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 613272 - im settings capplet goes offscreen when advanced is expanded
im settings capplet goes offscreen when advanced is expanded
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Accounts
2.29.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-18 20:34 UTC by Travis Reitter
Modified: 2010-03-29 08:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
View of the clipped accounts embedded control panel (48.77 KB, image/png)
2010-03-18 20:34 UTC, Travis Reitter
Details
sip account once the advanced section has been expanded (58.81 KB, image/png)
2010-03-25 08:31 UTC, Guillaume Desmottes
Details

Description Travis Reitter 2010-03-18 20:34:32 UTC
Created attachment 156511 [details]
View of the clipped accounts embedded control panel

This is an upstream mirror of Moblin bug #10274 (http://bugzilla.moblin.org/show_bug.cgi?id=10274)

=====================================================

Description From  Paul   2010-03-18 11:38:36 PST

Created an attachment (id=4576) [details]
im settings with advanced expanded and controls offscreen

Build Image(yyyy-mm-dd): empathy-2.29.91.2
Hardware Model (on what HW this bug is uncovered): 

Bug detailed descriptions(behavior, impact, etc)
===========================================================

If you have an account setup already in empathy and you go to the accounts
capplet in the settings shell and expand the advanced section, you'll find the
controls go off the bottom of the shell, and there is no scroll bar. See
attached screenshot.

Reproduce Steps(steps,current result, reproduce possibility)
===========================================================
(1) Create and account in empathy
(2) Open the unified settings shell
(3) Select IM Settings
(4) Select an account
(5) Click on the 'advanced' expander
(6) Weep as Cancel, Apply, and Add buttons disappear from view (but rejoice
when they re-appear when you click the expander again)


Expected result:
===========================================================

The capplet adds a scrollbar so that all settings and buttons can be accessed.


Possible root cause:
===========================================================
Comment 1 Guillaume Desmottes 2010-03-19 10:17:30 UTC
I started a branch adding a scrollbar : http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/scroll-advanced-613272

