[gthumb] file tools: use a separate dialog for the tool options



commit 5eb2d7fa33a9efe6be38242e9df98da7fd616868
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sat Oct 12 13:52:56 2013 +0200

    file tools: use a separate dialog for the tool options

 .../file_tools/data/ui/adjust-colors-options.ui    |   16 +-
 extensions/file_tools/data/ui/crop-options.ui      |  178 ++++++++++-------
 extensions/file_tools/data/ui/grayscale-options.ui |    7 +-
 extensions/file_tools/data/ui/resize-options.ui    |  209 ++++++++++++--------
 extensions/file_tools/data/ui/rotate-options.ui    |    3 +-
 extensions/file_tools/data/ui/sharpen-options.ui   |   16 +-
 extensions/file_tools/gth-file-tool-crop.c         |   26 +++-
 extensions/file_tools/gth-file-tool-resize.c       |   24 +++
 extensions/file_tools/gth-file-tool-rotate.c       |    4 +
 9 files changed, 290 insertions(+), 193 deletions(-)
---
diff --git a/extensions/file_tools/data/ui/adjust-colors-options.ui 
b/extensions/file_tools/data/ui/adjust-colors-options.ui
index 708f4a7..fa1497d 100644
--- a/extensions/file_tools/data/ui/adjust-colors-options.ui
+++ b/extensions/file_tools/data/ui/adjust-colors-options.ui
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Sat Oct 12 13:11:37 2013 -->
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAdjustment" id="crop_height_adjustment">
@@ -58,7 +59,6 @@
                     <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>
@@ -362,18 +362,14 @@
                     <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="tooltip_text" translatable="yes">Reset</property>
                     <property name="use_underline">True</property>
                     <child>
-                      <object class="GtkLabel" id="label1">
+                      <object class="GtkImage" id="image1">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">_Reset</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">reset_button</property>
-                        <attributes>
-                          <attribute name="size" value="8000"/>
-                        </attributes>
+                        <property name="icon_name">edit-undo-symbolic</property>
+                        <property name="icon_size">1</property>
                       </object>
                     </child>
                   </object>
@@ -422,7 +418,6 @@
                 <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_underline">True</property>
                 <property name="use_stock">True</property>
               </object>
@@ -439,7 +434,6 @@
                 <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>
diff --git a/extensions/file_tools/data/ui/crop-options.ui b/extensions/file_tools/data/ui/crop-options.ui
index 4764b4f..3574d17 100644
--- a/extensions/file_tools/data/ui/crop-options.ui
+++ b/extensions/file_tools/data/ui/crop-options.ui
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Sat Oct 12 13:51:58 2013 -->
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAdjustment" id="bind_factor_adjustment">
@@ -86,7 +87,6 @@
                                 <property name="can_focus">True</property>
                                 <property name="invisible_char">●</property>
                                 <property name="width_chars">5</property>
-                                <property name="invisible_char_set">True</property>
                                 <property name="adjustment">crop_width_adjustment</property>
                                 <property name="climb_rate">1</property>
                               </object>
@@ -127,7 +127,6 @@
                                 <property name="can_focus">True</property>
                                 <property name="invisible_char">●</property>
                                 <property name="width_chars">5</property>
-                                <property name="invisible_char_set">True</property>
                                 <property name="adjustment">crop_height_adjustment</property>
                                 <property name="climb_rate">1</property>
                               </object>
@@ -188,7 +187,6 @@
                                 <property name="can_focus">True</property>
                                 <property name="invisible_char">●</property>
                                 <property name="width_chars">5</property>
-                                <property name="invisible_char_set">True</property>
                                 <property name="adjustment">crop_x_adjustment</property>
                                 <property name="climb_rate">1</property>
                               </object>
@@ -218,7 +216,6 @@
                                 <property name="can_focus">True</property>
                                 <property name="invisible_char">●</property>
                                 <property name="width_chars">5</property>
-                                <property name="invisible_char_set">True</property>
                                 <property name="adjustment">crop_y_adjustment</property>
                                 <property name="climb_rate">1</property>
                               </object>
@@ -257,7 +254,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
-                            <property name="use_action_appearance">False</property>
                             <child>
                               <object class="GtkLabel" id="label4">
                                 <property name="visible">True</property>
