[simple-scan] Remove dead code from old toolbar



commit 374e92ee46dad876145efc0407c38ecbac500e7c
Author: Robert Ancell <robert ancell canonical com>
Date:   Tue Sep 25 14:08:47 2018 +1200

    Remove dead code from old toolbar

 src/app-window.ui   | 639 ++++++++++++++++------------------------------------
 src/app-window.vala | 103 ++-------
 2 files changed, 209 insertions(+), 533 deletions(-)
---
diff --git a/src/app-window.ui b/src/app-window.ui
index 69f7776..5056d7c 100644
--- a/src/app-window.ui
+++ b/src/app-window.ui
@@ -2,15 +2,200 @@
 <!-- Generated with glade 3.20.0 -->
 <interface>
   <requires lib="gtk+" version="3.12"/>
-  <object class="GtkImage" id="email_image">
+  <object class="GtkMenu" id="page_menu">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="icon_name">mail-send</property>
-  </object>
-  <object class="GtkImage" id="help_image">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="stock">gtk-help</property>
+    <child>
+      <object class="GtkMenuItem" id="rotate_left_menuitem">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" comments="Menu item to rotate page to left 
(anti-clockwise)">Rotate _Left</property>
+        <property name="use_underline">True</property>
+        <signal name="activate" handler="rotate_left_button_clicked_cb" swapped="no"/>
+        <accelerator key="bracketleft" signal="activate"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="rotate_right_menuitem">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" comments="Menu item to rotate page to right 
(clockwise)">Rotate _Right</property>
+        <property name="use_underline">True</property>
+        <signal name="activate" handler="rotate_right_button_clicked_cb" swapped="no"/>
+        <accelerator key="bracketright" signal="activate"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="crop_menuitem">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" comments="Label for page crop submenu">_Crop</property>
+        <property name="use_underline">True</property>
+        <child type="submenu">
+          <object class="GtkMenu" id="crop_menu">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkRadioMenuItem" id="no_crop_menuitem">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes" comments="Radio button for no 
crop">_None</property>
+                <property name="use_underline">True</property>
+                <property name="active">True</property>
+                <property name="draw_as_radio">True</property>
+                <signal name="toggled" handler="no_crop_menuitem_toggled_cb" swapped="no"/>
+              </object>
+            </child>
+            <child>
+              <object class="GtkRadioMenuItem" id="a4_menuitem">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes" comments="Radio button for cropping page to A4 
size">A_4</property>
+                <property name="use_underline">True</property>
+                <property name="draw_as_radio">True</property>
+                <property name="group">no_crop_menuitem</property>
+                <signal name="toggled" handler="a4_menuitem_toggled_cb" swapped="no"/>
+              </object>
+            </child>
+            <child>
+              <object class="GtkRadioMenuItem" id="a5_menuitem">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes" comments="Radio button for cropping page to A5 
size">A_5</property>
+                <property name="use_underline">True</property>
+                <property name="draw_as_radio">True</property>
+                <property name="group">no_crop_menuitem</property>
+                <signal name="toggled" handler="a5_menuitem_toggled_cb" swapped="no"/>
+              </object>
+            </child>
+            <child>
+              <object class="GtkRadioMenuItem" id="a6_menuitem">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes" comments="Radio button for cropping page to A6 
size">A_6</property>
+                <property name="use_underline">True</property>
+                <property name="draw_as_radio">True</property>
+                <property name="group">no_crop_menuitem</property>
+                <signal name="toggled" handler="a6_menuitem_toggled_cb" swapped="no"/>
+              </object>
+            </child>
+            <child>
+              <object class="GtkRadioMenuItem" id="letter_menuitem">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes" comments="Radio button for cropping page to US 
letter size">_Letter</property>
+                <property name="use_underline">True</property>
+                <property name="draw_as_radio">True</property>
+                <property name="group">no_crop_menuitem</property>
+                <signal name="toggled" handler="letter_menuitem_toggled_cb" swapped="no"/>
+              </object>
+            </child>
+            <child>
+              <object class="GtkRadioMenuItem" id="legal_menuitem">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes" comments="Radio button for cropping to page to US 
legal size">Le_gal</property>
+                <property name="use_underline">True</property>
+                <property name="draw_as_radio">True</property>
+                <property name="group">no_crop_menuitem</property>
+                <signal name="toggled" handler="legal_menuitem_toggled_cb" swapped="no"/>
+              </object>
+            </child>
+            <child>
+              <object class="GtkRadioMenuItem" id="four_by_six_menuitem">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes" comments="Radio button for cropping page to 4x6 
inch">4×6</property>
+                <property name="use_underline">True</property>
+                <property name="draw_as_radio">True</property>
+                <property name="group">no_crop_menuitem</property>
+                <signal name="toggled" handler="four_by_six_menuitem_toggled_cb" swapped="no"/>
+              </object>
+            </child>
+            <child>
+              <object class="GtkRadioMenuItem" id="a3_menuitem">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes" comments="Radio button for cropping page to 
A3">A_3</property>
+                <property name="use_underline">True</property>
+                <property name="draw_as_radio">True</property>
+                <property name="group">no_crop_menuitem</property>
+                <signal name="toggled" handler="a3_menuitem_toggled_cb" swapped="no"/>
+              </object>
+            </child>
+            <child>
+              <object class="GtkRadioMenuItem" id="custom_crop_menuitem">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes" comments="Radio button for cropping to custom page 
size">_Custom</property>
+                <property name="use_underline">True</property>
+                <property name="draw_as_radio">True</property>
+                <property name="group">no_crop_menuitem</property>
+                <signal name="toggled" handler="custom_crop_menuitem_toggled_cb" swapped="no"/>
+              </object>
+            </child>
+            <child>
+              <object class="GtkSeparatorMenuItem" id="crop_sep_menuitem">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkMenuItem" id="crop_rotate_menuitem">
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes" comments="Menu item to rotate the crop 
area">_Rotate Crop</property>
+                <property name="use_underline">True</property>
+                <signal name="activate" handler="crop_rotate_menuitem_activate_cb" swapped="no"/>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="page_move_left_menuitem">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" comments="Menu item to move the selected page to the 
left">Move Left</property>
+        <signal name="activate" handler="page_move_left_menuitem_activate_cb" swapped="no"/>
+        <accelerator key="less" signal="activate"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="page_move_right_menuitem">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" comments="Menu item to move the selected page to the 
right">Move Right</property>
+        <property name="use_underline">True</property>
+        <signal name="activate" handler="page_move_right_menuitem_activate_cb" swapped="no"/>
+        <accelerator key="greater" signal="activate"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkImageMenuItem" id="copy_to_clipboard_menuitem">
+        <property name="label">gtk-copy</property>
+        <property name="visible">True</property>
+        <property name="sensitive">False</property>
+        <property name="can_focus">False</property>
+        <property name="use_underline">True</property>
+        <property name="use_stock">True</property>
+        <signal name="activate" handler="copy_to_clipboard_button_clicked_cb" swapped="no"/>
+        <accelerator key="c" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkImageMenuItem" id="page_delete_menuitem">
+        <property name="label">gtk-delete</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="use_underline">True</property>
+        <property name="use_stock">True</property>
+        <signal name="activate" handler="page_delete_menuitem_activate_cb" swapped="no"/>
+        <accelerator key="Delete" signal="activate"/>
+      </object>
+    </child>
   </object>
   <object class="GtkMenu" id="scan_button_hb_menu">
     <property name="visible">True</property>
