Bläddra i källkod

wxGUI: rename Modules tab to Tools tab, and Display tab to Layers tab (#1927)

Linda Kladivova 3 år sedan
förälder
incheckning
6c8f73419d

+ 1 - 1
gui/wxpython/core/render.py

@@ -869,7 +869,7 @@ class Map(object):
         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()

+ 2 - 2
gui/wxpython/core/settings.py

@@ -800,8 +800,8 @@ class Settings:
         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

+ 3 - 1
gui/wxpython/docs/wxGUI.html

@@ -18,7 +18,9 @@ The GUI is composed of <em>three</em> main components:
   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>

BIN
gui/wxpython/docs/wxGUI_layer_manager.jpg


+ 2 - 2
gui/wxpython/gmodeler/dialogs.py

@@ -175,7 +175,7 @@ class ModelSearchDialog(wx.Dialog):
         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
@@ -315,7 +315,7 @@ class ModelSearchDialog(wx.Dialog):
             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],

+ 1 - 1
gui/wxpython/gmodeler/toolbars.py

@@ -49,7 +49,7 @@ class ModelerToolbar(BaseToolbar):
                 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(

+ 4 - 4
gui/wxpython/gui_core/menu.py

@@ -166,17 +166,17 @@ class SearchModuleWindow(wx.Panel):
             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()))

+ 5 - 5
gui/wxpython/gui_core/preferences.py

@@ -320,7 +320,7 @@ class PreferencesDialog(PreferencesBaseDialog):
         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(
@@ -721,7 +721,7 @@ class PreferencesDialog(PreferencesBaseDialog):
         #
         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),
         )
@@ -1097,11 +1097,11 @@ class PreferencesDialog(PreferencesBaseDialog):
         """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)
 
@@ -1129,7 +1129,7 @@ class PreferencesDialog(PreferencesBaseDialog):
         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"))

+ 5 - 5
gui/wxpython/gui_core/widgets.py

@@ -1202,7 +1202,7 @@ class SearchModuleWidget(wx.Panel):
         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(
@@ -1214,7 +1214,7 @@ class SearchModuleWidget(wx.Panel):
             )
             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)
@@ -1222,7 +1222,7 @@ class SearchModuleWidget(wx.Panel):
 
         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:
@@ -1287,7 +1287,7 @@ class SearchModuleWidget(wx.Panel):
                 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)
 
@@ -1330,7 +1330,7 @@ class SearchModuleWidget(wx.Panel):
         """Reset widget"""
         self._search.SetValue("")
         if self._showTip:
-            self._searchTip.SetLabel("Choose a module")
+            self._searchTip.SetLabel("Choose a tool")
 
 
 class ManageSettingsWidget(wx.Panel):

+ 4 - 6
gui/wxpython/lmgr/frame.py

@@ -129,7 +129,7 @@ class GMFrame(wx.Frame):
         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)
@@ -411,13 +411,11 @@ class GMFrame(wx.Frame):
         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")

+ 10 - 10
gui/wxpython/main_window/frame.py

@@ -136,7 +136,7 @@ class GMFrame(wx.Frame):
         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)
@@ -577,8 +577,8 @@ class GMFrame(wx.Frame):
         self._auimgr.AddPane(
             self.notebookLayers,
             aui.AuiPaneInfo()
-            .Name("display")
-            .Caption("Display")
+            .Name("layers")
+            .Caption("Layers")
             .Left()
             .Layer(1)
             .Position(2)
@@ -592,8 +592,8 @@ class GMFrame(wx.Frame):
         self._auimgr.AddPane(
             self.search,
             aui.AuiPaneInfo()
-            .Name("modules")
-            .Caption("Modules")
+            .Name("tools")
+            .Caption("Tools")
             .Right()
             .Layer(1)
             .Position(1)
@@ -615,7 +615,7 @@ class GMFrame(wx.Frame):
             .CloseButton(False)
             .MinimizeButton(True)
             .MaximizeButton(True),
-            target=self._auimgr.GetPane("modules"),
+            target=self._auimgr.GetPane("tools"),
         )
 
         self._auimgr.AddPane(
@@ -629,15 +629,15 @@ class GMFrame(wx.Frame):
             .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)

+ 3 - 3
gui/wxpython/modules/extensions.py

@@ -110,11 +110,11 @@ class InstallExtensionWindow(wx.Frame):
 
         # 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"))
@@ -209,7 +209,7 @@ class InstallExtensionWindow(wx.Frame):
         """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(

+ 8 - 8
gui/wxpython/xml/menudata_pyedit.xml

@@ -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>
@@ -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>
@@ -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>