diff options
author | Julien BLACHE <jblache@debian.org> | 2006-01-10 21:58:08 +0100 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2014-10-03 14:05:22 +0000 |
commit | a1871913efc67d71e7b355a8a03655cbf12ab07f (patch) | |
tree | cfe538674b55d1d0325e83bbbe1a2703bd2262b9 /src/xsane-batch-scan.c | |
parent | ab2ece358cc58b7a7d1671a72d62c2cafe8811bb (diff) | |
parent | 7fad909266d49203537a28e6acc5d96b14bf4e7f (diff) |
Imported Debian patch 0.99-1debian/0.99-1
Diffstat (limited to 'src/xsane-batch-scan.c')
-rw-r--r-- | src/xsane-batch-scan.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/xsane-batch-scan.c b/src/xsane-batch-scan.c index c7ae532..a356612 100644 --- a/src/xsane-batch-scan.c +++ b/src/xsane-batch-scan.c @@ -447,7 +447,7 @@ static void xsane_batch_scan_scan_list(void) GList *list = GTK_LIST(xsane.batch_scan_list)->children; Batch_Scan_Parameters *parameters = NULL; SANE_Int val_start = SANE_TRUE; - SANE_Int val_loop = SANE_TRUE; + SANE_Int val_loop = BATCH_MODE_LOOP; SANE_Int val_end = SANE_FALSE; SANE_Word val_next_tl_y = SANE_FIX(0.0); @@ -463,7 +463,7 @@ static void xsane_batch_scan_scan_list(void) { if (!list->next) /* last scan */ { - val_loop = SANE_FALSE; + val_loop = BATCH_MODE_LAST_SCAN; val_end = SANE_TRUE; val_next_tl_y = SANE_FIX(0.0); } @@ -501,7 +501,7 @@ static void xsane_batch_scan_scan_list(void) gtk_main_iteration(); } - xsane_scan_dialog(); + xsane_scan_dialog(NULL); while (xsane.scanning) { @@ -533,7 +533,7 @@ static void xsane_batch_scan_scan_list(void) xsane_control_option(xsane.dev, xsane.well_known.batch_scan_end, SANE_ACTION_SET_VALUE, &val_end, NULL); xsane_control_option(xsane.dev, xsane.well_known.batch_scan_next_tl_y, SANE_ACTION_SET_VALUE, &val_next_tl_y, NULL); - xsane.batch_loop = FALSE; /* make sure we reset the batch scan loop flag */ + xsane.batch_loop = BATCH_MODE_OFF; /* make sure we reset the batch scan loop flag */ if (parameters) { @@ -561,7 +561,11 @@ static void xsane_batch_scan_scan_selected(void) xsane_batch_scan_establish_parameters(parameters, TRUE); } - xsane_scan_dialog(); + xsane.batch_loop = BATCH_MODE_LAST_SCAN; /* to make sure we do not scan multiple times */ + + xsane_scan_dialog(NULL); + + xsane.batch_loop = BATCH_MODE_OFF; /* make sure we reset the batch scan loop flag */ } } @@ -939,6 +943,12 @@ static gint xsane_batch_scan_win_delete(GtkWidget *widget, gpointer data) { DBG(DBG_proc, "xsane_batch_scan_win_delete\n"); + if (preferences.show_batch_scan) + { + xsane_window_get_position(xsane.batch_scan_dialog, &xsane.batch_dialog_posx, &xsane.batch_dialog_posy); + gtk_window_move(GTK_WINDOW(xsane.batch_scan_dialog), xsane.batch_dialog_posx, xsane.batch_dialog_posy); + } + gtk_widget_hide(widget); preferences.show_batch_scan = FALSE; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(xsane.show_batch_scan_widget), preferences.show_batch_scan); |