[gthumb] change date: removed the "exif original date tag" option



commit 42d57548361f4fbf33ec936a6b24ccdb4d2f7d34
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Tue Aug 14 20:17:01 2012 +0200

    change date: removed the "exif original date tag" option
    
    this option isn't supposed to be there, the 'exif original date tag' is kept in
    sync with the comment date, so it is changed whenever the user chooses
    the 'comment date' option.

 data/org.gnome.gthumb.change-date.gschema.xml.in |    3 -
 extensions/change_date/data/ui/change-date.ui    |  272 +++++++++++++---------
 extensions/change_date/dlg-change-date.c         |   12 +-
 extensions/change_date/gth-change-date-task.c    |   21 +--
 extensions/change_date/gth-change-date-task.h    |    3 +-
 extensions/change_date/preferences.h             |    1 -
 6 files changed, 168 insertions(+), 144 deletions(-)
---
diff --git a/data/org.gnome.gthumb.change-date.gschema.xml.in b/data/org.gnome.gthumb.change-date.gschema.xml.in
index ffb9aca..a9014d7 100644
--- a/data/org.gnome.gthumb.change-date.gschema.xml.in
+++ b/data/org.gnome.gthumb.change-date.gschema.xml.in
@@ -25,9 +25,6 @@
     <key name="set-comment-date" type="b">
       <default>false</default>
     </key>
-    <key name="set-exif-datetimeoriginal-tag" type="b">
-      <default>false</default>
-    </key>
     <key name="to-following-date" type="b">
       <default>false</default>
     </key>
diff --git a/extensions/change_date/data/ui/change-date.ui b/extensions/change_date/data/ui/change-date.ui
index 054afa8..fabd3a8 100644
--- a/extensions/change_date/data/ui/change-date.ui
+++ b/extensions/change_date/data/ui/change-date.ui
@@ -1,43 +1,109 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <requires lib="gtk+" version="2.16"/>
-  <!-- interface-naming-policy project-wide -->
-  <object class="GtkAdjustment" id="time_s_adjustment">
-    <property name="upper">59</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="time_m_adjustment">
-    <property name="upper">59</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="time_h_adjustment">
-    <property name="upper">999999</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkListStore" id="adjust_sign_liststore">
+    <columns>
+      <!-- column-name name -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">+</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">-</col>
+      </row>
+    </data>
   </object>
   <object class="GtkDialog" id="change_date_dialog">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Change Date</property>
     <property name="resizable">False</property>
     <property name="type_hint">normal</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="help_button">
+                <property name="label">gtk-help</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="close_button">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-execute</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkVBox" id="vbox1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">5</property>
             <property name="spacing">12</property>
             <child>
               <object class="GtkVBox" id="vbox2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Change the following values:</property>
                     <attributes>
@@ -46,24 +112,30 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkAlignment" id="alignment1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="left_padding">12</property>
                     <child>
                       <object class="GtkVBox" id="vbox57">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">6</property>
                         <child>
                           <object class="GtkCheckButton" id="change_last_modified_checkbutton">
                             <property name="label" translatable="yes">_Last modified date</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
                             <property name="draw_indicator">True</property>
                           </object>
                           <packing>
@@ -75,10 +147,13 @@
                         <child>
                           <object class="GtkCheckButton" id="change_comment_checkbutton">
                             <property name="label" translatable="yes">Co_mment date</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
                             <property name="draw_indicator">True</property>
                           </object>
                           <packing>
@@ -87,41 +162,31 @@
                             <property name="position">1</property>
                           </packing>
                         </child>
-                        <child>
-                          <object class="GtkCheckButton" id="change_datetimeoriginal_checkbutton">
-                            <property name="label" translatable="yes">Exif DateTimeOriginal tag</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
               </object>
               <packing>
                 <property name="expand">False</property>
+                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
               <object class="GtkVBox" id="vbox3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Change to:</property>
                     <attributes>