@@ -81,446 +266,6 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child>
-          <object class="GtkMenuBar" id="menubar">
-            <property name="can_focus">False</property>
-            <child>
-              <object class="GtkMenuItem" id="document_menuitem">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes" comments="Label on document menu (contains actions 
for this document, e.g. save, print)">_Document</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="document_menu">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkImageMenuItem" id="new_menuitem">
-                        <property name="label">gtk-new</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="new_button_clicked_cb" swapped="no"/>
-                        <accelerator key="n" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="scan_menuitem">
-                        <property name="label" translatable="yes" comments="Scan menu item">Sc_an</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">False</property>
-                        <child type="submenu">
-                          <object class="GtkMenu" id="scan_menu">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <child>
-                              <object class="GtkMenuItem" id="scan_single_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Scan menu item to scan a 
single page from the scanner">Single _Page</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="scan_button_clicked_cb" swapped="no"/>
-                                <accelerator key="1" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkMenuItem" id="scan_all_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Scan menu item to scan 
all pages from a document feeder">All Pages From _Feeder</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="continuous_scan_button_clicked_cb" 
swapped="no"/>
-                                <accelerator key="f" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkMenuItem" id="batch_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Scan menu item to scan 
continuously from the flatbed">_Multiple Pages From Flatbed</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="batch_button_clicked_cb" swapped="no"/>
-                                <accelerator key="m" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkMenuItem" id="stop_scan_menuitem">
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Menu entry to stop 
current scan">_Stop Scan</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="stop_scan_button_clicked_cb" swapped="no"/>
-                                <accelerator key="Escape" signal="activate"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkSeparatorMenuItem" id="menuitem2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="text_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">Text</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <signal name="toggled" handler="text_menuitem_toggled_cb" swapped="no"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="photo_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">Photo</property>
-                                <property name="use_underline">True</property>
-                                <property name="active">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <property name="group">text_menuitem</property>
-                                <signal name="toggled" handler="photo_menuitem_toggled_cb" swapped="no"/>
-                              </object>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="reorder_menuitem">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes" comments="Menu item to reorder 
pages">Reorder Pages</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="reorder_menuitem_activate_cb" swapped="no"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="save_menuitem">
-                        <property name="label">gtk-save</property>
-                        <property name="visible">True</property>
-                        <property name="sensitive">False</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="save_file_button_clicked_cb" swapped="no"/>
-                        <accelerator key="s" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="email_menuitem">
-                        <property name="label" translatable="yes" comments="Label on email menu 
item">_Email</property>
-                        <property name="visible">True</property>
-                        <property name="sensitive">False</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="image">email_image</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="email_button_clicked_cb" swapped="no"/>
-                        <accelerator key="e" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="print_menuitem">
-                        <property name="label">gtk-print</property>
-                        <property name="visible">True</property>
-                        <property name="sensitive">False</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="print_button_clicked_cb" swapped="no"/>
-                        <accelerator key="p" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem" id="document_sep_menuitem">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="preferences_menuitem">
-                        <property name="label">gtk-preferences</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="preferences_button_clicked_cb" swapped="no"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem" id="separatormenuitem1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="quit_menuitem">
-                        <property name="label">gtk-quit</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="quit_menuitem_activate_cb" swapped="no"/>
-                        <accelerator key="w" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                        <accelerator key="q" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="page_menuitem">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes" comments="Page menu (contains action for each 
page, e.g. delete, crop)">_Page</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="page_menu">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkMenuItem" id="rotate_left_menuitem">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes" comments="Menu item to rotate page to left 
(anti-clockwise)">Rotate _Left</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="rotate_left_button_clicked_cb" swapped="no"/>
-                        <accelerator key="bracketleft" signal="activate"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="rotate_right_menuitem">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes" comments="Menu item to rotate page to 
right (clockwise)">Rotate _Right</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="rotate_right_button_clicked_cb" swapped="no"/>
-                        <accelerator key="bracketright" signal="activate"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="crop_menuitem">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes" comments="Label for page crop 
submenu">_Crop</property>
-                        <property name="use_underline">True</property>
-                        <child type="submenu">
-                          <object class="GtkMenu" id="crop_menu">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="no_crop_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Radio button for no 
crop">_None</property>
-                                <property name="use_underline">True</property>
-                                <property name="active">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <signal name="toggled" handler="no_crop_menuitem_toggled_cb" swapped="no"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="a4_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Radio button for 
cropping page to A4 size">A_4</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <property name="group">no_crop_menuitem</property>
-                                <signal name="toggled" handler="a4_menuitem_toggled_cb" swapped="no"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="a5_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Radio button for 
cropping page to A5 size">A_5</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <property name="group">no_crop_menuitem</property>
-                                <signal name="toggled" handler="a5_menuitem_toggled_cb" swapped="no"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="a6_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Radio button for 
cropping page to A6 size">A_6</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <property name="group">no_crop_menuitem</property>
-                                <signal name="toggled" handler="a6_menuitem_toggled_cb" swapped="no"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="letter_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Radio button for 
cropping page to US letter size">_Letter</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <property name="group">no_crop_menuitem</property>
-                                <signal name="toggled" handler="letter_menuitem_toggled_cb" swapped="no"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="legal_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Radio button for 
cropping to page to US legal size">Le_gal</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <property name="group">no_crop_menuitem</property>
-                                <signal name="toggled" handler="legal_menuitem_toggled_cb" swapped="no"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="four_by_six_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Radio button for 
cropping page to 4x6 inch">4×6</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <property name="group">no_crop_menuitem</property>
-                                <signal name="toggled" handler="four_by_six_menuitem_toggled_cb" 
swapped="no"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="a3_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Radio button for 
cropping page to A3">A_3</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <property name="group">no_crop_menuitem</property>
-                                <signal name="toggled" handler="a3_menuitem_toggled_cb" swapped="no"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="custom_crop_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Radio button for 
cropping to custom page size">_Custom</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <property name="group">no_crop_menuitem</property>
-                                <signal name="toggled" handler="custom_crop_menuitem_toggled_cb" 
swapped="no"/>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkSeparatorMenuItem" id="crop_sep_menuitem">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkMenuItem" id="crop_rotate_menuitem">
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="Menu item to rotate the 
crop area">_Rotate Crop</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="crop_rotate_menuitem_activate_cb" 
swapped="no"/>
-                              </object>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="page_move_left_menuitem">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes" comments="Menu item to move the selected 
page to the left">Move Left</property>
-                        <signal name="activate" handler="page_move_left_menuitem_activate_cb" swapped="no"/>
-                        <accelerator key="less" signal="activate"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="page_move_right_menuitem">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes" comments="Menu item to move the selected 
page to the right">Move Right</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="page_move_right_menuitem_activate_cb" swapped="no"/>
-                        <accelerator key="greater" signal="activate"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="copy_to_clipboard_menuitem">
-                        <property name="label">gtk-copy</property>
-                        <property name="visible">True</property>
-                        <property name="sensitive">False</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="copy_to_clipboard_button_clicked_cb" swapped="no"/>
-                        <accelerator key="c" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="page_delete_menuitem">
-                        <property name="label">gtk-delete</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="page_delete_menuitem_activate_cb" swapped="no"/>
-                        <accelerator key="Delete" signal="activate"/>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="help_menuitem">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes" comments="Label on help menu">_Help</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="help_menu">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkImageMenuItem" id="help_contents_menuitem">
-                        <property name="label" translatable="yes" comments="Help|Contents 
menu">_Contents</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="image">help_image</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="help_contents_menuitem_activate_cb" swapped="no"/>
-                        <accelerator key="F1" signal="activate"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="about_menuitem">
-                        <property name="label">gtk-about</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="about_menuitem_activate_cb" swapped="no"/>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
         <child>
           <object class="GtkStack" id="stack">
             <property name="visible">True</property>
