Changeset 3032
- Timestamp:
- 04/04/07 22:23:30 (2 years ago)
- Files:
-
- trunk/dabo/lib/datanav2/Form.py (modified) (7 diffs)
- trunk/dabo/lib/datanav2/PageFrame.py (modified) (2 diffs)
- trunk/dabo/ui/uiwx/dBaseMenuBar.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dabo/lib/datanav2/Form.py
r3031 r3032 68 68 tb.SetToolBitmapSize((22,22)) ## need to abstract in dToolBar! 69 69 if self.FormType != 'Edit': 70 self.appendToolBarButton("First", "%s/actions/go-first.png" % iconPath, OnHit=self.onFirst,71 tip=_("First"), help=_("Go to the first record"))72 self.appendToolBarButton("Prior", "%s/actions/go-previous.png" % iconPath, OnHit=self.onPrior,73 tip=_("Prior"), help=_("Go to the prior record"))74 self.appendToolBarButton("Requery", "%s/actions/view-refresh.png" % iconPath, OnHit=self.onRequery,75 tip=_("Requery"), help=_("Requery dataset"))76 self.appendToolBarButton("Next", "%s/actions/go-next.png" % iconPath, OnHit=self.onNext,77 tip=_("Next"), help=_("Go to the next record"))78 self.appendToolBarButton("Last", "%s/actions/go-last.png" % iconPath, OnHit=self.onLast,79 tip=_("Last"), help=_("Go to the last record"))70 self.appendToolBarButton("First", "%s/actions/go-first.png" % iconPath, 71 OnHit=self.onFirst, tip=_("First"), help=_("Go to the first record")) 72 self.appendToolBarButton("Prior", "%s/actions/go-previous.png" % iconPath, 73 OnHit=self.onPrior, tip=_("Prior"), help=_("Go to the prior record")) 74 self.appendToolBarButton("Requery", "%s/actions/view-refresh.png" % iconPath, 75 OnHit=self.onRequery, tip=_("Requery"), help=_("Requery dataset")) 76 self.appendToolBarButton("Next", "%s/actions/go-next.png" % iconPath, 77 OnHit=self.onNext, tip=_("Next"), help=_("Go to the next record")) 78 self.appendToolBarButton("Last", "%s/actions/go-last.png" % iconPath, 79 OnHit=self.onLast, tip=_("Last"), help=_("Go to the last record")) 80 80 tb.appendSeparator() 81 81 82 82 if self.FormType == 'Normal': 83 self.appendToolBarButton("New", "%s/actions/document-new.png" % iconPath, OnHit=self.onNew,84 tip=_("New"), help=_("Add a new record"))85 self.appendToolBarButton("Delete", "%s/actions/edit-delete.png" % iconPath, OnHit=self.onDelete,86 tip=_("Delete"), help=_("Delete this record"))83 self.appendToolBarButton("New", "%s/actions/document-new.png" % iconPath, 84 OnHit=self.onNew, tip=_("New"), help=_("Add a new record")) 85 self.appendToolBarButton("Delete", "%s/actions/edit-delete.png" % iconPath, 86 OnHit=self.onDelete, tip=_("Delete"), help=_("Delete this record")) 87 87 tb.appendSeparator() 88 88 89 89 if self.FormType != 'PickList': 90 self.appendToolBarButton("Save", "%s/actions/document-save.png" % iconPath, OnHit=self.onSave,91 tip=_("Save"), help=_("Save changes"))92 self.appendToolBarButton("Cancel", "%s/actions/edit-undo.png" % iconPath, OnHit=self.onCancel,93 tip=_("Cancel"), help=_("Cancel changes"))90 self.appendToolBarButton("Save", "%s/actions/document-save.png" % iconPath, 91 OnHit=self.onSave, tip=_("Save"), help=_("Save changes")) 92 self.appendToolBarButton("Cancel", "%s/actions/edit-undo.png" % iconPath, 93 OnHit=self.onCancel, tip=_("Cancel"), help=_("Cancel changes")) 94 94 tb.appendSeparator() 95 95 … … 106 106 107 107 menu.append(_("Set Selection &Criteria")+"\tAlt+1", 108 OnHit=self.onSetSelectionCriteria, bmp=" checkMark",108 OnHit=self.onSetSelectionCriteria, bmp="%s/actions/system-search.png" % iconPath, 109 109 help=_("Set the selection criteria for the recordset.")) 110 110 111 111 menu.append(_("&Browse Records")+"\tAlt+2", 112 OnHit=self.onBrowseRecords, bmp=" browse",112 OnHit=self.onBrowseRecords, bmp="%s/actions/format-justify-fill.png" % iconPath, 113 113 help=_("Browse the records in the current recordset.")) 114 114 … … 130 130 help = "" 131 131 132 menu.append(title, OnHit=onHit, bmp="%s/apps/accessories-text-editor.png" % iconPath, help=help, Tag=tag) 132 menu.append(title, OnHit=onHit, bmp="%s/apps/accessories-text-editor.png" % iconPath, 133 help=help, Tag=tag) 133 134 menu.appendSeparator() 134 135 135 136 if self.FormType != "Edit": 136 menu.append(_("&Requery")+"\tCtrl+R", OnHit=self.onRequery, bmp="%s/actions/view-refresh.png" % iconPath, 137 menu.append(_("&Requery")+"\tCtrl+R", OnHit=self.onRequery, 138 bmp="%s/actions/view-refresh.png" % iconPath, 137 139 help=_("Get a new recordset from the backend."), menutype="check") 138 140 139 141 if self.FormType != "PickList": 140 menu.append(_("&Save Changes")+"\tCtrl+S", OnHit=self.onSave, bmp="%s/actions/document-save.png" % iconPath, 142 menu.append(_("&Save Changes")+"\tCtrl+S", OnHit=self.onSave, 143 bmp="%s/actions/document-save.png" % iconPath, 141 144 help=_("Save any changes made to the records.")) 142 menu.append(_("&Cancel Changes"), OnHit=self.onCancel, bmp="%s/actions/edit-undo.png" % iconPath, 145 menu.append(_("&Cancel Changes"), OnHit=self.onCancel, 146 bmp="%s/actions/edit-undo.png" % iconPath, 143 147 help=_("Cancel any changes made to the records.")) 144 148 menu.appendSeparator() … … 166 170 167 171 if self.FormType == "Normal": 168 menu.append(_("&New Record")+"\tCtrl+N", OnHit=self.onNew, bmp="%s/actions/document-new.png" % iconPath, 172 menu.append(_("&New Record")+"\tCtrl+N", OnHit=self.onNew, 173 bmp="%s/actions/document-new.png" % iconPath, 169 174 help=_("Add a new record to the dataset.")) 170 menu.append(_("&Delete Current Record"), OnHit=self.onDelete, bmp="%s/actions/edit-delete" % iconPath, 175 menu.append(_("&Delete Current Record"), OnHit=self.onDelete, 176 bmp="%s/actions/edit-delete" % iconPath, 171 177 help=_("Delete the current record from the dataset.")) 172 178 menu.appendSeparator() … … 176 182 177 183 if self.FormType == "Normal": 178 menu.append(_("Quick &Report"), OnHit=self.onQuickReport, bmp="%s/actions/document-print-preview.png" % iconPath, 184 menu.append(_("Quick &Report"), OnHit=self.onQuickReport, 185 bmp="%s/actions/document-print-preview.png" % iconPath, 179 186 DynamicEnabled=self.enableQuickReport) 180 187 … … 295 302 if sql is None: 296 303 sql = "-Nothing executed yet-" 297 dlg = dabo.ui.dDialog(self, Caption=_("Last SQL"), SaveRestorePosition=True, BorderResizable=True) 304 dlg = dabo.ui.dDialog(self, Caption=_("Last SQL"), 305 SaveRestorePosition=True, BorderResizable=True) 298 306 eb = dlg.addObject(dabo.ui.dEditBox, ReadOnly=True, Value=sql, 299 307 Size=(400, 400)) … … 312 320 # May not have records if called via toolbar button 313 321 if not self.enableQuickReport(): 314 dabo.ui.exclaim(_("Sorry, there are no records to report on."), title=_("No Records")) 322 dabo.ui.exclaim(_("Sorry, there are no records to report on."), 323 title=_("No Records")) 315 324 return 316 325 trunk/dabo/lib/datanav2/PageFrame.py
r2735 r3032 9 9 self._pageStyleClass.__init__(self, parent, Name=Name, *args, **kwargs) 10 10 # Add the images for the various pages. 11 self.addImage("checkMark") 12 self.addImage("browse") 13 self.addImage("edit") 11 iconPath = "themes/tango/16x16" 12 self.addImage("%s/actions/system-search.png" % iconPath, key="select") 13 self.addImage("%s/actions/format-justify-fill.png" % iconPath, key="browse") 14 self.addImage("%s/apps/accessories-text-editor.png" % iconPath, key="edit") 14 15 self.addImage("childview") 15 16 … … 36 37 37 38 def addSelectPage(self, caption=_("Select")): 38 self.addPage(self.Form.SelectPageClass, caption, " checkMark")39 self.addPage(self.Form.SelectPageClass, caption, "select") 39 40 40 41 def addBrowsePage(self, caption=_("Browse")): trunk/dabo/ui/uiwx/dBaseMenuBar.py
r2932 r3032 17 17 from dabo.dLocalize import _, n_ 18 18 19 iconPath = "themes/tango/16x16" 19 20 20 21 class FileMenu(dMenu): … … 32 33 if self.Application.ShowCommandWindowMenu: 33 34 self.append(_("Command Win&dow") + "\tCtrl+D", OnHit=app.onCmdWin, 35 bmp="%s/apps/utilities-terminal.png" % iconPath, 34 36 help=_("Open up a command window for debugging") ) 35 37 36 38 prmpt = _("Close Windo&w") + "\tCtrl+W" 37 self.append(prmpt, OnHit=app.onWinClose, bmp="close",39 self.append(prmpt, OnHit=app.onWinClose, 38 40 help=_("Close the current window") ) 39 41 … … 41 43 42 44 prmpt = _("&Quit") + "\tCtrl+Q" 43 # if wx.Platform == '__WXWIN__':44 # prmpt = _("E&xit") + "\tAlt+F4"45 45 self.append(prmpt, id=wx.ID_EXIT, OnHit=app.onFileExit, 46 bmp="exit", help=_("Exit the application") ) 46 bmp="%s/actions/system-log-out.png" % iconPath, 47 help=_("Exit the application") ) 47 48 48 49 … … 54 55 self.Caption = _("&Edit") 55 56 56 self.append(_("&Undo") + "\tCtrl+Z", OnHit=app.onEditUndo, bmp="undo", 57 self.append(_("&Undo") + "\tCtrl+Z", OnHit=app.onEditUndo, 58 bmp="%s/actions/edit-undo.png" % iconPath, 57 59 help=_("Undo last action") ) 58 60 59 self.append(_("&Redo") + "\tCtrl+R", OnHit=app.onEditRedo, bmp="redo", 61 self.append(_("&Redo") + "\tCtrl+R", OnHit=app.onEditRedo, 62 bmp="%s/actions/edit-redo.png" % iconPath, 60 63 help=_("Undo last undo") ) 61 64 62 65 self.appendSeparator() 63 66 64 self.append(_("Cu&t") + "\tCtrl+X", OnHit=app.onEditCut, bmp="cut", 67 self.append(_("Cu&t") + "\tCtrl+X", OnHit=app.onEditCut, 68 bmp="%s/actions/edit-cut.png" % iconPath, 65 69 help=_("Cut selected text") ) 66 70 67 self.append(_("&Copy") + "\tCtrl+C", OnHit=app.onEditCopy, bmp="copy", 71 self.append(_("&Copy") + "\tCtrl+C", OnHit=app.onEditCopy, 72 bmp="%s/actions/edit-copy.png" % iconPath, 68 73 help=_("Copy selected text") ) 69 74 70 self.append(_("&Paste") + "\tCtrl+V", OnHit=app.onEditPaste, bmp="paste", 75 self.append(_("&Paste") + "\tCtrl+V", OnHit=app.onEditPaste, 76 bmp="%s/actions/edit-paste.png" % iconPath, 71 77 help=_("Paste text from clipboard") ) 72 78 73 self.append(_("Select &All") + "\tCtrl+A", OnHit=app.onEditSelectAll, 79 self.append(_("Select &All") + "\tCtrl+A", OnHit=app.onEditSelectAll, 80 bmp="%s/actions/edit-select-all.png" % iconPath, 74 81 help=_("Select all text") ) 75 82 … … 79 86 # commented lines below this enable the plain Find dialog call. 80 87 self.append(_("&Find / Replace") + "\tCtrl+F", OnHit=app.onEditFind, 81 bmp="find", help=_("Find text in the active window") ) 88 bmp="%s/actions/edit-find-replace.png" % iconPath, 89 help=_("Find or Replace text in the active window") ) 82 90 83 91 # self.append(_("Find") + "\tShift+Ctrl+F", OnHit=app.onEditFindAlone, 84 # bmp=" find", help=_("Find text in the active window") )92 # bmp="%s/actions/edit-find.png" % iconPath, help=_("Find text in the active window") ) 85 93 86 94 self.append(_("Find A&gain") + "\tCtrl+G", OnHit=app.onEditFindAgain, bmp="", … … 89 97 self.appendSeparator() 90 98 91 itm = self.append(_("&Preferences"), OnHit=app.onEditPreferences, bmp="configure", 99 itm = self.append(_("&Preferences"), OnHit=app.onEditPreferences, 100 bmp="%s/categories/preferences-system.png" % iconPath, 92 101 help=_("Set user preferences") ) 102 93 103 # Put the prefs item in the App Menu on Mac 94 104 wx.App_SetMacPreferencesMenuItemId(itm.GetId()) … … 120 130 121 131 itm = self.append(_("&About"), id=wx.ID_ABOUT, 122 OnHit=app.onHelpAbout, bmp="apply",132 OnHit=app.onHelpAbout, 123 133 help=_("About this application") ) 124 134 # Put the about menu in the App Menu on Mac
