changeset 18796:95fe5195bf98

merge of '0bc345ca5932b2abc8dc1dcaf527c6aed41cdead' and 'a56eff383f8b71c3a20e8380c261f7bad5f3c749'
author Sean Egan <seanegan@gmail.com>
date Fri, 03 Aug 2007 23:20:28 +0000
parents 883c18d31bf4 (diff) 450a3dae477a (current diff)
children 0622a7f08dde ed1def07d86e
files pidgin/gtkconv.c pidgin/pixmaps/status/16/message-pending.png
diffstat 8 files changed, 51 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/log_reader.c	Fri Aug 03 23:16:40 2007 +0000
+++ b/libpurple/plugins/log_reader.c	Fri Aug 03 23:20:28 2007 +0000
@@ -60,14 +60,14 @@
 	char *path;
 	GDir *dir;
 
-	g_return_val_if_fail(sn != NULL, list);
-	g_return_val_if_fail(account != NULL, list);
+	g_return_val_if_fail(sn != NULL, NULL);
+	g_return_val_if_fail(account != NULL, NULL);
 
 	logdir = purple_prefs_get_string("/plugins/core/log_reader/adium/log_directory");
 
 	/* By clearing the log directory path, this logger can be (effectively) disabled. */
-	if (!*logdir)
-		return list;
+	if (!logdir || !*logdir)
+		return NULL;
 
 	plugin = purple_find_prpl(purple_account_get_protocol_id(account));
 	if (!plugin)
@@ -236,7 +236,8 @@
 
 	/* XXX: TODO: We probably want to set PURPLE_LOG_READ_NO_NEWLINE
 	 * XXX: TODO: for HTML logs. */
-	*flags = 0;
+	if (flags != NULL)
+		*flags = 0;
 
 	g_return_val_if_fail(log != NULL, g_strdup(""));
 
@@ -625,17 +626,17 @@
 	const char *old_session_id = "";
 	struct msn_logger_data *data = NULL;
 
-	g_return_val_if_fail(sn != NULL, list);
-	g_return_val_if_fail(account != NULL, list);
+	g_return_val_if_fail(sn != NULL, NULL);
+	g_return_val_if_fail(account != NULL, NULL);
 
 	if (strcmp(account->protocol_id, "prpl-msn"))
-		return list;
+		return NULL;
 
 	logdir = purple_prefs_get_string("/plugins/core/log_reader/msn/log_directory");
 
 	/* By clearing the log directory path, this logger can be (effectively) disabled. */
-	if (!*logdir)
-		return list;
+	if (!logdir || !*logdir)
+		return NULL;
 
 	buddy = purple_find_buddy(account, sn);
 
@@ -1120,7 +1121,7 @@
 		if (name_guessed != NAME_GUESS_UNKNOWN)
 			text = g_string_append(text, "</span>");
 