@@ -281,7 +277,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
-                            <property name="use_action_appearance">False</property>
                             <child>
                               <object class="GtkLabel" id="label5">
                                 <property name="visible">True</property>
@@ -346,6 +341,7 @@
                   <object class="GtkVBox" id="vbox8">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="margin_left">6</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkHBox" id="ratio_combobox_box">
@@ -371,7 +367,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">●</property>
-                            <property name="invisible_char_set">True</property>
                             <property name="adjustment">ratio_w_adjustment</property>
                             <property name="climb_rate">1</property>
                           </object>
@@ -398,7 +393,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">●</property>
-                            <property name="invisible_char_set">True</property>
                             <property name="adjustment">ratio_h_adjustment</property>
                             <property name="climb_rate">1</property>
                             <property name="update_policy">if-valid</property>
@@ -423,7 +417,6 @@
                         <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>
@@ -446,7 +439,6 @@
                             <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>
@@ -463,7 +455,6 @@
                             <property name="can_focus">True</property>
                             <property name="invisible_char">●</property>
                             <property name="width_chars">5</property>
-                            <property name="invisible_char_set">True</property>
                             <property name="adjustment">bind_factor_adjustment</property>
                           </object>
                           <packing>
@@ -507,87 +498,36 @@
               </packing>
             </child>
             <child>
-              <object class="GtkBox" id="options_box">
+              <object class="GtkHBox" id="hbox3">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="orientation">vertical</property>
-                <property name="spacing">12</property>
+                <property name="spacing">6</property>
                 <child>
-                  <object class="GtkLabel" id="label6">
+                  <object class="GtkButton" id="options_button">
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Options</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
-                  </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>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="tooltip_text" translatable="yes">Options</property>
                     <child>
-                      <object class="GtkGrid" id="grid1">
+                      <object class="GtkImage" id="image2">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="row_spacing">6</property>
-                        <property name="column_spacing">6</property>
-                        <child>
-                          <object class="GtkLabel" id="grid_label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Grid:</property>
-                            <property name="use_underline">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkHBox" id="grid_type_combobox_box">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="hexpand">True</property>
-                            <child>
-                              <placeholder/>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
+                        <property name="icon_name">preferences-system-symbolic</property>
+                        <property name="icon_size">1</property>
                       </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
                   </packing>
                 </child>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">False</property>
+                <property name="fill">True</property>
                 <property name="position">2</property>
               </packing>
             </child>
@@ -623,7 +563,6 @@
                 <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_underline">True</property>
               </object>
               <packing>
@@ -639,7 +578,6 @@
                 <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>
@@ -659,6 +597,92 @@
       </object>
     </child>
   </object>
+  <object class="GtkDialog" id="options_dialog">
+    <property name="width_request">300</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Options</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox4">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area4">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="options_close_button">
+                <property name="label">gtk-close</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">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkGrid" id="grid1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="border_width">5</property>
+            <property name="row_spacing">6</property>
+            <property name="column_spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="grid_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">_Grid:</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="grid_type_combobox_box">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
   <object class="GtkAdjustment" id="ratio_h_adjustment">
     <property name="upper">999999</property>
     <property name="step_increment">1</property>
diff --git a/extensions/file_tools/data/ui/grayscale-options.ui 
b/extensions/file_tools/data/ui/grayscale-options.ui
index c8a3e54..66c17f6 100644
--- a/extensions/file_tools/data/ui/grayscale-options.ui
+++ b/extensions/file_tools/data/ui/grayscale-options.ui
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Sat Oct 12 13:11:33 2013 -->
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAlignment" id="options">
@@ -50,7 +51,6 @@
                         <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>
@@ -69,7 +69,6 @@
                         <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>
@@ -88,7 +87,6 @@
                         <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>
@@ -121,7 +119,6 @@
                 <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>
@@ -165,7 +162,6 @@
                 <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>
@@ -181,7 +177,6 @@
                 <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>
