X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkprintoperation-win32.c;h=04de8ebbeb178f44d8bd7d2db460199f96162a74;hb=ce0675f1fb2582717793ec29b1787039dfbf8437;hp=ccb3cd929b9994c7440bafae5c3677f78b9486f5;hpb=0a07e9733bb259598a09515a3e4cdbcda5feef57;p=~andy%2Fgtk diff --git a/gtk/gtkprintoperation-win32.c b/gtk/gtkprintoperation-win32.c index ccb3cd929..04de8ebbe 100644 --- a/gtk/gtkprintoperation-win32.c +++ b/gtk/gtkprintoperation-win32.c @@ -13,9 +13,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ #ifndef _MSC_VER @@ -71,7 +69,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 (HAVE_IPRINTDIALOGCALLBACK) #undef INTERFACE #define INTERFACE IPrintDialogCallback DECLARE_INTERFACE_ (IPrintDialogCallback, IUnknown) @@ -655,7 +653,7 @@ static HWND get_parent_hwnd (GtkWidget *widget) { gtk_widget_realize (widget); - return gdk_win32_drawable_get_handle (widget->window); + return gdk_win32_window_get_handle (gtk_widget_get_window (widget)); } static void @@ -1339,7 +1337,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); } @@ -1360,13 +1358,13 @@ pageDlgProc (HWND wnd, UINT message, WPARAM wparam, LPARAM lparam) SetWindowLongPtrW (wnd, GWLP_USERDATA, (LONG_PTR)op); - plug = _gtk_win32_embed_widget_new ((GdkNativeWindow) wnd); + plug = _gtk_win32_embed_widget_new (wnd); gtk_window_set_modal (GTK_WINDOW (plug), TRUE); op_win32->embed_widget = plug; 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); @@ -1411,8 +1409,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);