changeset 24273:6f7b24a2b746

merge of '06e4830f3567955e026f3d594afcc65a07d57b26' and 'cecd35e48c6dc8f5df7919fd23ecebe9bafb5dc1'
author Richard Laager <rlaager@wiktel.com>
date Thu, 30 Oct 2008 03:10:33 +0000
parents 882a1c4c11b4 (current diff) 750f9b4d8547 (diff)
children 06a4e268b9f5
files libpurple/protocols/qq/group_conv.c libpurple/protocols/qq/group_conv.h libpurple/protocols/qq/group_find.c libpurple/protocols/qq/group_find.h libpurple/protocols/qq/group_free.c libpurple/protocols/qq/group_free.h libpurple/protocols/qq/group_search.c libpurple/protocols/qq/group_search.h libpurple/protocols/qq/header_info.c libpurple/protocols/qq/header_info.h libpurple/protocols/qq/sys_msg.c libpurple/protocols/qq/sys_msg.h
diffstat 2 files changed, 30 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/log_reader.c	Thu Oct 30 03:03:45 2008 +0000
+++ b/libpurple/plugins/log_reader.c	Thu Oct 30 03:10:33 2008 +0000
@@ -662,8 +662,8 @@
 	}
 
 	if (buddy) {
-		PurpleBlistNode *node = (PurpleBlistNode *)buddy;
-		savedfilename = purple_blist_node_get_string(node, "log_reader_msn_log_filename");
+		savedfilename = purple_blist_node_get_string((PurpleBlistNode *)buddy,
+		                                             "log_reader_msn_log_filename");
 	}
 
 	if (savedfilename) {
@@ -1022,12 +1022,9 @@
 					name_guessed = NAME_GUESS_THEM;
 				} else {
 					if (buddy) {
-						const gchar *a = NULL, *server_alias = NULL;
-						gchar *alias = NULL, *temp = NULL;
-						
-						a = purple_buddy_get_alias(buddy);
-						if(a)
-							alias = g_strdup(a);
+						const char *server_alias = NULL;
+						char *alias = g_strdup(purple_buddy_get_alias(buddy));
+						char *temp;
 
 						/* "Truncate" the string at the first non-alphanumeric
 						 * character. The idea is to relax the comparison.
@@ -1572,31 +1569,30 @@
 					g_string_append(formatted, "</b>");
 					footer = NULL;
 				} else if (strstr(line, " signed off ")) {
-					if (buddy != NULL) {
-						const gchar *alias = purple_buddy_get_alias(buddy);
-
-						if(alias != NULL)
-							g_string_append_printf(formatted,
-								_("%s has signed off."), alias);
-						else
-							g_string_append_printf(formatted,
-								_("%s has signed off."), log->name);
+					const char *alias = NULL;
+
+					if (buddy != NULL)
+						alias = purple_buddy_get_alias(buddy);
+
+					if (alias != NULL) {
+						g_string_append_printf(formatted,
+							_("%s has signed off."), alias);
 					} else {
 						g_string_append_printf(formatted,
 							_("%s has signed off."), log->name);
 					}
 					line = "";
 				} else if (strstr(line, " signed on ")) {
-					if (buddy != NULL) {
-						const gchar *alias = purple_buddy_get_alias(buddy);
-
-						if(alias)
-							g_string_append(formatted, alias);
-						else
-							g_string_append(formatted, log->name);
-					} else {
+					const char *alias = NULL;
+
+					if (buddy != NULL)
+						alias = purple_buddy_get_alias(buddy);
+					
+					if (alias != NULL)
+						g_string_append(formatted, alias);
+					else
 						g_string_append(formatted, log->name);
-					}
+
 					line = " logged in.";
 				} else if (purple_str_has_prefix(line,
 					"One or more messages may have been undeliverable.")) {
@@ -1652,9 +1648,9 @@
 				}
 			} else if (purple_str_has_prefix(line, data->their_nickname)) {
 				if (buddy != NULL) {
-					const gchar *alias = purple_buddy_get_alias(buddy);
-
-					if(alias != NULL) {
+					const char *alias = purple_buddy_get_alias(buddy);
+
+					if (alias != NULL) {
 						line += strlen(data->their_nickname) + 2;
 						g_string_append_printf(formatted,
 							"<span style=\"color: #A82F2F;\">"
@@ -2025,10 +2021,10 @@
 					g_string_append(formatted, "</font> ");
 
 					if (is_in_message) {
-						const gchar *alias = NULL;
+						const char *alias = NULL;
 
 						if (buddy_name != NULL && buddy != NULL &&
-							(alias = purple_buddy_get_alias(buddy)))
+						    (alias = purple_buddy_get_alias(buddy)))
 						{
 							g_string_append_printf(formatted,
 								"<span style=\"color: #A82F2F;\">"
--- a/pidgin/gtkprefs.c	Thu Oct 30 03:03:45 2008 +0000
+++ b/pidgin/gtkprefs.c	Thu Oct 30 03:10:33 2008 +0000
@@ -1836,14 +1836,14 @@
                 gpointer data)
 {
 	GtkToggleButton *button = data;
-	gboolean muted = val;
+	gboolean muted = GPOINTER_TO_INT(val);
 
 	g_return_if_fail(!strcmp (pref_name, PIDGIN_PREFS_ROOT "/sound/mute"));
 
 	/* Block the handler that re-sets the preference. */
-	g_signal_handlers_block_matched(button, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, pref_name);
+	g_signal_handlers_block_matched(button, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, (gpointer)pref_name);
 	gtk_toggle_button_set_active (button, muted);
-	g_signal_handlers_unblock_matched(button, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, pref_name);
+	g_signal_handlers_unblock_matched(button, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, (gpointer)pref_name);
 }