diff --git a/src/app-window.vala b/src/app-window.vala
index bb6381d..1ffa50f 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -18,15 +18,15 @@ public class AppWindow : Gtk.ApplicationWindow
 {
     private const GLib.ActionEntry[] action_entries =
     {
-        { "new_document", new_document_activate_cb },
-        { "reorder", reorder_document_activate_cb },
+        { "new_document", new_document_cb },
+        { "reorder", reorder_document_cb },
         { "save", save_document_activate_cb },
-        { "email", email_document_activate_cb },
-        { "print", print_document_activate_cb },
-        { "preferences", preferences_activate_cb },
-        { "help", help_contents_activate_cb },
-        { "about", about_activate_cb },
-        { "quit", quit_activate_cb }
+        { "email", email_document_cb },
+        { "print", print_document_cb },
+        { "preferences", preferences_cb },
+        { "help", help_cb },
+        { "about", about_cb },
+        { "quit", quit_cb }
     };
 
     private Settings settings;
@@ -72,18 +72,10 @@ public class AppWindow : Gtk.ApplicationWindow
     [GtkChild]
     private Gtk.MenuItem crop_rotate_menuitem;
     [GtkChild]
-    private Gtk.MenuItem save_menuitem;
-    [GtkChild]
-    private Gtk.MenuItem email_menuitem;
-    [GtkChild]
-    private Gtk.MenuItem print_menuitem;
-    [GtkChild]
     private Gtk.MenuItem copy_to_clipboard_menuitem;
     [GtkChild]
     private Gtk.Button save_button;
     [GtkChild]
-    private Gtk.MenuItem stop_scan_menuitem;
-    [GtkChild]
     private Gtk.Button stop_button;
     [GtkChild]
     private Gtk.Button scan_button;
@@ -95,11 +87,7 @@ public class AppWindow : Gtk.ApplicationWindow
     [GtkChild]
     private Gtk.RadioMenuItem text_button_hb_menuitem;
     [GtkChild]
-    private Gtk.RadioMenuItem text_menuitem;
-    [GtkChild]
     private Gtk.RadioMenuItem photo_button_hb_menuitem;
-    [GtkChild]
-    private Gtk.RadioMenuItem photo_menuitem;
 
     [GtkChild]
     private Gtk.MenuButton menu_button;
@@ -142,7 +130,6 @@ public class AppWindow : Gtk.ApplicationWindow
             stack.set_visible_child_name ("document");
             page_delete_menuitem.sensitive = !value;
             delete_button.sensitive = !value;
-            stop_scan_menuitem.sensitive = value;
             scan_button.visible = !value;
             stop_button.visible = value;
         }
