changeset 25273:ff6eba605ca3

propagate from branch 'im.pidgin.pidgin' (head 24a56806ef9dfa8ea67d214a92a19c9011bc8a27) to branch 'im.pidgin.pidgin.next.minor' (head 16066b9d1332ed0ff3fd89a922f553e412c332db)
author Richard Laager <rlaager@wiktel.com>
date Thu, 30 Oct 2008 03:52:47 +0000
parents be7659f7b4d8 (current diff) 0b6acb534f16 (diff)
children 53ae7b278e85
files pidgin/Makefile.am pidgin/gtkprefs.c
diffstat 3 files changed, 31 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/log_reader.c	Thu Oct 30 03:46:21 2008 +0000
+++ b/libpurple/plugins/log_reader.c	Thu Oct 30 03:52:47 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/Makefile.am	Thu Oct 30 03:46:21 2008 +0000
+++ b/pidgin/Makefile.am	Thu Oct 30 03:52:47 2008 +0000
@@ -198,6 +198,7 @@
 pidgin_LDFLAGS = -export-dynamic
 pidgin_LDADD = \
 	@LIBOBJS@ \
+	$(GLIB_LIBS) \
 	$(DBUS_LIBS) \
 	$(GSTREAMER_LIBS) \
 	$(XSS_LIBS) \
--- a/pidgin/gtkprefs.c	Thu Oct 30 03:46:21 2008 +0000
+++ b/pidgin/gtkprefs.c	Thu Oct 30 03:52:47 2008 +0000
@@ -2108,14 +2108,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);
 }