! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Thunar icon shouldnt change in window buttons
Status:
RESOLVED: FIXED

Comments

Description Yousuf 'Jay' Philips 2020-03-04 10:52:55 CET
Visually we use the icon in the panel's window buttons to easily find the application, even more importantly when the buttons dont have labels, and with thunar constantly changing the icon when it is on a folder which has a custom folder icon, this makes things very difficult to do.

This has annoyed me for some time and i just read a review saying the same thing, so that was the perfect time to remember to file it. :D

"One detail that I didn't like - the Thunar window button (when shown without text) changes to match the content, like Documents, Downloads, Pictures, etc, and I found this somewhat confusing, especially on the default-size panel." - https://www.dedoimedo.com/computers/xubuntu-ermine.html
Comment 1 Yousuf 'Jay' Philips 2020-03-05 22:52:48 CET
So i checked other file managers these dont change their window icon and they are

Nautilus
Dolphin
PCManFM
Windows Explorer - Windows XP
Windows Explorer - Windows 8

and these file managers do change their window icon

Caja
Nemo
Windows Explorer - Windows 7
Windows Explorer - Windows 10

Theo provided the below as a pointer for the change and said that it would be another candidate for a hidden xfconf setting.
https://git.xfce.org/xfce/thunar/tree/thunar/thunar-window.c#n3456

If it is decided that this behaviour should be switchable by a xfconf setting, I would suggest that the default behaviour should be that it doesn't change.

Imagine if every app changed its window icon based on context. If firefox used a website's icon as the window icon depending on which tab you are in. If mousepad, libreoffice, vlc, etc. used the file's filetype icon as the window icon.
Comment 2 alexxcons editbugs 2020-03-06 10:07:18 CET
Thanks for reporting it !

Yes, it would be nice to have a xfconf setting for it.

And yes, I agree that the default should be to only show the generic folder icon. (Or possibly Thor's Hammer ?  I would prefer a generic folder icon)

As always, patches would be very welcome !
(Hope I will have time to work on my xfce email backlog this weekend)
Comment 3 Yousuf 'Jay' Philips 2020-03-06 20:08:30 CET
Created attachment 9540 
patch

Compiled it and it worked.
Comment 4 Yousuf 'Jay' Philips 2020-03-06 23:01:00 CET
Created attachment 9541 
patch with fixed comment
Comment 5 alexxcons editbugs 2020-03-07 01:15:18 CET
Thanks !  Works like a charm.

Though I dont understand why you modified "thunar-list-model.c". You can revert the changes there, and it still works fine. Possibly added to the patch by accident ?

If somebody wants to test: 
xfconf-query --channel thunar --property /misc-change-window-icon --create --type bool --set false
xfconf-query --channel thunar --property /misc-change-window-icon --create --type bool --set true

After pushing, we have to keep in mind to add the new setting to https://docs.xfce.org/xfce/thunar/hidden-settings
Comment 6 Yousuf 'Jay' Philips 2020-03-07 10:51:08 CET
Created attachment 9543 
final patch
Comment 7 Theo Linkspfeifer editbugs 2020-03-07 22:17:10 CET
Note that 3 spaces were used for indentation here:

+  if (G_UNLIKELY (change_window_icon))
+     gtk_window_set_icon_name (GTK_WINDOW (window), icon_name);
Comment 8 Git Bot editbugs 2020-03-08 00:13:30 CET
Yousuf Philips referenced this bugreport in commit 7ea02968b73bd39e4d4c59071d4ace1d8aa6b1de

Xfconf setting whether to change the window icon (bug #16501)

https://git.xfce.org/xfce/thunar/commit?id=7ea02968b73bd39e4d4c59071d4ace1d8aa6b1de
Comment 9 alexxcons editbugs 2020-03-08 00:15:00 CET
(In reply to Theo Linkspfeifer from comment #7)
> Note that 3 spaces were used for indentation

Fixed and pushed to master

Thanks alot for your contribution, Jay !
Comment 10 Yousuf 'Jay' Philips 2020-03-08 11:32:19 CET
Glad to help.

Thanks Theo for the code pointer.
Comment 11 Git Bot editbugs 2020-03-15 23:35:10 CET
Andre Miranda referenced this bugreport in commit e3b560e1866ae74b9a8e9de6146424c59f0b937b

Make change window icon opt-out (Bug #16501)

https://git.xfce.org/xfce/thunar/commit?id=e3b560e1866ae74b9a8e9de6146424c59f0b937b
Comment 12 Git Bot editbugs 2020-03-19 18:34:22 CET
Alexander Schwinn referenced this bugreport in commit 498ade50786698c342d083449fc77a9f0d76b3be

move setting to to use current folder icon as window icon to the 'display' tab (Bug #16501)

https://git.xfce.org/xfce/thunar/commit?id=498ade50786698c342d083449fc77a9f0d76b3be
Comment 13 alexxcons editbugs 2020-03-19 22:24:27 CET
*** Bug 15393 has been marked as a duplicate of this bug. ***

Bug #16501

Reported by:
Yousuf 'Jay' Philips
Reported on: 2020-03-04
Last modified on: 2020-03-19
Duplicates (1):
  • 15393 Make File Manager thumbnail image in window button static/constant

People

Assignee:
Xfce Bug Triage
CC List:
2 users

Version

Version:
1.8.11

Attachments

patch (3.50 KB, patch)
2020-03-06 20:08 CET , Yousuf 'Jay' Philips
no flags
patch with fixed comment (3.51 KB, patch)
2020-03-06 23:01 CET , Yousuf 'Jay' Philips
no flags
final patch (2.51 KB, patch)
2020-03-07 10:51 CET , Yousuf 'Jay' Philips
no flags

Additional information