Skip to content

Commit

Permalink
wxGUI: Add new icons to datacatalog for actions avaliable in context …
Browse files Browse the repository at this point in the history
…menu (continue) (#830)

Added icons for downloading and creating a location. Simplified tooltip strings, reordered icons.

Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
  • Loading branch information
lindakarlovska and petrasovaa committed Jul 25, 2020
1 parent a760814 commit 1402544
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 175 deletions.
Binary file added gui/icons/grass/location-add.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
119 changes: 43 additions & 76 deletions gui/icons/grass/location-add.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui/icons/grass/location-download.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
138 changes: 52 additions & 86 deletions gui/icons/grass/location-download.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions gui/wxpython/datacatalog/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ def OnCreateMapset(self, event):
db_node, loc_node, mapset_node = self.tree.GetCurrentDbLocationMapsetNode()
self.tree.CreateMapset(db_node, loc_node)

def OnCreateLocation(self, event):
"""Create new location"""
db_node, loc_node, mapset_node = self.tree.GetCurrentDbLocationMapsetNode()
self.tree.CreateLocation(db_node)

def OnDownloadLocation(self, event):
"""Download location to current grass database"""
db_node, loc_node, mapset_node = self.tree.GetCurrentDbLocationMapsetNode()
self.tree.DownloadLocation(db_node)

def SetRestriction(self, restrict):
"""Allow editing other mapsets or restrict editing to current mapset"""
self.tree.SetRestriction(restrict)
Expand Down
10 changes: 10 additions & 0 deletions gui/wxpython/datacatalog/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ def OnCreateMapset(self, event):
db_node, loc_node, mapset_node = self.tree.GetCurrentDbLocationMapsetNode()
self.tree.CreateMapset(db_node, loc_node)

def OnCreateLocation(self, event):
"""Create new location"""
db_node, loc_node, mapset_node = self.tree.GetCurrentDbLocationMapsetNode()
self.tree.CreateLocation(db_node)

def OnDownloadLocation(self, event):
"""Download location online"""
db_node, loc_node, mapset_node = self.tree.GetCurrentDbLocationMapsetNode()
self.tree.DownloadLocation(db_node)

def SetRestriction(self, restrict):
"""Allow editing other mapsets or restrict editing to current mapset"""
self.tree.SetRestriction(restrict)
Expand Down

0 comments on commit 1402544

Please sign in to comment.