[Xfce4-commits] <thunar:master> Option to set small toolbar icons (bug #3971).
Nick Schermer
noreply at xfce.org
Mon Oct 29 21:54:03 CET 2012
Updating branch refs/heads/master
to c3baf825e14bc8d4b578eca505ce00d3a2530bdf (commit)
from e0182d851af5e76611c483b3a59376848d78810e (commit)
commit c3baf825e14bc8d4b578eca505ce00d3a2530bdf
Author: Nick Schermer <nick at xfce.org>
Date: Mon Oct 29 21:52:07 2012 +0100
Option to set small toolbar icons (bug #3971).
thunar/thunar-preferences.c | 14 ++++++++++++++
thunar/thunar-window.c | 5 ++++-
2 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/thunar/thunar-preferences.c b/thunar/thunar-preferences.c
index b2ab0bb..0c0535a 100644
--- a/thunar/thunar-preferences.c
+++ b/thunar/thunar-preferences.c
@@ -85,6 +85,7 @@ enum
PROP_MISC_SHOW_THUMBNAILS,
PROP_MISC_SINGLE_CLICK,
PROP_MISC_SINGLE_CLICK_TIMEOUT,
+ PROP_MISC_SMALL_TOOLBAR_ICONS,
PROP_MISC_TAB_CLOSE_MIDDLE_CLICK,
PROP_MISC_TEXT_BESIDE_ICONS,
PROP_SHORTCUTS_ICON_EMBLEMS,
@@ -648,6 +649,19 @@ thunar_preferences_class_init (ThunarPreferencesClass *klass)
EXO_PARAM_READWRITE));
/**
+ * ThunarPreferences:misc-small-toolbar-icons:
+ *
+ * Use small icons on the toolbar instead of the default toolbar size.
+ **/
+ g_object_class_install_property (gobject_class,
+ PROP_MISC_SMALL_TOOLBAR_ICONS,
+ g_param_spec_boolean ("misc-small-toolbar-icons",
+ NULL,
+ NULL,
+ FALSE,
+ EXO_PARAM_READWRITE));
+
+ /**
* ThunarPreferences:misc-tab-close-middle-click:
*
* Whether to close tabs when the tab label is clicked with the 2nd
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 1d7624f..8925f92 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -1810,6 +1810,7 @@ thunar_window_install_location_bar (ThunarWindow *window,
GType type)
{
GtkToolItem *item;
+ gboolean small_icons;
_thunar_return_if_fail (type == G_TYPE_NONE || g_type_is_a (type, THUNAR_TYPE_LOCATION_BAR));
_thunar_return_if_fail (THUNAR_IS_WINDOW (window));
@@ -1847,7 +1848,9 @@ thunar_window_install_location_bar (ThunarWindow *window,
{
/* setup the toolbar for the location bar */
window->location_toolbar = gtk_ui_manager_get_widget (window->ui_manager, "/location-toolbar");
- /*gtk_toolbar_set_icon_size (GTK_TOOLBAR (window->location_toolbar), GTK_ICON_SIZE_SMALL_TOOLBAR);*/
+ g_object_get (G_OBJECT (window->preferences), "misc-small-toolbar-icons", &small_icons, NULL);
+ if (small_icons)
+ gtk_toolbar_set_icon_size (GTK_TOOLBAR (window->location_toolbar), GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_table_attach (GTK_TABLE (window->table), window->location_toolbar, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (window->location_toolbar);
More information about the Xfce4-commits
mailing list