changeset 30900:3c1563a54785

Build the "Pidgin Theme Editor" plugin on Windows too.
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 04 Nov 2010 18:23:41 +0000
parents 56e1f06471a9
children 52dbbedb4908 4de2b3adc823
files pidgin/plugins/Makefile.mingw pidgin/plugins/themeedit-icon.c pidgin/plugins/themeedit.c pidgin/win32/nsis/pidgin-installer.nsi
diffstat 4 files changed, 28 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/Makefile.mingw	Tue Nov 02 20:55:06 2010 +0000
+++ b/pidgin/plugins/Makefile.mingw	Thu Nov 04 18:23:41 2010 +0000
@@ -73,10 +73,19 @@
 	$(MAKE) -C $(WINPREFS_PLUGIN) -f $(MINGW_MAKEFILE) install
 	cp *.dll $(PIDGIN_INSTALL_PLUGINS_DIR)
 
+THEMEEDIT_SRC = themeedit.c themeedit-icon.c
+THEMEEDIT_OBJECTS = $(THEMEEDIT_SRC:%.c=%.o)
+
+themeedit.dll: $(THEMEEDIT_OBJECTS)
+	$(CC) -shared $(THEMEEDIT_OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $@
+
 %.dll: %.c $(PURPLE_CONFIG_H) $(PURPLE_VERSION_H)
 	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@.o -c $<
 	$(CC) -shared $@.o $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $@
 
+
+include $(PIDGIN_COMMON_RULES)
+
 plugins: \
 		convcolors.dll \
 		extplacement.dll \
@@ -89,6 +98,7 @@
 		relnot.dll \
 		sendbutton.dll \
 		spellchk.dll \
+		themeedit.dll \
 		timestamp_format.dll \
 		timestamp.dll \
 		xmppconsole.dll
--- a/pidgin/plugins/themeedit-icon.c	Tue Nov 02 20:55:06 2010 +0000
+++ b/pidgin/plugins/themeedit-icon.c	Thu Nov 04 18:23:41 2010 +0000
@@ -106,9 +106,16 @@
 create_icon_theme(GtkWidget *window)
 {
 	int s, i, j;
-	char *dirname = "/tmp";   /* FIXME */
-	PidginStatusIconTheme *theme = g_object_new(PIDGIN_TYPE_STATUS_ICON_THEME, "type", "status-icon",
-				"author", getlogin(),
+	const char *dirname = g_get_tmp_dir();
+	PidginStatusIconTheme *theme;
+	const char *author;
+#ifndef _WIN32
+	author = getlogin();
+#else
+	author = "user";
+#endif
+	theme = g_object_new(PIDGIN_TYPE_STATUS_ICON_THEME, "type", "status-icon",
+				"author", author,
 				"directory", dirname,
 				NULL);
 
--- a/pidgin/plugins/themeedit.c	Tue Nov 02 20:55:06 2010 +0000
+++ b/pidgin/plugins/themeedit.c	Thu Nov 04 18:23:41 2010 +0000
@@ -268,8 +268,14 @@
 
 	theme = pidgin_blist_get_theme();
 	if (!theme) {
+		const char *author;
+#ifndef _WIN32
+		author = getlogin();
+#else
+		author = "user";
+#endif
 		theme = g_object_new(PIDGIN_TYPE_BLIST_THEME, "type", "blist",
-				"author", getlogin(),
+				"author", author,
 				NULL);
 		pidgin_blist_set_theme(theme);
 	}
--- a/pidgin/win32/nsis/pidgin-installer.nsi	Tue Nov 02 20:55:06 2010 +0000
+++ b/pidgin/win32/nsis/pidgin-installer.nsi	Thu Nov 04 18:23:41 2010 +0000
@@ -599,6 +599,7 @@
     Delete "$INSTDIR\plugins\ssl.dll"
     Delete "$INSTDIR\plugins\statenotify.dll"
     Delete "$INSTDIR\plugins\tcl.dll"
+    Delete "$INSTDIR\plugins\themeedit.dll"
     Delete "$INSTDIR\plugins\ticker.dll"
     Delete "$INSTDIR\plugins\timestamp.dll"
     Delete "$INSTDIR\plugins\timestamp_format.dll"