diff --git a/extensions/file_tools/data/ui/resize-options.ui b/extensions/file_tools/data/ui/resize-options.ui
index a520d14..9fe1767 100644
--- a/extensions/file_tools/data/ui/resize-options.ui
+++ b/extensions/file_tools/data/ui/resize-options.ui
@@ -1,6 +1,115 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Sat Oct 12 13:47:22 2013 -->
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="options_dialog">
+    <property name="width_request">300</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Options</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox3">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area3">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="options_close_button">
+                <property name="label">gtk-close</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">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</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="border_width">5</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkCheckButton" id="high_quality_checkbutton">
+                <property name="label" translatable="yes">High _quality</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_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="ratio_h_adjustment">
+    <property name="upper">999999</property>
+    <property name="step_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="ratio_w_adjustment">
+    <property name="upper">999999</property>
+    <property name="step_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="resize_height_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">999999</property>
+    <property name="step_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="resize_width_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">999999</property>
+    <property name="step_increment">1</property>
+  </object>
+  <object class="GtkListStore" id="unit_liststore">
+    <columns>
+      <!-- column-name type -->
+      <column type="gint"/>
+      <!-- column-name name -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0">0</col>
+        <col id="1" translatable="yes">pixels</col>
+      </row>
+      <row>
+        <col id="0">1</col>
+        <col id="1" translatable="yes">%</col>
+      </row>
+    </data>
+  </object>
   <object class="GtkAlignment" id="options">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -93,7 +202,6 @@
                                 <property name="can_focus">True</property>
                                 <property name="invisible_char">●</property>
                                 <property name="width_chars">6</property>
-                                <property name="invisible_char_set">True</property>
                                 <property name="adjustment">resize_width_adjustment</property>
                                 <property name="climb_rate">1</property>
                                 <property name="numeric">True</property>
@@ -123,7 +231,6 @@
                                 <property name="can_focus">True</property>
                                 <property name="invisible_char">●</property>
                                 <property name="width_chars">6</property>
-                                <property name="invisible_char_set">True</property>
                                 <property name="adjustment">resize_height_adjustment</property>
                                 <property name="climb_rate">1</property>
                                 <property name="numeric">True</property>
@@ -187,7 +294,6 @@
                             <property name="has_tooltip">True</property>
                             <property name="tooltip_markup" translatable="yes">Set the image size to this 
value</property>
                             <property name="tooltip_text" translatable="yes">Set the image size to this 
value</property>
-                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <child>
                               <object class="GtkLabel" id="image_size_label">
@@ -215,7 +321,6 @@
                             <property name="has_tooltip">True</property>
                             <property name="tooltip_markup" translatable="yes">Set the image size to this 
value</property>
                             <property name="tooltip_text" translatable="yes">Set the image size to this 
value</property>
-                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <child>
                               <object class="GtkLabel" id="screen_size_label">
@@ -282,6 +387,7 @@
                   <object class="GtkVBox" id="vbox8">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="margin_left">6</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkHBox" id="ratio_combobox_box">
@@ -307,7 +413,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">●</property>
-                            <property name="invisible_char_set">True</property>
                             <property name="adjustment">ratio_w_adjustment</property>
                             <property name="climb_rate">1</property>
                           </object>
@@ -334,7 +439,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">●</property>
-                            <property name="invisible_char_set">True</property>
                             <property name="adjustment">ratio_h_adjustment</property>
                             <property name="climb_rate">1</property>
                             <property name="update_policy">if-valid</property>
@@ -359,7 +463,6 @@
                         <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>
@@ -385,62 +488,36 @@
               </packing>
             </child>
             <child>
-              <object class="GtkBox" id="box4">
+              <object class="GtkHBox" id="hbox3">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="orientation">vertical</property>
-                <property name="spacing">12</property>
-                <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">Options</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
+                <property name="spacing">6</property>
                 <child>
-                  <object class="GtkVBox" id="vbox3">
+                  <object class="GtkButton" id="options_button">
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">6</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="tooltip_text" translatable="yes">Options</property>
                     <child>
-                      <object class="GtkCheckButton" id="high_quality_checkbutton">
-                        <property name="label" translatable="yes">High _quality</property>
-                        <property name="use_action_appearance">False</property>
+                      <object class="GtkImage" id="image2">
                         <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>
