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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Tkinter based wrapper GUI #108
base: master
Are you sure you want to change the base?
Conversation
try: | ||
import tkinter as Tk | ||
except ImportError: | ||
print_('Error: Tkinter module not found: Please use command line version instead') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should quit the program here.
You can add an GUI entry_point in |
I think you should set gui entry point like this: entry_points = { "console_scripts" : [ "coursera-dl = courseradownloader.courseradownloader:main"],
"gui_scripts" : ["coursera-dl-gui = courseradownloader.gui:main" ]} |
@xu-cheng I tried that first but unfortunately if you try that you'll see that the program doesn't work as expected, Upon clicking download the program quits and doesn't print anything |
You may consider add a log window in your GUI and redirect sys.stdout and sys.stderr into it. Therefore it will be GUI app not console one. |
That's what I was thinking too... |
Thanks. I had a quick try 2 days ago. From memory:
|
@K-DawG007 Actually I commented the code in the current master branch. It seems that @dgorissen merged wrong commit. |
@dgorissen oops looks like you merged the wrong commit... BTW @xu-cheng why is this still a open pull request? is that because an outdated commit was merged? |
Not sure what commit you are talking about. I had another look at this pull request. Comments:
Minor:
|
Well Basically you can't miss a layout manager cause then There'd be no UI (I have used
Fixed in commit 0f4fa5d
Fixed.... To Be fixed:
I can't seem to reproduce the bug please show how to reproduce....
I don't get what your trying to say please clarify a bit more...
I'll try to add that feature :) |
This will happen when you download a large file. In this case, in CLI, a download status would be appeared to show you speed and progress. So basically,in GUI, your
BTW, you need sync your pull request with upstream. |
@xu-cheng I reckon its fixed now... |
Thanks, already improved. Comments:
The gui does not show you what the target directory is. IMHO would make things clearer for the user (he can see what is set by default and catch mistakes if he selected the wrong folder). Typically you see this done with a line edit - browse button combo but there are different options.
Even better would be to see the error message in the GUI itself :) Just a tip, you can also ensure you only enable the download button once the course name has been filled in.
|
@dgorissen thanks for the clarification, Now it shows the default directory
Now the Download button is enabled after a course name is entered.
Fixed....
Added feature... To be fixed:
Tough one BTW I'll try to add that feature.... Also it says I have edited |
BTW, note also commit 6c7fbcf. Will want to update your code as well (or ideally) avoid the duplication. |
@dgorissen thanks added code from commit 6c7fbcf and hopefully merging should now be easier :) |
@K-DawG007 I think you handled the |
@xu-cheng Well mimicking that effect is quite hard in a Tkinter |
@K-DawG007 Sorry, I have no experience in GUI programming. So I cannot offer too much help. Also I found a new bug in your code. try:
import Tkinter as Tk
import ttk
import tkFileDialog
import tkMessageBox
except ImportError:
try:
#In python 3 the module Tkinter was renamed to tkinter
import tkinter as Tk
except ImportError:
raise Exception("Error: Tkinter module not found use command line version instead") You didn't import ttk, tkFileDialog and tkMessageBox in python 3. In fact you can just import tk using six module, it will handle python 2 and 3 well. Doc: http://pythonhosted.org/six/#module-six.moves |
@xu-cheng Thanks I actually never tested that part, BTW its fixed now however if you get a I suggest you test the gui now....the |
@K-DawG007 good job! Here's a minor suggestion. I recommend you change |
@xu-cheng Thanks for the suggestion :) @dgorissen I suggest you update the current gui with this updated gui cause there's practically no way to launch the gui in your branch plus there are a ton of bugs in that. Also I suggest updating the readme stating the launching of the gui via I'll try to replace the |
@K-DawG007 mmm, I had not realized I had merged gui.py. That was unintended and by accident, was planning to wait until it reached a stable state. I will leave it there for now and merge your pull request after one more round of testing. Let me know once you are fully happy with it. Btw, I dont see the real need for an extra confirmation dialog when you click on "Download". What was the rationale? Minor: be consistent in using capitalized labels for buttons and menus (e.g., Quit instead of quit) |
Any progress on this, would like to put out a release. |
I'm currently facing a exam so expect a bit of delay will try to work on this when I have time though :) |
What's Changed:
To be added:
And please could some linux user post some screenshots of this? |
Finally No single line of core changed.
The GUI is now ready for deployment 馃槂
Commit 74d66ca