@@ -130,28 +195,35 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkAlignment" id="alignment2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="left_padding">12</property>
                     <child>
                       <object class="GtkVBox" id="vbox48">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">6</property>
                         <child>
                           <object class="GtkVBox" id="vbox49">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkRadioButton" id="to_following_date_radiobutton">
                                 <property name="label" translatable="yes">The _following date:</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
+                                <property name="xalign">0</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -164,10 +236,12 @@
                             <child>
                               <object class="GtkAlignment" id="alignment3">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="left_padding">12</property>
                                 <child>
                                   <object class="GtkHBox" id="date_selector_box">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <child>
                                       <placeholder/>
                                     </child>
@@ -175,6 +249,8 @@
                                 </child>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
@@ -188,10 +264,13 @@
                         <child>
                           <object class="GtkRadioButton" id="to_last_modified_date_radiobutton">
                             <property name="label" translatable="yes">File _modified date</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">to_following_date_radiobutton</property>
                           </object>
@@ -204,10 +283,13 @@
                         <child>
                           <object class="GtkRadioButton" id="to_creation_date_radiobutton">
                             <property name="label" translatable="yes">File c_reation date</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">to_following_date_radiobutton</property>
                           </object>
@@ -220,10 +302,13 @@
                         <child>
                           <object class="GtkRadioButton" id="to_photo_original_date_radiobutton">
                             <property name="label" translatable="yes">Date p_hoto was taken</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">to_following_date_radiobutton</property>
                           </object>
@@ -236,25 +321,31 @@
                         <child>
                           <object class="GtkVBox" id="vbox54">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkHBox" id="hbox71">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkVBox" id="vbox6">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <child>
                                       <object class="GtkAlignment" id="alignment4">
                                         <property name="visible">True</property>
-                                        <property name="top_padding">4</property>
+                                        <property name="can_focus">False</property>
                                         <child>
                                           <object class="GtkRadioButton" id="adjust_time_radiobutton">
                                             <property name="label" translatable="yes">A_djust by</property>
+                                            <property name="use_action_appearance">False</property>
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
+                                            <property name="use_action_appearance">False</property>
                                             <property name="use_underline">True</property>
+                                            <property name="xalign">0.5</property>
                                             <property name="draw_indicator">True</property>
                                             <property name="group">to_following_date_radiobutton</property>
                                           </object>
@@ -276,15 +367,22 @@
                                 <child>
                                   <object class="GtkTable" id="time_box">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="n_rows">3</property>
                                     <property name="n_columns">3</property>
                                     <property name="column_spacing">6</property>
                                     <property name="row_spacing">6</property>
                                     <child>
+                                      <placeholder/>
+                                    </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                    <child>
                                       <object class="GtkSpinButton" id="adjust_time_h_spinbutton">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
-                                        <property name="invisible_char">&#x25CF;</property>
+                                        <property name="invisible_char">â</property>
                                         <property name="width_chars">5</property>
                                         <property name="invisible_char_set">True</property>
                                         <property name="adjustment">time_h_adjustment</property>
@@ -294,14 +392,14 @@
                                       <packing>
                                         <property name="left_attach">1</property>
                                         <property name="right_attach">2</property>
-                                        <property name="x_options"></property>
+                                        <property name="x_options"/>
                                       </packing>
                                     </child>
                                     <child>
                                       <object class="GtkSpinButton" id="adjust_time_m_spinbutton">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
-                                        <property name="invisible_char">&#x25CF;</property>
+                                        <property name="invisible_char">â</property>
                                         <property name="width_chars">5</property>
                                         <property name="invisible_char_set">True</property>
                                         <property name="adjustment">time_m_adjustment</property>
@@ -313,14 +411,14 @@
                                         <property name="right_attach">2</property>
                                         <property name="top_attach">1</property>
                                         <property name="bottom_attach">2</property>
