Пример #1
0
import gtk

from uxie.utils import join_to_settings_dir
from uxie.actions import KeyMap
from uxie.floating import Manager as FeedbackManager
from uxie.plugins import Manager as PluginManager

import filelist
import clipboard
import fsutils

keymap = KeyMap(join_to_settings_dir('fmd', 'keys.conf'))
keymap.map_generic('root-menu', 'F1')
keymap.map_generic('copy', '<ctrl>c')
keymap.map_generic('copy', '<ctrl>Insert')
keymap.map_generic('cut', '<ctrl>x')
keymap.map_generic('cut', '<shift>Delete')
keymap.map_generic('paste', '<ctrl>v')
keymap.map_generic('paste', '<shift>Insert')
keymap.map_generic('delete', 'Delete')

class App(object):
    def __init__(self):
        self.wg = gtk.WindowGroup()
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.window.set_default_size(700, 415)
        self.window.connect('delete-event', self.quit)
        self.wg.add_window(self.window)

        self.clipboard = clipboard.Clipboard()
        self.window.feedback = self.feedback = FeedbackManager()
Пример #2
0
prefs.add_option('RESTORE_POSITION', True, 'Restore snaked windows position')
prefs.add_option('CONSOLE_FONT', 'Monospace 8', 'Font used in console panel')
prefs.add_option('MIMIC_PANEL_COLORS_TO_EDITOR_THEME', True,
                 'Try to apply editor color theme to various panels')
prefs.add_option('WINDOW_BORDER_WIDTH', 0, 'Adjust window border width if you have bad wm')
prefs.add_option('SHOW_TABS', None,
                 'State of tabs visibility. Set it to None to use window specific settings')
prefs.add_option('TAB_BAR_PLACEMENT', None,
                 '''Tab bar placement position. One of "top", "bottom", "left", "right"
                    Set it to None to use window specific settings''')

prefs.add_internal_option('WINDOWS', list)
prefs.add_internal_option('MODIFIED_FILES', dict)

keymap = KeyMap(join_to_settings_dir('snaked', 'keys.conf'))
keymap.map_generic('root-menu', 'F1')
keymap.map_generic('activate-search-entry', '<ctrl>s')
keymap.map_generic('escape', 'Escape')
keymap.map_generic('delete', 'Delete')

keymap.map_generic('prev', '<ctrl>Up', 1)
keymap.map_generic('next', '<ctrl>Down', 1)

keymap.map_generic('complete', '<ctrl>space', 1)
keymap.map_generic('goto-definition', 'F3')
keymap.map_generic('show-outline', '<ctrl>o')
keymap.map_generic('show-calltip', '<ctrl>Return', 1)

keymap.map_generic('run-test', '<ctrl>F10')
keymap.map_generic('run-all-tests', '<ctrl><shift>F10')