diff options
author | Julien BLACHE <jblache@debian.org> | 2007-02-27 22:22:40 +0100 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2014-10-03 14:05:34 +0000 |
commit | 4d8384e7b116e3eb11cc3df9151c8554dbca95fc (patch) | |
tree | f049f1240de8a8a971a621a4a3891d5eab2839a1 /src/xsane-batch-scan.c | |
parent | 92f35807f68b30405639d4e0a95f748b6bdb793f (diff) | |
parent | 129ed4b29e21fdb8bda3bee89c3e5d8cca6ba749 (diff) |
Imported Debian patch 0.993-1debian/0.993-1
Diffstat (limited to 'src/xsane-batch-scan.c')
-rw-r--r-- | src/xsane-batch-scan.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/xsane-batch-scan.c b/src/xsane-batch-scan.c index 604e052..ff07e0c 100644 --- a/src/xsane-batch-scan.c +++ b/src/xsane-batch-scan.c @@ -3,7 +3,7 @@ xsane-batch-scan.c Oliver Rauch <Oliver.Rauch@rauch-domain.de> - Copyright (C) 1998-2005 Oliver Rauch + Copyright (C) 1998-2007 Oliver Rauch This file is part of the XSANE package. This program is free software; you can redistribute it and/or modify @@ -345,7 +345,7 @@ static void xsane_batch_scan_load_list(void) sprintf(windowname, "%s %s %s", xsane.prog_name, WINDOW_LOAD_BATCH_LIST, xsane.device_text); xsane_back_gtk_make_path(sizeof(filename), filename, "xsane", "batch-lists", 0, "default", ".xbl", XSANE_PATH_LOCAL_SANE); - if (!xsane_back_gtk_get_filename(windowname, filename, sizeof(filename), filename, NULL, FALSE, FALSE, FALSE, FALSE)) + if (!xsane_back_gtk_get_filename(windowname, filename, sizeof(filename), filename, NULL, NULL, XSANE_FILE_CHOOSER_ACTION_OPEN, XSANE_GET_FILENAME_SHOW_NOTHING, XSANE_FILE_FILTER_ALL | XSANE_FILE_FILTER_BATCHLIST, XSANE_FILE_FILTER_BATCHLIST)) { if (xsane_batch_scan_load_list_from_file(filename)) /* error while loading file ? */ { @@ -396,7 +396,7 @@ static void xsane_batch_scan_save_list(void) sprintf(windowname, "%s %s %s", xsane.prog_name, WINDOW_SAVE_BATCH_LIST, xsane.device_text); xsane_back_gtk_make_path(sizeof(filename), filename, "xsane", "batch-lists", 0, "default", ".xbl", XSANE_PATH_LOCAL_SANE); - if (!xsane_back_gtk_get_filename(windowname, filename, sizeof(filename), filename, NULL, FALSE, FALSE, FALSE, FALSE)) + if (!xsane_back_gtk_get_filename(windowname, filename, sizeof(filename), filename, NULL, NULL, XSANE_FILE_CHOOSER_ACTION_SAVE, XSANE_GET_FILENAME_SHOW_NOTHING, XSANE_FILE_FILTER_ALL | XSANE_FILE_FILTER_BATCHLIST, XSANE_FILE_FILTER_BATCHLIST)); { fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600); @@ -893,27 +893,29 @@ static void xsane_batch_scan_rename_callback(GtkWidget *widget, gpointer data) gtk_box_pack_start(GTK_BOX(vbox), text, TRUE, TRUE, 4); gtk_widget_show(text); + #ifdef HAVE_GTK2 - button = gtk_button_new_from_stock(GTK_STOCK_OK); + button = gtk_button_new_from_stock(GTK_STOCK_CANCEL); #else - button = gtk_button_new_with_label(BUTTON_OK); + button = gtk_button_new_with_label(BUTTON_CANCEL); #endif - GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); - g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_batch_scan_rename_button_callback, (void *) 1); + g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_batch_scan_rename_button_callback, (void *) -1); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0); - gtk_widget_grab_default(button); gtk_widget_show(button); #ifdef HAVE_GTK2 - button = gtk_button_new_from_stock(GTK_STOCK_CANCEL); + button = gtk_button_new_from_stock(GTK_STOCK_OK); #else - button = gtk_button_new_with_label(BUTTON_CANCEL); + button = gtk_button_new_with_label(BUTTON_OK); #endif - g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_batch_scan_rename_button_callback, (void *) -1); + GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); + g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_batch_scan_rename_button_callback, (void *) 1); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0); + gtk_widget_grab_default(button); gtk_widget_show(button); + xsane_batch_scan_rename = 0; while (xsane_batch_scan_rename == 0) |