From 787ccfc8ac336388db6ff40c32e1741695935c49 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Fri, 12 Jun 2009 15:05:55 +0200 Subject: [PATCH] [shell] Add default case to switch, warning about unsupported print pages setting It falls back to GTK_PRINT_PAGES_ALL. Fixes bug #585497. --- shell/ev-print-operation.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell/ev-print-operation.c b/shell/ev-print-operation.c index 9c21a1d9..1821d4f9 100644 --- a/shell/ev-print-operation.c +++ b/shell/ev-print-operation.c @@ -1120,6 +1120,8 @@ ev_print_operation_export_print_dialog_response_cb (GtkDialog *dial export->ranges[i].end = export->n_pages - 1; } break; + default: + g_warning ("Unsupported print pages setting\n"); case GTK_PRINT_PAGES_ALL: export->ranges = &export->one_range; @@ -1129,6 +1131,7 @@ ev_print_operation_export_print_dialog_response_cb (GtkDialog *dial break; } + if (export->n_ranges < 1 || !clamp_ranges (export)) { GtkWidget *message_dialog; -- 2.43.5