[maemo-commits] [maemo-commits] r9658 - in projects/haf/branches/hildon-libs/hildon-1: . examples
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Feb 6 10:23:04 EET 2007
- Previous message: [maemo-commits] r9657 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r9659 - in projects/haf/branches/hildon-libs/hildon-1: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: mdk Date: 2007-02-06 10:23:03 +0200 (Tue, 06 Feb 2007) New Revision: 9658 Modified: projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2 projects/haf/branches/hildon-libs/hildon-1/examples/hildon-insensitive-example.c Log: Correcting the example for insensitive press to use HildonWindow. For strange reasons doesn't work with Dialogs. Modified: projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2 =================================================================== --- projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2 2007-02-05 20:38:11 UTC (rev 9657) +++ projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2 2007-02-06 08:23:03 UTC (rev 9658) @@ -1,3 +1,9 @@ +2007-02-06 Michael Dominic Kostrzewa <michael.kostrzewa at nokia.com> + + * examples/hildon-insensitive-example.c: Correcting the example for + insensitive press to use HildonWindow. For strange reasons doesn't + work with Dialogs. + 2007-02-05 Michael Dominic Kostrzewa <michael.kostrzewa at nokia.com> * examples/Makefile.am: Modified: projects/haf/branches/hildon-libs/hildon-1/examples/hildon-insensitive-example.c =================================================================== --- projects/haf/branches/hildon-libs/hildon-1/examples/hildon-insensitive-example.c 2007-02-05 20:38:11 UTC (rev 9657) +++ projects/haf/branches/hildon-libs/hildon-1/examples/hildon-insensitive-example.c 2007-02-06 08:23:03 UTC (rev 9658) @@ -34,18 +34,18 @@ { gtk_init (&argc, &args); - GtkDialog *dialog = GTK_DIALOG (gtk_dialog_new ()); + HildonWindow *window = HILDON_WINDOW (hildon_window_new ()); GtkWidget *button = gtk_button_new_with_label ("Click me"); hildon_helper_set_insensitive_message (button, "Do not poke me!"); gtk_widget_set_sensitive (button, FALSE); - - gtk_box_pack_start (GTK_BOX (dialog->vbox), button, TRUE, TRUE, 0); + + gtk_container_add (GTK_CONTAINER (window), button); - gtk_dialog_add_button (dialog, "Close", GTK_RESPONSE_CLOSE); + g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_main_quit), NULL); - gtk_widget_show_all (GTK_WIDGET (dialog)); - gtk_dialog_run (dialog); + gtk_widget_show_all (GTK_WIDGET (window)); + gtk_main (); return 0; }
- Previous message: [maemo-commits] r9657 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r9659 - in projects/haf/branches/hildon-libs/hildon-1: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]