Пример #1
0
 def edit_patterns(cls, button):
     win = JSONBasedEditor(Command, cls.all_commands(),
                           filename=cls.COMS_FILE,
                           title=_("Edit Custom Commands"))
     # Cache busting
     cls._commands = None
     win.show()
Пример #2
0
 def edit_patterns(cls, button):
     win = JSONBasedEditor(Command, cls.all_commands(),
                           filename=cls.COMS_FILE,
                           title=_("Edit Custom Commands"))
     # Cache busting
     cls._commands = None
     win.show()
Пример #3
0
 def edit_patterns(cls, button):
     cls.commands = cls._get_saved_searches()
     win = JSONBasedEditor(Command,
                           cls.commands,
                           filename=cls.COMS_FILE,
                           title=_("Edit Custom Commands"))
     win.show()
Пример #4
0
 def add_edit_item(cls, submenu):
     config = Gtk.MenuItem(label=_("Edit Custom Commands") + "...")
     connect_obj(config, 'activate', cls.edit_patterns, config)
     config.set_sensitive(not JSONBasedEditor.is_not_unique())
     submenu.append(SeparatorMenuItem())
     submenu.append(config)
Пример #5
0
 def edit_patterns(cls, button):
     cls.commands = cls._get_saved_searches()
     win = JSONBasedEditor(Command, cls.commands, filename=cls.COMS_FILE,
                           title=_("Edit Custom Commands"))
     win.show()
Пример #6
0
 def add_edit_item(cls, submenu):
     config = Gtk.MenuItem(label=_("Edit Custom Commands") + "…")
     connect_obj(config, 'activate', cls.edit_patterns, config)
     config.set_sensitive(not JSONBasedEditor.is_not_unique())
     submenu.append(SeparatorMenuItem())
     submenu.append(config)
Пример #7
0
 def test_JSONBasedEditor(self):
     ed = JSONBasedEditor(Command, self.commands, None, "title")
     ed.show_now()
     ed.destroy()
Пример #8
0
 def test_JSONBasedEditor(self):
     ed = JSONBasedEditor(Command, self.commands, None, "title")
     ed.show_now()
     ed.destroy()