changeset 24276:06a4e268b9f5

merge of '843d513c3da12026fc35af070a23a3d11844824c' and 'b630f3305c53ab0eb32b948911940959cc873699'
author John Bailey <rekkanoryo@rekkanoryo.org>
date Thu, 30 Oct 2008 03:58:19 +0000
parents 6f7b24a2b746 (diff) d81104908a4e (current diff)
children 0b6acb534f16
files
diffstat 2 files changed, 30 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/log_reader.c	Thu Oct 30 03:34:09 2008 +0000
+++ b/libpurple/plugins/log_reader.c	Thu Oct 30 03:58:19 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:34:09 2008 +0000
+++ b/pidgin/gtkprefs.c	Thu Oct 30 03:58:19 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);
 }