empathy r844 - trunk/src



Author: xclaesse
Date: Wed Apr  2 10:41:59 2008
New Revision: 844
URL: http://svn.gnome.org/viewvc/empathy?rev=844&view=rev

Log:
Fix load/save chat geometry


Modified:
   trunk/src/empathy-chat-window.c
   trunk/src/empathy-chat-window.h

Modified: trunk/src/empathy-chat-window.c
==============================================================================
--- trunk/src/empathy-chat-window.c	(original)
+++ trunk/src/empathy-chat-window.c	Wed Apr  2 10:41:59 2008
@@ -558,6 +558,22 @@
 						 FALSE, FALSE);
 }
 
+static const gchar *
+chat_get_window_id_for_geometry (EmpathyChat *chat)
+{
+	gboolean separate_windows;
+
+	empathy_conf_get_bool (empathy_conf_get (),
+			       EMPATHY_PREFS_UI_SEPARATE_CHAT_WINDOWS,
+			       &separate_windows);
+
+	if (separate_windows) {
+		return empathy_chat_get_id (chat);
+	} else {
+		return "chat-window";
+	}
+}
+
 static gboolean
 chat_window_save_geometry_timeout_cb (EmpathyChatWindow *window)
 {
@@ -569,7 +585,8 @@
 	gtk_window_get_size (GTK_WINDOW (priv->dialog), &w, &h);
 	gtk_window_get_position (GTK_WINDOW (priv->dialog), &x, &y);
 
-	empathy_chat_save_geometry (priv->current_chat, x, y, w, h);
+	empathy_geometry_save (chat_get_window_id_for_geometry (priv->current_chat),
+			       x, y, w, h);
 
 	priv->save_geometry_id = 0;
 
@@ -1597,7 +1614,7 @@
 	/* Reference the chat object */
 	g_object_ref (chat);
 
-	empathy_chat_load_geometry (chat, &x, &y, &w, &h);
+	empathy_geometry_load (chat_get_window_id_for_geometry (chat), x, y, w, h);
 
 	if (x >= 0 && y >= 0) {
 		/* Let the window manager position it if we don't have
@@ -1790,40 +1807,4 @@
 
 	return !has_focus;
 }
-static const gchar *
-chat_get_window_id_for_geometry (EmpathyChat *chat)
-{
-	gboolean separate_windows;
-
-	empathy_conf_get_bool (empathy_conf_get (),
-			       EMPATHY_PREFS_UI_SEPARATE_CHAT_WINDOWS,
-			       &separate_windows);
-
-	if (separate_windows) {
-		return empathy_chat_get_id (chat);
-	} else {
-		return "chat-window";
-	}
-}
-
-void
-empathy_chat_save_geometry (EmpathyChat *chat,
-			   gint        x,
-			   gint        y,
-			   gint        w,
-			   gint        h)
-{
-	empathy_geometry_save (chat_get_window_id_for_geometry (chat), x, y, w, h);
-}
-
-void
-empathy_chat_load_geometry (EmpathyChat *chat,
-			   gint       *x,
-			   gint       *y,
-			   gint       *w,
-			   gint       *h)
-{
-	empathy_geometry_load (chat_get_window_id_for_geometry (chat), x, y, w, h);
-}
-
 

Modified: trunk/src/empathy-chat-window.h
==============================================================================
--- trunk/src/empathy-chat-window.h	(original)
+++ trunk/src/empathy-chat-window.h	Wed Apr  2 10:41:59 2008
@@ -71,16 +71,6 @@
 EmpathyChat *      empathy_chat_window_find_chat      (McAccount        *account,
 						       const gchar      *id);
 void               empathy_chat_window_present_chat   (EmpathyChat      *chat);
-void               empathy_chat_save_geometry         (EmpathyChat       *chat,
-						       gint               x,
-						       gint               y,
-						       gint               w,
-						       gint               h);
-void               empathy_chat_load_geometry         (EmpathyChat       *chat,
-						       gint              *x,
-						       gint              *y,
-						       gint              *w,
-						       gint              *h);
 
 
 G_END_DECLS



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]