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 746538 - online-accounts: Prevent the attention-needed icon from getting hidden
online-accounts: Prevent the attention-needed icon from getting hidden
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Online Accounts
3.15.x
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-20 16:31 UTC by Debarshi Ray
Modified: 2015-04-13 13:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of hidden attention-needed icons (54.35 KB, image/png)
2015-03-20 16:32 UTC, Debarshi Ray
  Details
online-accounts: Prevent the attention-needed icon from getting hidden (1.01 KB, patch)
2015-03-20 16:33 UTC, Debarshi Ray
none Details | Review
Screenshot of a wider list without hidden icons (54.52 KB, image/png)
2015-03-20 16:34 UTC, Debarshi Ray
  Details
online-accounts: Prevent the attention-needed icon from getting hidden (1.20 KB, patch)
2015-03-26 13:02 UTC, Debarshi Ray
none Details | Review
online-accounts: Prevent the attention-needed icon from getting hidden (1.65 KB, patch)
2015-04-10 14:41 UTC, Bastien Nocera
none Details | Review
online-accounts: Prevent the attention-needed icon from getting hidden (1.33 KB, patch)
2015-04-10 14:43 UTC, Bastien Nocera
committed Details | Review
online-accounts: Widen the accounts list (1.12 KB, patch)
2015-04-13 12:50 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2015-03-20 16:31:38 UTC
See the attached screenshot and patch.
Comment 1 Debarshi Ray 2015-03-20 16:32:52 UTC
Created attachment 299962 [details]
Screenshot of hidden attention-needed icons
Comment 2 Debarshi Ray 2015-03-20 16:33:55 UTC
Created attachment 299963 [details] [review]
online-accounts: Prevent the attention-needed icon from getting hidden

This increases the width to 278 from the automatically allocated 259.
Comment 3 Debarshi Ray 2015-03-20 16:34:31 UTC
Created attachment 299964 [details]
Screenshot of a wider list without hidden icons
Comment 4 Bastien Nocera 2015-03-23 12:43:50 UTC
Review of attachment 299963 [details] [review]:

That seems very hackish. We should rework the layout so that the list is never clipped to the left.
Comment 5 Debarshi Ray 2015-03-26 13:01:52 UTC
From #control-center on GIMPNet:

12:43 <hadess> rishi, pretty horrible hack
12:44 <hadess> rishi, setting the scrolled window it's in to not have a         
      horizontal scrollbar should allow it to now get clipped
12:44 <hadess> rishi, then make the account identifier ellipsise
12:49 <rishi> hadess: That is already the case since commit                     
      f86d8eb26cc922fabd6765f3ad2481b9f0218298
12:49 <rishi> Maybe we shouldn't be setting the width_request on the tree       
      view?
12:50 <hadess> that might be enough

Removing the GtkTreeView's width-request and setting its hexpand to TRUE will work for this bug, but it creates other problems. When there are no accounts, then the GtkTreeView shrinks. You can then see it become wider as new accounts are added or when the attention-needed icon shows up. So we can't really let it change its width with the current design.

So, maybe, it will be less horrible if we increase the width-request of the GtkTreeView itself instead of adding a new width-request to the parent GtkBox? Or we can play with the width-chars property of the GtkCellRendererText ...
Comment 6 Debarshi Ray 2015-03-26 13:02:45 UTC
Created attachment 300352 [details] [review]
online-accounts: Prevent the attention-needed icon from getting hidden
Comment 7 Bastien Nocera 2015-04-10 13:51:26 UTC
(In reply to Debarshi Ray from comment #6)
> Created attachment 300352 [details] [review] [review]
> online-accounts: Prevent the attention-needed icon from getting hidden

Isn't this the same hack in a different place?
Comment 8 Debarshi Ray 2015-04-10 14:20:11 UTC
(In reply to Bastien Nocera from comment #7)
> (In reply to Debarshi Ray from comment #6)
> > Created attachment 300352 [details] [review] [review] [review]
> > online-accounts: Prevent the attention-needed icon from getting hidden
> 
> Isn't this the same hack in a different place?

Yes, it is. I realized that we were already using width-request in some other place so I just decided to use it instead of adding another one.

For reasons mentioned in comment 5 , I could not get anything else to work. Maybe you have a better idea.
Comment 9 Bastien Nocera 2015-04-10 14:41:58 UTC
Created attachment 301292 [details] [review]
online-accounts: Prevent the attention-needed icon from getting hidden

By making sure that the label inside each of the list items gets
only whatever space is left by the left and right-side icons.
Comment 10 Bastien Nocera 2015-04-10 14:43:18 UTC
Created attachment 301293 [details] [review]
online-accounts: Prevent the attention-needed icon from getting hidden

By making sure that the label inside each of the list items gets
only whatever space is left by the left and right-side icons.
Comment 11 Bastien Nocera 2015-04-10 14:45:54 UTC
This solves the original problem. We might very well decide that the list isn't wide enough though...
Comment 12 Debarshi Ray 2015-04-10 17:45:38 UTC
Review of attachment 301293 [details] [review]:

::: panels/online-accounts/cc-online-accounts-panel.c
@@ +305,1 @@
                 NULL);

Nice. That removes one hard-coded value. Actually, that width-chars was causing some jumping when you added the first account.

How about we do this, and bump the width-request of the tree view?

We can't remove the width-request for reasons mentioned in comment 5 , and increasing the width-request will address the narrowness.
Comment 13 Bastien Nocera 2015-04-10 18:18:05 UTC
(In reply to Debarshi Ray from comment #12)
> Review of attachment 301293 [details] [review] [review]:
> 
> ::: panels/online-accounts/cc-online-accounts-panel.c
> @@ +305,1 @@
>                  NULL);
> 
> Nice. That removes one hard-coded value. Actually, that width-chars was
> causing some jumping when you added the first account.
> 
> How about we do this, and bump the width-request of the tree view?

Sure, but as I said, do it in a separate commit, because it ultimately solves a separate problem, right?

> We can't remove the width-request for reasons mentioned in comment 5 , and
> increasing the width-request will address the narrowness.

Sure.
Comment 14 Debarshi Ray 2015-04-13 12:50:32 UTC
Created attachment 301456 [details] [review]
online-accounts: Widen the accounts list