[ocrfeeder] Add action to open help contents



commit c4519bf9bf20ea6659d23776fe59464245b2dddd
Author: Joaquim Rocha <jrocha igalia com>
Date:   Mon Jan 3 08:51:39 2011 +0100

    Add action to open help contents

 src/ocrfeeder/studio/studioBuilder.py   |    8 +++++++-
 src/ocrfeeder/studio/widgetPresenter.py |    2 ++
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/ocrfeeder/studio/studioBuilder.py b/src/ocrfeeder/studio/studioBuilder.py
index 51e6ca2..9ecf04d 100644
--- a/src/ocrfeeder/studio/studioBuilder.py
+++ b/src/ocrfeeder/studio/studioBuilder.py
@@ -101,7 +101,8 @@ class Studio:
                                  'delete_selected_areas': self.source_images_controler.deleteSelectedAreas,
                                  'image_deskewer': self.source_images_controler.deskewCurrentImage,
                                  'copy_to_clipboard': self.source_images_controler.copyRecognizedTextToClipboard,
-                                 'spell_checker': self.spellChecker
+                                 'spell_checker': self.spellChecker,
+                                 'help_contents': self.showHelpContents,
                                  }
 
         self.main_window.setHeader(menubar_callback_dict, toolbar_callback_dict)
@@ -370,6 +371,11 @@ class Studio:
         if about_dialog.run():
             about_dialog.destroy()
 
+    def showHelpContents(self, widget = None):
+        gtk.show_uri(self.main_window.window.get_screen(),
+                     'ghelp:ocrfeeder',
+                     gtk.get_current_event_time())
+
     def zoomIn(self, widget = None):
         self.source_images_controler.zoomIn()
 
diff --git a/src/ocrfeeder/studio/widgetPresenter.py b/src/ocrfeeder/studio/widgetPresenter.py
index e42c667..b7519bd 100644
--- a/src/ocrfeeder/studio/widgetPresenter.py
+++ b/src/ocrfeeder/studio/widgetPresenter.py
@@ -97,6 +97,7 @@ class MainWindow:
             <menuitem action="SpellChecker"/>
         </menu>
         <menu action="Help">
+            <menuitem action="HelpContents"/>
             <menuitem action="About"/>
         </menu>
     </menubar>
@@ -177,6 +178,7 @@ class MainWindow:
                                    None, _('Trie to straighten the image'),
                                    menu_items['image_deskewer']),
                                   ('Help', None, _('_Help')),
+                                  ('HelpContents', gtk.STOCK_HELP, _('_Help'), 'F1', _('Help contents'), menu_items['help_contents']),
                                   ('About', gtk.STOCK_ABOUT, _('_About'), None, _('About this application'), menu_items['about']),
                                   ('OCRFeederDetection', None, _('_Recognize Document'), None, _("Automatic Detection and Recognition"), tool_items['detection']),
                                   ('RecognizeAreas', None, _('Recognize Selected _Areas'), None, _("Recognize Selected Areas"), menu_items['recognize_areas']),



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