-                                        <property name="x_options"></property>
+                                        <property name="x_options"/>
                                       </packing>
                                     </child>
                                     <child>
                                       <object class="GtkSpinButton" id="adjust_time_s_spinbutton">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
-                                        <property name="invisible_char">&#x25CF;</property>
+                                        <property name="invisible_char">â</property>
                                         <property name="width_chars">5</property>
                                         <property name="invisible_char_set">True</property>
                                         <property name="adjustment">time_s_adjustment</property>
@@ -332,12 +430,13 @@
                                         <property name="right_attach">2</property>
                                         <property name="top_attach">2</property>
                                         <property name="bottom_attach">3</property>
-                                        <property name="x_options"></property>
+                                        <property name="x_options"/>
                                       </packing>
                                     </child>
                                     <child>
                                       <object class="GtkLabel" id="label3">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="xalign">0</property>
                                         <property name="label" translatable="yes">hours</property>
                                       </object>
@@ -350,6 +449,7 @@
                                     <child>
                                       <object class="GtkLabel" id="label4">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="xalign">0</property>
                                         <property name="label" translatable="yes">minutes</property>
                                       </object>
@@ -364,6 +464,7 @@
                                     <child>
                                       <object class="GtkLabel" id="label5">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="xalign">0</property>
                                         <property name="label" translatable="yes">seconds</property>
                                       </object>
@@ -384,6 +485,7 @@
                                     <child>
                                       <object class="GtkComboBox" id="adjust_sign_combobox">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="model">adjust_sign_liststore</property>
                                         <property name="active">0</property>
                                         <child>
@@ -396,6 +498,8 @@
                                     </child>
                                   </object>
                                   <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
                                     <property name="position">1</property>
                                   </packing>
                                 </child>
@@ -408,6 +512,8 @@
                             </child>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">4</property>
                           </packing>
                         </child>
@@ -415,72 +521,23 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
               </object>
               <packing>
                 <property name="expand">False</property>
+                <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-                <property name="secondary">True</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="close_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-execute</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
@@ -491,18 +548,19 @@
       <action-widget response="0">ok_button</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkListStore" id="adjust_sign_liststore">
-    <columns>
-      <!-- column-name name -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">+</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">-</col>
-      </row>
-    </data>
+  <object class="GtkAdjustment" id="time_h_adjustment">
+    <property name="upper">999999</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="time_m_adjustment">
+    <property name="upper">59</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="time_s_adjustment">
+    <property name="upper">59</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
   </object>
 </interface>
