A GUI for wmllint
Moderator: Forum Moderators
- Elvish_Hunter
- Posts: 1578
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
In this case, whatever the cause may be, unfortunately it doesn't depend on my code. I'm just using Tkinter'svultraz wrote:Ok, another weird bug found: if you double click a folder in the file browser, it doesn't expand; it only does if you click the little arrow. Double clicking just results in a 'waiting' cursor.
I'm not sure this is a gui.pyw bug, though. Sounds like a problem with the widget library or something else.
askdirectory()
function, and Tkinter in turn is a thin Python wrapper upon Tcl/Tk. So, I fear that this may be an upstream bug with Windows 8.1 and Tcl/Tk
I just tested. With Windows 7 @ 64 bit and Python 2.7.9 @ 32 bit it works perfectly. It works perfectly even with Python 3.4.3 @ 32 bit!vultraz wrote:EDIT: possible second issue. I installed python 2.7.9 32 bit, and gui.pyw wouldn't start. It worked when I installed 64 bit, though. Can you confirm?
Did you, by any chance, install Python 2.7.9-32 over version 2.7.8-64? If so, there's the chance that some 64-bit component is still around. Try completely uninstalling and then reinstalling Python.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: A GUI for wmllint
'Elvish_Hunter wrote:Did you, by any chance, install Python 2.7.9-32 over version 2.7.8-64? If so, there's the chance that some 64-bit component is still around. Try completely uninstalling and then reinstalling Python.
I did. Tried uninstalling completely, then reinstalling, and it works. Thanks. I can now run pyenchant!
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
Re: A GUI for wmllint
Ok, small issue:
If you have a subdirectory of core selected and 'Skip Core Directory', the warning about no dir selected doesn't appear, for some reason, but the warning about it only running on core since you have a subdirectory selected does. The result is the command with no target.
If you have a subdirectory of core selected and 'Skip Core Directory', the warning about no dir selected doesn't appear, for some reason, but the warning about it only running on core since you have a subdirectory selected does. The result is the command with no target.
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
- Elvish_Hunter
- Posts: 1578
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
Yeah, I'm aware of it. But I didn't fix it yet because I was undecided of what should be the best behavior here: since the core directory is disabled, should I halt the run? Or should I issue a warning and run wmllint on the selected directory anyway? Or should I use the selected directory and issue no warning at all?vultraz wrote:Ok, small issue:
If you have a subdirectory of core selected and 'Skip Core Directory', the warning about no dir selected doesn't appear, for some reason, but the warning about it only running on core since you have a subdirectory selected does. The result is the command with no target.
The funny thing of this situation is that wmllint itself doesn't have any of these checks to avoid being fooled...
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: A GUI for wmllint
Hi Elvish_Hunter,
As per our discussion, here's a screenshot of how the GUI looks on my Mac. This is with OS X 10.9.5, Wesnoth 1.12.2+dev and python 2.7.9. As I said, it worked for me right out of the box without any problems and is so easy to use that I might actually switch away from my CL habits for this in the future.
Thanks!
mattsc
As per our discussion, here's a screenshot of how the GUI looks on my Mac. This is with OS X 10.9.5, Wesnoth 1.12.2+dev and python 2.7.9. As I said, it worked for me right out of the box without any problems and is so easy to use that I might actually switch away from my CL habits for this in the future.
Thanks!
mattsc
SP campaigns: Galuldur's First Journey (1.12 & 1.14) & Grnk the Mighty (1.10 & 1.12)
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
- Elvish_Hunter
- Posts: 1578
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
Thanks for the screenshot
However, I can't help but notice that the look seems somehow "off" - for example, the MacOs buttons that I always seen in screenshots are more rounded. So, can you please open a Python prompt (IDLE is fine as well), type the following lines and tell me their output?I'm suspecting that I'll need to explicitly set the Aqua theme on Mac...
However, I can't help but notice that the look seems somehow "off" - for example, the MacOs buttons that I always seen in screenshots are more rounded. So, can you please open a Python prompt (IDLE is fine as well), type the following lines and tell me their output?
Code: Select all
from Tkinter import *
from ttk import *
print Style().theme_use()
print Style().theme_names()
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: A GUI for wmllint
It looks like it does default to aqua:
Unfortunately, I can't tell you much about whether I might have some settings that change this on the system level -- mostly because I stopped caring about these things many years ago and just don't pay attention to them; I just use whatever the default and/or migrated settings are... As for rounded buttons, the browse, clear and tool selection buttons are rounded, while the top row of buttons is not. Both types appear in other applications for me as well, although I cannot quickly find one where they appear next to each other like that.
Code: Select all
Python 2.7.9 (default, Dec 11 2014, 02:36:08)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from Tkinter import *
>>> from ttk import *
>>> print Style().theme_use()
aqua
>>> print Style().theme_names()
('aqua', 'clam', 'alt', 'default', 'classic')
>>>
SP campaigns: Galuldur's First Journey (1.12 & 1.14) & Grnk the Mighty (1.10 & 1.12)
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
- Elvish_Hunter
- Posts: 1578
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
Thanks anyway . At least, now I know that it isn't something that I can fix. Perhaps it's a bug in Tcl/Tk, perhaps it's some inconsistency in MacOS, perhaps it's a combination of both, but for sure It's Not My Fault™mattsc wrote:As for rounded buttons, the browse, clear and tool selection buttons are rounded, while the top row of buttons is not. Both types appear in other applications for me as well, although I cannot quickly find one where they appear next to each other like that.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
- Celtic_Minstrel
- Developer
- Posts: 2255
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: A GUI for wmllint
I tried this out in 1.12.4 and have two suggestions for improvement:
- Would it be a lot of work to support dragging a folder into the text box? I can drag it into the file select dialog already, but this would be slightly more convenient.
- I suggest setting the current working directory to the provided directory - I think this should result in shorter messages. (Or possibly the parent of the provided directory.)
Here's my view:Elvish_Hunter wrote:Yeah, I'm aware of it. But I didn't fix it yet because I was undecided of what should be the best behavior here: since the core directory is disabled, should I halt the run? Or should I issue a warning and run wmllint on the selected directory anyway? Or should I use the selected directory and issue no warning at all?
The funny thing of this situation is that wmllint itself doesn't have any of these checks to avoid being fooled...
- If they select the core directory (ie, "data/core"), then just parse core once, thus ignoring the setting of whether or not to include core.
- If they disable core but then select a subdirectory of core, then just parse that subdirectory.
- If they enable core but then select a subdirectory of core, ignore their subdirectory and just parse core.
Re: A GUI for wmllint
Small issue I think I found: the file chooser box seems to be constantly refreshing - the cursor stutters between normal and 'waiting', and the folder overlays (such as from tgit) flicker. Not sure if this is a problem with the app or something else, but I thought I'd point it out.
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
- Elvish_Hunter
- Posts: 1578
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
OK, let me get this straight: Tkinter doesn't support drag and drop. There are some extensions around to enable it, but this will mean adding a dependency that not everyone may know how to install, and that may not be redistributed with Wesnoth, depending on the license.Celtic_Minstrel wrote:Would it be a lot of work to support dragging a folder into the text box? I can drag it into the file select dialog already, but this would be slightly more convenient.
Whatever D'n'D support you got, it's caused by Tkinter using the OS' native widgets; since Linux doesn't have native widgets, on Xubuntu I have no support at all for it.
EDIT: I just found out that the Python Standard Library includes a module, called Tkdnd, which can be used to add d'n'd' support. However, it's marked as experimental and in future it should be replaced with TkDND. Also, it seems like it doesn't work on MacOS. Hmmm... I'll have to investigate.
This script doesn't rely on the current working directory (os.getcwd()). But it should be easy to implement, by using os.chdir() and supplying the selected folder as argument. I'll have to try it.Celtic_Minstrel wrote:I suggest setting the current working directory to the provided directory - I think this should result in shorter messages. (Or possibly the parent of the provided directory.)
Either that, or I'll have to find some time to study some Tcl/Tk and write a wrapper to the Tklib Tooltip library - I never managed to do it so far. Anyway, thanks for the idea: even if I won't implement it here (most stuff is quite self-explanatory anyway), I'll surely find a use for it in trackplacerCeltic_Minstrel wrote:if tooltips are too difficult, couldn't you instead have a text label that updates with further info as you move the mouse over things? Kind of like the browser status bar.
My guess is that's an upstream problem with Windows 10 and Tcl/Tk, since my code hasn't changed. I'll try to keep an eye on Python's and Tcl's bugtrackers - although I have higher priorities right now.vultraz wrote:Not sure if this is a problem with the app or something else, but I thought I'd point it out.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: A GUI for wmllint
Update: I no longer observe the flicker problem, so it must have been a one-off anomaly.
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
- Elvish_Hunter
- Posts: 1578
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
After a long time, I finally managed to add tooltips to this program! Commit dce1e7b adds the required widget (a subclass of Toplevel) and experimentally wires five of them to the radiobuttons in the wmllint tab.
Have a screenshot on XFCE:
Have a screenshot on XFCE:
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: A GUI for wmllint
I just tried this and it works well but it seems like the wmllint ignore options don't work, i still get spammes with unknown unit erros even though is checked "Disable checks for unknown units"
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- Elvish_Hunter
- Posts: 1578
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: A GUI for wmllint
Since this GUI just calls wmllint and adds the required command line switches, it might as well be a bug in wmllint itself. When you run the GUI, the command used is added as the first line of the output in the textbox: can you please copy it here?gfgtdf wrote:I just tried this and it works well but it seems like the wmllint ignore options don't work, i still get spammes with unknown unit erros even though is checked "Disable checks for unknown units"
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)