From a606ea62a156015a7a19bb93123ae19ef87e3076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= Date: Tue, 11 Jan 2011 16:13:34 +0100 Subject: [PATCH] Fix win32 build --- gdk/win32/Makefile.am | 1 + gdk/win32/gdkprivate-win32.h | 1 - gtk/Makefile.am | 4 ++-- gtk/gtk.symbols | 2 +- gtk/gtkappchooserbutton.c | 2 ++ gtk/gtkappchooserwidget.c | 2 ++ gtk/gtkmain.c | 9 ++++++++- gtk/gtkmain.h | 2 +- modules/input/gtkimcontextime.c | 4 ++++ 9 files changed, 21 insertions(+), 6 deletions(-) diff --git a/gdk/win32/Makefile.am b/gdk/win32/Makefile.am index 641ae68208..404ddd6aef 100644 --- a/gdk/win32/Makefile.am +++ b/gdk/win32/Makefile.am @@ -33,6 +33,7 @@ libgdk_win32_la_SOURCES = \ gdkdevice-wintab.c \ gdkdevice-wintab.h \ gdkdisplay-win32.c \ + gdkdisplaymanager-win32.c \ gdkdnd-win32.c \ gdkevents-win32.c \ gdkgeometry-win32.c \ diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h index 6ff1cad424..2889e66cb6 100644 --- a/gdk/win32/gdkprivate-win32.h +++ b/gdk/win32/gdkprivate-win32.h @@ -109,7 +109,6 @@ GdkScreen *GDK_WINDOW_SCREEN(GObject *win); #define GDK_WINDOW_IS_WIN32(win) (GDK_IS_WINDOW_IMPL_WIN32 (win->impl)) typedef struct _GdkColormapPrivateWin32 GdkColormapPrivateWin32; -typedef struct _GdkWin32Cursor GdkWin32Cursor; typedef struct _GdkWin32SingleFont GdkWin32SingleFont; struct _GdkWin32Cursor diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 148137bb6e..06b434b78a 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -894,10 +894,10 @@ libgtk_3_0_la_LIBADD = $(libadd) libgtk_3_0_la_DEPENDENCIES = $(deps) #libgtk_win32_3_0_la_LDFLAGS = $(libtool_opts) -Wl,-luuid -#libgtk_win32_3_0_la_LIBADD = $(libadd) -lole32 -lgdi32 -lcomdlg32 -lwinspool -lcomctl32 -#libgtk_win32_3_0_la_DEPENDENCIES = $(gtk_def) $(gtk_win32_res) $(deps) if USE_WIN32 +libgtk_3_0_la_LIBADD += -lole32 -lgdi32 -lcomdlg32 -lwinspool -lcomctl32 +libgtk_3_0_la_DEPENDENCIES += $(gtk_win32_res) $(deps) libgtk_target_ldflags = $(gtk_win32_res_ldflag) $(gtk_win32_symbols) endif diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index d3bec23c34..a8aa36e4d7 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -1335,7 +1335,7 @@ gtk_info_bar_set_message_type gtk_info_bar_set_response_sensitive gtk_init gtk_init_check -#ifdef GDK_WINDOWING_WIN32 +#ifdef G_OS_WIN32 gtk_init_abi_check gtk_init_check_abi_check #endif diff --git a/gtk/gtkappchooserbutton.c b/gtk/gtkappchooserbutton.c index 586c74dd9e..df00ae820d 100644 --- a/gtk/gtkappchooserbutton.c +++ b/gtk/gtkappchooserbutton.c @@ -271,7 +271,9 @@ gtk_app_chooser_button_populate (GtkAppChooserButton *self) GIcon *icon; gboolean cycled_recommended; +#ifndef G_OS_WIN32 recommended_apps = g_app_info_get_recommended_for_type (self->priv->content_type); +#endif cycled_recommended = FALSE; for (l = recommended_apps; l != NULL; l = l->next) diff --git a/gtk/gtkappchooserwidget.c b/gtk/gtkappchooserwidget.c index 487f921a1a..6d0c3fa3f3 100644 --- a/gtk/gtkappchooserwidget.c +++ b/gtk/gtkappchooserwidget.c @@ -722,6 +722,7 @@ gtk_app_chooser_widget_real_add_items (GtkAppChooserWidget *self) } } +#ifndef G_OS_WIN32 if (self->priv->show_recommended || self->priv->show_all) { recommended_apps = g_app_info_get_recommended_for_type (self->priv->content_type); @@ -748,6 +749,7 @@ gtk_app_chooser_widget_real_add_items (GtkAppChooserWidget *self) exclude_apps = g_list_concat (exclude_apps, g_list_copy (fallback_apps)); } +#endif if (self->priv->show_other || self->priv->show_all) { diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 63376bfb1f..9a3b0314fa 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -1169,7 +1169,14 @@ gtk_init (int *argc, char ***argv) } } -#ifdef G_PLATFORM_WIN32 +#ifdef G_OS_WIN32 + +/* This is relevant when building with gcc for Windows (MinGW), + * where we want to be struct packing compatible with MSVC, + * i.e. use the -mms-bitfields switch. + * For Cygwin there should be no need to be compatible with MSVC, + * so no need to use G_PLATFORM_WIN32. + */ static void check_sizeof_GtkWindow (size_t sizeof_GtkWindow) diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h index f015568384..99ce6d45ab 100644 --- a/gtk/gtkmain.h +++ b/gtk/gtkmain.h @@ -107,7 +107,7 @@ gboolean gtk_init_with_args (gint *argc, GOptionGroup *gtk_get_option_group (gboolean open_default_display); -#ifdef G_PLATFORM_WIN32 +#ifdef G_OS_WIN32 /* Variants that are used to check for correct struct packing * when building GTK+-using code. diff --git a/modules/input/gtkimcontextime.c b/modules/input/gtkimcontextime.c index d6cdd9b32f..786fb9d40e 100644 --- a/modules/input/gtkimcontextime.c +++ b/modules/input/gtkimcontextime.c @@ -25,6 +25,10 @@ * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/appendix/hh/appendix/imeimes2_35ph.asp */ +#ifdef GTK_DISABLE_DEPRECATED +#undef GTK_DISABLE_DEPRECATED +#endif + #include "gtkimcontextime.h" #include "imm-extra.h"