Skip to content

Commit

Permalink
wxGUI: rename Modules tab to Tools tab, and Display tab to Layers tab (
Browse files Browse the repository at this point in the history
  • Loading branch information
lindakarlovska authored and petrasovaa committed Dec 10, 2021
1 parent 9609ac5 commit 2e280df
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion gui/wxpython/core/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ def _projInfo(self):
projinfo = dict()
if not grass.find_program("g.proj", "--help"):
sys.exit(
_("GRASS module '%s' not found. Unable to start map " "display window.")
_("GRASS tool '%s' not found. Unable to start map " "display window.")
% "g.proj"
)
env = os.environ.copy()
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,8 +800,8 @@ def _internalSettings(self):
self.internalSettings["appearance"]["iconTheme"]["choices"] = ("grass",)
self.internalSettings["appearance"]["menustyle"]["choices"] = (
_("Classic (labels only)"),
_("Combined (labels and module names)"),
_("Expert (module names only)"),
_("Combined (labels and tool names)"),
_("Expert (tool names only)"),
)
self.internalSettings["appearance"]["gSelectPopupHeight"]["min"] = 50
# there is also maxHeight given to TreeCtrlComboPopup.GetAdjustedSize
Expand Down
4 changes: 3 additions & 1 deletion gui/wxpython/docs/wxGUI.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ <h3>Overview</h3>
set of map layers in the layer manager. The user may start multiple map
displays during a session. The map layers for each display are grouped
under different tabs in the Layer Manager.</li>
<li><a href="wxGUI.modules.html">Module dialogs</a> enable running GRASS modules.</li>
<li><a href="wxGUI.modules.html">Module dialogs</a> enable running GRASS modules
that can be searched and launched via Tools tab.
</li>
</ul>

<h3>Layer Manager</h3>
Expand Down
Binary file modified gui/wxpython/docs/wxGUI_layer_manager.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions gui/wxpython/gmodeler/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def __init__(
style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER,
**kwargs,
):
"""Graphical modeler module search window
"""Graphical modeler tool search window
:param parent: parent window
:param id: window id
Expand Down Expand Up @@ -315,7 +315,7 @@ def ValidateCmd(self, cmd):
GError(
parent=self,
message=_(
"'%s' is not a GRASS module.\n\n"
"'%s' is not a GRASS tool.\n\n"
"Unable to add new action to the model."
)
% cmd[0],
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gmodeler/toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _toolbarData(self):
img="python-export", label=_("Export model to Python script")
),
"actionAdd": MetaIcon(
img="module-add", label=_("Add command (GRASS module) to model")
img="module-add", label=_("Add GRASS tool (module) to model")
),
"dataAdd": MetaIcon(img="data-add", label=_("Add data to model")),
"relation": MetaIcon(
Expand Down
8 changes: 4 additions & 4 deletions gui/wxpython/gui_core/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,17 @@ def __init__(self, parent, handlerObj, giface, model, id=wx.ID_ANY, **kwargs):
self, id=wx.ID_ANY, label=_("Adva&nced search...")
)
self._btnAdvancedSearch.SetToolTip(
_("Do advanced search using %s module") % "g.search.module"
_("Do advanced search using %s tool") % "g.search.module"
)
# tree
self._tree = CTreeView(model=model, parent=self)
self._tree.SetToolTip(_("Double-click to run selected module"))
self._tree.SetToolTip(_("Double-click to run selected tool"))

# buttons
self._btnRun = Button(self, id=wx.ID_OK, label=_("&Run..."))
self._btnRun.SetToolTip(_("Run selected module from the tree"))
self._btnRun.SetToolTip(_("Run selected tool from the tree"))
self._btnHelp = Button(self, id=wx.ID_ANY, label=_("H&elp"))
self._btnHelp.SetToolTip(_("Show manual for selected module from the tree"))
self._btnHelp.SetToolTip(_("Show manual for selected tool from the tree"))

# bindings
self._search.Bind(wx.EVT_TEXT, lambda evt: self.Filter(evt.GetString()))
Expand Down
10 changes: 5 additions & 5 deletions gui/wxpython/gui_core/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def _createGeneralPage(self, notebook):
hideSearch = wx.CheckBox(
parent=panel,
id=wx.ID_ANY,
label=_("Hide '%s' tab (requires GUI restart)") % _("Modules"),
label=_("Hide '%s' tab (requires GUI restart)") % _("Tools"),
name="IsChecked",
)
hideSearch.SetValue(
Expand Down Expand Up @@ -721,7 +721,7 @@ def _createAppearancePage(self, notebook):
#
row += 1
gridSizer.Add(
StaticText(parent=panel, id=wx.ID_ANY, label=_("Module dialog style:")),
StaticText(parent=panel, id=wx.ID_ANY, label=_("Tool dialog style:")),
flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL,
pos=(row, 0),
)
Expand Down Expand Up @@ -1097,11 +1097,11 @@ def _createCmdPage(self, notebook):
"""Create notebook page for commad dialog settings"""
panel = SP.ScrolledPanel(parent=notebook, id=wx.ID_ANY)
panel.SetupScrolling(scroll_x=False, scroll_y=True)
notebook.AddPage(page=panel, text=_("Modules"))
notebook.AddPage(page=panel, text=_("Tools"))

border = wx.BoxSizer(wx.VERTICAL)
box = StaticBox(
parent=panel, id=wx.ID_ANY, label=" %s " % _("Module dialog settings")
parent=panel, id=wx.ID_ANY, label=" %s " % _("Tool dialog settings")
)
sizer = wx.StaticBoxSizer(box, wx.VERTICAL)

Expand Down Expand Up @@ -1129,7 +1129,7 @@ def _createCmdPage(self, notebook):
close = wx.CheckBox(
parent=panel,
id=wx.ID_ANY,
label=_("Close dialog when module is successfully finished"),
label=_("Close dialog when completed successfully"),
name="IsChecked",
)
close.SetValue(self.settings.Get(group="cmd", key="closeDlg", subkey="enabled"))
Expand Down
10 changes: 5 additions & 5 deletions gui/wxpython/gui_core/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ def __init__(self, parent, model, showChoice=True, showTip=False, **kwargs):
wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY, **kwargs)

# self._box = wx.StaticBox(parent = self, id = wx.ID_ANY,
# label = " %s " % _("Find module - (press Enter for next match)"))
# label = " %s " % _("Find tool - (press Enter for next match)"))

if sys.platform == "win32":
self._search = TextCtrl(
Expand All @@ -1214,15 +1214,15 @@ def __init__(self, parent, model, showChoice=True, showTip=False, **kwargs):
)
self._search.SetDescriptiveText(_("Fulltext search"))
self._search.SetToolTip(
_("Type to search in all modules. Press Enter for next match.")
_("Type to search in all tools. Press Enter for next match.")
)

self._search.Bind(wx.EVT_TEXT, self.OnSearchModule)
self._search.Bind(wx.EVT_TEXT_ENTER, self.OnEnter)

if self._showTip:
self._searchTip = StaticWrapText(
parent=self, id=wx.ID_ANY, label="Choose a module", size=(-1, 35)
parent=self, id=wx.ID_ANY, label="Choose a tool", size=(-1, 35)
)

if self._showChoice:
Expand Down Expand Up @@ -1287,7 +1287,7 @@ def OnSearchModule(self, event):
self._searchChoice.SetSelection(0)
self.OnSelectModule()

label = _("%d modules match") % len(commands)
label = _("%d tools match") % len(commands)
if self._showTip:
self._searchTip.SetLabel(label)

Expand Down Expand Up @@ -1330,7 +1330,7 @@ def Reset(self):
"""Reset widget"""
self._search.SetValue("")
if self._showTip:
self._searchTip.SetLabel("Choose a module")
self._searchTip.SetLabel("Choose a tool")


class ManageSettingsWidget(wx.Panel):
Expand Down
10 changes: 4 additions & 6 deletions gui/wxpython/lmgr/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def add_menu_error(message):
def show_menu_errors(messages):
if messages:
self._gconsole.WriteError(
_("There were some issues when loading menu" " or Modules tab:")
_("There were some issues when loading menu" " or Tools tab:")
)
for message in messages:
self._gconsole.WriteError(message)
Expand Down Expand Up @@ -411,13 +411,11 @@ def _addPagesToNotebook(self):
self.notebook.AddPage(page=self.datacatalog, text=_("Data"), name="catalog")

# add 'display' widget to main notebook page
self.notebook.AddPage(
page=self.notebookLayers, text=_("Display"), name="layers"
)
self.notebook.AddPage(page=self.notebookLayers, text=_("Layers"), name="layers")

# add 'modules' widget to main notebook page
# add 'tools' widget to main notebook page
if self.search:
self.notebook.AddPage(page=self.search, text=_("Modules"), name="search")
self.notebook.AddPage(page=self.search, text=_("Tools"), name="search")

# add 'console' widget to main notebook page and add connect switch page signal
self.notebook.AddPage(page=self.goutput, text=_("Console"), name="output")
Expand Down
20 changes: 10 additions & 10 deletions gui/wxpython/main_window/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def add_menu_error(message):
def show_menu_errors(messages):
if messages:
self._gconsole.WriteError(
_("There were some issues when loading menu" " or Modules tab:")
_("There were some issues when loading menu" " or Tools:")
)
for message in messages:
self._gconsole.WriteError(message)
Expand Down Expand Up @@ -577,8 +577,8 @@ def BuildPanes(self):
self._auimgr.AddPane(
self.notebookLayers,
aui.AuiPaneInfo()
.Name("display")
.Caption("Display")
.Name("layers")
.Caption("Layers")
.Left()
.Layer(1)
.Position(2)
Expand All @@ -592,8 +592,8 @@ def BuildPanes(self):
self._auimgr.AddPane(
self.search,
aui.AuiPaneInfo()
.Name("modules")
.Caption("Modules")
.Name("tools")
.Caption("Tools")
.Right()
.Layer(1)
.Position(1)
Expand All @@ -615,7 +615,7 @@ def BuildPanes(self):
.CloseButton(False)
.MinimizeButton(True)
.MaximizeButton(True),
target=self._auimgr.GetPane("modules"),
target=self._auimgr.GetPane("tools"),
)

self._auimgr.AddPane(
Expand All @@ -629,15 +629,15 @@ def BuildPanes(self):
.CloseButton(False)
.MinimizeButton(True)
.MaximizeButton(True),
target=self._auimgr.GetPane("modules"),
target=self._auimgr.GetPane("tools"),
)

self._auimgr.GetPane("toolbarNviz").Hide()

# Set Modules as active tab
modules = self._auimgr.GetPane("modules")
# Set Tools as active tab
tools = self._auimgr.GetPane("tools")
notebook = self._auimgr.GetNotebooks()[0]
notebook.SetSelectionToPage(modules)
notebook.SetSelectionToPage(tools)

# Set the size for automatic notebook
pane = self._auimgr.GetPane(notebook)
Expand Down
6 changes: 3 additions & 3 deletions gui/wxpython/modules/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ def __init__(

# self.btnFetch = Button(parent=self.panel, id=wx.ID_ANY,
# label=_("&Fetch"))
# self.btnFetch.SetToolTip(_("Fetch list of available modules "
# self.btnFetch.SetToolTip(_("Fetch list of available tools "
# "from GRASS Addons repository"))
self.btnClose = Button(parent=self.panel, id=wx.ID_CLOSE)
self.btnInstall = Button(parent=self.panel, id=wx.ID_ANY, label=_("&Install"))
self.btnInstall.SetToolTip(_("Install selected add-ons GRASS module"))
self.btnInstall.SetToolTip(_("Install selected add-ons GRASS tool"))
self.btnInstall.Enable(False)
self.btnHelp = Button(parent=self.panel, id=wx.ID_HELP)
self.btnHelp.SetToolTip(_("Show g.extension manual page"))
Expand Down Expand Up @@ -209,7 +209,7 @@ def _fetch(self):
"""Fetch list of available extensions"""
wx.BeginBusyCursor()
self.SetStatusText(
_("Fetching list of modules from GRASS-Addons (be patient)..."), 0
_("Fetching list of tools from GRASS-Addons (be patient)..."), 0
)
try:
self.thread.Run(
Expand Down
16 changes: 8 additions & 8 deletions gui/wxpython/xml/menudata_pyedit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
<handler>OnSimpleScriptTemplate</handler>
</menuitem>
<menuitem>
<label>Load GRASS &amp;module template</label>
<help>Load full GRASS module template</help>
<label>Load GRASS &amp;tool template</label>
<help>Load full GRASS tool template</help>
<handler>OnGrassModuleTemplate</handler>
</menuitem>
</items>
Expand All @@ -63,13 +63,13 @@
<handler>OnSimpleScriptExample</handler>
</menuitem>
<menuitem>
<label>Load GRASS &amp;module example</label>
<help>Load full GRASS module example</help>
<label>Load GRASS &amp;tool example</label>
<help>Load full GRASS tool example</help>
<handler>OnGrassModuleExample</handler>
</menuitem>
<menuitem>
<label>Load GRASS module error &amp;handling example</label>
<help>Load full GRASS module with error handling example</help>
<label>Load GRASS tool error &amp;handling example</label>
<help>Load full GRASS tool with error handling example</help>
<handler>OnGrassModuleErrorHandlingExample</handler>
</menuitem>
</items>
Expand All @@ -88,8 +88,8 @@
<handler>OnPythonHelp</handler>
</menuitem>
<menuitem>
<label>GRASS Modules help</label>
<help>Display the HTML man page index for all GRASS modules</help>
<label>GRASS Tools help</label>
<help>Display the HTML man page index for all GRASS tools</help>
<handler>OnModulesHelp</handler>
</menuitem>
<menuitem>
Expand Down

0 comments on commit 2e280df

Please sign in to comment.