mailr14706 - in /1.3: graphics/oxygen_icons/16x16/actions/ graphics/oxygen_icons/22x22/actions/ graphics/oxygen_icons/32x32/acti...


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on September 19, 2011 - 22:41:
Author: bugman
Date: Mon Sep 19 22:41:29 2011
New Revision: 14706

URL: http://svn.gna.org/viewcvs/relax?rev=14706&view=rev
Log:
Added the 'Go to top' and 'Go to end' entries for the relax controller pop up 
menu.

This includes the appropriate oxygen icons.


Added:
    1.3/graphics/oxygen_icons/16x16/actions/go-top.png   (with props)
    1.3/graphics/oxygen_icons/22x22/actions/go-top.png   (with props)
    1.3/graphics/oxygen_icons/32x32/actions/go-top.png   (with props)
    1.3/graphics/oxygen_icons/48x48/actions/go-top.png   (with props)
Modified:
    1.3/gui/controller.py
    1.3/gui/paths.py

Added: 1.3/graphics/oxygen_icons/16x16/actions/go-top.png
URL: 
http://svn.gna.org/viewcvs/relax/1.3/graphics/oxygen_icons/16x16/actions/go-top.png?rev=14706&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 1.3/graphics/oxygen_icons/16x16/actions/go-top.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: 1.3/graphics/oxygen_icons/22x22/actions/go-top.png
URL: 
http://svn.gna.org/viewcvs/relax/1.3/graphics/oxygen_icons/22x22/actions/go-top.png?rev=14706&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 1.3/graphics/oxygen_icons/22x22/actions/go-top.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: 1.3/graphics/oxygen_icons/32x32/actions/go-top.png
URL: 
http://svn.gna.org/viewcvs/relax/1.3/graphics/oxygen_icons/32x32/actions/go-top.png?rev=14706&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 1.3/graphics/oxygen_icons/32x32/actions/go-top.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: 1.3/graphics/oxygen_icons/48x48/actions/go-top.png
URL: 
http://svn.gna.org/viewcvs/relax/1.3/graphics/oxygen_icons/48x48/actions/go-top.png?rev=14706&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 1.3/graphics/oxygen_icons/48x48/actions/go-top.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Modified: 1.3/gui/controller.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/controller.py?rev=14706&r1=14705&r2=14706&view=diff
==============================================================================
--- 1.3/gui/controller.py (original)
+++ 1.3/gui/controller.py Mon Sep 19 22:41:29 2011
@@ -591,6 +591,8 @@
         self.menu_id_zoom_in = wx.NewId()
         self.menu_id_zoom_out = wx.NewId()
         self.menu_id_zoom_orig = wx.NewId()
+        self.menu_id_goto_start = wx.NewId()
+        self.menu_id_goto_end = wx.NewId()
 
         # Make the control read only.
         self.SetReadOnly(True)
@@ -610,6 +612,8 @@
         self.Bind(wx.EVT_MENU, self.on_zoom_in, id=self.menu_id_zoom_in)
         self.Bind(wx.EVT_MENU, self.on_zoom_out, id=self.menu_id_zoom_out)
         self.Bind(wx.EVT_MENU, self.on_zoom_orig, id=self.menu_id_zoom_orig)
+        self.Bind(wx.EVT_MENU, self.on_goto_start, 
id=self.menu_id_goto_start)
+        self.Bind(wx.EVT_MENU, self.on_goto_end, id=self.menu_id_goto_end)
 
 
     def capture_keys(self, event):
@@ -649,6 +653,12 @@
         if event.ControlDown() and event.GetKeyCode() == 61:
             self.on_zoom_in(event)
 
