changeset 14361:0c3957362c69

[gaim-migrate @ 17067] If the status box is "away" when we go idle-away, then do nothing committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 27 Aug 2006 23:04:55 +0000
parents c196a30f645f
children 665b814f8fd7
files libgaim/savedstatuses.c libgaim/upnp.h
diffstat 2 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libgaim/savedstatuses.c	Sun Aug 27 22:51:40 2006 +0000
+++ b/libgaim/savedstatuses.c	Sun Aug 27 23:04:55 2006 +0000
@@ -812,7 +812,12 @@
 
 	old = gaim_savedstatus_get_current();
 	gaim_prefs_set_bool("/core/savedstatus/isidleaway", idleaway);
-	saved_status = gaim_savedstatus_get_current();
+	saved_status = idleaway ? gaim_savedstatus_get_idleaway()
+			: gaim_savedstatus_get_default();
+
+	if (idleaway && (gaim_savedstatus_get_type(old) != GAIM_STATUS_AVAILABLE))
+		/* Our global status is already "away," so don't change anything */
+		return;
 
 	accounts = gaim_accounts_get_all_active();
 	for (node = accounts; node != NULL; node = node->next)
--- a/libgaim/upnp.h	Sun Aug 27 22:51:40 2006 +0000
+++ b/libgaim/upnp.h	Sun Aug 27 23:04:55 2006 +0000
@@ -36,6 +36,7 @@
 /**************************************************************************/
 /*@{*/
 
+/* typedef struct _GaimUPnPRequestData GaimUPnPRequestData; */
 
 typedef void (*GaimUPnPCallback) (gboolean success, gpointer data);
 
@@ -56,13 +57,12 @@
  * Retrieve the current UPnP control info, if there is any available.
  * This will only be filled in if gaim_upnp_discover() had been called,
  * and finished discovering.
- * 
+ *
  * @return The control URL for the IGD we'll use to use the IGD services
  */
 const GaimUPnPControlInfo* gaim_upnp_get_control_info(void);
 #endif
 
-
 /**
  * Gets the IP address from a UPnP enabled IGD that sits on the local
  * network, so when getting the network IP, instead of returning the
@@ -73,7 +73,6 @@
  */
 const gchar* gaim_upnp_get_public_ip(void);
 
-
 /**
  * Maps Ports in a UPnP enabled IGD that sits on the local network to
  * this gaim client. Essentially, this function takes care of the port
@@ -90,7 +89,7 @@
 
 /**
  * Deletes a port mapping in a UPnP enabled IGD that sits on the local network
- * to this gaim client. Essentially, this function takes care of deleting the 
+ * to this gaim client. Essentially, this function takes care of deleting the
  * port forwarding after they have completed a connection so another client on
  * the local network can take advantage of the port forwarding
  *
@@ -102,6 +101,7 @@
  */
 void gaim_upnp_remove_port_mapping(unsigned short portmap,
 		const gchar* protocol, GaimUPnPCallback cb, gpointer cb_data);
+
 /*@}*/
 
 #ifdef __cplusplus