[go: up one dir, main page]

Menu

[r13]: / bin / Menu.py  Maximize  Restore  History

Download this file

104 lines (86 with data), 4.7 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
#!/usr/bin/python
# -*- coding: utf-8 -*-
import wx
from configClass import *
class MainMenu(wx.MenuBar):
def __init__(self, parent, id=wx.ID_ANY):
menubar = wx.MenuBar()
wx.MenuBar.__init__(self)
file = wx.Menu()
edit = wx.Menu()
help = wx.Menu()
search = wx.Menu()
view = wx.Menu()
document = wx.Menu()
file.Append(500, '&New Tab\tCtrl+N', 'Open a new tab.')
file.Append(501, '&Open\tCtrl+O', 'Open a new document.')
file.Append(502, '&Save\tCtrl+S', 'Save the document.')
file.Append(503, 'Save As',
'Save the document under a different name.')
file.Append(506, "Save All",
"Saves all the open documents that have a path.")
file.Append(504, '&Print\tCtrl+P', 'Print the current document.')
file.Append(505, 'Close &Tab\tCtrl+W', 'Close the current tab.')
file.AppendSeparator()
quit = wx.MenuItem(file, 506, '&Quit\tCtrl+Q', 'Quit gEcrit.')
file.AppendItem(quit)
edit.Append(520, "&Undo\tCtrl+Z", "Cancel the last action.")
edit.Append(521, "&Redo\tCtrl+Y", "Bring back the last action.")
edit.AppendSeparator()
edit.Append(522, "&Cut\tCtrl+X", "Cut the selection.")
edit.Append(523, "C&opy\tCtrl+C", "Copy the selection.")
edit.Append(524, "P&aste\tCtrl+V", "Paste the selection.")
edit.AppendSeparator()
edit.Append(525, "Select All\tCtrl+A",
"Select all the document.")
edit.AppendSeparator()
edit.Append(529, "Indent\tCtrl+K", "Indent the selected lines.")
edit.Append(528, "Dedent\tCtrl+J", "Dedent the selected lines.")
edit.AppendSeparator()
edit.Append(526, "Insert date",
"Insert the date at cursor position.")
edit.AppendSeparator()
edit.Append(527, "Preferences\tCtrl+E",
"Open the configuration window.")
search.Append(530, "Find\tCtrl+F",
"Search text in the current document.")
search.Append(531, "Find and Replace\tCtrl+H",
"Search and replace text in the current document.")
view.Append(535, "Zoom In\tCtrl++",
"Increase the size of the text.")
view.Append(536, "Zoom Out\tCtrl+-",
"Decrease the size of the text.")
view.Append(537, "Normal Size\tCtrl+0",
"Set the size of the text to normal.")
view.AppendSeparator()
view.AppendCheckItem(538, "Line Numbers",
"Show/Hide line numbers.").Check(Config.GetOption("LineNumbers"))
view.AppendCheckItem(539, "Fold Marks", "Show/Hide fold marks.").Check(Config.GetOption("FoldMarks"))
view.AppendCheckItem(540, "White Space",
"Show/Hide white spaces.").Check(Config.GetOption("Whitespace"))
view.AppendCheckItem(541, "Indentation Guides",
"Show/Hide indentation guides.").Check(Config.GetOption("IndetationGuides"))
view.AppendCheckItem(546, "Edge Line",
"Show/Hide the edge line.").Check(Config.GetOption("EdgeLine"))
view.AppendCheckItem(547, "Syntax Highlight",
"Enable/Disable Syntax Highlight.").Check(Config.GetOption("SyntaxHighlight"))
view.AppendSeparator()
view.AppendCheckItem(542, "Python Shell",
"Stop/Start a python shell.").Check(Config.GetOption("PythonShell"))
view.AppendCheckItem(543, "OS Shell", "Stop/Start an OS shell.").Check(Config.GetOption("BashShell"))
view.AppendCheckItem(544, "Source Browser",
"Show/Hide the source browser.").Check(Config.GetOption("SourceBrowser"))
view.AppendCheckItem(555, "FileTree",
"Show/Hide the file browser.").Check(Config.GetOption("FileTree"))
view.AppendCheckItem(545, "Statusbar", "Show/Hide statusbar.").Check(Config.GetOption("StatusBar"))
document.Append(549, "Send to Pastebin\tCtrl+I",
"Submit the current document to pastebin.com")
document.Append(548, "Check for errors\tCtrl+B",
"Check the current document for errors.(python only)")
help.Append(550, "About", "Open the about window.")
self.Append(file, '&File')
self.Append(edit, '&Edit')
self.Append(search, "&Search")
self.Append(view, "&View")
self.Append(document, "&Document")
self.Append(help, '&Help')