changeset 14591:fc99573b0b62

[gaim-migrate @ 17315] I like to drag the expander in the chat all the way over so the userlist isn't visible. This saves that preference. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 18 Sep 2006 20:20:32 +0000
parents 2d451d3aa1bd
children f407d80a618c
files gtk/gtkcellrendererexpander.c gtk/gtkconv.c
diffstat 2 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/gtkcellrendererexpander.c	Mon Sep 18 18:23:17 2006 +0000
+++ b/gtk/gtkcellrendererexpander.c	Mon Sep 18 20:20:32 2006 +0000
@@ -108,7 +108,7 @@
 static void gaim_gtk_cell_renderer_expander_init (GaimGtkCellRendererExpander *cellexpander)
 {
 	GTK_CELL_RENDERER(cellexpander)->mode = GTK_CELL_RENDERER_MODE_ACTIVATABLE;
-	GTK_CELL_RENDERER(cellexpander)->xpad = 2;
+	GTK_CELL_RENDERER(cellexpander)->xpad = 0;
 	GTK_CELL_RENDERER(cellexpander)->ypad = 2;
 }
 
--- a/gtk/gtkconv.c	Mon Sep 18 18:23:17 2006 +0000
+++ b/gtk/gtkconv.c	Mon Sep 18 20:20:32 2006 +0000
@@ -235,6 +235,8 @@
 		}
 		if (w == gtkconv->entry)
 			gaim_prefs_set_int("/gaim/gtk/conversations/chat/entry_height", allocation->height);
+		if (w == gtkconv->u.chat->list)
+			gaim_prefs_set_int("/gaim/gtk/conversations/chat/userlist_width", allocation->width == 1 ? 0 : allocation->width);
 	}
 
 	return FALSE;
@@ -3976,12 +3978,16 @@
 												   "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, 
+	                            gaim_prefs_get_int("/gaim/gtk/conversations/chat/userlist_width"), -1);
 
 	g_signal_connect(G_OBJECT(list), "button_press_event",
 					 G_CALLBACK(right_click_chat_cb), gtkconv);
 	g_signal_connect(G_OBJECT(list), "popup-menu",
 			 G_CALLBACK(gtkconv_chat_popup_menu_cb), gtkconv);
-
+        g_signal_connect(G_OBJECT(list), "size-allocate", G_CALLBACK(size_allocate_cb), gtkconv);
+	      
+	
 	rend = gtk_cell_renderer_text_new();
 
 	g_object_set(rend,
@@ -4008,8 +4014,6 @@
 
 	gtk_tree_view_append_column(GTK_TREE_VIEW(list), col);
 
-	gtk_widget_set_size_request(list, 150, -1);
-
 	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(list), FALSE);
 	gtk_widget_show(list);
 
@@ -6482,7 +6486,7 @@
 	gaim_prefs_add_int("/gaim/gtk/conversations/chat/default_width", 410);
 	gaim_prefs_add_int("/gaim/gtk/conversations/chat/default_height", 160);
 	gaim_prefs_add_int("/gaim/gtk/conversations/chat/entry_height", 50);
-
+	gaim_prefs_add_int("/gaim/gtk/conversations/chat/userlist_width", 80);
 	/* Conversations -> IM */
 	gaim_prefs_add_none("/gaim/gtk/conversations/im");