/pidgin/main: 184849af4d62: cross-win32: fix gtk3 build

Tomasz Wasilczyk twasilczyk at pidgin.im
Thu Apr 17 04:25:22 EDT 2014


Changeset: 184849af4d62c355194eb5f19f22f4a1e26eb6f5
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-04-17 10:25 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/184849af4d62

Description:

cross-win32: fix gtk3 build

diffstat:

 pidgin/gtkblist.c          |  11 +++++++----
 pidgin/plugins/cap/cap.c   |   2 +-
 pidgin/plugins/cap/cap.h   |   2 +-
 pidgin/win32/gtkwin32dep.c |  13 ++++++++-----
 4 files changed, 17 insertions(+), 11 deletions(-)

diffs (94 lines):

diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -134,7 +134,12 @@ typedef struct
 	((PidginBuddyListPrivate *)((list)->priv))
 
 #define PIDGIN_WINDOW_ICONIFIED(x) \
-	(gdk_window_get_state(gtk_widget_get_window(GTK_WIDGET(x))) & GDK_WINDOW_STATE_ICONIFIED)
+	(gdk_window_get_state(gtk_widget_get_window(GTK_WIDGET(x))) & \
+	GDK_WINDOW_STATE_ICONIFIED)
+
+#define PIDGIN_WINDOW_MAXIMIZED(x) \
+	(gdk_window_get_state(gtk_widget_get_window(GTK_WIDGET(x))) & \
+	GDK_WINDOW_STATE_MAXIMIZED)
 
 static GtkWidget *accountmenu = NULL;
 
@@ -264,10 +269,8 @@ static gboolean gtk_blist_configure_cb(G
 #ifdef _WIN32
 	/* Workaround for GTK+ bug # 169811 - "configure_event" is fired
 	 * when the window is being maximized */
-	if (gdk_window_get_state(w->window)
-			& GDK_WINDOW_STATE_MAXIMIZED) {
+	if (PIDGIN_WINDOW_MAXIMIZED(w))
 		return FALSE;
-	}
 #endif
 
 	/* don't save if nothing changed */
diff --git a/pidgin/plugins/cap/cap.c b/pidgin/plugins/cap/cap.c
--- a/pidgin/plugins/cap/cap.c
+++ b/pidgin/plugins/cap/cap.c
@@ -862,7 +862,7 @@ static CapPrefsUI * create_cap_prefs_ui(
 	return ui;
 }
 
-static void cap_prefs_ui_destroy_cb(GtkObject *object, gpointer user_data) {
+static void cap_prefs_ui_destroy_cb(GObject *object, gpointer user_data) {
 	CapPrefsUI *ui = user_data;
 	if(_db) {
 		add_plugin_functionality(_plugin_pointer);
diff --git a/pidgin/plugins/cap/cap.h b/pidgin/plugins/cap/cap.h
--- a/pidgin/plugins/cap/cap.h
+++ b/pidgin/plugins/cap/cap.h
@@ -120,7 +120,7 @@ static void remove_plugin_functionality(
 static void write_stats_on_unload(gpointer key, gpointer value, gpointer user_data);
 static gboolean plugin_unload(PurplePlugin *plugin);
 static CapPrefsUI * create_cap_prefs_ui(void);
-static void cap_prefs_ui_destroy_cb(GtkObject *object, gpointer user_data);
+static void cap_prefs_ui_destroy_cb(GObject *object, gpointer user_data);
 static void numeric_spinner_prefs_cb(GtkSpinButton *spinbutton, gpointer user_data);
 static GtkWidget * get_config_frame(PurplePlugin *plugin);
 static void init_plugin(PurplePlugin *plugin);
diff --git a/pidgin/win32/gtkwin32dep.c b/pidgin/win32/gtkwin32dep.c
--- a/pidgin/win32/gtkwin32dep.c
+++ b/pidgin/win32/gtkwin32dep.c
@@ -322,12 +322,12 @@ winpidgin_window_flash(GtkWindow *window
 
 	g_return_if_fail(window != NULL);
 
-	gdkwin = GTK_WIDGET(window)->window;
+	gdkwin = gtk_widget_get_window(GTK_WIDGET(window));
 
 	g_return_if_fail(GDK_IS_WINDOW(gdkwin));
-	g_return_if_fail(GDK_WINDOW_TYPE(gdkwin) != GDK_WINDOW_CHILD);
+	g_return_if_fail(gdk_window_get_window_type(gdkwin) != GDK_WINDOW_CHILD);
 
-	if(GDK_WINDOW_DESTROYED(gdkwin))
+	if (gdk_window_is_destroyed(gdkwin))
 		return;
 
 	memset(&info, 0, sizeof(FLASHWINFO));
@@ -368,8 +368,11 @@ winpidgin_conv_blink(PurpleConversation 
 	window = GTK_WINDOW(win->window);
 
 	/* Don't flash if the window is in the foreground */
-	if (GetForegroundWindow() == GDK_WINDOW_HWND(GTK_WIDGET(window)->window))
+	if (GetForegroundWindow() ==
+		GDK_WINDOW_HWND(gtk_widget_get_window(GTK_WIDGET(window))))
+	{
 		return;
+	}
 
 	winpidgin_window_flash(window, TRUE);
 	/* Stop flashing when window receives focus */
@@ -474,7 +477,7 @@ get_WorkingAreaRectForWindow(HWND hwnd, 
 
 void winpidgin_ensure_onscreen(GtkWidget *win) {
 	RECT winR, wAR, intR;
-	HWND hwnd = GDK_WINDOW_HWND(win->window);
+	HWND hwnd = GDK_WINDOW_HWND(gtk_widget_get_window(win));
 
 	g_return_if_fail(hwnd != NULL);
 	GetWindowRect(hwnd, &winR);



More information about the Commits mailing list