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.
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);
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 )
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