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 588865 - window is too tiny when opening new chatrooms with contact list
window is too tiny when opening new chatrooms with contact list
Status: RESOLVED OBSOLETE
Product: empathy
Classification: Core
Component: Multi User Chat
2.27.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
: 586268 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-07-17 10:55 UTC by Nicolò Chieffo
Modified: 2018-05-22 13:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (8.60 KB, image/png)
2009-07-17 10:56 UTC, Nicolò Chieffo
  Details
tiny-chatroom.patch (2.43 KB, patch)
2009-07-17 11:23 UTC, Nicolò Chieffo
rejected Details | Review

Description Nicolò Chieffo 2009-07-17 10:55:56 UTC
Currently if you open a new channel you get a really tiny chat window with a huge contact list (see the screenshot).

This is caused by these lines of code in empathy-chat.c +1266

	/* We are adding the contact list to the chat, we don't want the
	 * chat view to become too small. If the chat view is already
	 * smaller than 250 make sure that size won't change. If the
	 * chat view is bigger the contact list will take some space on
	 * it but we make sure the chat view don't become smaller than
	 * 250. Relax the size request once the resize is done */
	min_width = MIN (priv->vbox_left->allocation.width, 250);
	gtk_widget_set_size_request (priv->vbox_left, min_width, -1);

while this works when the window is bigger than 250, it does not when it is smaller.

Looking at the gtk_widget_set_size_request doc, we can see: "Sets the minimum size of a widget" which is exactly what we want (from the comment).
In my opinion we should remove those lines, and set a minimum width and height request directly in the .ui file
Comment 1 Nicolò Chieffo 2009-07-17 10:56:21 UTC
Created attachment 138582 [details]
screenshot
Comment 2 Nicolò Chieffo 2009-07-17 11:23:07 UTC
Created attachment 138583 [details] [review]
tiny-chatroom.patch
Comment 3 Danielle Madeley 2009-07-17 14:30:03 UTC
Comment on attachment 138583 [details] [review]
tiny-chatroom.patch

This is not the correct approach at all. We should not be hard setting a size request in the UI file (this is rarely ever something that we want to do).

A more correct approach might be when we wish to show the contact list, fix the size-request of the chat window to be the size of the allocation, show the sidebar (forcing a window resize) and then releasing the size-request again.
Comment 4 Nicolò Chieffo 2009-07-17 15:00:57 UTC
I thought to use the size request in the UI because there is already the size request of the contact list.

Anyway the initial approach was to "steal" the contact list size from the chat view, if the chat view size was > 250.

So tell me if the following steps would be correct:
- #define CONTACT_LIST_WIDTH 200 /* (taken from UI, why is it so high??) */
- #define MIN_CHAT_WIDTH 250
- request chat width = MIN_CHAT_WIDTH (so if the chat is bigger, we steal the space, if it is smaller we don't steal anything)
- show contact list
- request contact list width = CONTACT_LIST_WIDTH (why a so high value?)
- release both requests
Comment 5 Nicolò Chieffo 2009-07-17 15:29:00 UTC
Are you sure that keeping a size request for the chat window is wrong?
In my opinion it is useless to have a small chat window: there's no reason to resize it to less than MIN_CHAT_WIDTH (which could be decided to be even less than 250) or you won't see anything inside
Comment 6 Nicolò Chieffo 2009-08-21 16:22:24 UTC
*** Bug 586268 has been marked as a duplicate of this bug. ***
Comment 7 Omer Akram 2010-03-22 12:29:37 UTC
isn't bug 612216 the same?
Comment 8 Nicolò Chieffo 2010-03-22 12:39:24 UTC
Not really the same, but maybe a fix to that bug would also fix this
Comment 9 GNOME Infrastructure Team 2018-05-22 13:36:15 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/empathy/issues/95.