summaryrefslogtreecommitdiff
path: root/libview/ev-print-operation.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-11-23 18:15:54 +0300
committermonsta <[email protected]>2016-11-23 18:15:54 +0300
commitae5f4711a21508a70d7123dbc0efb610af1289a2 (patch)
tree54d4a9de3b092aa772ed8799fcf30e11e19ff93f /libview/ev-print-operation.c
parent7884bbe50fe8b8c26e68b8077c18047861c2dd0c (diff)
downloadatril-ae5f4711a21508a70d7123dbc0efb610af1289a2.tar.bz2
atril-ae5f4711a21508a70d7123dbc0efb610af1289a2.tar.xz
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require caja >= 1.17.1
Diffstat (limited to 'libview/ev-print-operation.c')
-rw-r--r--libview/ev-print-operation.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/libview/ev-print-operation.c b/libview/ev-print-operation.c
index 822d1a84..7ca2b41e 100644
--- a/libview/ev-print-operation.c
+++ b/libview/ev-print-operation.c
@@ -872,12 +872,7 @@ export_print_done (EvPrintOperationExport *export)
app = g_app_info_create_from_commandline (cmd, NULL, 0, &error);
if (app != NULL) {
-#if GTK_CHECK_VERSION (3, 0, 0)
ctx = gdk_display_get_app_launch_context (gtk_widget_get_display (GTK_WIDGET (export->parent_window)));
-#else
- ctx = gdk_app_launch_context_new ();
- gdk_app_launch_context_set_display (ctx, gtk_widget_get_display (GTK_WIDGET (export->parent_window)));
-#endif
gdk_app_launch_context_set_screen (ctx, gtk_window_get_screen (export->parent_window));
g_app_info_launch (app, NULL, G_APP_LAUNCH_CONTEXT (ctx), &error);
@@ -1873,11 +1868,7 @@ ev_print_operation_print_create_custom_widget (EvPrintOperationPrint *print,
{
GtkPrintSettings *settings;
GtkWidget *label;
-#if GTK_CHECK_VERSION (3, 0, 0)
GtkWidget *grid;
-#else
- GtkWidget *table;
-#endif
EvPrintScale page_scale;
gboolean autorotate;
gboolean use_source_size;
@@ -1889,7 +1880,6 @@ ev_print_operation_print_create_custom_widget (EvPrintOperationPrint *print,
TRUE;
use_source_size = gtk_print_settings_get_bool (settings, EV_PRINT_SETTING_PAGE_SIZE);
-#if GTK_CHECK_VERSION (3, 0, 0)
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
@@ -1897,15 +1887,6 @@ ev_print_operation_print_create_custom_widget (EvPrintOperationPrint *print,
label = gtk_label_new (_("Page Scaling:"));
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
-#else
- table = gtk_table_new (3, 2, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), 6);
- gtk_table_set_col_spacings (GTK_TABLE (table), 12);
- gtk_container_set_border_width (GTK_CONTAINER (table), 12);
-
- label = gtk_label_new (_("Page Scaling:"));
- gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
-#endif
gtk_widget_show (label);
print->scale_combo = gtk_combo_box_text_new ();
@@ -1924,11 +1905,7 @@ ev_print_operation_print_create_custom_widget (EvPrintOperationPrint *print,
"\n"
"• \"Fit to Printable Area\": Document pages are enlarged or reduced as"
" required to fit the printable area of the printer page.\n"));
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_grid_attach (GTK_GRID (grid), print->scale_combo, 1, 0, 1, 1);
-#else
- gtk_table_attach (GTK_TABLE (table), print->scale_combo, 1, 2, 0, 1, GTK_FILL, 0, 0, 0);
-#endif
gtk_widget_show (print->scale_combo);
print->autorotate_button = gtk_check_button_new_with_label (_("Auto Rotate and Center"));
@@ -1936,28 +1913,17 @@ ev_print_operation_print_create_custom_widget (EvPrintOperationPrint *print,
gtk_widget_set_tooltip_text (print->autorotate_button,
_("Rotate printer page orientation of each page to match orientation of each document page. "
"Document pages will be centered within the printer page."));
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_grid_attach (GTK_GRID (grid), print->autorotate_button, 0, 1, 2, 1);
-#else
- gtk_table_attach (GTK_TABLE (table), print->autorotate_button, 0, 2, 1, 2, GTK_FILL, 0, 0, 0);
-#endif
gtk_widget_show (print->autorotate_button);
print->source_button = gtk_check_button_new_with_label (_("Select page size using document page size"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (print->source_button), use_source_size);
gtk_widget_set_tooltip_text (print->source_button, _("When enabled, each page will be printed on "
"the same size paper as the document page."));
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_grid_attach (GTK_GRID (grid), print->source_button, 0, 2, 2, 1);
gtk_widget_show (print->source_button);
return G_OBJECT (grid);
-#else
- gtk_table_attach (GTK_TABLE (table), print->source_button, 0, 2, 2, 3, GTK_FILL, 0, 0, 0);
- gtk_widget_show (print->source_button);
-
- return G_OBJECT (table);
-#endif
}
static void