Skip to content

Commit 4731a59

Browse files
committed
v1.0.4: Gui mode is now shutdownable (threads dont keep running in the background anymore)
1 parent 6189735 commit 4731a59

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Example `par2deep.ini`:
4343

4444
### Changelog
4545

46+
* 2018-12-05: v1.0.4: Gui mode is now shutdownable (threads dont keep running in the background anymore).
4647
* 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.
4748
* 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.
4849
* 2018-05-25: v1.0.1. Crossplatform doubleclick in treeview. Improved Windows par2 executable finding. New cx_Freeze installer script. Converted relative imports.

par2deep/gui.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
except:
1010
from par2deep import *
1111

12+
1213
class CreateToolTip(object):
1314
"""
1415
create a tooltip for a given widget.
@@ -79,8 +80,8 @@ def __init__(self, master):
7980
#bottom bar shows actions
8081
self.new_window(self.topbar_frame(0), self.start_options_frame(), self.start_actions_frame())
8182
return
82-
83-
83+
84+
8485
def startfile(self, fname):
8586
fname = os.path.normpath(fname)
8687
if os.path.isfile(fname): #otherwise its probably a category in the treeview
@@ -190,7 +191,7 @@ def pickdir():
190191
self.args["par_cmd"].pack(fill=X)
191192
self.args["par_cmd"].insert(0,self.p2d.args["par_cmd"])
192193
CreateToolTip(self.args["par_cmd"],"Should be set automatically and correctly, but can be overriden.")
193-
194+
194195
Label(advset, text="Percentage of protection").pack(fill=X)
195196
self.args["percentage"] = IntVar()
196197
self.args["percentage"].set(self.p2d.args["percentage"])
@@ -289,6 +290,7 @@ def run():
289290
#put p2d.len_all_err somewhere in label of final report
290291
self.cnt_stop = True
291292
thread = threading.Thread(target=run)
293+
thread.daemon = True
292294
thread.start()
293295

294296
def upd():
@@ -329,6 +331,7 @@ def run():
329331
#put p2d.len_all_err somewhere in label of final report
330332
self.cnt_stop = True
331333
thread = threading.Thread(target=run)
334+
thread.daemon = True
332335
thread.start()
333336

334337
def upd():
@@ -372,6 +375,7 @@ def run():
372375
}
373376
self.new_window(self.topbar_frame(1), self.scrollable_treeview_frame(dispdict), self.execute_actions_frame())
374377
thread = threading.Thread(target=run)
378+
thread.daemon = True
375379
thread.start()
376380
return
377381

@@ -399,6 +403,7 @@ def run():
399403
self.new_window(self.topbar_frame(3), self.scrollable_treeview_frame(dispdict), self.repair_actions_frame())
400404
self.cnt_stop = True
401405
thread = threading.Thread(target=run)
406+
thread.daemon = True
402407
thread.start()
403408

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

422427
ysb = Scrollbar(subframe, orient='vertical', command=tree.yview)
423428
ysb.pack(side="right", fill=Y, expand=False)
424-
429+
425430
def doubleclick_tree(event):
426431
self.startfile(tree.item(tree.selection()[0],"text"))
427432
return
@@ -459,7 +464,7 @@ def main():
459464
x = (ws/2) - (w/2)
460465
y = (hs/2) - (h/2)
461466

462-
# set the dimensions of the screen
467+
# set the dimensions of the screen
463468
# and where it is placed
464469
root.geometry('%dx%d+%d+%d' % (w, h, x, y))
465470
root.wm_title("par2deep")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/env python
22
from setuptools import setup
33

4-
VERSION = '1.0.3'
4+
VERSION = '1.0.4'
55

66
with open("README.md", "rb") as f:
77
long_descr = f.read()

setup_cx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from cx_Freeze import setup, Executable
22
import sys,os.path,glob
33

4-
VERSION = '1.0.3'
4+
VERSION = '1.0.4'
55
NAME = 'par2deep'
66
DESCRIPTION = "Produce, verify and repair par2 files recursively."
77

0 commit comments

Comments
 (0)