changeset 9915:0ddc84d81eac

[gaim-migrate @ 10807] (17:54:09) kstange: lschiere2: This makes the window get larger when the Win32 trans plugin slider is added, so it doesn't slowly crush the message area after. (17:57:10) kstange: er, remove the word "after" from my sentence committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 30 Aug 2004 21:59:25 +0000
parents 3df9ffcb9b06
children 4d17a945aab3
files plugins/win32/transparency/win2ktrans.c
diffstat 1 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/win32/transparency/win2ktrans.c	Mon Aug 30 03:34:54 2004 +0000
+++ b/plugins/win32/transparency/win2ktrans.c	Mon Aug 30 21:59:25 2004 +0000
@@ -124,7 +124,7 @@
 	GtkWidget *frame;
 
 	frame = gtk_frame_new(NULL);
-	gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT);
+	gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_NONE);
 	gtk_widget_show(frame);
 
 	hbox = gtk_hbox_new(FALSE, 5);
@@ -194,6 +194,8 @@
 	if(!find_slidwin(win)) {
 		GtkWidget *slider_box=NULL;
 		slider_win *slidwin=NULL;
+		GtkRequisition slidereq;
+		gint width, height;
 
 		/* Get top vbox */
 		for ( wl1 = wl = gtk_container_get_children(GTK_CONTAINER(win));
@@ -209,9 +211,14 @@
 		g_list_free(wl1);
 
 		slider_box = wintrans_slider(win);
+		/* Figure out how tall the slider wants to be */
+		gtk_widget_size_request(slider_box, &slidereq);
+		gtk_window_get_size(GTK_WINDOW(win), &width, &height);
 		gtk_box_pack_start(GTK_BOX(vbox),
 						   slider_box,
 						   FALSE, FALSE, 0);
+		/* Make window taller so we don't slowly collapse its message area */
+		gtk_window_resize(GTK_WINDOW(win), width, (height + slidereq.height));
 		/* Add window to list, to track that it has a slider */
 		slidwin = g_new0( slider_win, 1 );
 		slidwin->win = win;
@@ -227,8 +234,17 @@
 		GList *tmp=window_list;
 		while(tmp) {
 			slider_win *slidwin = (slider_win*)tmp->data;
-			if (slidwin != NULL && GTK_IS_WINDOW(slidwin->win))
+			if (slidwin != NULL && GTK_IS_WINDOW(slidwin->win)) {
+				GtkRequisition slidereq;
+				gint width, height;
+				/* Figure out how tall the slider was */
+				gtk_widget_size_request(slidwin->slider, &slidereq);
+				gtk_window_get_size(GTK_WINDOW(slidwin->win), &width, &height);
+
 				gtk_widget_destroy(slidwin->slider);
+
+				gtk_window_resize(GTK_WINDOW(slidwin->win), width, (height - slidereq.height));
+			}
 			g_free(slidwin);
 			tmp=tmp->next;
 		}