diff options
author | Javier Jardón <jjardon@gnome.org> | 2010-06-03 09:36:39 +0200 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2010-07-13 19:40:47 +0200 |
commit | 7f2cc85db96afb9806fc62ce6e32c47e49a9f4d3 (patch) | |
tree | 9b4e9a147f29c3ac181d1901579c9dd16a386acc /tests/teststatusicon.c | |
parent | 80df961edb1557bae3a545e6b18871d7c4c6f566 (diff) | |
download | gtk+-7f2cc85db96afb9806fc62ce6e32c47e49a9f4d3.tar.gz |
Use accessor functions to access GtkDialog
Diffstat (limited to 'tests/teststatusicon.c')
-rwxr-xr-x | tests/teststatusicon.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/teststatusicon.c b/tests/teststatusicon.c index 4829bf0d0a..942a4a54c9 100755 --- a/tests/teststatusicon.c +++ b/tests/teststatusicon.c @@ -143,6 +143,7 @@ timeout_toggle_toggled (GtkToggleButton *toggle) static void icon_activated (GtkStatusIcon *icon) { + GtkWidget *content_area; GtkWidget *dialog; GtkWidget *toggle; @@ -165,8 +166,10 @@ icon_activated (GtkStatusIcon *icon) g_signal_connect (dialog, "delete_event", G_CALLBACK (gtk_widget_hide_on_delete), NULL); + content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); + toggle = gtk_toggle_button_new_with_mnemonic ("_Show the icon"); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->vbox), toggle, TRUE, TRUE, 6); + gtk_box_pack_end (GTK_BOX (content_area), toggle, TRUE, TRUE, 6); gtk_widget_show (toggle); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), @@ -175,7 +178,7 @@ icon_activated (GtkStatusIcon *icon) G_CALLBACK (visible_toggle_toggled), NULL); toggle = gtk_toggle_button_new_with_mnemonic ("_Blink the icon"); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->vbox), toggle, TRUE, TRUE, 6); + gtk_box_pack_end (GTK_BOX (content_area), toggle, TRUE, TRUE, 6); gtk_widget_show (toggle); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), @@ -184,7 +187,7 @@ icon_activated (GtkStatusIcon *icon) G_CALLBACK (blink_toggle_toggled), NULL); toggle = gtk_toggle_button_new_with_mnemonic ("_Change images"); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->vbox), toggle, TRUE, TRUE, 6); + gtk_box_pack_end (GTK_BOX (content_area), toggle, TRUE, TRUE, 6); gtk_widget_show (toggle); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), |