changeset 29436:89858e3a0464

merge of '2aa174ad4c0e50a229c8c951b836b5f788fe7393' and '633db1f2c83f666e4ac7a26601725cb01233681e'
author Mark Doliner <mark@kingant.net>
date Sun, 14 Feb 2010 20:20:00 +0000
parents 97974856c920 (current diff) 2fc38fb61418 (diff)
children 4e7fd81a39c6 48f70e888c04
files
diffstat 5 files changed, 28 insertions(+), 55 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/win32/targets.mak	Sun Feb 14 08:06:00 2010 +0000
+++ b/libpurple/win32/targets.mak	Sun Feb 14 20:20:00 2010 +0000
@@ -23,7 +23,7 @@
 
 $(PIDGIN_REVISION_H): $(PIDGIN_REVISION_RAW_TXT)
 	if [ -f $< ]; then \
-		sed 's/^\(.\+\)$$/#define REVISION "\1"/' $< > $@; \
+		sed 's/^\(.\{1,\}\)$$/#define REVISION "\1"/' $< > $@; \
 	fi
 	[ -f $@ ] || echo "#define REVISION \"unknown\"" > $@
 
--- a/pidgin/gtkpounce.c	Sun Feb 14 08:06:00 2010 +0000
+++ b/pidgin/gtkpounce.c	Sun Feb 14 20:20:00 2010 +0000
@@ -1546,53 +1546,7 @@
 				g_free(localecmd);
 			}
 #else /* !_WIN32 */
-			PROCESS_INFORMATION pi;
-			BOOL retval;
-			gchar *message = NULL;
-
-			memset(&pi, 0, sizeof(pi));
-
-			if (G_WIN32_HAVE_WIDECHAR_API ()) {
-				STARTUPINFOW si;
-				wchar_t *wc_cmd = g_utf8_to_utf16(command,
-						-1, NULL, NULL, NULL);
-
-				memset(&si, 0 , sizeof(si));
-				si.cb = sizeof(si);
-
-				retval = CreateProcessW(NULL, wc_cmd, NULL,
-						NULL, 0, 0, NULL, NULL,
-						&si, &pi);
-				g_free(wc_cmd);
-			} else {
-				STARTUPINFOA si;
-				char *l_cmd = g_locale_from_utf8(command,
-						-1, NULL, NULL, NULL);
-
-				memset(&si, 0 , sizeof(si));
-				si.cb = sizeof(si);
-
-				retval = CreateProcessA(NULL, l_cmd, NULL,
-						NULL, 0, 0, NULL, NULL,
-						&si, &pi);
-				g_free(l_cmd);
-			}
-
-			if (retval) {
-				CloseHandle(pi.hProcess);
-				CloseHandle(pi.hThread);
-			} else {
-				message = g_win32_error_message(GetLastError());
-			}
-
-			purple_debug_info("pounce",
-					"Pounce execute command called for: "
-					"%s\n%s%s%s",
-						command,
-						retval ? "" : "Error: ",
-						retval ? "" : message,
-						retval ? "" : "\n");
-			g_free(message);
+			winpidgin_shell_execute(command, "open", NULL);
 #endif /* !_WIN32 */
 		}
 	}
--- a/pidgin/gtkprefs.c	Sun Feb 14 08:06:00 2010 +0000
+++ b/pidgin/gtkprefs.c	Sun Feb 14 20:20:00 2010 +0000
@@ -1445,11 +1445,27 @@
 
 #ifdef _WIN32
 static void
+apply_custom_font(void)
+{
+	PangoFontDescription *desc = NULL;
+	if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font")) {
+		const char *font = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/custom_font");
+		desc = pango_font_description_from_string(font);
+	}
+
+	gtk_widget_modify_font(sample_imhtml, desc);
+	if (desc)
+		pango_font_description_free(desc);
+
+}
+static void
 pidgin_custom_font_set(GtkFontButton *font_button, gpointer nul)
 {
+
 	purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/custom_font",
-				gtk_font_button_get_font_name(font_button))
-;
+				gtk_font_button_get_font_name(font_button));
+
+	apply_custom_font();
 }
 #endif
 
@@ -1522,6 +1538,7 @@
 	if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font"))
 		gtk_widget_set_sensitive(hbox, FALSE);
 	g_signal_connect(G_OBJECT(fontpref), "clicked", G_CALLBACK(pidgin_toggle_sensitive), hbox);
+	g_signal_connect(G_OBJECT(fontpref), "clicked", G_CALLBACK(apply_custom_font), hbox);
 	g_signal_connect(G_OBJECT(font_button), "font-set", G_CALLBACK(pidgin_custom_font_set), NULL);
 
 	}
--- a/pidgin/gtkutils.c	Sun Feb 14 08:06:00 2010 +0000
+++ b/pidgin/gtkutils.c	Sun Feb 14 20:20:00 2010 +0000
@@ -105,7 +105,6 @@
 void
 pidgin_setup_imhtml(GtkWidget *imhtml)
 {
-	PangoFontDescription *desc = NULL;
 	g_return_if_fail(imhtml != NULL);
 	g_return_if_fail(GTK_IS_IMHTML(imhtml));
 
@@ -115,15 +114,16 @@
 
 #ifdef _WIN32
 	if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font")) {
+		PangoFontDescription *desc;
 		const char *font = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/custom_font");
 		desc = pango_font_description_from_string(font);
+		if (desc) {
+			gtk_widget_modify_font(imhtml, desc);
+			pango_font_description_free(desc);
+		}
 	}
 #endif
 
-	if (desc) {
-		gtk_widget_modify_font(imhtml, desc);
-		pango_font_description_free(desc);
-	}
 }
 
 static
--- a/pidgin/win32/gtkwin32dep.c	Sun Feb 14 08:06:00 2010 +0000
+++ b/pidgin/win32/gtkwin32dep.c	Sun Feb 14 20:20:00 2010 +0000
@@ -157,6 +157,7 @@
 		wsinfo.lpVerb = w_verb;
 		wsinfo.lpFile = w_uri;
 		wsinfo.nShow = SW_SHOWNORMAL;
+		wsinfo.fMask |= SEE_MASK_FLAG_NO_UI;
 		if (clazz != NULL) {
 			w_clazz = g_utf8_to_utf16(clazz, -1, NULL, NULL, NULL);
 			wsinfo.fMask |= SEE_MASK_CLASSNAME;
@@ -181,6 +182,7 @@
 		sinfo.lpVerb = verb;
 		sinfo.lpFile = locale_uri;
 		sinfo.nShow = SW_SHOWNORMAL;
+		sinfo.fMask |= SEE_MASK_FLAG_NO_UI;
 		if (clazz != NULL) {
 			sinfo.fMask |= SEE_MASK_CLASSNAME;
 			sinfo.lpClass = clazz;