+                        <property name="can_focus">False</property>
+                        <property name="icon_name">preferences-system-symbolic</property>
+                        <property name="icon_size">1</property>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
                   </packing>
                 </child>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">False</property>
+                <property name="fill">True</property>
                 <property name="position">2</property>
               </packing>
             </child>
@@ -617,7 +694,6 @@
                 <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_underline">True</property>
                 <property name="use_stock">True</property>
               </object>
@@ -634,7 +710,6 @@
                 <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>
@@ -654,40 +729,4 @@
       </object>
     </child>
   </object>
-  <object class="GtkAdjustment" id="ratio_h_adjustment">
-    <property name="upper">999999</property>
-    <property name="step_increment">1</property>
-  </object>
-  <object class="GtkAdjustment" id="ratio_w_adjustment">
-    <property name="upper">999999</property>
-    <property name="step_increment">1</property>
-  </object>
-  <object class="GtkAdjustment" id="resize_height_adjustment">
-    <property name="lower">1</property>
-    <property name="upper">999999</property>
-    <property name="step_increment">1</property>
-  </object>
-  <object class="GtkAdjustment" id="resize_width_adjustment">
-    <property name="lower">1</property>
-    <property name="upper">999999</property>
-    <property name="step_increment">1</property>
-  </object>
-  <object class="GtkListStore" id="unit_liststore">
-    <columns>
-      <!-- column-name type -->
-      <column type="gint"/>
-      <!-- column-name name -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0">0</col>
-        <col id="1" translatable="yes">pixels</col>
-      </row>
-      <row>
-        <col id="0">1</col>
-        <col id="1" translatable="yes">%</col>
-      </row>
-    </data>
-  </object>
 </interface>
diff --git a/extensions/file_tools/data/ui/rotate-options.ui b/extensions/file_tools/data/ui/rotate-options.ui
index a28e92d..54b2379 100644
--- a/extensions/file_tools/data/ui/rotate-options.ui
+++ b/extensions/file_tools/data/ui/rotate-options.ui
@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Sat Oct 12 13:09:52 2013 -->
+<!-- Generated with glade 3.16.0 on Sat Oct 12 13:47:20 2013 -->
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="options_dialog">
+    <property name="width_request">300</property>
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Options</property>
diff --git a/extensions/file_tools/data/ui/sharpen-options.ui 
b/extensions/file_tools/data/ui/sharpen-options.ui
index c9e38a7..a33a493 100644
--- a/extensions/file_tools/data/ui/sharpen-options.ui
+++ b/extensions/file_tools/data/ui/sharpen-options.ui
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Sat Oct 12 13:11:35 2013 -->
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAlignment" id="options">
@@ -32,7 +33,6 @@
                         <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>
@@ -191,18 +191,14 @@
                     <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="tooltip_text" translatable="yes">Reset</property>
                     <property name="use_underline">True</property>
                     <child>
-                      <object class="GtkLabel" id="label1">
+                      <object class="GtkImage" id="image1">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">_Reset</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">reset_button</property>
-                        <attributes>
-                          <attribute name="size" value="8000"/>
-                        </attributes>
+                        <property name="icon_name">edit-undo-symbolic</property>
+                        <property name="icon_size">1</property>
                       </object>
                     </child>
                   </object>
@@ -251,7 +247,6 @@
                 <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_underline">True</property>
                 <property name="use_stock">True</property>
               </object>
@@ -268,7 +263,6 @@
                 <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>
diff --git a/extensions/file_tools/gth-file-tool-crop.c b/extensions/file_tools/gth-file-tool-crop.c
index d602708..a68a4f0 100644
--- a/extensions/file_tools/gth-file-tool-crop.c
+++ b/extensions/file_tools/gth-file-tool-crop.c
@@ -410,6 +410,18 @@ center_button_clicked_cb (GtkButton *button,
 }
 
 
+static void
+options_button_clicked_cb (GtkButton       *button,
+                          GthFileToolCrop *self)
+{
+       GtkWidget *dialog;
+
+       dialog = GET_WIDGET ("options_dialog");
+       gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (gth_file_tool_get_window 
(GTH_FILE_TOOL (self))));
+       gtk_widget_show (dialog);
+}
+
+
 static GtkWidget *
 gth_file_tool_crop_get_options (GthFileTool *base)
 {
@@ -493,8 +505,6 @@ gth_file_tool_crop_get_options (GthFileTool *base)
        gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("bind_factor_spinbutton")),
                                   g_settings_get_int (self->priv->settings, PREF_CROP_BIND_FACTOR));
 
