Skip to content

Commit

Permalink
v1.0.4: Gui mode is now shutdownable (threads dont keep running in th…
Browse files Browse the repository at this point in the history
…e background anymore)
  • Loading branch information
brenthuisman committed Dec 5, 2018
1 parent 6189735 commit 4731a59
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Example `par2deep.ini`:

### Changelog

* 2018-12-05: v1.0.4: Gui mode is now shutdownable (threads dont keep running in the background anymore).
* 2018-12-05: v1.0.3. Once again fixed imports. Should now work with local, pip-installed and bundled versions. Gui and cli now show filename during executing actions stage.
* 2018-05-30: v1.0.2. GUI updates: file doubleclick now checkes if string is file, added tooltips to GUI settings, and treeview category headers have a bit for info (nb of files in category). CLI updates: same par2deep import check as GUI.
* 2018-05-25: v1.0.1. Crossplatform doubleclick in treeview. Improved Windows par2 executable finding. New cx_Freeze installer script. Converted relative imports.
Expand Down
15 changes: 10 additions & 5 deletions par2deep/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
except:
from par2deep import *


class CreateToolTip(object):
"""
create a tooltip for a given widget.
Expand Down Expand Up @@ -79,8 +80,8 @@ def __init__(self, master):
#bottom bar shows actions
self.new_window(self.topbar_frame(0), self.start_options_frame(), self.start_actions_frame())
return


def startfile(self, fname):
fname = os.path.normpath(fname)
if os.path.isfile(fname): #otherwise its probably a category in the treeview
Expand Down Expand Up @@ -190,7 +191,7 @@ def pickdir():
self.args["par_cmd"].pack(fill=X)
self.args["par_cmd"].insert(0,self.p2d.args["par_cmd"])
CreateToolTip(self.args["par_cmd"],"Should be set automatically and correctly, but can be overriden.")

Label(advset, text="Percentage of protection").pack(fill=X)
self.args["percentage"] = IntVar()
self.args["percentage"].set(self.p2d.args["percentage"])
Expand Down Expand Up @@ -289,6 +290,7 @@ def run():
#put p2d.len_all_err somewhere in label of final report
self.cnt_stop = True
thread = threading.Thread(target=run)
thread.daemon = True
thread.start()

def upd():
Expand Down Expand Up @@ -329,6 +331,7 @@ def run():
#put p2d.len_all_err somewhere in label of final report
self.cnt_stop = True
thread = threading.Thread(target=run)
thread.daemon = True
thread.start()

def upd():
Expand Down Expand Up @@ -372,6 +375,7 @@ def run():
}
self.new_window(self.topbar_frame(1), self.scrollable_treeview_frame(dispdict), self.execute_actions_frame())
thread = threading.Thread(target=run)
thread.daemon = True
thread.start()
return

Expand Down Expand Up @@ -399,6 +403,7 @@ def run():
self.new_window(self.topbar_frame(3), self.scrollable_treeview_frame(dispdict), self.repair_actions_frame())
self.cnt_stop = True
thread = threading.Thread(target=run)
thread.daemon = True
thread.start()

def upd():
Expand All @@ -421,7 +426,7 @@ def scrollable_treeview_frame(self,nodes={}):

ysb = Scrollbar(subframe, orient='vertical', command=tree.yview)
ysb.pack(side="right", fill=Y, expand=False)

def doubleclick_tree(event):
self.startfile(tree.item(tree.selection()[0],"text"))
return
Expand Down Expand Up @@ -459,7 +464,7 @@ def main():
x = (ws/2) - (w/2)
y = (hs/2) - (h/2)

# set the dimensions of the screen
# set the dimensions of the screen
# and where it is placed
root.geometry('%dx%d+%d+%d' % (w, h, x, y))
root.wm_title("par2deep")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python
from setuptools import setup

VERSION = '1.0.3'
VERSION = '1.0.4'

with open("README.md", "rb") as f:
long_descr = f.read()
Expand Down
2 changes: 1 addition & 1 deletion setup_cx.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from cx_Freeze import setup, Executable
import sys,os.path,glob

VERSION = '1.0.3'
VERSION = '1.0.4'
NAME = 'par2deep'
DESCRIPTION = "Produce, verify and repair par2 files recursively."

Expand Down

0 comments on commit 4731a59

Please sign in to comment.