win32: globally define _WIN32_WINNT macro, tune config, move gtkconv themes

Sat, 18 May 2013 19:22:47 +0200

author
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
date
Sat, 18 May 2013 19:22:47 +0200
changeset 33941
80fcf7f86e4a
parent 33940
b44d15793c83
child 33942
e0a388ced476

win32: globally define _WIN32_WINNT macro, tune config, move gtkconv themes

config.h.mingw file | annotate | diff | comparison | revisions
pidgin/Makefile.mingw file | annotate | diff | comparison | revisions
pidgin/gtkconv-theme.c file | annotate | diff | comparison | revisions
pidgin/gtkconv.c file | annotate | diff | comparison | revisions
pidgin/plugins/win32/transparency/win2ktrans.c file | annotate | diff | comparison | revisions
pidgin/win32/MinimizeToTray.c file | annotate | diff | comparison | revisions
pidgin/win32/winpidgin.c file | annotate | diff | comparison | revisions
--- a/config.h.mingw	Sat May 18 16:02:23 2013 +0200
+++ b/config.h.mingw	Sat May 18 19:22:47 2013 +0200
@@ -29,7 +29,7 @@
 /* #undef HAVE_CONNECT */
 
 /* Define to 1 if Cyrus SASL is present */
-/* #undef HAVE_CYRUS_SASL */
+#define HAVE_CYRUS_SASL 1
 
 /* Define if you have the external 'daylight' variable. */
 #define HAVE_DAYLIGHT 1
@@ -62,9 +62,8 @@
 /* Define to 1 if you have the <fcntl.h> header file. */
 #define HAVE_FCNTL_H 1
 
-/* Define to 1 if you have the getaddrinfo function. */
-/* TODO: Use this on new enough versions of Windows */
-/* #define HAVE_GETADDRINFO 1 */
+/* Define to 1 if you have the getaddrinfo function (since WinXP). */
+#define HAVE_GETADDRINFO 1
 
 /* Define to 1 if you have the `gethostid' function. */
 /* #define HAVE_GETHOSTID 1 */
@@ -148,13 +147,13 @@
 /* #undef HAVE_MONO_METADATA_OBJECT_H */
 
 /* Define to 1 if you have the <nspr.h> header file. */
-/* #undef HAVE_NSPR_H */
+#define HAVE_NSPR_H 1
 
 /* Define if you have Mozilla NSS */
 #define HAVE_NSS 1
 
 /* Define to 1 if you have the <nss.h> header file. */
-/* #undef HAVE_NSS_H */
+#define HAVE_NSS_H 1
 
 /* Define if we have Pango 1.4 or newer. */
 #define HAVE_PANGO14 1
@@ -409,4 +408,7 @@
 
 #define HAVE_FILENO 1
 
-
+#ifndef _WIN32_WINNT
+/* _WIN32_WINNT_WINXP = 0x0501 */
+#define _WIN32_WINNT 0x0501
+#endif
--- a/pidgin/Makefile.mingw	Sat May 18 16:02:23 2013 +0200
+++ b/pidgin/Makefile.mingw	Sat May 18 19:22:47 2013 +0200
@@ -154,8 +154,9 @@
 
 install_shallow: $(PIDGIN_INSTALL_DIR) $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
 	cp $(EXE_TARGET).exe $(PIDGIN_TARGET).dll $(PIDGIN_INSTALL_DIR)
-	mkdir -p "$(PIDGIN_INSTALL_DIR)/pidgin/theme/"
-	cp -r themes/* "$(PIDGIN_INSTALL_DIR)/pidgin/theme/"
+	mkdir -p "$(PIDGIN_INSTALL_DIR)/theme"
+	cp -r themes/* "$(PIDGIN_INSTALL_DIR)/theme/"
+	chmod -R 777 "$(PIDGIN_INSTALL_DIR)/theme/"
 
 install: install_shallow all
 	$(MAKE_at) $(MAKE) -C $(PIDGIN_PLUGINS_TOP) -f $(MINGW_MAKEFILE) install
--- a/pidgin/gtkconv-theme.c	Sat May 18 16:02:23 2013 +0200
+++ b/pidgin/gtkconv-theme.c	Sat May 18 19:22:47 2013 +0200
@@ -126,7 +126,11 @@
 
 	if (!g_file_test(file, G_FILE_TEST_EXISTS)) {
 		g_free(file);
+#ifdef _WIN32
+		file = g_build_filename(DATADIR, "theme", "Template.html", NULL);
+#else
 		file = g_build_filename(DATADIR, "pidgin", "theme", "Template.html", NULL);
+#endif
 	}
 
 	return file;
--- a/pidgin/gtkconv.c	Sat May 18 16:02:23 2013 +0200
+++ b/pidgin/gtkconv.c	Sat May 18 19:22:47 2013 +0200
@@ -8840,7 +8840,11 @@
 			PURPLE_CALLBACK(wrote_msg_update_unseen_cb), NULL);
 
 	purple_theme_manager_register_type(g_object_new(PIDGIN_TYPE_CONV_THEME_LOADER, "type", "conversation", NULL));
+#ifdef _WIN32
+	theme_dir = g_build_filename(DATADIR, "theme", NULL);
+#else
 	theme_dir = g_build_filename(DATADIR, "pidgin", "theme", NULL);
+#endif
 	default_conv_theme = purple_theme_manager_load_theme(theme_dir, "conversation");
 	g_free(theme_dir);
 
--- a/pidgin/plugins/win32/transparency/win2ktrans.c	Sat May 18 16:02:23 2013 +0200
+++ b/pidgin/plugins/win32/transparency/win2ktrans.c	Sat May 18 19:22:47 2013 +0200
@@ -21,9 +21,8 @@
  * 02111-1301, USA.
  *
  */
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0500
-#endif
+
+#include "config.h"
 #include <gdk/gdkwin32.h>
 #include "internal.h"
 
--- a/pidgin/win32/MinimizeToTray.c	Sat May 18 16:02:23 2013 +0200
+++ b/pidgin/win32/MinimizeToTray.c	Sat May 18 19:22:47 2013 +0200
@@ -14,7 +14,7 @@
  *
  * Copyright 2000 Matthew Ellis <m.t.ellis@bigfoot.com>
  */
-#define _WIN32_WINNT 0x0500
+#include <config.h>
 #include <windows.h>
 #include "MinimizeToTray.h"
 
--- a/pidgin/win32/winpidgin.c	Sat May 18 16:02:23 2013 +0200
+++ b/pidgin/win32/winpidgin.c	Sat May 18 19:22:47 2013 +0200
@@ -25,10 +25,8 @@
  *
  */
 
-/* This is for ATTACH_PARENT_PROCESS */
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x501
-#endif
+#include "config.h"
+
 #include <windows.h>
 #include <fcntl.h>
 #include <stdlib.h>
@@ -36,7 +34,6 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include "config.h"
 
 typedef int (__cdecl* LPFNPIDGINMAIN)(HINSTANCE, int, char**);
 typedef void (WINAPI* LPFNSETDLLDIRECTORY)(LPCWSTR);

mercurial