/pidgin/main: 5a740d40503d: Pulling default in again

Gary Kramlich grim at reaperworld.com
Thu Dec 31 11:59:27 EST 2015


Changeset: 5a740d40503d8b740e002bedfc4d86095e5b1da6
Author:	 Gary Kramlich <grim at reaperworld.com>
Date:	 2015-12-29 21:48 -0600
Branch:	 replace-nm-with-gio
URL: https://hg.pidgin.im/pidgin/main/rev/5a740d40503d

Description:

Pulling default in again

diffstat:

 ChangeLog                        |   2 ++
 libpurple/plugins/codeinline.c   |  12 ++++--------
 libpurple/plugins/signals-test.c |   8 ++++----
 libpurple/savedstatuses.c        |   6 ++++--
 4 files changed, 14 insertions(+), 14 deletions(-)

diffs (86 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,8 @@ version 3.0.0 (??/??/????):
 	  non-native plugin support.
 	* Removed flags for manually configuring GnuTLS and NSS. They are now only
 	  recognized through pkg-config. (Michael McConville)
+	* Fixed an issue where transient startup statuses could be deleted
+	  (Jakub Adam) (#16762)
 
 	libpurple:
 	* Specify a different set of encryption ciphers for TLS connections when
diff --git a/libpurple/plugins/codeinline.c b/libpurple/plugins/codeinline.c
--- a/libpurple/plugins/codeinline.c
+++ b/libpurple/plugins/codeinline.c
@@ -41,15 +41,11 @@ outgoing_msg_common(const char *message)
   return g_strjoinv("</font>", ms);
 }
 
-static gboolean outgoing_msg_cb1(PurpleAccount *account, const char *who, char **message,
-					PurpleConversation *conv, PurpleMessageFlags flags, gpointer null)
+static gboolean outgoing_msg_cb1(PurpleConversation *conv, PurpleMessage *msg,
+	gpointer null)
 {
-	char *m;
-
-	m = outgoing_msg_common(*message);
-	g_free(*message);
-	*message = m;
-
+	purple_message_set_contents(msg,
+		outgoing_msg_common(purple_message_get_contents(msg)));
 	return FALSE;
 }
 
diff --git a/libpurple/plugins/signals-test.c b/libpurple/plugins/signals-test.c
--- a/libpurple/plugins/signals-test.c
+++ b/libpurple/plugins/signals-test.c
@@ -282,11 +282,11 @@ connection_error_cb(PurpleConnection *gc
  * Conversation subsystem signal callbacks
  **************************************************************************/
 static gboolean
-writing_im_msg_cb(PurpleAccount *account, const char *who, char **buffer,
-				PurpleConversation *conv, PurpleMessageFlags flags, void *data)
+writing_im_msg_cb(PurpleConversation *conv, PurpleMessage *pmsg)
 {
-	purple_debug_misc("signals test", "writing-im-msg (%s, %s, %s)\n",
-					purple_account_get_username(account), purple_conversation_get_name(conv), *buffer);
+	purple_debug_misc("signals test", "writing-im-msg (%s, %s)\n",
+		purple_conversation_get_name(conv),
+		purple_message_get_contents(pmsg));
 
 	return FALSE;
 
diff --git a/libpurple/savedstatuses.c b/libpurple/savedstatuses.c
--- a/libpurple/savedstatuses.c
+++ b/libpurple/savedstatuses.c
@@ -188,16 +188,18 @@ static void
 remove_old_transient_statuses(void)
 {
 	GList *l, *next;
-	PurpleSavedStatus *saved_status, *current_status;
+	PurpleSavedStatus *saved_status, *startup_status, *current_status;
 	int count;
 	time_t creation_time;
 
+	startup_status = purple_savedstatus_get_startup();
 	current_status = purple_savedstatus_get_current();
 
 	/*
 	 * Iterate through the list of saved statuses.  Delete all
 	 * transient statuses except for the first MAX_TRANSIENTS
 	 * (remember, the saved statuses are already sorted by popularity).
+	 * We should also keep the startup status, if any is set.
 	 */
 	count = 0;
 	for (l = saved_statuses; l != NULL; l = next)
@@ -208,7 +210,7 @@ remove_old_transient_statuses(void)
 		{
 			if (count == MAX_TRANSIENTS)
 			{
-				if (saved_status != current_status)
+				if (saved_status != current_status && saved_status != startup_status)
 				{
 					saved_statuses = g_list_remove(saved_statuses, saved_status);
 					creation_time = purple_savedstatus_get_creation_time(saved_status);



More information about the Commits mailing list