[Xfce4-commits] <ristretto:master> Remove merge toolbars property

Stephan Arts noreply at xfce.org
Mon Apr 16 18:54:08 CEST 2012


Updating branch refs/heads/master
         to 029c04adfbb26e3326afcfa38e578ffba1df0ed3 (commit)
       from 60884a63b294a53b0e8f78950dea76f5e5f30692 (commit)

commit 029c04adfbb26e3326afcfa38e578ffba1df0ed3
Author: Stephan Arts <stephan at xfce.org>
Date:   Mon Apr 16 18:04:07 2012 +0200

    Remove merge toolbars property

 src/main_window.c |   58 ++++++++++++++--------------------------------------
 src/settings.c    |   26 -----------------------
 2 files changed, 16 insertions(+), 68 deletions(-)

diff --git a/src/main_window.c b/src/main_window.c
index 8d221f4..028677e 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -1975,10 +1975,7 @@ cb_rstto_main_window_state_event(GtkWidget *widget, GdkEventWindowState *event,
                 gtk_widget_hide (window->priv->t_bar_s_window);
             }
 
-            if (rstto_settings_get_boolean_property (
-                    window->priv->settings_manager,
-                    "merge-toolbars") ||
-                rstto_image_list_get_n_images (window->priv->image_list) == 0)
+            if (rstto_image_list_get_n_images (window->priv->image_list) == 0)
             {
                 gtk_ui_manager_add_ui (
                         window->priv->ui_manager,
@@ -2009,46 +2006,23 @@ cb_rstto_main_window_state_event(GtkWidget *widget, GdkEventWindowState *event,
         }
         else
         {
-            if (rstto_settings_get_boolean_property (
-                    window->priv->settings_manager,
-                    "merge-toolbars"))
-            {
-                gtk_ui_manager_add_ui (
-                        window->priv->ui_manager,
-                        window->priv->toolbar_fullscreen_merge_id,
-                        "/main-toolbar/placeholder-fullscreen",
-                        "fullscreen",
-                        "fullscreen",
-                        GTK_UI_MANAGER_TOOLITEM,
-                        FALSE);
-                gtk_ui_manager_remove_ui (
-                        window->priv->ui_manager,
-                        window->priv->toolbar_unfullscreen_merge_id);
-
-                if (rstto_settings_get_boolean_property (RSTTO_SETTINGS (window->priv->settings_manager), "show-toolbar"))
-                    gtk_widget_show (window->priv->toolbar);
-                else
-                    gtk_widget_hide(window->priv->toolbar);
-            }
+            gtk_ui_manager_add_ui (
+                    window->priv->ui_manager,
+                    window->priv->toolbar_fullscreen_merge_id,
+                    "/main-toolbar/placeholder-fullscreen",
+                    "fullscreen",
+                    "fullscreen",
+                    GTK_UI_MANAGER_TOOLITEM,
+                    FALSE);
+            gtk_ui_manager_remove_ui (
+                    window->priv->ui_manager,
+                    window->priv->toolbar_unfullscreen_merge_id);
+
+            if (rstto_settings_get_boolean_property (RSTTO_SETTINGS (window->priv->settings_manager), "show-toolbar"))
+                gtk_widget_show (window->priv->toolbar);
             else
-            {
-                gtk_ui_manager_add_ui (
-                        window->priv->ui_manager,
-                        window->priv->toolbar_fullscreen_merge_id,
-                        "/main-toolbar/placeholder-fullscreen",
-                        "fullscreen",
-                        "fullscreen",
-                        GTK_UI_MANAGER_TOOLITEM,
-                        FALSE);
-                gtk_ui_manager_remove_ui (
-                        window->priv->ui_manager,
-                        window->priv->toolbar_unfullscreen_merge_id);
+                gtk_widget_hide(window->priv->toolbar);
 
-                if (rstto_settings_get_boolean_property (RSTTO_SETTINGS (window->priv->settings_manager), "show-toolbar"))
-                    gtk_widget_show (window->priv->toolbar);
-                else
-                    gtk_widget_hide(window->priv->toolbar);
-            }
             if (window->priv->show_fs_toolbar_timeout_id > 0)
             {
                 g_source_remove (window->priv->show_fs_toolbar_timeout_id);
diff --git a/src/settings.c b/src/settings.c
index 9beea1f..32cd274 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -72,7 +72,6 @@ enum
     PROP_REVERT_ZOOM_DIRECTION,
     PROP_USE_THUNAR_PROPERTIES,
     PROP_MAXIMIZE_ON_STARTUP,
-    PROP_MERGE_TOOLBARS,
     PROP_ERROR_MISSING_THUMBNAILER,
     PROP_SORT_TYPE,
     PROP_THUMBNAIL_SIZE,
@@ -125,7 +124,6 @@ struct _RsttoSettingsPriv
     gchar    *desktop_type;
     gboolean  use_thunar_properties;
     gboolean  maximize_on_startup;
-    gboolean  merge_toolbars;
     RsttoThumbnailSize thumbnail_size;
 
     RsttoSortType sort_type;
@@ -309,13 +307,6 @@ rstto_settings_init (GObject *object)
 
     xfconf_g_property_bind (
             settings->priv->channel,
-            "/window/merge-toolbars",
-            G_TYPE_BOOLEAN,
-            settings,
-            "merge-toolbars");
-
-    xfconf_g_property_bind (
-            settings->priv->channel,
             "/errors/missing-thumbnailer",
             G_TYPE_BOOLEAN,
             settings,
@@ -540,17 +531,6 @@ rstto_settings_class_init (GObjectClass *object_class)
             pspec);
 
     pspec = g_param_spec_boolean (
-            "merge-toolbars",
-            "",
-            "",
-            TRUE,
-            G_PARAM_READWRITE);
-    g_object_class_install_property (
-            object_class,
-            PROP_MERGE_TOOLBARS,
-            pspec);
-
-    pspec = g_param_spec_boolean (
             "show-error-missing-thumbnailer",
             "",
             "",
@@ -739,9 +719,6 @@ rstto_settings_set_property    (GObject      *object,
         case PROP_MAXIMIZE_ON_STARTUP:
             settings->priv->maximize_on_startup = g_value_get_boolean (value);
             break;
-        case PROP_MERGE_TOOLBARS:
-            settings->priv->merge_toolbars = g_value_get_boolean (value);
-            break;
         case PROP_ERROR_MISSING_THUMBNAILER:
             settings->priv->errors.missing_thumbnailer = g_value_get_boolean (value);
             break;
@@ -818,9 +795,6 @@ rstto_settings_get_property    (GObject    *object,
         case PROP_MAXIMIZE_ON_STARTUP:
             g_value_set_boolean (value, settings->priv->maximize_on_startup);
             break;
-        case PROP_MERGE_TOOLBARS:
-            g_value_set_boolean (value, settings->priv->merge_toolbars);
-            break;
         case PROP_ERROR_MISSING_THUMBNAILER:
             g_value_set_boolean (
                     value,


More information about the Xfce4-commits mailing list