Преглед на файлове

wxGUI: north arrow icon added (thanks to Robert Szczepanek)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49665 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová преди 13 години
родител
ревизия
fc98f91c22
променени са 4 файла, в които са добавени 9 реда и са изтрити 6 реда
  1. BIN
      gui/icons/grass/north-arrow-add.png
  2. 5 1
      gui/wxpython/icons/icon.py
  3. 2 2
      gui/wxpython/mapdisp/frame.py
  4. 2 3
      gui/wxpython/psmap/frame.py

BIN
gui/icons/grass/north-arrow-add.png


+ 5 - 1
gui/wxpython/icons/icon.py

@@ -146,6 +146,8 @@ Icons = {
                                 label = _('Add scalebar and north arrow')),
         'addLegend'  : MetaIcon(img = iconSet.get('legend-add', wx.ART_ERROR),
                                 label = _('Add legend')),
+        'addNorthArrow': MetaIcon(img = iconSet.get('north-arrow-add', wx.ART_ERROR),
+                                label = _('North Arrow')),
         'saveFile'   : MetaIcon(img = iconSet.get('map-export', wx.ART_ERROR),
                                 label = _('Save display to graphic file')),
         'print'      : MetaIcon(img = iconSet.get('print', wx.ART_ERROR),
@@ -441,8 +443,10 @@ Icons = {
                                 label = _('Legend')),
         'addScalebar' : MetaIcon(img = iconSet.get('scalebar-add', wx.ART_ERROR),
                                  label = _('Scale bar')),
-        'addImage'   : MetaIcon(img = iconSet['image-add'],
+        'addImage'   : MetaIcon(img = iconSet.get('image-add', wx.ART_ERROR),
                                  label = _('Image')),
+        'addNorthArrow': MetaIcon(img = iconSet.get('north-arrow-add', wx.ART_ERROR),
+                                 label = _('North Arrow')),
         }
     }
 

+ 2 - 2
gui/wxpython/mapdisp/frame.py

@@ -1146,8 +1146,8 @@ class MapFrame(MapFrameBase):
         # temporary
         if self.IsPaneShown('3d'):
             AddScale.Enable(False)
-            AddArrow = wx.MenuItem(decmenu, wx.ID_ANY, _("Add north arrow"))
-            AddArrow.SetBitmap(icons["addBarscale"].GetBitmap(self.iconsize))
+            AddArrow = wx.MenuItem(decmenu, wx.ID_ANY, icons['addNorthArrow'].GetLabel())
+            AddArrow.SetBitmap(icons['addNorthArrow'].GetBitmap(self.iconsize))
             decmenu.AppendItem(AddArrow)
             self.Bind(wx.EVT_MENU, self.OnAddArrow, AddArrow)
         

+ 2 - 3
gui/wxpython/psmap/frame.py

@@ -610,9 +610,8 @@ class PsMapFrame(wx.Frame):
         decmenu.AppendItem(AddImage)
         self.Bind(wx.EVT_MENU, self.OnAddImage, AddImage) 
         # north arrow image
-        AddNorthArrow = wx.MenuItem(decmenu, wx.ID_ANY, _("North arrow"))
-        AddNorthArrow.SetBitmap(wx.ArtProvider.GetBitmap(id = wx.ART_MISSING_IMAGE,
-                                client = wx.ART_MENU, size = self.iconsize))
+        AddNorthArrow = wx.MenuItem(decmenu, wx.ID_ANY, Icons['psMap']["addNorthArrow"].GetLabel())
+        AddNorthArrow.SetBitmap(Icons['psMap']["addNorthArrow"].GetBitmap(self.iconsize))
         decmenu.AppendItem(AddNorthArrow)
         self.Bind(wx.EVT_MENU, self.OnAddNorthArrow, AddNorthArrow) 
         # Popup the menu.  If an item is selected then its handler