diff --git a/extensions/change_date/dlg-change-date.c b/extensions/change_date/dlg-change-date.c
index 052d767..8091c11 100644
--- a/extensions/change_date/dlg-change-date.c
+++ b/extensions/change_date/dlg-change-date.c
@@ -70,8 +70,6 @@ ok_button_clicked (GtkWidget  *button,
 		change_fields |= GTH_CHANGE_LAST_MODIFIED_DATE;
 	if (IS_ACTIVE (GET_WIDGET ("change_comment_checkbutton")))
 		change_fields |= GTH_CHANGE_COMMENT_DATE;
-	if (IS_ACTIVE (GET_WIDGET ("change_datetimeoriginal_checkbutton")))
-		change_fields |= GTH_CHANGE_EXIF_DATETIMEORIGINAL_TAG;
 
 	change_type = 0;
 	time_adjustment = 0;
@@ -99,7 +97,6 @@ ok_button_clicked (GtkWidget  *button,
 
 	g_settings_set_boolean (data->settings, PREF_CHANGE_DATE_SET_LAST_MODIFIED_DATE, (change_fields & GTH_CHANGE_LAST_MODIFIED_DATE) == GTH_CHANGE_LAST_MODIFIED_DATE);
 	g_settings_set_boolean (data->settings, PREF_CHANGE_DATE_SET_COMMENT_DATE, (change_fields & GTH_CHANGE_COMMENT_DATE) == GTH_CHANGE_COMMENT_DATE);
-	g_settings_set_boolean (data->settings, PREF_CHANGE_DATE_SET_EXIF_DATETIMEORIGINAL_TAG, (change_fields & GTH_CHANGE_EXIF_DATETIMEORIGINAL_TAG) == GTH_CHANGE_EXIF_DATETIMEORIGINAL_TAG);
 
 	g_settings_set_boolean (data->settings, PREF_CHANGE_DATE_TO_FOLLOWING_DATE, change_type == GTH_CHANGE_TO_FOLLOWING_DATE);
 	if (change_type == GTH_CHANGE_TO_FOLLOWING_DATE) {
@@ -144,8 +141,7 @@ update_sensitivity (DialogData *data)
 {
 	gtk_widget_set_sensitive (GET_WIDGET ("ok_button"),
 				  (IS_ACTIVE (GET_WIDGET ("change_last_modified_checkbutton"))
-				   || IS_ACTIVE (GET_WIDGET ("change_comment_checkbutton"))
-				   || IS_ACTIVE (GET_WIDGET ("change_datetimeoriginal_checkbutton"))));
+				   || IS_ACTIVE (GET_WIDGET ("change_comment_checkbutton"))));
 	gtk_widget_set_sensitive (data->date_selector, IS_ACTIVE (GET_WIDGET ("to_following_date_radiobutton")));
 	gtk_widget_set_sensitive (GET_WIDGET ("time_box"), IS_ACTIVE (GET_WIDGET ("adjust_time_radiobutton")));
 
@@ -195,8 +191,6 @@ dlg_change_date (GthBrowser *browser,
 				      g_settings_get_boolean (data->settings, PREF_CHANGE_DATE_SET_LAST_MODIFIED_DATE));
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("change_comment_checkbutton")),
 				      g_settings_get_boolean (data->settings, PREF_CHANGE_DATE_SET_COMMENT_DATE));
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("change_datetimeoriginal_checkbutton")),
-				      g_settings_get_boolean (data->settings, PREF_CHANGE_DATE_SET_EXIF_DATETIMEORIGINAL_TAG));
 
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("to_following_date_radiobutton")),
 				      g_settings_get_boolean (data->settings, PREF_CHANGE_DATE_TO_FOLLOWING_DATE));
@@ -282,10 +276,6 @@ dlg_change_date (GthBrowser *browser,
 			  "clicked",
 			  G_CALLBACK (radio_button_clicked),
 			  data);
-	g_signal_connect (GET_WIDGET ("change_datetimeoriginal_checkbutton"),
-			  "clicked",
-			  G_CALLBACK (radio_button_clicked),
-			  data);
 	g_signal_connect (GET_WIDGET ("to_following_date_radiobutton"),
 			  "clicked",
 			  G_CALLBACK (radio_button_clicked),
diff --git a/extensions/change_date/gth-change-date-task.c b/extensions/change_date/gth-change-date-task.c
index 6cbdf50..25ad4a7 100644
--- a/extensions/change_date/gth-change-date-task.c
+++ b/extensions/change_date/gth-change-date-task.c
@@ -251,14 +251,6 @@ set_date_time_from_field (GthChangeDateTask *self,
 		if ((m != NULL) && _g_time_val_from_exif_date (gth_metadata_get_raw (m), &time_val))
 			gth_datetime_from_timeval (date_time, &time_val);
 	}
-	else if (field & GTH_CHANGE_EXIF_DATETIMEORIGINAL_TAG) {
-		GthMetadata *m;
-		GTimeVal     time_val;
-
-		m = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "Exif::Photo::DateTimeOriginal");
-		if ((m != NULL) && _g_time_val_from_exif_date (gth_metadata_get_raw (m), &time_val))
-			gth_datetime_from_timeval (date_time, &time_val);
-	}
 }
 
 
@@ -294,12 +286,6 @@ info_ready_cb (GList    *files,
 				if (gth_datetime_valid (date_time))
 					set_date_metadata (file_data, "general::datetime", date_time, self->priv->time_offset);
 			}
