# name, stock id, label, accelerator, tooltip, callback
actions = [
('Undo', gtk.STOCK_UNDO, _('Undo'), 'Z', None, self.undo_cb),
('Redo', gtk.STOCK_REDO, _('Redo'), 'Y', None, self.redo_cb),
('Brighter', None, _('Brighter'), '<Shift>a', None, self.brighter_cb),
('Smaller', None, _('Smaller'), 'd', None, self.brush_smaller_cb),
('MoreOpaque', None, _('More Opaque'), 's', None, self.more_opaque_cb),
('LessOpaque', None, _('Less Opaque'), 'a', None, self.less_opaque_cb),
('Eraser', None, _('Toggle Eraser Mode'), 'e', None, self.eraser_cb), # TODO: make toggle action
('PickContext', None, _('Pick Context (layer, brush and color)'), 'w', None, self.pick_context_cb),
('Darker', None, _('Darker'), '<Shift>s', None, self.darker_cb),
('Warmer', None, _('Warmer'), None, None, self.warmer_cb),
('Cooler', None, _('Cooler'), None, None, self.cooler_cb),
('Purer', None, _('Purer'), None, None, self.purer_cb),
('Grayer', None, _('Grayer'), None, None, self.grayer_cb),
('Bigger', None, _('Bigger'), 'f', None, self.brush_bigger_cb),
# Context actions are also added in init_context_actions
('ContextStore', None, _('Save to Most Recently Restored'), 'q', None, self.context_cb),
('ClearLayer', gtk.STOCK_CLEAR, _('Clear'), 'Delete', None, self.clear_layer_cb),
('CopyLayer', gtk.STOCK_COPY, _('Copy to Clipboard'), '<control>C', None, self.copy_cb),
('PasteLayer', gtk.STOCK_PASTE, _('Paste Clipboard (Replace Layer)'), '<control>V', None, self.paste_cb),
('PickLayer', gtk.STOCK_JUMP_TO, _('Select Layer at Cursor'), 'h', None, self.pick_layer_cb),
('LayerFG', gtk.STOCK_GO_UP, _('Next (above current)'), 'Page_Up', None, self.layer_fg_cb),
('LayerBG', gtk.STOCK_GO_DOWN, _('Next (below current)'), 'Page_Down', None, self.layer_bg_cb),
('NewLayerFG', gtk.STOCK_ADD, _('New (above current)'), '<Shift>Up', None, self.new_layer_cb),
('NewLayerBG', None, _('New (below current)'), '<Shift>Down', None, self.new_layer_cb),
('MergeLayer', gtk.STOCK_DND_MULTIPLE, # XXX need a batter one, but stay consistent with layerswindow for now
_('Merge Down'), '<Control>BackSpace', None, self.merge_layer_cb),
('RemoveLayer', gtk.STOCK_DELETE, _('Remove'), '<Shift>BackSpace', None, self.remove_layer_cb),
('IncreaseLayerOpacity', None, _('Increase Layer Opacity'), 'p', None, self.layer_increase_opacity),
('DecreaseLayerOpacity', None, _('Decrease Layer Opacity'), 'o', None, self.layer_decrease_opacity),
('ShortcutsMenu', None, _('Shortcuts')),
('ResetView', gtk.STOCK_ZOOM_FIT, _('Reset and Center'), 'semicolon', None, self.reset_view_cb),
('ResetMenu', None, _('Reset')),
('ResetZoom', gtk.STOCK_ZOOM_100, _('Zoom'), None, None, self.reset_view_cb),
('ResetRotation', None, _('Rotation'), None, None, self.reset_view_cb),
('ResetMirror', None, _('Mirror'), None, None, self.reset_view_cb),
('ZoomIn', gtk.STOCK_ZOOM_IN, _('Zoom In (at cursor)'), 'period', None, self.zoom_cb),
('ZoomOut', gtk.STOCK_ZOOM_OUT, _('Zoom Out'), 'comma', None, self.zoom_cb),
('RotateLeft', None, _('Rotate Counterclockwise'), '<control>Left', None, self.rotate_cb),
('RotateRight', None, _('Rotate Clockwise'), '<control>Right', None, self.rotate_cb),
('MirrorHorizontal', None, _('Mirror Horizontal'), 'i', None, self.mirror_horizontal_cb),
('MirrorVertical', None, _('Mirror Vertical'), 'u', None, self.mirror_vertical_cb),
('SoloLayer', None, _('Layer Solo'), 'Home', None, self.solo_layer_cb), # TODO: make toggle action
('ToggleAbove', None, _('Hide Layers Above Current'), 'End', None, self.toggle_layers_above_cb), # TODO: make toggle action
]
actions = [
# name, stock id, label, accelerator, tooltip, callback
('FileMenu', None, _('File')),
('Quit', gtk.STOCK_QUIT, _('Quit'), None, None, self.quit_cb),
('FrameWindow', None, _('Document Frame...'), None, None, self.toggleWindow_cb),
('FrameToggle', None, _('Toggle Document Frame'), None, None, self.toggle_frame_cb),
('EditMenu', None, _('Edit')),
('PreferencesWindow', gtk.STOCK_PREFERENCES, _('Preferences...'), '<Shift>b', None, self.toggleWindow_cb),
('ColorMenu', None, _('Color')),
('ColorPickerPopup', gtk.STOCK_COLOR_PICKER, _('Pick Color'), 'r', None, self.popup_cb),
('ColorHistoryPopup', None, _('Color History'), 'x', None, self.popup_cb),
('ColorChangerPopup', None, _('Color Changer'), 'v', None, self.popup_cb),
('ColorRingPopup', None, _('Color Ring'), None, None, self.popup_cb),
('ColorSelectionWindow', gtk.STOCK_SELECT_COLOR, _('Color Triangle...'), 'g', None, self.toggleWindow_cb),
('ColorSamplerWindow', gtk.STOCK_SELECT_COLOR, _('Color Sampler...'), 't', None, self.toggleWindow_cb),
('ContextMenu', None, _('Brushkeys')),
('ContextHelp', gtk.STOCK_HELP, _('Help!'), None, None, self.show_infodialog_cb),
('LayerMenu', None, _('Layers')),
('LayersWindow', gtk.STOCK_INDEX, _('Layers...'), 'l', None, self.toggleWindow_cb),
('BackgroundWindow', gtk.STOCK_PAGE_SETUP, _('Background...'), 'backslash', None, self.toggleWindow_cb),
('BrushMenu', None, _('Brush')),
('BrushSelectionWindow', None, _('Brush List...'), 'b', None, self.toggleWindow_cb),
('BrushSettingsWindow', gtk.STOCK_PROPERTIES, _('Brush Editor...'), '<control>b', None, self.toggleWindow_cb),
('ImportBrushPack', gtk.STOCK_OPEN, _('Import brush package...'), '', None, self.import_brush_pack_cb),
('HelpMenu', None, _('Help')),
('Docu', gtk.STOCK_INFO, _('Where is the Documentation?'), None, None, self.show_infodialog_cb),
('ShortcutHelp', gtk.STOCK_INFO, _('Change the Keyboard Shortcuts?'), None, None, self.show_infodialog_cb),
('About', gtk.STOCK_ABOUT, _('About MyPaint'), '?', None, self.about_cb),
('DebugMenu', None, _('Debug')),
('PrintMemoryLeak', None, _('Print Memory Leak Info to stdout (Slow!)'), None, None, self.print_memory_leak_cb),
('RunGarbageCollector', None, _('Run Garbage Collector Now'), None, None, self.run_garbage_collector_cb),
('StartProfiling', gtk.STOCK_EXECUTE, _('Start/Stop Python Profiling (cProfile)'), None, None, self.start_profiling_cb),
('InputTestWindow', None, _('Test input devices...'), None, None, self.toggleWindow_cb),
('GtkInputDialog', None, _('GTK input devices dialog...'), None, None, self.gtk_input_dialog_cb),
('ViewMenu', None, _('View')),
('ShowPopupMenu', None, _('Popup Menu'), '<control>minus', None, self.popupmenu_show_cb),
('Fullscreen', gtk.STOCK_FULLSCREEN, _('Fullscreen'), '<Shift>f', None, self.fullscreen_cb),
('ToggleSubwindows', None, _('Toggle Subwindows'), 'tab', None, self.toggle_subwindows_cb),
('ViewHelp', gtk.STOCK_HELP, _('Help'), None, None, self.show_infodialog_cb),
]
| The Following 2 Users Say Thank You to xman For This Useful Post: | ||
if key == keysyms.space or keysyms.v
if event.keyval == keysyms.space or keysyms.v

| The Following User Says Thank You to Creativetone For This Useful Post: | ||
# Context actions are also added in init_context_actions
('ContextStore', None, _('Save to Most Recently Restored'), 'q', None, self.context_cb),
; (gtk_accel_path "<Actions>/WindowActions/ContextStore" "q")