[chirp_devel] [PATCH] Updated Memory Edit View (Part 2)

Kosta Arvanitis
Sun Feb 1 00:04:02 PST 2015


# HG changeset patch
# User K. Arvanitis <kosta at alumni.uvic.ca>
# Date 1422736039 28800
# Parent  ee4e39df6d17db7bc162725491279a60c2054401
[PATCH] Updated Memory Edit View #2
This patch adds "Select All" functionality to the memory editor via the
app 'edit' menu and the memory editor context menu.

Feature #2273
diff -r ee4e39df6d17 -r 876c1328e8a6 chirpui/mainapp.py
--- a/chirpui/mainapp.py Sat Jan 31 12:18:38 2015 -0800
+++ b/chirpui/mainapp.py Sat Jan 31 12:27:19 2015 -0800
@@ -113,7 +113,7 @@
         for i in ["export", "close", "columns", "irbook", "irfinder",
                   "move_up", "move_dn", "exchange", "iradioreference",
                   "cut", "copy", "paste", "delete", "viewdeveloper",
-                  "properties"]:
+                  "all", "properties"]:
             set_action_sensitive(i, eset is not None)
 
     def ev_status(self, editorset, msg):
@@ -1420,7 +1420,7 @@
         elif action == "developer":
             self.do_toggle_developer(_action)
         elif action in ["cut", "copy", "paste", "delete",
-                        "move_up", "move_dn", "exchange",
+                        "move_up", "move_dn", "exchange", "all",
                         "devshowraw", "devdiffraw", "properties"]:
             self.get_current_editorset().get_current_editor().hotkey(_action)
         elif action == "devdifftab":
@@ -1459,6 +1459,8 @@
       <menuitem action="paste"/>
       <menuitem action="delete"/>
       <separator/>
+      <menuitem action="all"/>
+      <separator/>
       <menuitem action="move_up"/>
       <menuitem action="move_dn"/>
       <menuitem action="exchange"/>
@@ -1524,6 +1526,7 @@
             ('copy', None, _("_Copy"), "<Ctrl>c", None, self.mh),
             ('paste', None, _("_Paste"), "<Ctrl>v", None, self.mh),
             ('delete', None, _("_Delete"), "Delete", None, self.mh),
+            ('all', None, _("Select _All"), None, None, self.mh),
             ('move_up', None, _("Move _Up"), "<Control>Up", None, self.mh),
             ('move_dn', None, _("Move Dow_n"), "<Control>Down", None, self.mh),
             ('exchange', None, _("E_xchange"), "<Control><Shift>x", None, self.mh),
diff -r ee4e39df6d17 -r 876c1328e8a6 chirpui/memedit.py
--- a/chirpui/memedit.py Sat Jan 31 12:18:38 2015 -0800
+++ b/chirpui/memedit.py Sat Jan 31 12:27:19 2015 -0800
@@ -791,6 +791,8 @@
             changed = self.copy_selection(action=="cut")
         elif action == "paste":
             changed = self.paste_selection()
+        elif action == "all":
+            changed = self.select_all()
         elif action == "devshowraw":
             self._show_raw(cur_pos)
         elif action == "devdiffraw":
@@ -832,6 +834,8 @@
     <menuitem action="copy"/>
     <menuitem action="paste"/>
     <separator/>
+    <menuitem action="all"/>
+    <separator/>
     <menuitem action="insert_prev"/>
     <menuitem action="insert_next"/>
     <menu action="deletes">
@@ -858,6 +862,7 @@
             ("cut", _("Cut")),
             ("copy", _("Copy")),
             ("paste", _("Paste")),
+            ("all", _("Select All")),
             ("insert_prev", _("Insert row above")),
             ("insert_next", _("Insert row below")),
             ("deletes", _("Delete")),
@@ -1498,6 +1503,9 @@
         clipboard = gtk.Clipboard(selection="PRIMARY")
         clipboard.request_text(self._paste_selection)
 
+    def select_all(self):
+        self.view.get_selection().select_all()
+
     def prepare_close(self):
         cols = self.view.get_columns()
         self._config.set("column_order_%s" % self.__class__.__name__,
 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20150201/79486326/attachment-0001.html 


More information about the chirp_devel mailing list