Changeset 3035

Show
Ignore:
Timestamp:
04/05/2007 02:24:43 PM (2 years ago)
Author:
paul
Message:

Changed the old datanav to use the new icons. With this, I believe all the
dependencies to the old icons are gone, so after 0.8 is released I'll
remove the old icons.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/lib/datanav/Form.py

    r2905 r3035  
    142142            # It's already been set up 
    143143            return 
    144         tb.MaxWidth = 16 
    145         tb.MaxHeight = 16 
    146          
     144         
     145        if self.Application.Platform == "Mac": 
     146            # Toolbar looks better with larger icons on Mac. In fact, I believe HIG 
     147            # recommends 32x32 for Mac Toolbars. 
     148            iconSize = (32, 32) 
     149        else: 
     150            iconSize = (22, 22) 
     151        tb.SetToolBitmapSize(iconSize)  ## need to abstract in dToolBar! 
     152        iconPath = "themes/tango/%sx%s" % iconSize 
     153 
    147154        if self.FormType != 'Edit': 
    148             self.appendToolBarButton("First", "leftArrows", OnHit=self.onFirst,  
    149                     tip=_("First"), help=_("Go to the first record")) 
    150             self.appendToolBarButton("Prior", "leftArrow", OnHit=self.onPrior,  
    151                     tip=_("Prior"), help=_("Go to the prior record")) 
    152             self.appendToolBarButton("Requery", "requery", OnHit=self.onRequery,  
    153                     tip=_("Requery"), help=_("Requery dataset")) 
    154             self.appendToolBarButton("Next", "rightArrow", OnHit=self.onNext,  
    155                     tip=_("Next"), help=_("Go to the next record")) 
    156             self.appendToolBarButton("Last", "rightArrows", OnHit=self.onLast,  
    157                     tip=_("Last"), help=_("Go to the last record")) 
     155            self.appendToolBarButton("First", "%s/actions/go-first.png" % iconPath,  
     156                    OnHit=self.onFirst,    tip=_("First"), help=_("Go to the first record")) 
     157            self.appendToolBarButton("Prior", "%s/actions/go-previous.png" % iconPath,  
     158                    OnHit=self.onPrior,    tip=_("Prior"), help=_("Go to the prior record")) 
     159            self.appendToolBarButton("Requery", "%s/actions/view-refresh.png" % iconPath,  
     160                    OnHit=self.onRequery,  tip=_("Requery"), help=_("Requery dataset")) 
     161            self.appendToolBarButton("Next", "%s/actions/go-next.png" % iconPath,  
     162                    OnHit=self.onNext, tip=_("Next"), help=_("Go to the next record")) 
     163            self.appendToolBarButton("Last", "%s/actions/go-last.png" % iconPath,  
     164                    OnHit=self.onLast, tip=_("Last"), help=_("Go to the last record")) 
    158165            tb.appendSeparator() 
    159166 
    160167        if self.FormType == 'Normal': 
    161             self.appendToolBarButton("New", "blank", OnHit=self.onNew,  
    162                     tip=_("New"), help=_("Add a new record")) 
    163             self.appendToolBarButton("Delete", "delete", OnHit=self.onDelete,  
    164                     tip=_("Delete"), help=_("Delete this record")) 
     168            self.appendToolBarButton("New", "%s/actions/document-new.png" % iconPath,  
     169                    OnHit=self.onNew,  tip=_("New"), help=_("Add a new record")) 
     170            self.appendToolBarButton("Delete", "%s/actions/edit-delete.png" % iconPath,  
     171                    OnHit=self.onDelete, tip=_("Delete"), help=_("Delete this record")) 
    165172            tb.appendSeparator() 
    166173 
    167174        if self.FormType != 'PickList': 
    168             self.appendToolBarButton("Save", "save", OnHit=self.onSave,  
    169                     tip=_("Save"), help=_("Save changes")) 
    170             self.appendToolBarButton("Cancel", "revert", OnHit=self.onCancel,  
    171                     tip=_("Cancel"), help=_("Cancel changes")) 
     175            self.appendToolBarButton("Save", "%s/actions/document-save.png" % iconPath,  
     176                    OnHit=self.onSave, tip=_("Save"), help=_("Save changes")) 
     177            self.appendToolBarButton("Cancel", "%s/actions/edit-undo.png" % iconPath,  
     178                    OnHit=self.onCancel, tip=_("Cancel"), help=_("Cancel changes")) 
    172179            tb.appendSeparator() 
    173180 
    174         if self.FormType != "Edit": 
    175             self.appendToolBarButton("SQL", "zoomNormal", OnHit=self.onShowSQL,  
    176                     tip=_("Show SQL"), help=_("Show the last executed SQL statement")) 
    177  
    178181        if self.FormType == "Normal": 
    179             self.appendToolBarButton(_("Quick Report"), "print"
     182            self.appendToolBarButton(_("Quick Report"), "%s/actions/document-print-preview.png" % iconPath
    180183                    OnHit=self.onQuickReport, tip=_("Quick Report"), 
    181184                    help=_("Run a Quick Report on the current dataset")) 
     
    183186 
    184187    def getMenu(self): 
     188        iconPath = "themes/tango/16x16"  
    185189        menu = super(Form, self).getMenu() 
    186190        menu.Caption = _("&Actions") 
    187191 
    188192        menu.append(_("Set Selection &Criteria")+"\tAlt+1",  
    189                 OnHit=self.onSetSelectionCriteria, bmp="checkMark"
     193                OnHit=self.onSetSelectionCriteria, bmp="%s/actions/system-search.png" % iconPath
    190194                help=_("Set the selection criteria for the recordset.")) 
    191195 
    192196        menu.append(_("&Browse Records")+"\tAlt+2",  
    193                 OnHit=self.onBrowseRecords, bmp="browse"
     197                OnHit=self.onBrowseRecords, bmp="%s/actions/format-justify-fill.png" % iconPath
    194198                help=_("Browse the records in the current recordset.")) 
    195199 
     
    211215                    help = "" 
    212216                     
    213                 menu.append(title, OnHit=onHit, bmp="edit", help=help, Tag=tag) 
     217                menu.append(title, OnHit=onHit, bmp="%s/apps/accessories-text-editor.png" % iconPath,    
     218                        help=help, Tag=tag) 
    214219            menu.appendSeparator() 
    215220 
    216221        if self.FormType != "Edit": 
    217             menu.append(_("&Requery")+"\tCtrl+R", OnHit=self.onRequery, bmp="requery", 
     222            menu.append(_("&Requery")+"\tCtrl+R", OnHit=self.onRequery,  
     223                    bmp="%s/actions/view-refresh.png" % iconPath, 
    218224                    help=_("Get a new recordset from the backend."), menutype="check")       
    219225     
    220226        if self.FormType != "PickList": 
    221             menu.append(_("&Save Changes")+"\tCtrl+S", OnHit=self.onSave, bmp="save", 
     227            menu.append(_("&Save Changes")+"\tCtrl+S", OnHit=self.onSave,  
     228                    bmp="%s/actions/document-save.png" % iconPath, 
    222229                    help=_("Save any changes made to the records."))     
    223             menu.append(_("&Cancel Changes"), OnHit=self.onCancel, bmp="revert", 
     230            menu.append(_("&Cancel Changes"), OnHit=self.onCancel,  
     231                    bmp="%s/actions/edit-undo.png" % iconPath, 
    224232                    help=_("Cancel any changes made to the records.")) 
    225233            menu.appendSeparator() 
     
    233241 
    234242            menu.append(_("Select &First Record")+"\t%s+UP" % altKey,  
    235                     OnHit=self.onFirst, bmp="leftArrows",  
     243                    OnHit=self.onFirst, bmp="%s/actions/go-first.png" % iconPath,  
    236244                    help=_("Go to the first record in the set."))  
    237245            menu.append(_("Select &Prior Record")+"\t%s+LEFT" % altKey,  
    238                     OnHit=self.onPrior,bmp="leftArrow",  
     246                    OnHit=self.onPrior, bmp="%s/actions/go-previous.png" % iconPath,  
    239247                    help=_("Go to the prior record in the set."))    
    240248            menu.append(_("Select Ne&xt Record")+"\t%s+RIGHT" % altKey,  
    241                     OnHit=self.onNext, bmp="rightArrow",  
     249                    OnHit=self.onNext, bmp="%s/actions/go-next.png" % iconPath,  
    242250                    help=_("Go to the next record in the set.")) 
    243251            menu.append(_("Select &Last Record")+"\t%s+DOWN" % altKey,  
    244                     OnHit=self.onLast, bmp="rightArrows",  
     252                    OnHit=self.onLast, bmp="%s/actions/go-last.png" % iconPath,  
    245253                    help=_("Go to the last record in the set.")) 
    246254            menu.appendSeparator() 
    247255         
    248256        if self.FormType == "Normal": 
    249             menu.append(_("&New Record")+"\tCtrl+N", OnHit=self.onNew, bmp="blank", 
     257            menu.append(_("&New Record")+"\tCtrl+N", OnHit=self.onNew,  
     258                    bmp="%s/actions/document-new.png" % iconPath, 
    250259                    help=_("Add a new record to the dataset.")) 
    251             menu.append(_("&Delete Current Record"), OnHit=self.onDelete, bmp="delete", 
     260            menu.append(_("&Delete Current Record"), OnHit=self.onDelete,  
     261                    bmp="%s/actions/edit-delete" % iconPath, 
    252262                    help=_("Delete the current record from the dataset.")) 
    253263            menu.appendSeparator() 
    254264 
    255265        if self.FormType != "Edit": 
    256             menu.append(_("Show S&QL"), OnHit=self.onShowSQL, bmp="zoomNormal"
     266            menu.append(_("Show S&QL"), OnHit=self.onShowSQL
    257267 
    258268        if self.FormType == "Normal": 
    259             menu.append(_("Quick &Report"), OnHit=self.onQuickReport, bmp="print", 
     269            menu.append(_("Quick &Report"), OnHit=self.onQuickReport,  
     270                    bmp="%s/actions/document-print-preview.png" % iconPath, 
    260271                    DynamicEnabled=self.enableQuickReport) 
    261272 
  • trunk/dabo/lib/datanav/PageFrame.py

    r2543 r3035  
    1515        self._pageStyleClass.__init__(self, parent, Name=Name, *args, **kwargs) 
    1616        # Add the images for the various pages. 
    17         self.addImage("checkMark") 
    18         self.addImage("browse") 
    19         self.addImage("edit") 
    20         self.addImage("childview") 
     17        iconPath = "themes/tango/16x16" 
     18        self.addImage("%s/actions/system-search.png" % iconPath, key="select") 
     19        self.addImage("%s/actions/format-justify-fill.png" % iconPath, key="browse") 
     20        self.addImage("%s/apps/accessories-text-editor.png" % iconPath, key="edit") 
    2121 
    2222 
     
    5757                for child in bizobj.getChildren(): 
    5858                    self.appendPage(self.ChildPageClass(self, child.DataSource),  
    59                             child.Caption, imgKey="childview"
     59                            child.Caption
    6060 
    6161 
    6262    def addSelectPage(self, title=_("Select")): 
    63         self.appendPage(self.Form.SelectPageClass, caption=title, imgKey="checkMark") 
     63        self.appendPage(self.Form.SelectPageClass, caption=title, imgKey="select") 
    6464     
    6565    def addBrowsePage(self, title=_("Browse")): 
  • trunk/dabo/lib/datanav2/PageFrame.py

    r3032 r3035  
    1313        self.addImage("%s/actions/format-justify-fill.png" % iconPath, key="browse") 
    1414        self.addImage("%s/apps/accessories-text-editor.png" % iconPath, key="edit") 
    15         self.addImage("childview") 
    1615 
    1716        self.dsEditPages = {}