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 632357 - Contact list pane start with zero size
Contact list pane start with zero size
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Chat
2.32.x
Other Linux
: Normal normal
: 3.2
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2010-10-17 12:49 UTC by Juan J. Martinez
Modified: 2011-09-19 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
zero size contact list pane (52.57 KB, image/png)
2010-10-17 12:49 UTC, Juan J. Martinez
  Details
example of the 'resize' problem (599.61 KB, video/ogg)
2010-10-17 13:18 UTC, Juan J. Martinez
  Details
EmpathyChat: Set slider position after a timeout (3.84 KB, patch)
2011-09-19 13:57 UTC, Xavier Claessens
none Details | Review
EmpathyChat: Set slider position after a timeout (4.64 KB, patch)
2011-09-19 14:06 UTC, Xavier Claessens
accepted-commit_now Details | Review

Description Juan J. Martinez 2010-10-17 12:49:33 UTC
Created attachment 172542 [details]
zero size contact list pane

It is present, but it has zero size, so I have to drag the pane to see the contacts (attached screenshot).

When this happens, there's another problem: when I type in the text entry to send a text, when the message is longer than the text entry, the whole window resizes with each character, instead of breaking the text like and keep the windows size (that was the usual behaviour in previous versions).

I don't know if the second problem is related.

This happens at least in jabber muc and irc.

Empathy 2.32.0.1, Fedora 14 beta.
Comment 1 Juan J. Martinez 2010-10-17 13:15:03 UTC
I confirm the "resize window on text entry" but happens even when the pane has the correct size.

Should I file a different bug for this?
Comment 2 Juan J. Martinez 2010-10-17 13:18:15 UTC
Created attachment 172544 [details]
example of the 'resize' problem

Just in case my explanation isn't clear enough :)
Comment 3 Juan J. Martinez 2010-10-18 07:47:53 UTC
I've noticed that when you paste a long text in the text entry, the weird window resize doesn't happen.

So it happens when typing in the text entry only.
Comment 4 Guillaume Desmottes 2010-10-18 08:53:36 UTC
(In reply to comment #0)
> Created an attachment (id=172542) [details]
> zero size contact list pane
> 
> It is present, but it has zero size, so I have to drag the pane to see the
> contacts (attached screenshot).

Empathy is supposed to reuse the last used size but that seems broken indeed.

> When this happens, there's another problem: when I type in the text entry to
> send a text, when the message is longer than the text entry, the whole window
> resizes with each character, instead of breaking the text like and keep the
> windows size (that was the usual behaviour in previous versions).

That's bug #587441
Comment 5 Juan J. Martinez 2010-10-18 09:01:16 UTC
OK, thank you!

I'm adding myself to the CC of bug #587441.
Comment 6 Guillaume Desmottes 2010-10-18 10:33:37 UTC
Humm that's actually harder to fix than I thought.

The size of the pane is properly saved and restored. But for some reason, GTK+ changes the size of the pane after we restored it (during the call of chat_size_allocate). Ideally we should restore the size of the pane once  the widget has been fully allocated, but I didn't manage to find a trick to do that.

Help welcome.
Comment 7 Xavier Claessens 2011-09-19 07:30:14 UTC
taking
Comment 8 Xavier Claessens 2011-09-19 11:05:01 UTC
Ok, have a good understanding of what happens now:

When the window is created, we do a gtk_window_resize() on it to restore saved size. But that takes effect only after an idle callback (resizes are queued into GTK). So until we re-enter mainloop, the window (and its content) has default small allocation. So when we do the gtk_paned_set_position() the position is bigger than its allocation so it gets forced to the max of the window's size. Later the window resize happens and the extra space is given to the chat part and not contact-list (that's what we want when user resizes the window) and so the position stay on right most.

We don't have any choice but setting position in an idle callback after the queued resize of the window happened.
Comment 9 Xavier Claessens 2011-09-19 13:57:54 UTC
Created attachment 196944 [details] [review]
EmpathyChat: Set slider position after a timeout

This ensure that the window has resized before setting the position
because GtkPaned needs to know its size allocation
Comment 10 Xavier Claessens 2011-09-19 13:58:52 UTC
Bah, I wanted to find a better solution, but that's the only thing that works...
Comment 11 Xavier Claessens 2011-09-19 14:06:07 UTC
Created attachment 196945 [details] [review]
EmpathyChat: Set slider position after a timeout

This ensure that the window has resized before setting the position
because GtkPaned needs to know its size allocation
Comment 12 Guillaume Desmottes 2011-09-19 14:07:00 UTC
Review of attachment 196945 [details] [review]:

++
Comment 13 Xavier Claessens 2011-09-19 14:07:56 UTC
pushed.