]> Pileus Git - ~andy/gtk/blobdiff - modules/printbackends/cups/gtkprintbackendcups.c
Do not use static GTypeInfo and GInterfaceInfo
[~andy/gtk] / modules / printbackends / cups / gtkprintbackendcups.c
index 7fd39847f18cd17f293d9e41206e1a0c70725113..0bae98fac2e191f03b0869c029f88907d5783255 100644 (file)
@@ -193,7 +193,7 @@ static gboolean             request_auth_info                       (gpointer
 static void
 gtk_print_backend_cups_register_type (GTypeModule *module)
 {
-  static const GTypeInfo print_backend_cups_info =
+  const GTypeInfo print_backend_cups_info =
   {
     sizeof (GtkPrintBackendCupsClass),
     NULL,              /* base_init */
@@ -4319,18 +4319,18 @@ cups_printer_prepare_for_print (GtkPrinter       *printer,
             break;
           case GTK_PAGE_ORIENTATION_LANDSCAPE:
             if (layout < 4)
-              layout = layout + 5 - 2 * (layout % 2);
+              layout = layout + 2 + 4 * (1 - layout / 2);
             else
-              layout = layout - 6 + 4 * (1 - (layout - 4) / 2);
+              layout = layout - 3 - 2 * (layout % 2);
             break;
           case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT:
             layout = (layout + 3 - 2 * (layout % 2)) % 4 + 4 * (layout / 4);
             break;
           case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
             if (layout < 4)
-              layout = layout + 2 + 4 * (1 - layout / 2);
+              layout = layout + 5 - 2 * (layout % 2);
             else
-              layout = layout - 3 - 2 * (layout % 2);
+              layout = layout - 6 + 4 * (1 - (layout - 4) / 2);
             break;
         }