-		style     = xmlnode_get_attrib(text_node, "Style");
+		style = xmlnode_get_attrib(text_node, "Style");
 
 		tmp = xmlnode_get_data(text_node);
 		if (style && *style) {
@@ -1210,14 +1211,14 @@
 	gchar *line;
 	gchar *c;
 
-	g_return_val_if_fail(sn != NULL, list);
-	g_return_val_if_fail(account != NULL, list);
+	g_return_val_if_fail(sn != NULL, NULL);
+	g_return_val_if_fail(account != NULL, NULL);
 
 	logdir = purple_prefs_get_string("/plugins/core/log_reader/trillian/log_directory");
 
 	/* By clearing the log directory path, this logger can be (effectively) disabled. */
-	if (!*logdir)
-		return list;
+	if (!logdir || !*logdir)
+		return NULL;
 
 	plugin = purple_find_prpl(purple_account_get_protocol_id(account));
 	if (!plugin)
@@ -1428,7 +1429,9 @@
 	char *c;
 	const char *line;
 
-	*flags = PURPLE_LOG_READ_NO_NEWLINE;
+	if (flags != NULL)
+		*flags = PURPLE_LOG_READ_NO_NEWLINE;
+
 	g_return_val_if_fail(log != NULL, g_strdup(""));
 
 	data = log->logger_data;
@@ -1773,18 +1776,18 @@
 	int offset = 0;
 	GError *error;
 
-	g_return_val_if_fail(sn != NULL, list);
-	g_return_val_if_fail(account != NULL, list);
+	g_return_val_if_fail(sn != NULL, NULL);
+	g_return_val_if_fail(account != NULL, NULL);
 
 	/* QIP only supports ICQ. */
 	if (strcmp(account->protocol_id, "prpl-icq"))
-		return list;
+		return NULL;
 
 	logdir = purple_prefs_get_string("/plugins/core/log_reader/qip/log_directory");
 
 	/* By clearing the log directory path, this logger can be (effectively) disabled. */
-	if (!*logdir)
-		return list;
+	if (!logdir || !*logdir)
+		return NULL;
 
 	plugin = purple_find_prpl(purple_account_get_protocol_id(account));
 	if (!plugin)
@@ -1924,7 +1927,9 @@
 	char *utf8_string;
 	FILE *file;
 
-	*flags = PURPLE_LOG_READ_NO_NEWLINE;
+	if (flags != NULL)
+		*flags = PURPLE_LOG_READ_NO_NEWLINE;
+
 	g_return_val_if_fail(log != NULL, g_strdup(""));
 
 	data = log->logger_data;
--- a/libpurple/protocols/oscar/oscar.c	Fri Aug 03 23:16:40 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Fri Aug 03 23:20:28 2007 +0000
@@ -4964,7 +4964,7 @@
 			case 0x0001: { /* Group */
 				char *gname = curitem->name;
 				char *gname_utf8 = gname ? oscar_utf8_try_convert(gc->account, gname) : NULL;
-				if (gname_utf8 != NULL) {
+				if (gname_utf8 != NULL && purple_find_group(gname_utf8) == NULL) {
 					g = purple_group_new(gname_utf8);
 					purple_blist_add_group(g, NULL);
 				}
--- a/pidgin/gtkconv.c	Fri Aug 03 23:16:40 2007 +0000
+++ b/pidgin/gtkconv.c	Fri Aug 03 23:20:28 2007 +0000
@@ -8673,8 +8673,8 @@
 			MIN(g_utf8_strlen(gtk_label_get_text(GTK_LABEL(gtkconv->tab_label)), -1), 12)
 		);
 	}
-	if (angle)
-		gtk_label_set_angle(GTK_LABEL(gtkconv->tab_label), angle);
+
+	gtk_label_set_angle(GTK_LABEL(gtkconv->tab_label), angle);
 #endif
 
 #if 0
--- a/pidgin/gtkimhtmltoolbar.c	Fri Aug 03 23:16:40 2007 +0000
+++ b/pidgin/gtkimhtmltoolbar.c	Fri Aug 03 23:20:28 2007 +0000
@@ -1109,7 +1109,6 @@
 	GtkWidget *font_menu;
 	GtkWidget *insert_menu;
 	GtkWidget *menuitem;
-	GtkWidget *button;
 	GtkWidget *sep;
 	int i;
 	struct {
@@ -1126,10 +1125,10 @@
 #endif
 		{_("_Smaller"), &toolbar->smaller_size, TRUE},
 		{_("_Font face"), &toolbar->font, TRUE},
-		{_("_Foreground color"), &toolbar->fgcolor, TRUE},
-		{_("_Background color"), &toolbar->bgcolor, TRUE},
+		{_("Foreground _color"), &toolbar->fgcolor, TRUE},
+		{_("Bac_kground color"), &toolbar->bgcolor, TRUE},
 		{_("_Reset formatting"), &toolbar->clear, FALSE},
-		{NULL, NULL}
+		{NULL, NULL, FALSE}
 	};
 
 
--- a/pidgin/pidginstock.c	Fri Aug 03 23:16:40 2007 +0000
+++ b/pidgin/pidginstock.c	Fri Aug 03 23:20:28 2007 +0000
@@ -111,7 +111,7 @@
 	{ PIDGIN_STOCK_STATUS_LOGOUT, 	"status", "log-out.png",	TRUE, TRUE, TRUE, TRUE, FALSE, FALSE , NULL },
 	{ PIDGIN_STOCK_STATUS_OFFLINE, 	"status", "offline.png",	TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, PIDGIN_STOCK_STATUS_OFFLINE_I  },
 	{ PIDGIN_STOCK_STATUS_PERSON, 	"status", "person.png",		TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, NULL  },
-	{ PIDGIN_STOCK_STATUS_MESSAGE, 	"status", "message-pending.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL  },
+	{ PIDGIN_STOCK_STATUS_MESSAGE, 	"toolbar", "message-new.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL  },
 	
 	{ PIDGIN_STOCK_STATUS_IGNORED,	"emblems", "blocked.png",	TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL  },
 	{ PIDGIN_STOCK_STATUS_FOUNDER,	"emblems", "founder.png",	TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL  },
@@ -155,7 +155,7 @@
 	{ PIDGIN_STOCK_TOOLBAR_INSERT_IMAGE, "toolbar", "insert-image.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL  },
 	{ PIDGIN_STOCK_TOOLBAR_INSERT_LINK, "toolbar", "insert-link.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL  },
 	{ PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW, "toolbar", "message-new.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL  },
-	{ PIDGIN_STOCK_TOOLBAR_PENDING, "status", "message-pending.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL  },
+	{ PIDGIN_STOCK_TOOLBAR_PENDING, "toolbar", "message-new.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL  },
 	{ PIDGIN_STOCK_TOOLBAR_PLUGINS, "toolbar", "plugins.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL  },
 	{ PIDGIN_STOCK_TOOLBAR_TYPING, "toolbar", "typing.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL  },
 	{ PIDGIN_STOCK_TOOLBAR_UNBLOCK, "toolbar", "unblock.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL  },
--- a/pidgin/pixmaps/status/16/Makefile.am	Fri Aug 03 23:16:40 2007 +0000
+++ b/pidgin/pixmaps/status/16/Makefile.am	Fri Aug 03 23:20:28 2007 +0000
@@ -8,7 +8,6 @@
 		invisible.png \
 		log-in.png \
 		log-out.png \
-		message-pending.png \
 		offline.png \
 		person.png 
 
Binary file pidgin/pixmaps/status/16/message-pending.png has changed
--- a/pidgin/win32/winpidgin.c	Fri Aug 03 23:16:40 2007 +0000
+++ b/pidgin/win32/winpidgin.c	Fri Aug 03 23:20:28 2007 +0000
@@ -332,10 +332,10 @@
 			break;
 		case LANG_ROMANIAN: posix = "ro"; break;
 		case LANG_RUSSIAN: posix = "ru"; break;
-		/* LANG_CROATIAN == LANG_SERBIAN == LANG_BOSNIAN */
 		case LANG_SLOVAK: posix = "sk"; break;
 		case LANG_SLOVENIAN: posix = "sl"; break;
 		case LANG_ALBANIAN: posix = "sq"; break;
+		/* LANG_CROATIAN == LANG_SERBIAN == LANG_BOSNIAN */
 		case LANG_SERBIAN:
 			switch (sub_id) {
 				case SUBLANG_SERBIAN_LATIN:
@@ -538,6 +538,8 @@
 	char exe_name[MAX_PATH];
 	HMODULE hmod;
 	char *tmp;
+	int pidgin_argc = __argc;
+	char **pidgin_argv = __argv;
 
 	/* If debug or help or version flag used, create console for output */
 	if (strstr(lpszCmdLine, "-d") || strstr(lpszCmdLine, "-h") || strstr(lpszCmdLine, "-v")) {
@@ -601,8 +603,20 @@
 	/* Determine if we're running in portable mode */
 	if (strstr(lpszCmdLine, "--portable-mode")
 			|| (exe_name != NULL && strstr(exe_name, "-portable.exe"))) {
+		int i = 0, c = 0;
+
 		printf("Running in PORTABLE mode.\n");
 		portable_mode = TRUE;
+
+		/* Remove the --portable-mode arg from the args passed to pidgin so it doesn't choke */
+		pidgin_argv = malloc(sizeof(char*) * pidgin_argc);
+		for (; i < __argc; i++) {
+			if (strstr(__argv[i], "--portable-mode") == NULL) {
+				pidgin_argv[c] = __argv[i];
+				c++;
+			} else
+				pidgin_argc--;
+		}
 	}
 
 	if (portable_mode)
@@ -635,5 +649,5 @@
 		return 0;
 	}
 
-	return pidgin_main(hInstance, __argc, __argv);
+	return pidgin_main(hInstance, pidgin_argc, pidgin_argv);
 }