changeset 1420:9be6790092dc

[gaim-migrate @ 1430] backing out the change mishan sent in. it's not working right for me for some reason and i don't feel like trying to figure out why right now. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 23 Jan 2001 12:08:21 +0000
parents b37ed5eb0317
children 13a34fb4abb0
files src/applet.c src/buddy.c src/gaim.h src/gaimrc.c
diffstat 4 files changed, 16 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/applet.c	Sun Jan 21 02:55:14 2001 +0000
+++ b/src/applet.c	Tue Jan 23 12:08:21 2001 +0000
@@ -244,7 +244,7 @@
 	GNOME_Panel_OrientType orient = applet_widget_get_panel_orient( APPLET_WIDGET(applet) );
 	pad = 5;
 
-	gdk_window_get_root_origin(gtk_widget_get_parent_window(appletframe), &x, &y);
+	gdk_window_get_position(gtk_widget_get_parent_window(appletframe), &x, &y);
 	if (for_blist) {
 	        if (general_options & OPT_GEN_SAVED_WINDOWS) {
 			buddy_req.width = blist_pos.width;
@@ -286,7 +286,7 @@
         if (general_options & OPT_GEN_NEAR_APPLET)
                 gtk_widget_set_uposition ( blist, al.x, al.y );
         else if (general_options & OPT_GEN_SAVED_WINDOWS)
-                gtk_widget_set_uposition(blist, blist_pos.x, blist_pos.y);
+                gtk_widget_set_uposition(blist, blist_pos.x - blist_pos.xoff, blist_pos.y - blist_pos.yoff);
 }
 
 void AppletClicked( GtkWidget *sender, GdkEventButton *ev, gpointer data ){
--- a/src/buddy.c	Sun Jan 21 02:55:14 2001 +0000
+++ b/src/buddy.c	Tue Jan 23 12:08:21 2001 +0000
@@ -2016,7 +2016,7 @@
 {
         int x, y, width, height;
         int save = 0;
-        gdk_window_get_root_origin(blist->window, &x, &y);
+        gdk_window_get_position(blist->window, &x, &y);
         gdk_window_get_size(blist->window, &width, &height);
 
         if(e->send_event) { /* Is a position event */
@@ -2025,10 +2025,13 @@
                 blist_pos.x = x;
                 blist_pos.y = y;
         } else { /* Is a size event */
-                if (blist_pos.width != width || blist_pos.width != width)
+                if (blist_pos.xoff != x || blist_pos.yoff != y || blist_pos.width != width)
                         save = 1;
+
                 blist_pos.width = width;
                 blist_pos.height = height;
+		blist_pos.xoff = x;
+		blist_pos.yoff = y;
         }
 
         if (save)
@@ -2458,7 +2461,8 @@
 
         if (general_options & OPT_GEN_SAVED_WINDOWS) {
                 if (blist_pos.width != 0) { /* Sanity check! */
-                        gtk_widget_set_uposition(blist, blist_pos.x, blist_pos.y);
+                        gtk_widget_set_uposition(blist, blist_pos.x - blist_pos.xoff,
+						 blist_pos.y - blist_pos.yoff);
                         gtk_widget_set_usize(blist, blist_pos.width, blist_pos.height);
                 }
         }
--- a/src/gaim.h	Sun Jan 21 02:55:14 2001 +0000
+++ b/src/gaim.h	Tue Jan 23 12:08:21 2001 +0000
@@ -148,6 +148,8 @@
         int y;
         int width;
         int height;
+	int xoff;
+	int yoff;
 };
 
 
--- a/src/gaimrc.c	Sun Jan 21 02:55:14 2001 +0000
+++ b/src/gaimrc.c	Tue Jan 23 12:08:21 2001 +0000
@@ -652,6 +652,8 @@
 			blist_pos.y = atoi(p->value[1]);
 			blist_pos.width = atoi(p->value[2]);
 			blist_pos.height = atoi(p->value[3]);
+			blist_pos.xoff = atoi(p->value[4]);
+			blist_pos.yoff = atoi(p->value[5]);
 		}
 
 	}
@@ -673,8 +675,9 @@
 	fprintf(f, "\treport_idle { %d }\n", report_idle);
 	fprintf(f, "\tweb_browser { %d }\n", web_browser);
 	fprintf(f, "\tweb_command { %s }\n", web_command);
-	fprintf(f, "\tblist_pos { %d } { %d } { %d } { %d }\n",
-		blist_pos.x, blist_pos.y, blist_pos.width, blist_pos.height);
+	fprintf(f, "\tblist_pos { %d } { %d } { %d } { %d } { %d } { %d }\n",
+		blist_pos.x, blist_pos.y, blist_pos.width, blist_pos.height,
+		blist_pos.xoff, blist_pos.yoff);
 	fprintf(f, "}\n");
 }