Problem is, now when we expand the advanced section, the window does grow so it looks kinda ugly. Ideally I think we should grow the window up to the size of the screen. Any idea how to properly do that?
Comment 2 Travis Reitter 2010-03-19 16:20:22 UTC
(In reply to comment #1)
> Problem is, now when we expand the advanced section, the window does grow so it
> looks kinda ugly. Ideally I think we should grow the window up to the size of
> the screen. Any idea how to properly do that?

No, not really. That's the problem.

We can make scrolling work, but GTK will incorrectly-size the window to start with (so you've got one line to scroll to, even before you expand the Advanced tab).

We can increase the size-request in the scrolled window's "size-request" signal handler, but then we risk making the window too large for the screen (which basically just re-creates this bug).

As far as I can tell, there's no sane way to get the appropriate height for the scrolled window (because it'd have to be = screen height - height of all vertical panels - window title bar height - other window decorations - misc. other widgets we use above and below the scrolled window - all those widgets' padding and borders). It's all terribly complicated and fragile.
Comment 3 Travis Reitter 2010-03-19 16:26:45 UTC
(In reply to comment #2)
> (In reply to comment #1)
> As far as I can tell, there's no sane way to get the appropriate height for the
> scrolled window (because it'd have to be = screen height - height of all
> vertical panels - window title bar height - other window decorations - misc.
> other widgets we use above and below the scrolled window - all those widgets'
> padding and borders). It's all terribly complicated and fragile.

Just to clarify, part of this problem is that I'm trying to make it work for both this embedded capplet and the empathy-accounts application (which is just a window wrapper of the same content widgets). The control panel is maximized by default in MeeGo, and reasonably large in stock Gnome (so vertical scrolling usually isn't a problem).

Another possibly solution is to set a default vertical window height. This will ensure that, on a larger screen, the accounts application won't get a vertical scroll bar. But the exact height we choose is arbitrary. And it will require vertical scrolling when we expand the Advanced tab, even on a large screen (where we currently let the window expand as much as it needs to, which is certainly the best solution in that context).
Comment 4 Travis Reitter 2010-03-19 18:22:29 UTC
OK, I think I've worked out a reasonable solution in this branch:

http://git.collabora.co.uk/?p=user/treitter/empathy.git;a=shortlog;h=refs/heads/bug-613272

It adds the obvious scrolled window to solve this bug and increases the default accounts window size to avoid vertical and horizontal (in the case of Facebook accounts) in the default case (though it requires vertical scrolling for Jabber and SIP accounts when the Advanced section is expanded, even if your screen is tall enough to fit it all at once).

I've tested this on the desktop, Moblin, and in an artificially-small Xephyr window, and it all seems to work reasonably well.

Guillaume, could you please review this?
Comment 5 Guillaume Desmottes 2010-03-22 08:52:15 UTC
+                    <property name="label" translatable="yes">_Add&#x2026;</property>
Those are wrong, see bug #613117

I'm not sure about this approach. The jabber widget looks kinda ugly now as you have to scroll to hit the apply/cancel buttons.
Maybe we should just add the advanced box in the GtkScrolledWindow?

Also, the dialog looks too wide now IMHO.
Comment 6 Travis Reitter 2010-03-22 21:35:18 UTC
(In reply to comment #5)
> +                    <property name="label"
> translatable="yes">_Add&#x2026;</property>
> Those are wrong, see bug #613117

Will fix.

> I'm not sure about this approach. The jabber widget looks kinda ugly now as you
> have to scroll to hit the apply/cancel buttons.
> Maybe we should just add the advanced box in the GtkScrolledWindow?

That sounds like a good idea. I'll try that out.

> Also, the dialog looks too wide now IMHO.

The reason I made it wider is so that it fits the "example account" label for Facebook without horizontal scrolling. I'm not sure relocating the scrolled window just around the advanced box will help this (since SIP has a very wide Advanced section).

I'll give this a try this afternoon.
Comment 7 Travis Reitter 2010-03-24 17:32:36 UTC
(In reply to comment #5)
> +                    <property name="label"
> translatable="yes">_Add&#x2026;</property>
> Those are wrong, see bug #613117
> 
> I'm not sure about this approach. The jabber widget looks kinda ugly now as you
> have to scroll to hit the apply/cancel buttons.
> Maybe we should just add the advanced box in the GtkScrolledWindow?
> 
> Also, the dialog looks too wide now IMHO.

OK, please check the branch for a newer solution (it's a new commit on top of the older one -- I'll squash them before committing).

It fixes the ellipsis bug, doesn't change the default size of the accounts dialog, and only puts the advanced content in a scrolled window. The down side is that we'll need to manually update this for each protocol that has a large Advanced section (currently only the XMPP protocols and SIP, which is all I have changed in this version).
Comment 8 Guillaume Desmottes 2010-03-25 08:30:31 UTC
That's better but the jabber and SIP widget looks kinda shit when expanded now :\
I'd really prefer if they'd take more space because atm they are unusable without manually enlarge the dialog.
Comment 9 Guillaume Desmottes 2010-03-25 08:31:20 UTC
Created attachment 157035 [details]
sip account once the advanced section has been expanded
Comment 10 Guillaume Desmottes 2010-03-26 12:51:40 UTC
Maybe we could manually request a bigger height for the advanced so they won't be ridiculously small by default?
Comment 11 Guillaume Desmottes 2010-03-26 13:53:29 UTC
Another option would be to increase the default height of the accounts dialog.
Comment 12 Travis Reitter 2010-03-26 18:01:49 UTC
(In reply to comment #11)
> Another option would be to increase the default height of the accounts dialog.

This seems the most workable. I've pushed another commit that changes the dialog height from auto-sized (-1) to 450 pixels. It's arbitrary, but there's no getting around that. That height seems like a reasonable trade-off between being small-enough for small screens while still being usable on larger screens.

I agree it's not idea for either case, but I think a longer-term solution would require some deeper redesign of the dialog (beyond the scope of this bug).
Comment 13 Guillaume Desmottes 2010-03-29 08:48:27 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.