[Xfce4-commits] [xfce/thunar] 01/01: Xfconf setting whether to change the window icon (bug #16501)
noreply at xfce.org
noreply at xfce.org
Sun Mar 8 00:13:25 CET 2020
This is an automated email from the git hooks/post-receive script.
a l e x p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/thunar.
commit 7ea02968b73bd39e4d4c59071d4ace1d8aa6b1de
Author: Yousuf Philips <philipz85 at hotmail.com>
Date: Fri Mar 6 23:05:31 2020 +0400
Xfconf setting whether to change the window icon (bug #16501)
By default the window icon wont change and if this default behaviour is
not wanted then it can be changed with thunar's misc-change-window-icon
xfconf setting
---
thunar/thunar-preferences.c | 13 +++++++++++++
thunar/thunar-window.c | 6 +++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/thunar/thunar-preferences.c b/thunar/thunar-preferences.c
index ba1efd4..78c9969 100644
--- a/thunar/thunar-preferences.c
+++ b/thunar/thunar-preferences.c
@@ -97,6 +97,7 @@ enum
PROP_MISC_THUMBNAIL_DRAW_FRAMES,
PROP_MISC_FILE_SIZE_BINARY,
PROP_MISC_CONFIRM_CLOSE_MULTIPLE_TABS,
+ PROP_MISC_WINDOW_ICON,
PROP_SHORTCUTS_ICON_EMBLEMS,
PROP_SHORTCUTS_ICON_SIZE,
PROP_TREE_ICON_EMBLEMS,
@@ -764,6 +765,18 @@ thunar_preferences_class_init (ThunarPreferencesClass *klass)
EXO_PARAM_READWRITE);
/**
+ * ThunarPreferences:misc-change-window-icon:
+ *
+ * Whether to change the window icon to the folder's icon.
+ **/
+ preferences_props[PROP_MISC_WINDOW_ICON] =
+ g_param_spec_boolean ("misc-change-window-icon",
+ "MiscChangeWindowIcon",
+ NULL,
+ FALSE,
+ EXO_PARAM_READWRITE);
+
+ /**
* ThunarPreferences:misc-confirm-close-multiple-tabs:
*
* Ask the user for confirmation before closing a window with
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 11e2be9..945d864 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -3426,6 +3426,7 @@ thunar_window_current_directory_changed (ThunarFile *current_directory,
const gchar *icon_name;
gchar *title;
gboolean show_full_path;
+ gboolean change_window_icon;
gchar *parse_name = NULL;
const gchar *name;
@@ -3458,7 +3459,10 @@ G_GNUC_END_IGNORE_DEPRECATIONS
icon_name = thunar_file_get_icon_name (current_directory,
THUNAR_FILE_ICON_STATE_DEFAULT,
icon_theme);
- gtk_window_set_icon_name (GTK_WINDOW (window), icon_name);
+
+ g_object_get (G_OBJECT (window->preferences), "misc-change-window-icon", &change_window_icon, NULL);
+ if (G_UNLIKELY (change_window_icon))
+ gtk_window_set_icon_name (GTK_WINDOW (window), icon_name);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list