changeset 16024:b60aaf9da8b1

merge of 'ada29b7febfe2747e4e0a7178ca7dc11ae261d92' and 'd4522ac7da3100609f31e0ef1c263b8aad750136'
author Mark Doliner <mark@kingant.net>
date Mon, 09 Apr 2007 03:20:40 +0000
parents de619a9523f9 (current diff) fab49f913709 (diff)
children 01c22d9a60f9 326e6a503724
files
diffstat 5 files changed, 33 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Sun Apr 08 22:29:42 2007 +0000
+++ b/Makefile.am	Mon Apr 09 03:20:40 2007 +0000
@@ -68,5 +68,3 @@
 
 DISTCLEANFILES= pidgin.desktop libpurple/gconf/purple.schemas intltool-extract \
 			intltool-merge intltool-update
-
-ACLOCAL_AMFLAGS = -I m4
--- a/libpurple/util.c	Sun Apr 08 22:29:42 2007 +0000
+++ b/libpurple/util.c	Mon Apr 09 03:20:40 2007 +0000
@@ -2184,8 +2184,8 @@
 #endif
 }
 
-/* returns a string of the form ~/.gaim, where ~ is replaced by the user's home
- * dir. Note that there is no trailing slash after .gaim. */
+/* Returns the argument passed to -c IFF it was present, or ~/.gaim IFF it
+ * exists, else ~/.purple. */
 const char *
 purple_user_dir(void)
 {
@@ -2198,6 +2198,13 @@
 			g_strlcpy((char*) &home_dir, hd, sizeof(home_dir));
 			g_strlcat((char*) &home_dir, G_DIR_SEPARATOR_S ".gaim",
 					sizeof(home_dir));
+
+			if (g_file_test(home_dir, G_FILE_TEST_EXISTS))
+				return home_dir;
+
+			g_strlcpy((char*) &home_dir, hd, sizeof(home_dir));
+			g_strlcat((char*) &home_dir, G_DIR_SEPARATOR_S ".purple",
+					sizeof(home_dir));
 		}
 	}
 
--- a/pidgin.spec.in	Sun Apr 08 22:29:42 2007 +0000
+++ b/pidgin.spec.in	Mon Apr 09 03:20:40 2007 +0000
@@ -354,7 +354,7 @@
 %{_libdir}/pkgconfig/purple.pc
 %{_libdir}/pkgconfig/pidgin.pc
 %{_libdir}/pkgconfig/gnt.pc
-%{_datadir}/aclocal/pidgin.m4
+%{_datadir}/aclocal/purple.m4
 %if 0%{?_with_dbus:1}
 %{_libdir}/libpurple-client.so
 %endif
--- a/pidgin/gtksavedstatuses.c	Sun Apr 08 22:29:42 2007 +0000
+++ b/pidgin/gtksavedstatuses.c	Mon Apr 09 03:20:40 2007 +0000
@@ -1647,6 +1647,8 @@
 			   SS_MENU_TEXT_COLUMN, purple_primitive_get_name_from_type(primitive),
 			   SS_MENU_DATA_COLUMN, GINT_TO_POINTER(primitive),
 			   -1);
+	if (pixbuf != NULL)
+		g_object_unref(pixbuf);
 
 	if (purple_savedstatus_is_transient(current_status)
 			&& !purple_savedstatus_has_substatuses(current_status)
@@ -1704,8 +1706,14 @@
 						GTK_STOCK_SAVE, GTK_ICON_SIZE_MENU, "PidginStatusMenu");
 			if (emblem != NULL)
 			{
+				/* copy the pixbuf so we're not modifying the stock image data when we overlay the disk */
+				GdkPixbuf *pixbuf2 = gdk_pixbuf_copy(pixbuf);
 				int width = gdk_pixbuf_get_width(pixbuf) / 2;
 				int height = gdk_pixbuf_get_height(pixbuf) / 2;
+
+				g_object_unref(G_OBJECT(pixbuf));
+				pixbuf = pixbuf2;
+
 				gdk_pixbuf_composite(emblem, pixbuf, 0, height,
 						     width, height, 0, height,
 						     0.5, 0.5, GDK_INTERP_BILINEAR, 255);
@@ -1719,6 +1727,7 @@
 				SS_MENU_TEXT_COLUMN, purple_savedstatus_get_title(status),
 				SS_MENU_DATA_COLUMN, GINT_TO_POINTER(purple_savedstatus_get_creation_time(status)),
 				-1);
