[chirp_devel] [PATCH] Correct menu enable/disable when changing selected editor
Marco Filippi IZ3GME
Thu Apr 4 01:55:53 PDT 2013
# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1365065724 -7200
# Node ID 69e2514f8f1e4154c50591b788e7494f2ef40a78
# Parent e6d14af8e3f169012abc39d874cfe3ca2288b520
Correct menu enable/disable when changing selected editor
Introduced fixing #739
diff --git a/chirpui/mainapp.py b/chirpui/mainapp.py
--- a/chirpui/mainapp.py
+++ b/chirpui/mainapp.py
@@ -20,6 +20,7 @@
from glob import glob
import shutil
import time
+import re
import gtk
import gobject
@@ -124,13 +125,13 @@
def ev_editor_selected(self, editorset, editortype):
mappings = {
- "memedit" : ["view", "edit"],
+ "^memedit\d*$" : ["view", "edit"],
}
for _editortype, actions in mappings.items():
for _action in actions:
action = self.menu_ag.get_action(_action)
- action.set_sensitive(_editortype == editortype)
+ action.set_sensitive(re.search(_editortype, editortype) is not None)
def _connect_editorset(self, eset):
eset.connect("want-close", self.do_close)
More information about the chirp_devel
mailing list