[gthumb] Move reset-orientation checkbox from import to preferences



commit 0ec53207fe64ca0e0696a08a9fc693606c1e656c
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Thu Jun 18 08:54:48 2009 -0400

    Move reset-orientation checkbox from import to preferences

 data/glade/gthumb_camera.glade      |   25 +-------
 data/glade/gthumb_preferences.glade |  122 +++++++++++++++++++++++++++++++++++
 src/dlg-photo-importer.c            |   19 +-----
 src/dlg-preferences.c               |   16 ++++-
 4 files changed, 139 insertions(+), 43 deletions(-)
---
diff --git a/data/glade/gthumb_camera.glade b/data/glade/gthumb_camera.glade
index 9dd5d54..98c5c1d 100644
--- a/data/glade/gthumb_camera.glade
+++ b/data/glade/gthumb_camera.glade
@@ -157,7 +157,7 @@
 	      <child>
 		<widget class="GtkTable" id="i_commands_table">
 		  <property name="visible">True</property>
-		  <property name="n_rows">7</property>
+		  <property name="n_rows">6</property>
 		  <property name="n_columns">2</property>
 		  <property name="homogeneous">False</property>
 		  <property name="row_spacing">6</property>
@@ -435,29 +435,6 @@
 		      <property name="y_options"></property>
 		    </packing>
 		  </child>
-
-		  <child>
-		    <widget class="GtkCheckButton" id="reset_exif_tag_on_import_checkbutton">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">If this checkbox is enabled and the imported photo contains an Exif orientation tag, the image data will be physically transformed (losslessly) so that the viewed image looks the same as before but the orientation tag is reset to &quot;top left&quot;. If this checkbox is not enabled, the image data and the orientation tag are both left unchanged. The image will be displayed identically by gthumb for both possibilities, but for maximum compatibility with other applications this checkbox should be enabled.</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">_Rotate images physically</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">6</property>
-		      <property name="bottom_attach">7</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>
diff --git a/data/glade/gthumb_preferences.glade b/data/glade/gthumb_preferences.glade
index a03af20..8d75fec 100644
--- a/data/glade/gthumb_preferences.glade
+++ b/data/glade/gthumb_preferences.glade
@@ -2248,6 +2248,128 @@ Checked</property>
 		  <property name="fill">True</property>
 		</packing>
 	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox66">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox125">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">5</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label193">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">&lt;b&gt;Extra Processing&lt;/b&gt;</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox127">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label195">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">    </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox68">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="reset_exif_tag_on_import_checkbutton">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">If this checkbox is enabled and the imported photo contains an Exif orientation tag, the image data will be physically transformed (losslessly) so that the viewed image looks the same as before but the orientation tag is reset to &quot;top left&quot;. If this checkbox is not enabled, the image data and the orientation tag are both left unchanged. The image will be displayed identically by gthumb for both possibilities, but for maximum compatibility with other applications this checkbox should be enabled.</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">_Rotate images physically</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
 	    <packing>
 	      <property name="tab_expand">False</property>
