Mercurial > pidgin.yaz
comparison pidgin/gtkprefs.c @ 21646:2a2496044eef
Patch from fmoo. This makes a lot of the windows closeable with Escape. There
may be other windows that need this.
The buttons at the bottom don't quite line up properly. That needs to be fixed.
Closes #2137.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 26 Nov 2007 08:47:08 +0000 |
parents | 665e04562de0 |
children | eb2d5ba2a50d |
comparison
equal
deleted
inserted
replaced
21645:d0ea3a86add5 | 21646:2a2496044eef |
---|---|
2163 /* (that should have been "effect," right?) */ | 2163 /* (that should have been "effect," right?) */ |
2164 | 2164 |
2165 /* Back to instant-apply! I win! BU-HAHAHA! */ | 2165 /* Back to instant-apply! I win! BU-HAHAHA! */ |
2166 | 2166 |
2167 /* Create the window */ | 2167 /* Create the window */ |
2168 prefs = pidgin_create_window(_("Preferences"), PIDGIN_HIG_BORDER, "preferences", FALSE); | 2168 prefs = pidgin_create_dialog(_("Preferences"), PIDGIN_HIG_BORDER, "preferences", FALSE); |
2169 g_signal_connect(G_OBJECT(prefs), "destroy", | 2169 g_signal_connect(G_OBJECT(prefs), "destroy", |
2170 G_CALLBACK(delete_prefs), NULL); | 2170 G_CALLBACK(delete_prefs), NULL); |
2171 | 2171 |
2172 vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER); | 2172 vbox = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(prefs), FALSE, PIDGIN_HIG_BORDER); |
2173 gtk_container_add(GTK_CONTAINER(prefs), vbox); | |
2174 gtk_widget_show(vbox); | |
2175 | 2173 |
2176 /* The notebook */ | 2174 /* The notebook */ |
2177 prefsnotebook = notebook = gtk_notebook_new (); | 2175 prefsnotebook = notebook = gtk_notebook_new (); |
2178 gtk_box_pack_start (GTK_BOX (vbox), notebook, FALSE, FALSE, 0); | 2176 gtk_box_pack_start (GTK_BOX (vbox), notebook, FALSE, FALSE, 0); |
2179 gtk_widget_show(prefsnotebook); | 2177 gtk_widget_show(prefsnotebook); |
2180 | 2178 |
2181 /* The buttons to press! */ | 2179 /* The buttons to press! */ |
2182 bbox = gtk_hbutton_box_new(); | 2180 bbox = pidgin_dialog_get_action_area(GTK_DIALOG(prefs)); |
2183 gtk_box_set_spacing(GTK_BOX(bbox), PIDGIN_HIG_BOX_SPACE); | 2181 gtk_box_set_spacing(GTK_BOX(bbox), PIDGIN_HIG_BOX_SPACE); |
2184 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | 2182 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); |
2185 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); | |
2186 gtk_widget_show (bbox); | |
2187 | 2183 |
2188 button = gtk_button_new_from_stock (GTK_STOCK_CLOSE); | 2184 button = gtk_button_new_from_stock (GTK_STOCK_CLOSE); |
2189 g_signal_connect_swapped(G_OBJECT(button), "clicked", | 2185 g_signal_connect_swapped(G_OBJECT(button), "clicked", |
2190 G_CALLBACK(gtk_widget_destroy), prefs); | 2186 G_CALLBACK(gtk_widget_destroy), prefs); |
2191 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 2187 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); |