From: Christian Dywan Date: Sun, 1 May 2011 22:02:54 +0000 (+0200) Subject: Remove frame titles in preference dialogue X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6711bf33f06b2c06bb5956466d23b387e76d5638;p=midori Remove frame titles in preference dialogue Effectively all pages contain options of only one group. --- diff --git a/katze/katze-preferences.c b/katze/katze-preferences.c index e45d9f62..3f7b8080 100644 --- a/katze/katze-preferences.c +++ b/katze/katze-preferences.c @@ -335,11 +335,13 @@ katze_hig_frame_new (const gchar* title) /** * katze_preferences_add_group: * @preferences: a #KatzePreferences instance - * @label: a group label + * @label: a group label, or %NULL * * Adds a new group with the specified label to the dialog. * * Since: 0.2.1 + * + * Since 0.3.4 you can pass %NULL to hide the label. **/ void katze_preferences_add_group (KatzePreferences* preferences, @@ -349,11 +351,11 @@ katze_preferences_add_group (KatzePreferences* preferences, KatzePreferencesPrivate* priv; g_return_if_fail (KATZE_IS_PREFERENCES (preferences)); - g_return_if_fail (label != NULL); priv = preferences->priv; priv->sizegroup2 = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); - priv->frame = katze_hig_frame_new (label); + priv->frame = label ? katze_hig_frame_new (label) : + g_object_new (GTK_TYPE_FRAME, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_container_set_border_width (GTK_CONTAINER (priv->frame), 4); gtk_box_pack_start (GTK_BOX (priv->page), priv->frame, FALSE, FALSE, 0); priv->box = gtk_vbox_new (FALSE, 4); diff --git a/midori/main.c b/midori/main.c index 5d6035df..9c84c313 100644 --- a/midori/main.c +++ b/midori/main.c @@ -749,7 +749,7 @@ midori_browser_privacy_preferences_cb (MidoriBrowser* browser, gchar* markup; katze_preferences_add_category (preferences, _("Privacy"), GTK_STOCK_INDEX); - katze_preferences_add_group (preferences, _("Web Cookies")); + katze_preferences_add_group (preferences, NULL); button = katze_property_label (settings, "maximum-cookie-age"); katze_preferences_add_widget (preferences, button, "indented"); button = gtk_combo_box_new_text (); diff --git a/midori/midori-preferences.c b/midori/midori-preferences.c index c63a679b..71a3e15d 100644 --- a/midori/midori-preferences.c +++ b/midori/midori-preferences.c @@ -299,8 +299,8 @@ midori_preferences_set_settings (MidoriPreferences* preferences, #define SPANNED_ADD(__widget) \ katze_preferences_add_widget (_preferences, __widget, "spanned") /* Page "General" */ - PAGE_NEW (GTK_STOCK_HOME, _("General")); - FRAME_NEW (_("Startup")); + PAGE_NEW (GTK_STOCK_HOME, _("Startup")); + FRAME_NEW (NULL); label = katze_property_label (settings, "load-on-startup"); INDENTED_ADD (label); button = katze_property_proxy (settings, "load-on-startup", NULL); @@ -328,17 +328,10 @@ midori_preferences_set_settings (MidoriPreferences* preferences, SPANNED_ADD (button); #endif } - FRAME_NEW (_("Transfers")); - #if !HAVE_HILDON - label = katze_property_label (settings, "download-folder"); - INDENTED_ADD (label); - button = katze_property_proxy (settings, "download-folder", "folder"); - SPANNED_ADD (button); - #endif /* Page "Appearance" */ PAGE_NEW (GTK_STOCK_SELECT_FONT, _("Appearance")); - FRAME_NEW (_("Font settings")); + FRAME_NEW (NULL); #if !HAVE_HILDON label = gtk_label_new (_("Default Font Family")); INDENTED_ADD (label); @@ -369,7 +362,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences, /* Page "Behavior" */ PAGE_NEW (GTK_STOCK_SELECT_COLOR, _("Behavior")); - FRAME_NEW (_("Features")); + FRAME_NEW (NULL); #if !HAVE_HILDON button = katze_property_proxy (settings, "auto-load-images", NULL); INDENTED_ADD (button); @@ -408,19 +401,25 @@ midori_preferences_set_settings (MidoriPreferences* preferences, INDENTED_ADD (button); entry = katze_property_proxy (settings, "preferred-languages", "languages"); SPANNED_ADD (entry); + #if !HAVE_HILDON + label = katze_property_label (settings, "download-folder"); + INDENTED_ADD (label); + button = katze_property_proxy (settings, "download-folder", "folder"); + SPANNED_ADD (button); + #endif /* Page "Interface" */ PAGE_NEW (GTK_STOCK_CONVERT, _("Browsing")); #if !HAVE_HILDON if (!g_getenv ("DESKTOP_SESSION")) { - FRAME_NEW (_("Navigationbar")); + FRAME_NEW (NULL); INDENTED_ADD (katze_property_label (settings, "toolbar-style")); button = katze_property_proxy (settings, "toolbar-style", NULL); SPANNED_ADD (button); } #endif - FRAME_NEW (_("Interface")); + FRAME_NEW (NULL); label = katze_property_label (settings, "open-new-pages-in"); INDENTED_ADD (label); button = katze_property_proxy (settings, "open-new-pages-in", NULL); @@ -439,7 +438,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences, /* Page "Applications" */ #if !HAVE_HILDON PAGE_NEW (GTK_STOCK_CONVERT, _("Applications")); - FRAME_NEW (_("External applications")); + FRAME_NEW (NULL); label = katze_property_label (settings, "text-editor"); INDENTED_ADD (label); entry = katze_property_proxy (settings, "text-editor", "application-text/plain"); @@ -452,7 +451,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences, /* Page "Network" */ PAGE_NEW (GTK_STOCK_NETWORK, _("Network")); - FRAME_NEW (_("Network")); + FRAME_NEW (NULL); #if !HAVE_HILDON label = katze_property_label (settings, "proxy-type"); INDENTED_ADD (label);