diff --git a/src/dlg-photo-importer.c b/src/dlg-photo-importer.c
index c8866f8..c8ca4f4 100644
--- a/src/dlg-photo-importer.c
+++ b/src/dlg-photo-importer.c
@@ -86,7 +86,6 @@ struct _DialogData {
         GtkWidget           *import_delete_button;
 	GtkWidget           *import_ok_button;
 	GtkWidget           *i_commands_table;
-	GtkWidget           *reset_exif_tag_on_import_checkbutton;
 
 	GtkWidget           *progress_info_image;
 	GtkWidget           *progress_info_label;
@@ -757,7 +756,6 @@ main_dialog_set_sensitive (DialogData *data,
 	gtk_widget_set_sensitive (data->import_reload_button, value);
 	gtk_widget_set_sensitive (data->import_delete_button, value);
 	gtk_widget_set_sensitive (data->i_commands_table, value);
-	gtk_widget_set_sensitive (data->reset_exif_tag_on_import_checkbutton, value);
 }
 
 
@@ -1532,15 +1530,6 @@ choose_tags_cb (GtkButton  *button,
 
 
 static void
-reset_exif_tag_on_import_cb (GtkButton  *button,
-					    DialogData *data)
-{
-	eel_gconf_set_boolean (PREF_PHOTO_IMPORT_RESET_EXIF_ORIENTATION,
-		gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data->reset_exif_tag_on_import_checkbutton)));
-}
-
-
-static void
 import_reload_cb (GtkButton  *button,
                   DialogData *data)
 {
@@ -1733,7 +1722,7 @@ dlg_photo_importer (GthBrowser *browser,
 	data->import_delete_button = glade_xml_get_widget (data->gui, "import_delete_button");
 	data->i_commands_table = glade_xml_get_widget (data->gui, "i_commands_table");
 	data->import_ok_button = glade_xml_get_widget (data->gui, "import_okbutton");
-	data->reset_exif_tag_on_import_checkbutton = glade_xml_get_widget (data->gui, "reset_exif_tag_on_import_checkbutton");
+
 	btn_cancel = glade_xml_get_widget (data->gui, "import_cancelbutton");
 	btn_help = glade_xml_get_widget (data->gui, "import_helpbutton");
 
@@ -1748,7 +1737,6 @@ dlg_photo_importer (GthBrowser *browser,
 	/* Set widgets data. */
 
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (data->delete_checkbutton), eel_gconf_get_boolean (PREF_PHOTO_IMPORT_DELETE, FALSE));
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (data->reset_exif_tag_on_import_checkbutton), eel_gconf_get_boolean (PREF_PHOTO_IMPORT_RESET_EXIF_ORIENTATION, TRUE));
 
 	default_path = eel_gconf_get_path (PREF_PHOTO_IMPORT_DESTINATION, NULL);
 	if ((default_path == NULL) || (*default_path == 0))
@@ -1808,11 +1796,6 @@ dlg_photo_importer (GthBrowser *browser,
 			  G_CALLBACK (import_delete_cb),
 			  data);
 
-	g_signal_connect (G_OBJECT (data->reset_exif_tag_on_import_checkbutton),
-			  "clicked",
-			  G_CALLBACK (reset_exif_tag_on_import_cb),
-			  data);
-
 	g_signal_connect (G_OBJECT (data->subfolder_combobox),
 			  "changed", 
 			  G_CALLBACK (subfolder_mode_changed_cb),
diff --git a/src/dlg-preferences.c b/src/dlg-preferences.c
index 73a0f8c..5ddcd3d 100644
--- a/src/dlg-preferences.c
+++ b/src/dlg-preferences.c
@@ -103,6 +103,7 @@ typedef struct {
 	GtkWidget  *toggle_ss_wrap_around;
 
 	GtkWidget  *toggle_import_previews;
+	GtkWidget  *reset_exif_tag_on_import_checkbutton;
 
 } DialogData;
 
@@ -386,6 +387,14 @@ import_previews_toggled_cb (GtkToggleButton *button,
 }
 
 
+static void
+reset_exif_tag_on_import_cb (GtkButton  *button,
+                                            DialogData *data)
+{
+        eel_gconf_set_boolean (PREF_PHOTO_IMPORT_RESET_EXIF_ORIENTATION, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data->reset_exif_tag_on_import_checkbutton)));
+}
+
+
 /* create the main dialog. */
 void
 dlg_preferences (GthBrowser *browser)
@@ -454,6 +463,7 @@ dlg_preferences (GthBrowser *browser)
         data->toggle_ss_wrap_around = glade_xml_get_widget (data->gui, "toggle_ss_wrap_around");
 
 	data->toggle_import_previews = glade_xml_get_widget (data->gui, "toggle_import_previews");
+	data->reset_exif_tag_on_import_checkbutton = glade_xml_get_widget (data->gui, "reset_exif_tag_on_import_checkbutton");
 
 	btn_close  = glade_xml_get_widget (data->gui, "p_close_button");
 	btn_help   = glade_xml_get_widget (data->gui, "p_help_button");
@@ -547,7 +557,7 @@ dlg_preferences (GthBrowser *browser)
 	/* Importer */
 
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (data->toggle_import_previews), eel_gconf_get_boolean (PREF_PHOTO_IMPORT_PREVIEWS, TRUE));
-
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (data->reset_exif_tag_on_import_checkbutton), eel_gconf_get_boolean (PREF_PHOTO_IMPORT_RESET_EXIF_ORIENTATION, TRUE));
 	/* Set the signals handlers. */
 
 	g_signal_connect (G_OBJECT (data->dialog),
@@ -664,6 +674,10 @@ dlg_preferences (GthBrowser *browser)
 			  "toggled",
 			  G_CALLBACK (import_previews_toggled_cb),
 			  data);
+        g_signal_connect (G_OBJECT (data->reset_exif_tag_on_import_checkbutton),
+                          "clicked",
+                          G_CALLBACK (reset_exif_tag_on_import_cb),
+                          data);
 
 	/* run dialog. */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]