Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g.gui.example: fix broken module #3233

Merged
merged 4 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions doc/gui/wxpython/example/README
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ or it can be launched from the console.

3. Edit ./gui/wxpython/Makefile:

SRCFILES := $(wildcard icons/*.* scripts/* xml/*) \
- $(wildcard core/* dbmgr/* gcp/* gmodeler/* ... \
+ $(wildcard core/* dbmgr/* example/* gcp/* gmodeler/* ... \

-PYDSTDIRS := $(patsubst %,$(ETCDIR)/%,core dbmgr gcp gmodeler ... \
+PYDSTDIRS := $(patsubst %,$(ETCDIR)/%,core dbmgr example gcp gmodeler ... \
SUBDIRS: Add example
SRCFILES: Add example/*py
PYDSTDIRS: Add example

4. Run make (in ./gui/wxpython)

Expand Down
2 changes: 1 addition & 1 deletion doc/gui/wxpython/example/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, parent, title=_("Choose raster map")):
def _layout(self):
"""!Do layout"""
self.dataSizer.Add(
item=wx.StaticText(parent=self.panel, label=_("Name of raster map:")),
wx.StaticText(parent=self.panel, label=_("Name of raster map:")),
proportion=0,
flag=wx.ALL,
border=1,
Expand Down
4 changes: 2 additions & 2 deletions doc/gui/wxpython/example/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def _setStyle(self, style):
else:
return

self.textCtrl.SetDefaultStyle(wx.TextAttr(font=self.font))
self.textCtrl.SetFont(self.font)

def _writeLine(self, title, value):
"""!Formats text (key, value pair) with styles."""
Expand All @@ -436,5 +436,5 @@ def WriteStatistics(self, name, statDict):
"""
self.GetControl().Clear()
self._writeRasterTitle(name=name)
for key, value in statDict.iteritems():
for key, value in statDict.items():
self._writeLine(title=key, value=value)
30 changes: 17 additions & 13 deletions doc/gui/wxpython/example/toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,12 @@ def _toolbarData(self):
"""!Toolbar data"""
return self._getToolbarData(
(
("addRaster", BaseIcons["addRast"].label),
BaseIcons["addRast"],
self.parent.OnSelectRaster,
),
(
("addRaster", BaseIcons["addRast"].label),
BaseIcons["addRast"],
self.parent.OnSelectRaster,
),
)
)


Expand All @@ -135,13 +137,15 @@ def _toolbarData(self):
icons = BaseIcons
return self._getToolbarData(
(
("help", icons["help"].label),
icons["help"],
self.parent.OnHelp,
),
(
("quit", icons["quit"].label),
icons["quit"],
self.parent.OnCloseWindow,
),
(
("help", icons["help"].label),
icons["help"],
self.parent.OnHelp,
),
(
("quit", icons["quit"].label),
icons["quit"],
self.parent.OnCloseWindow,
),
)
)
Loading