Updating branch refs/heads/master
to 32b56bc3b41074a468404679ea50e4db0f54f6b4 (commit)
from 1a7f8e3c7f7b1874192fb6161de7b9e30727bc26 (commit)
commit 32b56bc3b41074a468404679ea50e4db0f54f6b4
Author: Nick Schermer <[email protected]>
Date: Tue Oct 2 17:38:28 2012 +0200
Resuce saving on startup and fix zoom-out sensitive.
Reduce 1 save call on startup that is not required. Also
always update the action sensitivity, this failed for the
smallest zoom level (because THUNAR_ZOOM_LEVEL_SMALLEST == 0).
thunar/thunar-standard-view.c | 2 +-
thunar/thunar-window.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 5b4c0a3..c1b2975 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -660,7 +660,7 @@ thunar_standard_view_constructor (GType
type,
thunar_view_set_zoom_level (THUNAR_VIEW (standard_view), zoom_level);
/* save the "zoom-level" as "last-<view>-zoom-level" whenever the user
changes the zoom level */
- exo_binding_new (object, "zoom-level", G_OBJECT
(standard_view->preferences), THUNAR_STANDARD_VIEW_GET_CLASS
(standard_view)->zoom_level_property_name);
+ g_object_bind_property (object, "zoom-level", G_OBJECT
(standard_view->preferences), THUNAR_STANDARD_VIEW_GET_CLASS
(standard_view)->zoom_level_property_name, G_BINDING_DEFAULT);
/* determine the real view widget (treeview or iconview) */
view = GTK_BIN (object)->child;
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index faaa50a..e5b80b3 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -2884,13 +2884,13 @@ thunar_window_set_zoom_level (ThunarWindow *window,
/* remember the new zoom level */
window->zoom_level = zoom_level;
- /* update the "Zoom In" and "Zoom Out" actions */
- thunar_gtk_action_group_set_action_sensitive (window->action_group,
"zoom-in", (zoom_level < THUNAR_ZOOM_N_LEVELS - 1));
- thunar_gtk_action_group_set_action_sensitive (window->action_group,
"zoom-out", (zoom_level > 0));
-
/* notify listeners */
g_object_notify (G_OBJECT (window), "zoom-level");
}
+
+ /* update the "Zoom In" and "Zoom Out" actions */
+ thunar_gtk_action_group_set_action_sensitive (window->action_group,
"zoom-in", (zoom_level < THUNAR_ZOOM_N_LEVELS - 1));
+ thunar_gtk_action_group_set_action_sensitive (window->action_group,
"zoom-out", (zoom_level > 0));
}
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits