Пример #1
0
 def __init__(self):
     super(OutlineDialog, self).__init__(join_to_file_dir(__file__, 'outline.glade'))
     self.shortcuts = ShortcutActivator(self.window)
     self.shortcuts.bind('Escape', self.hide)
     self.shortcuts.bind('<alt>s', self.focus_search)
     
     set_activate_the_one_item(self.search_entry, self.outline_tree)
Пример #2
0
    def __init__(self):
        super(QuickOpenDialog, self).__init__(join_to_file_dir(__file__, 'gui.glade'))

        from snaked.core.manager import keymap
        self.shortcuts = keymap.get_activator(self.window, 'quick_open')
        self.shortcuts.bind('any', 'activate-search-entry',
            'Activate search entry', self.focus_search)

        self.shortcuts.bind('any', 'open-mime', 'Run _external editor',
            self.open_mime).to('<ctrl>Return')
        self.shortcuts.bind('any', 'open-dialog', '_Open...', self.free_open).to('<ctrl>o')
        self.shortcuts.bind('any', 'toggle-hidden', 'Toggle _hidden',
            self.toggle_hidden).to('<ctrl>h')

        self.shortcuts.bind('any', 'project-list', 'Toggle project _list',
            self.toggle_projects).to('<ctrl>p', 1)
        self.shortcuts.bind('projectlist', 'delete', '_Delete project', self.delete_project)
        self.shortcuts.bind('projectlist', 'set-root', 'Use as _root',
            self.use_as_root).to('Return', 1)

        self.shortcuts.bind('any', 'goto-parent', 'Goto p_arent', self.browse_top).to('BackSpace')
        self.shortcuts.bind('any', 'escape', '_Close', self.escape)

        self.shortcuts.add_context('projectlist', (),
            lambda: self.projectlist_tree if self.projectlist_tree.is_focus() else None)

        project_selection = self.projectlist_tree.get_selection()
        project_selection.set_mode(gtk.SELECTION_MULTIPLE)
        project_selection.connect_after('changed', self.on_projectlist_selection_changed)

        set_activate_the_one_item(self.search_entry, self.filelist_tree)

        self.roots = []
Пример #3
0
    def __init__(self):
        BuilderAware.__init__(self, join_to_file_dir(__file__, 'prefs.glade'))

        from snaked.core.shortcuts import ShortcutActivator
        self.activator = ShortcutActivator(self.window)
        self.activator.bind('Escape', self.hide)
        self.activator.bind('<alt>s', self.focus_search)

        set_activate_the_one_item(self.search_entry, self.dialogs_view)
Пример #4
0
    def __init__(self):
        super(OutlineDialog, self).__init__(join_to_file_dir(__file__, 'outline.glade'))

        from snaked.core.manager import keymap
        self.activator = keymap.get_activator(self.window)
        self.activator.bind('any', 'escape', None, self.hide)
        self.activator.bind('any', 'activate-search-entry', None, self.focus_search)

        set_activate_the_one_item(self.search_entry, self.outline_tree)
Пример #5
0
    def __init__(self, existing_snippets):
        BuilderAware.__init__(self, join_to_file_dir(__file__, 'prefs.glade'))

        from snaked.core.manager import keymap
        self.activator = keymap.get_activator(self.window)
        self.activator.bind('Escape', self.hide)
        self.activator.bind('<alt>s', self.focus_search)
        self.existing_snippets = existing_snippets

        set_activate_the_one_item(self.search_entry, self.snippets_view)
Пример #6
0
    def __init__(self):
        super(QuickOpenDialog, self).__init__(join_to_file_dir(__file__, 'gui.glade'))
        self.shortcuts = ShortcutActivator(self.window)
        self.shortcuts.bind('Escape', self.escape)
        self.shortcuts.bind('<alt>Up', self.project_up)
        self.shortcuts.bind('<alt>Down', self.project_down)
        self.shortcuts.bind('<ctrl>Return', self.open_mime)
        self.shortcuts.bind('<alt>s', self.focus_search)
        self.shortcuts.bind('<ctrl>o', self.free_open)
        self.shortcuts.bind('<ctrl>p', self.popup_projects)
        self.shortcuts.bind('<ctrl>Delete', self.delete_project)
        self.shortcuts.bind('<ctrl>h', self.toggle_hidden)
        self.shortcuts.bind('BackSpace', self.browse_top)

        set_activate_the_one_item(self.search_entry, self.filelist_tree)