-			if (self->priv->fields & GTH_CHANGE_EXIF_DATETIMEORIGINAL_TAG) {
-				gth_datetime_clear (date_time);
-				set_date_time_from_field (self, date_time, GTH_CHANGE_EXIF_DATETIMEORIGINAL_TAG, file_data);
-				if (gth_datetime_valid (date_time))
-					set_date_metadata (file_data, "Exif::Photo::DateTimeOriginal", date_time, self->priv->time_offset);
-			}
 		}
 		else {
 			gth_datetime_clear (date_time);
@@ -308,9 +294,6 @@ info_ready_cb (GList    *files,
 				if (self->priv->fields & GTH_CHANGE_COMMENT_DATE) {
 					set_date_metadata (file_data, "general::datetime", date_time, 0);
 				}
-				if (self->priv->fields & GTH_CHANGE_EXIF_DATETIMEORIGINAL_TAG) {
-					set_date_metadata (file_data, "Exif::Photo::DateTimeOriginal", date_time, 0);
-				}
 			}
 		}
 	}
@@ -318,14 +301,12 @@ info_ready_cb (GList    *files,
 	attribute_v = g_ptr_array_new ();
 	if (self->priv->fields & GTH_CHANGE_COMMENT_DATE)
 		g_ptr_array_add (attribute_v, "general::datetime");
-	if (self->priv->fields & GTH_CHANGE_EXIF_DATETIMEORIGINAL_TAG)
-		g_ptr_array_add (attribute_v, "Exif::Photo::DateTimeOriginal");
 	if (attribute_v->len > 0) {
 		char *attributes;
 
 		attributes = _g_string_array_join (attribute_v, ",");
 		_g_write_metadata_async (self->priv->file_list,
-					 (self->priv->fields & GTH_CHANGE_EXIF_DATETIMEORIGINAL_TAG) ? GTH_METADATA_WRITE_FORCE_EMBEDDED : GTH_METADATA_WRITE_DEFAULT,
+					 GTH_METADATA_WRITE_DEFAULT,
 					 attributes,
 					 gth_task_get_cancellable (GTH_TASK (self)),
 					 write_metadata_ready_cb,
diff --git a/extensions/change_date/gth-change-date-task.h b/extensions/change_date/gth-change-date-task.h
index 879dad3..6761b8f 100644
--- a/extensions/change_date/gth-change-date-task.h
+++ b/extensions/change_date/gth-change-date-task.h
@@ -29,8 +29,7 @@ G_BEGIN_DECLS
 
 typedef enum {
 	GTH_CHANGE_LAST_MODIFIED_DATE = 1 << 0,
-	GTH_CHANGE_COMMENT_DATE = 1 << 1,
-	GTH_CHANGE_EXIF_DATETIMEORIGINAL_TAG = 1 << 2,
+	GTH_CHANGE_COMMENT_DATE = 1 << 1
 } GthChangeFields;
 
 typedef enum {
diff --git a/extensions/change_date/preferences.h b/extensions/change_date/preferences.h
index 3320f41..292de40 100644
--- a/extensions/change_date/preferences.h
+++ b/extensions/change_date/preferences.h
@@ -34,7 +34,6 @@ G_BEGIN_DECLS
 
 #define PREF_CHANGE_DATE_SET_LAST_MODIFIED_DATE          "set-last-modified-date"
 #define PREF_CHANGE_DATE_SET_COMMENT_DATE		 "set-comment-date"
-#define PREF_CHANGE_DATE_SET_EXIF_DATETIMEORIGINAL_TAG   "set-exif-datetimeoriginal-tag"
 #define PREF_CHANGE_DATE_TO_FOLLOWING_DATE               "to-following-date"
 #define PREF_CHANGE_DATE_DATE                            "date"
 #define PREF_CHANGE_DATE_TO_FILE_MODIFIED_DATE           "to-file-modified-date"



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