[Xfce4-commits] <midori:master> Remove frame titles in preference dialogue
Christian Dywan
noreply at xfce.org
Mon May 2 01:30:01 CEST 2011
Updating branch refs/heads/master
to 6711bf33f06b2c06bb5956466d23b387e76d5638 (commit)
from 812ba0aee055bb77e5d21279e7a9af1cf44bab3a (commit)
commit 6711bf33f06b2c06bb5956466d23b387e76d5638
Author: Christian Dywan <christian at twotoasts.de>
Date: Mon May 2 00:02:54 2011 +0200
Remove frame titles in preference dialogue
Effectively all pages contain options of only one group.
katze/katze-preferences.c | 8 +++++---
midori/main.c | 2 +-
midori/midori-preferences.c | 29 ++++++++++++++---------------
3 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/katze/katze-preferences.c b/katze/katze-preferences.c
index e45d9f6..3f7b808 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 5d6035d..9c84c31 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 c63a679..71a3e15 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);
More information about the Xfce4-commits
mailing list