+        # Jump to start or end (Ctrl-Home and Ctrl-End).
+        if event.ControlDown() and event.GetKeyCode() == 316:
+            self.on_goto_start(event)
+        elif event.ControlDown() and event.GetKeyCode() == 317:
+            self.on_goto_end(event)
+
 
     def find(self, event):
         """Find the text in the log control.
@@ -849,6 +859,28 @@
 
         # Copy the selection to the clipboard.
         self.Copy()
+
+
+    def on_goto_end(self, event):
+        """Move to the end of the text.
+
+        @param event:   The wx event.
+        @type event:    wx event
+        """
+
+        # Go to the end.
+        self.GotoPos(self.GetLength())
+
+
+    def on_goto_start(self, event):
+        """Move to the start of the text.
+
+        @param event:   The wx event.
+        @type event:    wx event
+        """
+
+        # Go to the start.
+        self.GotoPos(-1)
 
 
     def on_select_all(self, event):
@@ -914,6 +946,9 @@
         menu.AppendItem(build_menu_item(menu, id=self.menu_id_zoom_in, 
text="Zoom &in", icon=icon_16x16.zoom_in))
         menu.AppendItem(build_menu_item(menu, id=self.menu_id_zoom_out, 
text="Zoom &out", icon=icon_16x16.zoom_out))
         menu.AppendItem(build_menu_item(menu, id=self.menu_id_zoom_orig, 
text="Original &zoom", icon=icon_16x16.zoom_original))
+        menu.AppendSeparator()
+        menu.AppendItem(build_menu_item(menu, id=self.menu_id_goto_start, 
text="&Go to start", icon=icon_16x16.go_top))
+        menu.AppendItem(build_menu_item(menu, id=self.menu_id_goto_end, 
text="&Go to end", icon=icon_16x16.go_bottom))
 
         # Pop up the menu.
         if status.show_gui:

Modified: 1.3/gui/paths.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/paths.py?rev=14706&r1=14705&r2=14706&view=diff
==============================================================================
--- 1.3/gui/paths.py (original)
+++ 1.3/gui/paths.py Mon Sep 19 22:41:29 2011
@@ -98,6 +98,7 @@
         self.flag_blue =            path + 'actions'    + sep + 
'flag-blue.png'
         self.flag_red =             path + 'actions'    + sep + 
'flag-red.png'
         self.go_bottom =            path + 'actions'    + sep + 
'go-bottom.png'
+        self.go_top =               path + 'actions'    + sep + 'go-top.png'
         self.list_remove =          path + 'actions'    + sep + 
'list-remove.png'
         self.load =                 path + 'actions'    + sep + 
'arrow-right.png'
         self.manual =               path + 'mimetypes'  + sep + 
'application-pdf.png'
@@ -151,6 +152,7 @@
         self.go_bottom =            path + 'actions'    + sep + 
'go-bottom.png'
         self.go_previous_view =     path + 'actions'    + sep + 
'go-previous-view.png'
         self.go_next_view =         path + 'actions'    + sep + 
'go-next-view.png'
+        self.go_top =               path + 'actions'    + sep + 'go-top.png'
         self.list_remove =          path + 'actions'    + sep + 
'list-remove.png'
         self.new =                  path + 'actions'    + sep + 
'document-new.png'
         self.open_folder =          path + 'actions'    + sep + 
'document-open-folder.png'
@@ -210,6 +212,7 @@
         self.edit_find =            path + 'actions'    + sep + 
'edit-find.png'
         self.edit_select_all =      path + 'actions'    + sep + 
'edit-select-all.png'
         self.go_bottom =            path + 'actions'    + sep + 
'go-bottom.png'
+        self.go_top =               path + 'actions'    + sep + 'go-top.png'
         self.list_remove =          path + 'actions'    + sep + 
'list-remove.png'
         self.new =                  path + 'actions'    + sep + 
'document-new.png'
         self.open_folder =          path + 'actions'    + sep + 
'document-open-folder.png'
@@ -259,6 +262,7 @@
         self.edit_select_all =      path + 'actions'    + sep + 
'edit-select-all.png'
         self.forwards =             path + 'actions'    + sep + 
'go-next-view.png'
         self.go_bottom =            path + 'actions'    + sep + 
'go-bottom.png'
+        self.go_top =               path + 'actions'    + sep + 'go-top.png'
         self.list_remove =          path + 'actions'    + sep + 
'list-remove.png'
         self.new =                  path + 'actions'    + sep + 
'document-new.png'
         self.open_folder =          path + 'actions'    + sep + 
'document-open-folder.png'




Related Messages


Powered by MHonArc, Updated Tue Sep 20 10:00:01 2011