SOURCES: rawstudio-rev1068_batch_window_settings.patch (NEW) - mak...
blues
blues at pld-linux.org
Tue Jan 16 21:45:34 CET 2007
Author: blues Date: Tue Jan 16 20:45:34 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- make settings accessible in batch tab.
---- Files affected:
SOURCES:
rawstudio-rev1068_batch_window_settings.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/rawstudio-rev1068_batch_window_settings.patch
diff -u /dev/null SOURCES/rawstudio-rev1068_batch_window_settings.patch:1.1
--- /dev/null Tue Jan 16 21:45:34 2007
+++ SOURCES/rawstudio-rev1068_batch_window_settings.patch Tue Jan 16 21:45:29 2007
@@ -0,0 +1,199 @@
+Index: rs-batch.c
+===================================================================
+--- rs-batch.c (revision 1068)
++++ rs-batch.c (working copy)
+@@ -23,7 +23,11 @@
+ #include "rawstudio.h"
+ #include "rs-batch.h"
+ #include "conf_interface.h"
++#include "gettext.h"
++#include "gtk-helper.h"
+
++static gchar *filenames[] = {DEFAULT_CONF_EXPORT_FILENAME, "%f", "%f_%c", "%f_output_%4c", NULL};
++
+ extern GtkWindow *rawstudio_window;
+
+ static gboolean batch_exists_in_queue(RS_QUEUE *queue, const gchar *filename, gint setting_id);
+@@ -260,11 +264,120 @@
+ return FALSE;
+ }
+
++static GtkWidget *
++make_batchsettingbox()
++{
++ GtkWidget *batch_page;
++ GtkWidget *batch_directory_hbox;
++ GtkWidget *batch_directory_label;
++ GtkWidget *batch_directory_entry;
++ GtkWidget *batch_filename_hbox;
++ GtkWidget *batch_filename_label;
++ GtkWidget *batch_filename_entry;
++ GtkWidget *batch_filetype_hbox;
++ GtkWidget *batch_filetype_label;
++ RS_CONFBOX *batch_filetype_confbox;
++ GtkWidget *batch_tiff_uncompressed_check;
++ RS_FILETYPE *filetype;
++ gchar *conf_temp = NULL;
++ gint n;
++
++
++ batch_page = gtk_vbox_new(FALSE, 4);
++ gtk_container_set_border_width (GTK_CONTAINER (batch_page), 6);
++
++ batch_directory_hbox = gtk_hbox_new(FALSE, 0);
++ batch_directory_label = gtk_label_new(_("Directory:"));
++ gtk_misc_set_alignment(GTK_MISC(batch_directory_label), 0.0, 0.5);
++ batch_directory_entry = gtk_entry_new();
++ conf_temp = rs_conf_get_string(CONF_BATCH_DIRECTORY);
++
++ if (conf_temp)
++ {
++ gtk_entry_set_text(GTK_ENTRY(batch_directory_entry), conf_temp);
++ g_free(conf_temp);
++ }
++ gtk_box_pack_start (GTK_BOX (batch_directory_hbox), batch_directory_label, TRUE, TRUE, 0);
++ gtk_box_pack_start (GTK_BOX (batch_directory_hbox), batch_directory_entry, FALSE, TRUE, 0);
++ gtk_box_pack_start (GTK_BOX (batch_page), batch_directory_hbox, FALSE, TRUE, 0);
++
++
++ batch_filename_hbox = gtk_hbox_new(FALSE, 0);
++ batch_filename_label = gtk_label_new(_("Filename:"));
++ gtk_misc_set_alignment(GTK_MISC(batch_filename_label), 0.0, 0.5);
++ batch_filename_entry = gtk_combo_box_entry_new_text();
++ conf_temp = rs_conf_get_string(CONF_BATCH_FILENAME);
++
++ if (!conf_temp)
++ {
++ rs_conf_set_string(CONF_BATCH_FILENAME, DEFAULT_CONF_BATCH_FILENAME);
++ conf_temp = rs_conf_get_string(CONF_BATCH_FILENAME);
++ }
++
++ gtk_combo_box_append_text(GTK_COMBO_BOX(batch_filename_entry), conf_temp);
++
++ n=0;
++ while(filenames[n])
++ {
++ gtk_combo_box_append_text(GTK_COMBO_BOX(batch_filename_entry), filenames[n]);
++ n++;
++ }
++ gtk_combo_box_set_active(GTK_COMBO_BOX(batch_filename_entry), 0);
++ g_free(conf_temp);
++ gtk_box_pack_start (GTK_BOX (batch_filename_hbox), batch_filename_label, TRUE, TRUE, 0);
++ gtk_box_pack_start (GTK_BOX (batch_filename_hbox), batch_filename_entry, FALSE, TRUE, 0);
++ gtk_box_pack_start (GTK_BOX (batch_page), batch_filename_hbox, FALSE, TRUE, 0);
++
++ batch_filetype_hbox = gtk_hbox_new(FALSE, 0);
++ batch_filetype_label = gtk_label_new(_("Filetype:"));
++ gtk_misc_set_alignment(GTK_MISC(batch_filetype_label), 0.0, 0.5);
++
++ if (!rs_conf_get_filetype(CONF_BATCH_FILETYPE, &filetype))
++ rs_conf_set_filetype(CONF_BATCH_FILETYPE, filetype); /* set default */
++
++ batch_filetype_confbox = gui_confbox_filetype_new(CONF_BATCH_FILETYPE);
++
++ batch_tiff_uncompressed_check = checkbox_from_conf(CONF_BATCH_TIFF_UNCOMPRESSED, _("Save uncompressed TIFF"), FALSE);
++
++ gtk_box_pack_start (GTK_BOX (batch_filetype_hbox), batch_filetype_label, TRUE, TRUE, 0);
++ gtk_box_pack_start (GTK_BOX (batch_filetype_hbox), gui_confbox_get_widget(batch_filetype_confbox), FALSE, TRUE, 0);
++ gtk_box_pack_start (GTK_BOX (batch_page), batch_filetype_hbox, FALSE, TRUE, 0);
++
++ gtk_box_pack_start (GTK_BOX (batch_page), batch_tiff_uncompressed_check, FALSE, TRUE, 0);
++
++ g_signal_connect ((gpointer) batch_directory_entry, "changed",
++ G_CALLBACK(gui_batch_directory_entry_changed), NULL);
++ g_signal_connect ((gpointer) batch_filename_entry, "changed",
++ G_CALLBACK(gui_batch_filename_entry_changed), NULL);
++ gui_confbox_set_callback(batch_filetype_confbox, NULL, gui_batch_filetype_combobox_changed);
++
++ return batch_page;
++}
++
+ GtkWidget *
+ make_batchbox(RS_QUEUE *queue)
+ {
++ GtkWidget *settings_expander;
++ GtkWidget *settings_label;
+ GtkWidget *batchboxscroller;
++ GtkWidget *batchbox;
+ GtkWidget *batchview;
++
++ batchbox = gtk_vbox_new(FALSE, 4);
++
++ settings_expander = gtk_expander_new (NULL);
++ gtk_widget_show (settings_expander);
++ gtk_expander_set_expanded (GTK_EXPANDER (settings_expander), FALSE);
++
++ settings_label = gtk_label_new (_("Settings"));
++ gtk_widget_show (settings_label);
++ gtk_expander_set_label_widget (GTK_EXPANDER (settings_expander), settings_label);
++ gtk_label_set_use_markup (GTK_LABEL (settings_label), TRUE);
++
++ gtk_container_add (GTK_CONTAINER (settings_expander), make_batchsettingbox());
++ gtk_box_pack_start (GTK_BOX (batchbox), settings_expander, FALSE, FALSE, 0);
++
++
+ GtkCellRenderer *renderer_text, *renderer_pixbuf;
+ GtkTreeViewColumn *column_filename, *column_setting_id, *column_pixbuf;
+
+@@ -305,5 +418,7 @@
+
+ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW (batchview), FALSE);
+
+- return batchboxscroller;
++ gtk_box_pack_start (GTK_BOX (batchbox), batchboxscroller, TRUE, TRUE, 0);
++
++ return batchbox;
+ }
+Index: conf_interface.h
+===================================================================
+--- conf_interface.h (revision 1068)
++++ conf_interface.h (working copy)
+@@ -28,6 +28,7 @@
+ #define CONF_BATCH_DIRECTORY "batch_directory"
+ #define CONF_BATCH_FILENAME "batch_filename"
+ #define CONF_BATCH_FILETYPE "batch_filetype"
++#define CONF_BATCH_TIFF_UNCOMPRESSED "export_tiff_uncompressed"
+ #define CONF_EXPORT_DIRECTORY "export_directory"
+ #define CONF_EXPORT_FILENAME "export_filename"
+ #define CONF_EXPORT_FILETYPE "export_filetype"
+Index: gtk-helper.c
+===================================================================
+--- gtk-helper.c (revision 1068)
++++ gtk-helper.c (working copy)
+@@ -273,16 +273,15 @@
+ }
+
+ void
+-gui_batch_filename_entry_changed(GtkEntry *entry, gpointer user_data)
++gui_batch_filename_entry_changed(GtkComboBox *combobox, gpointer user_data)
+ {
+- rs_conf_set_string(CONF_BATCH_FILENAME, gtk_entry_get_text(entry));
++ rs_conf_set_string(CONF_BATCH_FILENAME, gtk_combo_box_get_active_text(combobox));
+ return;
+ }
+
+ void
+-gui_batch_filetype_entry_changed(GtkEntry *entry, gpointer user_data)
++gui_batch_filetype_combobox_changed(gpointer active, gpointer user_data)
+ {
+-/* rs_conf_set_string(CONF_BATCH_FILETYPE, gtk_entry_get_text(entry)); FIXME */
+ return;
+ }
+
+Index: gtk-helper.h
+===================================================================
+--- gtk-helper.h (revision 1068)
++++ gtk-helper.h (working copy)
+@@ -38,9 +38,9 @@
+ extern GtkWidget *checkbox_from_conf(const gchar *conf, gchar *label, gboolean default_value);
+ extern GtkWidget *gui_tooltip_no_window(GtkWidget *widget, gchar *tip_tip, gchar *tip_private);
+ extern void gui_tooltip_window(GtkWidget *widget, gchar *tip_tip, gchar *tip_private);
+-extern void gui_batch_directory_entry_changed(GtkEntry *entry, gpointer user_data);
+-extern void gui_batch_filename_entry_changed(GtkEntry *entry, gpointer user_data);
+-extern void gui_batch_filetype_entry_changed(GtkEntry *entry, gpointer user_data);
++void gui_batch_filetype_combobox_changed(gpointer active, gpointer user_data);
++void gui_batch_directory_entry_changed(GtkEntry *entry, gpointer user_data);
++void gui_batch_filename_entry_changed(GtkComboBox *combobox, gpointer user_data);
+ extern void gui_export_changed_helper(GtkLabel *label);
+ extern void gui_export_directory_entry_changed(GtkEntry *entry, gpointer user_data);
+ extern void gui_export_filename_entry_changed(GtkComboBox *combobox, gpointer user_data);
================================================================
More information about the pld-cvs-commit
mailing list