Changeset 3030

Show
Ignore:
Timestamp:
04/04/07 19:43:22 (2 years ago)
Author:
paul
Message:

Added tango icon theme (just the icons I thought we'd use and only the 16px,
22px, and 32px sizes, not the scalable ones). Put it in a directory structure
to allow other themes in the future, and preserved tango's directory
structure and filenames for ease of maintenance and because tango's names
could very well become the standard icon names.

Altered datanav2/Form.py to use the new icons.

Still need to alter dBaseMenuBar to use the new icons, but I want to test
how this looks first on platforms other than Gtk.

This partially fulfills ticket #1037.

Files:

Legend:

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

    r3013 r3030  
    6464            # It's already been set up 
    6565            return 
    66         tb.MaxWidth = 16 
    67         tb.MaxHeight = 16 
    68          
     66     
     67        iconPath = "themes/tango/22x22"  
    6968        if self.FormType != 'Edit': 
    70             self.appendToolBarButton("First", "leftArrows", OnHit=self.onFirst,  
     69            self.appendToolBarButton("First", "%s/actions/go-first.png" % iconPath, OnHit=self.onFirst,  
    7170                    tip=_("First"), help=_("Go to the first record")) 
    72             self.appendToolBarButton("Prior", "leftArrow", OnHit=self.onPrior,  
     71            self.appendToolBarButton("Prior", "%s/actions/go-previous.png" % iconPath, OnHit=self.onPrior,  
    7372                    tip=_("Prior"), help=_("Go to the prior record")) 
    74             self.appendToolBarButton("Requery", "requery", OnHit=self.onRequery,  
     73            self.appendToolBarButton("Requery", "%s/actions/view-refresh.png" % iconPath, OnHit=self.onRequery,  
    7574                    tip=_("Requery"), help=_("Requery dataset")) 
    76             self.appendToolBarButton("Next", "rightArrow", OnHit=self.onNext,  
     75            self.appendToolBarButton("Next", "%s/actions/go-next.png" % iconPath, OnHit=self.onNext,  
    7776                    tip=_("Next"), help=_("Go to the next record")) 
    78             self.appendToolBarButton("Last", "rightArrows", OnHit=self.onLast,  
     77            self.appendToolBarButton("Last", "%s/actions/go-last.png" % iconPath, OnHit=self.onLast,  
    7978                    tip=_("Last"), help=_("Go to the last record")) 
    8079            tb.appendSeparator() 
    8180 
    8281        if self.FormType == 'Normal': 
    83             self.appendToolBarButton("New", "blank", OnHit=self.onNew,  
     82            self.appendToolBarButton("New", "%s/actions/document-new.png" % iconPath, OnHit=self.onNew,  
    8483                    tip=_("New"), help=_("Add a new record")) 
    85             self.appendToolBarButton("Delete", "delete", OnHit=self.onDelete,  
     84            self.appendToolBarButton("Delete", "%s/actions/edit-delete.png" % iconPath, OnHit=self.onDelete,  
    8685                    tip=_("Delete"), help=_("Delete this record")) 
    8786            tb.appendSeparator() 
    8887 
    8988        if self.FormType != 'PickList': 
    90             self.appendToolBarButton("Save", "save", OnHit=self.onSave,  
     89            self.appendToolBarButton("Save", "%s/actions/document-save.png" % iconPath, OnHit=self.onSave,  
    9190                    tip=_("Save"), help=_("Save changes")) 
    92             self.appendToolBarButton("Cancel", "revert", OnHit=self.onCancel,  
     91            self.appendToolBarButton("Cancel", "%s/actions/edit-undo.png" % iconPath, OnHit=self.onCancel,  
    9392                    tip=_("Cancel"), help=_("Cancel changes")) 
    9493            tb.appendSeparator() 
    9594 
    96         if self.FormType != "Edit": 
    97             self.appendToolBarButton("SQL", "zoomNormal", OnHit=self.onShowSQL,  
    98                     tip=_("Show SQL"), help=_("Show the last executed SQL statement")) 
    99  
    10095        if self.FormType == "Normal": 
    101             self.appendToolBarButton(_("Quick Report"), "print"
     96            self.appendToolBarButton(_("Quick Report"), "%s/actions/document-print-preview.png" % iconPath
    10297                    OnHit=self.onQuickReport, tip=_("Quick Report"), 
    10398                    help=_("Run a Quick Report on the current dataset")) 
     
    105100 
    106101    def getMenu(self): 
     102        iconPath = "themes/tango/16x16"  
    107103        menu = super(Form, self).getMenu() 
    108104        menu.Caption = _("&Actions") 
     
    133129                    help = "" 
    134130                     
    135                 menu.append(title, OnHit=onHit, bmp="edit",   help=help, Tag=tag) 
     131                menu.append(title, OnHit=onHit, bmp="%s/apps/accessories-text-editor.png" % iconPath, help=help, Tag=tag) 
    136132            menu.appendSeparator() 
    137133 
    138134        if self.FormType != "Edit": 
    139             menu.append(_("&Requery")+"\tCtrl+R", OnHit=self.onRequery, bmp="requery"
     135            menu.append(_("&Requery")+"\tCtrl+R", OnHit=self.onRequery, bmp="%s/actions/view-refresh.png" % iconPath
    140136                    help=_("Get a new recordset from the backend."), menutype="check")       
    141137     
    142138        if self.FormType != "PickList": 
    143             menu.append(_("&Save Changes")+"\tCtrl+S", OnHit=self.onSave, bmp="save"
     139            menu.append(_("&Save Changes")+"\tCtrl+S", OnHit=self.onSave, bmp="%s/actions/document-save.png" % iconPath
    144140                    help=_("Save any changes made to the records."))     
    145             menu.append(_("&Cancel Changes"), OnHit=self.onCancel, bmp="revert"
     141            menu.append(_("&Cancel Changes"), OnHit=self.onCancel, bmp="%s/actions/edit-undo.png" % iconPath
    146142                    help=_("Cancel any changes made to the records.")) 
    147143            menu.appendSeparator() 
     
    155151 
    156152            menu.append(_("Select &First Record")+"\t%s+UP" % altKey,  
    157                     OnHit=self.onFirst, bmp="leftArrows",  
     153                    OnHit=self.onFirst, bmp="%s/actions/go-first.png" % iconPath,  
    158154                    help=_("Go to the first record in the set."))  
    159155            menu.append(_("Select &Prior Record")+"\t%s+LEFT" % altKey,  
    160                     OnHit=self.onPrior,bmp="leftArrow",  
     156                    OnHit=self.onPrior, bmp="%s/actions/go-previous.png" % iconPath,  
    161157                    help=_("Go to the prior record in the set."))    
    162158            menu.append(_("Select Ne&xt Record")+"\t%s+RIGHT" % altKey,  
    163                     OnHit=self.onNext, bmp="rightArrow",  
     159                    OnHit=self.onNext, bmp="%s/actions/go-next.png" % iconPath,  
    164160                    help=_("Go to the next record in the set.")) 
    165161            menu.append(_("Select &Last Record")+"\t%s+DOWN" % altKey,  
    166                     OnHit=self.onLast, bmp="rightArrows",  
     162                    OnHit=self.onLast, bmp="%s/actions/go-last.png" % iconPath,  
    167163                    help=_("Go to the last record in the set.")) 
    168164            menu.appendSeparator() 
    169165         
    170166        if self.FormType == "Normal": 
    171             menu.append(_("&New Record")+"\tCtrl+N", OnHit=self.onNew, bmp="blank"
     167            menu.append(_("&New Record")+"\tCtrl+N", OnHit=self.onNew, bmp="%s/actions/document-new.png" % iconPath
    172168                    help=_("Add a new record to the dataset.")) 
    173             menu.append(_("&Delete Current Record"), OnHit=self.onDelete, bmp="delete"
     169            menu.append(_("&Delete Current Record"), OnHit=self.onDelete, bmp="%s/actions/edit-delete" % iconPath
    174170                    help=_("Delete the current record from the dataset.")) 
    175171            menu.appendSeparator() 
    176172 
    177173        if self.FormType != "Edit": 
    178             menu.append(_("Show S&QL"), OnHit=self.onShowSQL, bmp="zoomNormal"
     174            menu.append(_("Show S&QL"), OnHit=self.onShowSQL
    179175 
    180176        if self.FormType == "Normal": 
    181             menu.append(_("Quick &Report"), OnHit=self.onQuickReport, bmp="print"
     177            menu.append(_("Quick &Report"), OnHit=self.onQuickReport, bmp="%s/actions/document-print-preview.png" % iconPath
    182178                    DynamicEnabled=self.enableQuickReport) 
    183179