# HG changeset patch # User Daniel Atallah # Date 1178914243 0 # Node ID 413c957e7c448060cdc90a9fcd974b4c50f2954f # Parent 53e757c37e06791e5a4b54fc4b536fabf8eb2d3d Hack to prevent a completely collapsed user list from coming ack with a 1-pixel width. Fixes #624. diff -r 53e757c37e06 -r 413c957e7c44 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Fri May 11 20:06:57 2007 +0000 +++ b/pidgin/gtkconv.c Fri May 11 20:10:43 2007 +0000 @@ -4127,6 +4127,7 @@ GtkTreeViewColumn *col; void *blist_handle = purple_blist_get_handle(); GList *focus_chain = NULL; + int ul_width; gtkchat = gtkconv->u.chat; gc = purple_conversation_get_gc(conv); @@ -4227,8 +4228,13 @@ "pixbuf", CHAT_USERS_ICON_COLUMN, NULL); gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_append_column(GTK_TREE_VIEW(list), col); - gtk_widget_set_size_request(lbox, - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/userlist_width"), -1); + ul_width = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/userlist_width"); + gtk_widget_set_size_request(lbox, ul_width, -1); + + /* Hack to prevent completely collapsed userlist coming back with a 1 pixel width. + * I would have liked to use the GtkPaned "max-position", but for some reason that didn't work */ + if (ul_width == 0) + gtk_paned_set_position(GTK_PANED(hpaned), 999999); g_signal_connect(G_OBJECT(list), "button_press_event", G_CALLBACK(right_click_chat_cb), gtkconv);