After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771161 - Other Locations: Label misaligned on mount operation
Other Locations: Label misaligned on mount operation
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Views: All
3.21.x
Other Linux
: Normal normal
: 3.22
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on: 772348
Blocks:
 
 
Reported: 2016-09-10 07:44 UTC by Mohammed Sadiq
Modified: 2016-10-11 17:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
misaligned label (image) (7.47 KB, image/png)
2016-09-10 07:44 UTC, Mohammed Sadiq
  Details
nautilusgtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible (6.55 KB, patch)
2016-10-02 20:24 UTC, Daniel Boles
none Details | Review
nautilusgtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible (6.68 KB, patch)
2016-10-02 21:03 UTC, Daniel Boles
none Details | Review
screencast with patch applied, showing busy/eject/neither working as expected (768.62 KB, video/webm)
2016-10-02 21:10 UTC, Daniel Boles
  Details
nautilusgtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible (6.84 KB, patch)
2016-10-02 22:03 UTC, Daniel Boles
none Details | Review
nautilusgtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible (6.85 KB, patch)
2016-10-02 22:14 UTC, Daniel Boles
reviewed Details | Review
gtkplacesview: update to latest code (6.18 KB, patch)
2016-10-11 17:02 UTC, Carlos Soriano
committed Details | Review

Description Mohammed Sadiq 2016-09-10 07:44:28 UTC
Created attachment 335230 [details]
misaligned label (image)

When a mount operation is active, ie, when the spinner is shown, the Label '/dev/something' is misaligned with the rest of the items.

See the attachment for details
Comment 1 Ernestas Kulik 2016-10-02 19:32:20 UTC
*** Bug 772345 has been marked as a duplicate of this bug. ***
Comment 2 Ernestas Kulik 2016-10-02 19:35:56 UTC
*** Bug 772345 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Boles 2016-10-02 20:24:44 UTC
Created attachment 336769 [details] [review]
nautilusgtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible

based on my speculation here: https://bugzilla.gnome.org/show_bug.cgi?id=772345

hey, it works!
Comment 4 Daniel Boles 2016-10-02 20:27:15 UTC
btw, I'm sure that often in the past, if you cancelled out of the mount authentication dialog, then the busy_spinner would remain visible evermore... yet I can't get that to happen with my patch. either I was doing something different/wrong before, or maybe I just inadvertently solved something else too. :D
Comment 5 Daniel Boles 2016-10-02 21:03:18 UTC
Created attachment 336771 [details] [review]
nautilusgtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible

This version adds ui code to make the spinner h/valign to centre, rather than the default fill, as the latter made it a bit too big. I also adjusted the halign on the eject_button to match, so the 2 widgets on different rows get aligned with each other horizontally.
Comment 6 Daniel Boles 2016-10-02 21:10:31 UTC
Created attachment 336772 [details]
screencast with patch applied, showing busy/eject/neither working as expected

Here's a video of the patch, showing how busy_spinner now doesn't offset the other widgets + how it and eject_button still show when they should/don't when they shouldn't.
Comment 7 Daniel Boles 2016-10-02 21:59:34 UTC
I just realised this would need to be patched in GTK+ too, so if this Nautilus one gets the go-ahead, I could prepare an equivalent patch for GTK+.
Comment 8 Daniel Boles 2016-10-02 22:03:46 UTC
Created attachment 336782 [details] [review]
nautilusgtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible

forgot to #include "gtkstack.h"...
Comment 9 Daniel Boles 2016-10-02 22:14:04 UTC
Created attachment 336784 [details] [review]
nautilusgtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible

fix one indent that accidentally got a tab instead of spaces
Comment 10 Ernestas Kulik 2016-10-03 03:24:32 UTC
(In reply to djb from comment #7)
> I just realised this would need to be patched in GTK+ too, so if this
> Nautilus one gets the go-ahead, I could prepare an equivalent patch for GTK+.

This actually only needs to be fixed in GTK+. A script is used to fetch the code and patch it up for use in Nautilus.

This bug should have been reassigned to GTK+. Sorry you had to go through the trouble.
Comment 11 Carlos Soriano 2016-10-04 20:44:22 UTC
Review of attachment 336784 [details] [review]:

As Ernestas said, this code has to be on gtk+, this is just a copy pasted code from gtkotherplacesview.c in gtk+ repository.

But the idea behind it makes sense to me, so it shouldn't be so different from that, and most probably it's going to be easy to port this code there.
Comment 12 Carlos Soriano 2016-10-04 20:44:37 UTC
and thanks for the patch!
Comment 13 Daniel Boles 2016-10-04 20:55:07 UTC
(In reply to Carlos Soriano from comment #12)
> and thanks for the patch!

Happy to help!

Just noticed I need to fix up the <packing> position, so I'll do that and any other further updates on the GTK+ ticket.
Comment 14 Daniel Boles 2016-10-04 21:00:01 UTC
Comment on attachment 336784 [details] [review]
nautilusgtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible

Marking this patch as obsolete because (A) the GTK+ ticket is the place for all this and (B) I just squashed an update to fix the <packing> position there: https://bugzilla.gnome.org/show_bug.cgi?id=772348
Comment 15 Daniel Boles 2016-10-10 22:10:45 UTC
My patch just landed in GTK+, woo! Looking forward to it reaching Nautilus. :)
Comment 16 Carlos Soriano 2016-10-11 17:02:32 UTC
Created attachment 337450 [details] [review]
gtkplacesview: update to latest code
Comment 17 Carlos Soriano 2016-10-11 17:03:27 UTC
Pushed to nautilus, thanks!

Attachment 337450 [details] pushed as 397f0ff - gtkplacesview: update to latest code