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 2 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
11 changes: 7 additions & 4 deletions doc/gui/wxpython/example/README
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ or it can be launched from the console.

3. Edit ./gui/wxpython/Makefile:

-SUBDIRS = docs animation datacatalog mapswipe gmodeler rlisetup psmap dbmgr vdigit rdigit iclass gcp timeline tplot photo2image image2target
+SUBDIRS = docs animation datacatalog example mapswipe gmodeler rlisetup psmap dbmgr vdigit rdigit iclass gcp timeline tplot photo2image image2target

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

-PYDSTDIRS := $(patsubst %,$(ETCDIR)/%,core dbmgr gcp gmodeler ... \
+PYDSTDIRS := $(patsubst %,$(ETCDIR)/%,core dbmgr example gcp gmodeler ... \
-PYDSTDIRS := $(patsubst %,$(DSTDIR)/%,animation core datacatalog dbmgr gcp gmodeler \
+PYDSTDIRS := $(patsubst %,$(DSTDIR)/%,animation core datacatalog dbmgr example gcp gmodeler \
wenzeslaus marked this conversation as resolved.
Show resolved Hide resolved

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