! 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 !
Pathbar buttons are not resized on folder rename
Status:
RESOLVED: FIXED
Priority:
Very Low

Comments

Description alexxcons editbugs 2019-01-05 19:27:22 CET
Resizing works fine if the new folder name is longer than before.

But shortening the name of a folder does not trigger a shrink of the related pathbar button.

The method of interest is:

"thunar_location_button_file_changed"
which is triggered by thunar_file_watch (see thunar_location_button_set_file) 

I quess the thunar-location-button is expanded by gtk, according to its new label-size.
But for a shrinked label, some method has to be called on the widget to shrink.

Possibly the location-bar needs to be signaled to re-draw / re-calc. Currently we only have the signals CLICKED and GONE to do so .. I guess a third signal would be required.
Comment 1 Theo Linkspfeifer editbugs 2019-04-20 18:54:32 CEST
Adding a gtk_widget_set_size_request() call in "thunar_location_button_file_changed" does trigger the missing size reduction, but I am not sure if that is a proper fix.

gtk_widget_set_size_request (GTK_WIDGET (location_button->label), -1, -1);
Comment 2 alexxcons editbugs 2019-04-20 21:50:38 CEST
Looks good to me, IMO can be considered as a proper fix!
How could I forget about gtk_widget_set_size_request .. I used it myself some while ago :P

I'll put it into the last line of the method. Ok if I put your name and mail address from bugzilla as author into the commit ? ( Ofc a patch, would be preferred :D )
Comment 3 alexxcons editbugs 2019-04-23 10:57:53 CEST
Meh, I failed to properly ref the bug in the commit message ... our commit hook needs the keyword "Bug".  Here the commits:
https://git.xfce.org/xfce/thunar/commit/?id=a7ece295374d54e98e35b6a546f707d1c8e154b9
https://git.xfce.org/xfce/thunar/commit/?h=xfce-4.14&id=1453d6b996ff771c96545178bfa9a4bb93c35267

Bug #15024

Reported by:
alexxcons
Reported on: 2019-01-05
Last modified on: 2019-04-23

People

Assignee:
Xfce Bug Triage
CC List:
4 users

Version

Attachments

Additional information