@@ -574,9 +561,6 @@ public class AppWindow : Gtk.ApplicationWindow
         book.clear ();
         book_needs_saving = false;
         book_uri = null;
-        save_menuitem.sensitive = false;
-        email_menuitem.sensitive = false;
-        print_menuitem.sensitive = false;
         save_button.sensitive = false;
         copy_to_clipboard_menuitem.sensitive = false;
         update_scan_status ();
@@ -612,13 +596,7 @@ public class AppWindow : Gtk.ApplicationWindow
         return false;
     }
 
-    [GtkCallback]
-    private void new_button_clicked_cb (Gtk.Widget widget)
-    {
-        new_document();
-    }
-
-    public void new_document_activate_cb ()
+    private void new_document_cb ()
     {
         new_document();
     }
@@ -630,12 +608,10 @@ public class AppWindow : Gtk.ApplicationWindow
         if (document_hint == "text")
         {
             text_button_hb_menuitem.active = true;
-            text_menuitem.active = true;
         }
         else if (document_hint == "photo")
         {
             photo_button_hb_menuitem.active = true;
-            photo_menuitem.active = true;
         }
 
         if (save)
@@ -716,13 +692,7 @@ public class AppWindow : Gtk.ApplicationWindow
         start_scan (selected_device, options);
     }
 