-       gtk_widget_set_vexpand (GET_WIDGET ("options_box"), FALSE);
-
        g_signal_connect (GET_WIDGET ("crop_button"),
                          "clicked",
                          G_CALLBACK (crop_button_clicked_cb),
@@ -503,6 +513,18 @@ gth_file_tool_crop_get_options (GthFileTool *base)
                                  "clicked",
                                  G_CALLBACK (gth_file_tool_cancel),
                                  self);
+       g_signal_connect (GET_WIDGET ("options_button"),
+                         "clicked",
+                         G_CALLBACK (options_button_clicked_cb),
+                         self);
+       g_signal_connect_swapped (GET_WIDGET ("options_close_button"),
+                                 "clicked",
+                                 G_CALLBACK (gtk_widget_hide),
+                                 GET_WIDGET ("options_dialog"));
+       g_signal_connect (GET_WIDGET ("options_dialog"),
+                         "delete-event",
+                         G_CALLBACK (gtk_widget_hide_on_delete),
+                         NULL);
        g_signal_connect (G_OBJECT (self->priv->crop_x_spinbutton),
                          "value-changed",
                          G_CALLBACK (selection_x_value_changed_cb),
diff --git a/extensions/file_tools/gth-file-tool-resize.c b/extensions/file_tools/gth-file-tool-resize.c
index 296b019..7334b87 100644
--- a/extensions/file_tools/gth-file-tool-resize.c
+++ b/extensions/file_tools/gth-file-tool-resize.c
@@ -504,6 +504,18 @@ screen_size_button_clicked_cb (GtkButton         *button,
 }
 
 
+static void
+options_button_clicked_cb (GtkButton         *button,
+                          GthFileToolResize *self)
+{
+       GtkWidget *dialog;
+
+       dialog = GET_WIDGET ("options_dialog");
+       gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (gth_file_tool_get_window 
(GTH_FILE_TOOL (self))));
+       gtk_widget_show (dialog);
+}
+
+
 static GtkWidget *
 gth_file_tool_resize_get_options (GthFileTool *base)
 {
@@ -614,6 +626,18 @@ gth_file_tool_resize_get_options (GthFileTool *base)
                                  "clicked",
                                  G_CALLBACK (gth_file_tool_cancel),
                                  self);
+       g_signal_connect (GET_WIDGET ("options_button"),
+                         "clicked",
+                         G_CALLBACK (options_button_clicked_cb),
+                         self);
+       g_signal_connect_swapped (GET_WIDGET ("options_close_button"),
+                                 "clicked",
+                                 G_CALLBACK (gtk_widget_hide),
+                                 GET_WIDGET ("options_dialog"));
+       g_signal_connect (GET_WIDGET ("options_dialog"),
+                         "delete-event",
+                         G_CALLBACK (gtk_widget_hide_on_delete),
+                         NULL);
        g_signal_connect (GET_WIDGET ("resize_width_spinbutton"),
                          "value-changed",
                          G_CALLBACK (selection_width_value_changed_cb),
diff --git a/extensions/file_tools/gth-file-tool-rotate.c b/extensions/file_tools/gth-file-tool-rotate.c
index 6068ab3..8db38a8 100644
--- a/extensions/file_tools/gth-file-tool-rotate.c
+++ b/extensions/file_tools/gth-file-tool-rotate.c
@@ -494,6 +494,10 @@ gth_file_tool_rotate_get_options (GthFileTool *base)
                                  "clicked",
                                  G_CALLBACK (gtk_widget_hide),
                                  GET_WIDGET ("options_dialog"));
+       g_signal_connect (GET_WIDGET ("options_dialog"),
+                         "delete-event",
+                         G_CALLBACK (gtk_widget_hide_on_delete),
+                         NULL);
        g_signal_connect (GET_WIDGET ("align_button"),
                          "clicked",
                          G_CALLBACK (align_button_clicked_cb),



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