# HG changeset patch # User Rudolph Gutzerhagen # Date 1593020108 14400 # Wed Jun 24 13:35:08 2020 -0400 # Node ID 9637b36c48c89f006b3cb6b4bdd0371b92891728 # Parent 0c5db792de719d4f1c373df76bcf74a51e87fc0b tooltip-recent-files completes # 8007 o tooltip on recent files menu for full-path information. - aids in distinguishing entries with same short name. diff --git a/chirp/ui/mainapp.py b/chirp/ui/mainapp.py --- a/chirp/ui/mainapp.py +++ b/chirp/ui/mainapp.py @@ -537,15 +537,25 @@ self.menu_ag.remove_action(old_action) file_basename = os.path.basename(fname).replace("_", "__") - action = gtk.Action( - action_name, "_%i. %s" % (i + 1, file_basename), - _("Open recent file {name}").format(name=fname), "") + widget_name = action_name + widget_label = "_%i. %s" % (i + 1, file_basename) + widget_tip = _("Open recent file") + (" {name}").format(name=fname) + action = gtk.Action(action_name, widget_label, widget_tip, "") + action.connect("activate", lambda a, f: self.do_open(f), fname) mid = self.menu_uim.new_merge_id() self.menu_uim.add_ui(mid, path, action_name, action_name, gtk.UI_MANAGER_MENUITEM, False) self.menu_ag.add_action(action) + + widget_uim_path = path + "/" + widget_name + try: + widget_item = self.menu_uim.get_widget(widget_uim_path) + widget_item.set_tooltip_text(widget_tip) + except: + pass + i += 1 def record_recent_file(self, filename):