-    [GtkCallback]
-    private void preferences_button_clicked_cb (Gtk.Widget widget)
-    {
-        preferences_dialog.present ();
-    }
-
-    public void preferences_activate_cb ()
+    private void preferences_cb ()
     {
         preferences_dialog.present ();
     }
@@ -1033,13 +1003,7 @@ public class AppWindow : Gtk.ApplicationWindow
         dialog.present ();
     }
 
-    public void reorder_document_activate_cb ()
-    {
-        reorder_document ();
-    }
-
-    [GtkCallback]
-    private void reorder_menuitem_activate_cb (Gtk.Widget widget)
+    private void reorder_document_cb ()
     {
         reorder_document ();
     }
@@ -1177,13 +1141,7 @@ public class AppWindow : Gtk.ApplicationWindow
         context.paint ();
     }
 
-    [GtkCallback]
-    private void email_button_clicked_cb (Gtk.Widget widget)
-    {
-        email_document_async.begin ();
-    }
-
-    public void email_document_activate_cb ()
+    private void email_document_cb ()
     {
         email_document_async.begin ();
     }
@@ -1232,13 +1190,7 @@ public class AppWindow : Gtk.ApplicationWindow
         print.draw_page.disconnect (draw_page);
     }
 
-    [GtkCallback]
-    private void print_button_clicked_cb (Gtk.Widget widget)
-    {
-        print_document ();
-    }
-
-    public void print_document_activate_cb ()
+    private void print_document_cb ()
     {
         print_document ();
     }
@@ -1257,13 +1209,7 @@ public class AppWindow : Gtk.ApplicationWindow
         }
     }
 
-    [GtkCallback]
-    private void help_contents_menuitem_activate_cb (Gtk.Widget widget)
-    {
-        launch_help ();
-    }
-
-    public void help_contents_activate_cb ()
+    private void help_cb ()
     {
         launch_help ();
     }
@@ -1296,13 +1242,7 @@ public class AppWindow : Gtk.ApplicationWindow
                                null);
     }
 
-    [GtkCallback]
-    private void about_menuitem_activate_cb (Gtk.Widget widget)
-    {
-        show_about ();
-    }
-
-    public void about_activate_cb ()
+    private void about_cb ()
     {
         show_about ();
     }
@@ -1326,13 +1266,7 @@ public class AppWindow : Gtk.ApplicationWindow
         });
     }
 
-    [GtkCallback]
-    private void quit_menuitem_activate_cb (Gtk.Widget widget)
-    {
-        on_quit ();
-    }
-
-    public void quit_activate_cb ()
+    private void quit_cb ()
     {
         on_quit ();
     }
@@ -1528,9 +1462,6 @@ public class AppWindow : Gtk.ApplicationWindow
 
     private void book_changed_cb (Book book)
     {
-        save_menuitem.sensitive = true;
-        email_menuitem.sensitive = true;
-        print_menuitem.sensitive = true;
         save_button.sensitive = true;
         book_needs_saving = true;
         copy_to_clipboard_menuitem.sensitive = true;
@@ -1582,7 +1513,7 @@ public class AppWindow : Gtk.ApplicationWindow
         var button = new Gtk.Button.with_label (/* Label on new document button */
                                                _("Start Again…"));
         button.visible = true;
-        button.clicked.connect (new_button_clicked_cb);
+        button.clicked.connect (new_document_cb);
         action_bar.pack_start (button);
 
         var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 10);



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