+			g_object_unref(G_OBJECT(pixbuf));
 
 			if (status == current_status)
 				index = i;
--- a/pidgin/win32/winpidgin.c	Sun Apr 08 22:29:42 2007 +0000
+++ b/pidgin/win32/winpidgin.c	Mon Apr 09 03:20:40 2007 +0000
@@ -111,7 +111,7 @@
 	HMODULE hmod;
 	HKEY hkey;
 #ifdef PORTABLE
-	/* We assume that GTK+ is installed under \\path\to\Purple\..\GTK
+	/* We assume that GTK+ is installed under \\path\to\Pidgin\..\GTK
 	 * First we find \\path\to
 	 */
 	if (GetModuleFileName(NULL, path, MAX_PATH) != 0) {
@@ -136,15 +136,15 @@
 
 	if (path) {
 		/* Set up the settings dir base to be \\path\to
-		 * The actual settings dir will be \\path\to\.purple */
-		char settingsdir[strlen(path) + strlen("PURPLEHOME=") + 1];
-		char aspelldir[strlen(path) + strlen("PURPLE_ASPELL_DIR=\\Aspell\\bin") + 1];
+		 * The actual settings dir will be \\path\to\.pidgin */
+		char settingsdir[strlen(path) + strlen("PIDGINHOME=") + 1];
+		char aspelldir[strlen(path) + strlen("PIDGIN_ASPELL_DIR=\\Aspell\\bin") + 1];
 
-		snprintf(settingsdir, sizeof(settingsdir), "PURPLEHOME=%s", path);
+		snprintf(settingsdir, sizeof(settingsdir), "PIDGINHOME=%s", path);
 		printf("Setting settings dir: %s\n", settingsdir);
 		putenv(settingsdir);
 
-		snprintf(aspelldir, sizeof(aspelldir), "PURPLE_ASPELL_DIR=%s\\Aspell\\bin", path);
+		snprintf(aspelldir, sizeof(aspelldir), "PIDGIN_ASPELL_DIR=%s\\Aspell\\bin", path);
 		printf("%s", aspelldir);
 		putenv(aspelldir);
 
@@ -390,8 +390,8 @@
 	return posix;
 }
 
-/* Determine and set Purple locale as follows (in order of priority):
-   - Check PURPLELANG env var
+/* Determine and set Pidgin locale as follows (in order of priority):
+   - Check PIDGINLANG env var
    - Check NSIS Installer Language reg value
    - Use default user locale
 */
@@ -403,12 +403,12 @@
 	DWORD datalen = 10;
 #endif
 
-	/* Check if user set PURPLELANG env var */
-	if ((locale = getenv("PURPLELANG")))
+	/* Check if user set PIDGINLANG env var */
+	if ((locale = getenv("PIDGINLANG")))
 		return locale;
 
 #ifndef PORTABLE
-	if (read_reg_string(HKEY_CURRENT_USER, "SOFTWARE\\purple",
+	if (read_reg_string(HKEY_CURRENT_USER, "SOFTWARE\\pidgin",
 			"Installer Language", (LPBYTE) &data, &datalen)) {
 		if ((locale = winpidgin_lcid_to_posix(atoi(data))))
 			return locale;
@@ -581,17 +581,17 @@
 	}
 
 #ifndef PORTABLE
-	if (!getenv("PURPLE_NO_DLL_CHECK"))
+	if (!getenv("PIDGIN_NO_DLL_CHECK"))
 #endif
 		dll_prep();
 
 	winpidgin_set_locale();
 	/* If help or version flag used, do not check Mutex */
 	if (!strstr(lpszCmdLine, "-h") && !strstr(lpszCmdLine, "-v"))
-		if (!getenv("PURPLE_MULTI_INST") && !winpidgin_set_running())
+		if (!getenv("PIDGIN_MULTI_INST") && !winpidgin_set_running())
 			return 0;
 
-	/* Now we are ready for Purple .. */
+	/* Now we are ready for Pidgin .. */
 	if ((hmod = LoadLibrary("pidgin.dll"))) {
 		pidgin_main = (LPFNPIDGINMAIN) GetProcAddress(hmod, "pidgin_main");
 	}