]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkprintoperation-win32.c
gdk: Allow display subclasses to override the type used for windows
[~andy/gtk] / gtk / gtkprintoperation-win32.c
index 76f8a696ae1dcd1cbb39a82badb4b8ce56190f64..aee3b500eebd83639bb6a46885acfacc10c51f6d 100644 (file)
@@ -43,7 +43,6 @@
 #include "gtkstock.h"
 #include "gtk.h"
 #include "gtkwin32embedwidget.h"
-#include "gtkalias.h"
 
 #define MAX_PAGE_RANGES 20
 #define STATUS_POLLING_TIME 2000
@@ -72,7 +71,7 @@ static void win32_poll_status (GtkPrintOperation *op);
 
 static const GUID myIID_IPrintDialogCallback  = {0x5852a2c3,0x6530,0x11d1,{0xb6,0xa3,0x0,0x0,0xf8,0x75,0x7b,0xf9}};
 
-#if !defined (_MSC_VER) && !defined (MINGW64) && !defined (__MINGW64__)
+#if !defined (_MSC_VER) && !defined (__MINGW64_VERSION_MAJOR)
 #undef INTERFACE
 #define INTERFACE IPrintDialogCallback
 DECLARE_INTERFACE_ (IPrintDialogCallback, IUnknown)
@@ -656,7 +655,7 @@ static HWND
 get_parent_hwnd (GtkWidget *widget)
 {
   gtk_widget_realize (widget);
-  return gdk_win32_drawable_get_handle (widget->window);
+  return gdk_win32_drawable_get_handle (gtk_widget_get_window (widget));
 }
 
 static void
@@ -1340,7 +1339,7 @@ plug_grab_notify (GtkWidget        *widget,
                  gboolean          was_grabbed,
                  GtkPrintOperation *op)
 {
-  EnableWindow (GetAncestor (GDK_WINDOW_HWND (widget->window), GA_ROOT),
+  EnableWindow (GetAncestor (GDK_WINDOW_HWND (gtk_widget_get_window (widget)), GA_ROOT),
                was_grabbed);
 }
 
@@ -1367,7 +1366,7 @@ pageDlgProc (HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
       gtk_container_add (GTK_CONTAINER (plug), op->priv->custom_widget);
       gtk_widget_show (op->priv->custom_widget);
       gtk_widget_show (plug);
-      gdk_window_focus (plug->window, GDK_CURRENT_TIME);
+      gdk_window_focus (gtk_widget_get_window (plug), GDK_CURRENT_TIME);
 
       /* This dialog is modal, so we grab the embed widget */
       gtk_grab_add (plug);
@@ -1412,8 +1411,9 @@ create_application_page (GtkPrintOperation *op)
   const char *tab_label;
 
   /* Make the template the size of the custom widget size request */
-  gtk_widget_size_request (op->priv->custom_widget, &requisition);
-      
+  gtk_widget_get_preferred_size (op->priv->custom_widget,
+                                 &requisition, NULL);
+
   base_units = GetDialogBaseUnits ();
   baseunitX = LOWORD (base_units);
   baseunitY = HIWORD (base_units);
@@ -2134,6 +2134,3 @@ gtk_print_run_page_setup_dialog_async (GtkWindow            *parent,
   done_cb (new_page_setup, data);
   g_object_unref (new_page_setup);
 }
-
-#define __GTK_PRINT_OPERATION_WIN32_C__
-#include "gtkaliasdef.c"