Make the Preferences more compact

This commit is contained in:
Christian Dywan 2008-09-11 01:49:01 +02:00
parent 2c1cdb0573
commit 04ad087d98

View file

@ -234,17 +234,19 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
preferences->notebook = gtk_notebook_new (); preferences->notebook = gtk_notebook_new ();
gtk_container_set_border_width (GTK_CONTAINER (preferences->notebook), 6); gtk_container_set_border_width (GTK_CONTAINER (preferences->notebook), 6);
sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); sizegroup = NULL;
#define PAGE_NEW(__label) page = gtk_vbox_new (FALSE, 0); \ #define PAGE_NEW(__label) page = gtk_vbox_new (FALSE, 0); \
gtk_container_set_border_width (GTK_CONTAINER (page), 5); \ if (sizegroup) g_object_unref (sizegroup); \
sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); \
gtk_container_set_border_width (GTK_CONTAINER (page), 4); \
gtk_notebook_append_page (GTK_NOTEBOOK (preferences->notebook), page, \ gtk_notebook_append_page (GTK_NOTEBOOK (preferences->notebook), page, \
gtk_label_new (__label)) gtk_label_new (__label))
#define FRAME_NEW(__label) frame = sokoke_hig_frame_new (__label); \ #define FRAME_NEW(__label) frame = sokoke_hig_frame_new (__label); \
gtk_container_set_border_width (GTK_CONTAINER (frame), 5); \ gtk_container_set_border_width (GTK_CONTAINER (frame), 4); \
gtk_box_pack_start (GTK_BOX (page), frame, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (page), frame, FALSE, FALSE, 0);
#define TABLE_NEW(__rows, __cols) table = gtk_table_new ( \ #define TABLE_NEW(__rows, __cols) table = gtk_table_new ( \
__rows, __cols, FALSE); \ __rows, __cols, FALSE); \
gtk_container_set_border_width (GTK_CONTAINER (table), 5); \ gtk_container_set_border_width (GTK_CONTAINER (table), 4); \
gtk_container_add (GTK_CONTAINER (frame), table); gtk_container_add (GTK_CONTAINER (frame), table);
#define WIDGET_ADD(__widget, __left, __right, __top, __bottom) \ #define WIDGET_ADD(__widget, __left, __right, __top, __bottom) \
gtk_table_attach (GTK_TABLE (table), __widget \ gtk_table_attach (GTK_TABLE (table), __widget \
@ -393,13 +395,13 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
button = katze_property_proxy (settings, "middle-click-opens-selection", NULL); button = katze_property_proxy (settings, "middle-click-opens-selection", NULL);
INDENTED_ADD (button, 0, 1, 1, 2); INDENTED_ADD (button, 0, 1, 1, 2);
button = katze_property_proxy (settings, "open-tabs-in-the-background", NULL); button = katze_property_proxy (settings, "open-tabs-in-the-background", NULL);
SPANNED_ADD (button, 1, 2, 1, 2); WIDGET_ADD (button, 1, 2, 1, 2);
/* button = katze_property_proxy (settings, "open-popups-in-tabs", NULL); /* button = katze_property_proxy (settings, "open-popups-in-tabs", NULL);
SPANNED_ADD (button, 0, 1, 2, 3);*/ SPANNED_ADD (button, 0, 1, 2, 3);*/
button = katze_property_proxy (settings, "open-tabs-next-to-current", NULL); button = katze_property_proxy (settings, "open-tabs-next-to-current", NULL);
SPANNED_ADD (button, 0, 1, 2, 3); WIDGET_ADD (button, 0, 1, 2, 3);
button = katze_property_proxy (settings, "close-buttons-on-tabs", NULL); button = katze_property_proxy (settings, "close-buttons-on-tabs", NULL);
SPANNED_ADD (button, 1, 2, 2, 3); WIDGET_ADD (button, 1, 2, 2, 3);
/* Page "Network" */ /* Page "Network" */
PAGE_NEW (_("Network")); PAGE_NEW (_("Network"));
@ -451,6 +453,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
button = katze_property_proxy (settings, "remember-last-downloaded-files", NULL); button = katze_property_proxy (settings, "remember-last-downloaded-files", NULL);
SPANNED_ADD (button, 0, 2, 2, 3); */ SPANNED_ADD (button, 0, 2, 2, 3); */
g_object_unref (sizegroup);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (preferences)->vbox), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (preferences)->vbox),
preferences->notebook, FALSE, FALSE, 4); preferences->notebook, FALSE, FALSE, 4);
gtk_widget_show_all (GTK_DIALOG (preferences)->vbox); gtk_widget_show_all (GTK_DIALOG (preferences)->vbox);