bugfix somes gui issues on destination file

This commit is contained in:
a-Sansara 2013-05-15 20:51:08 +02:00
parent c367db484c
commit db4adc0518
20 changed files with 117 additions and 90 deletions

View File

@ -1,4 +1,4 @@
Kirmah 2.17 (2013-05-06) Kirmah 2.18 (2013-05-15)
========================= =========================
New General Features New General Features

4
README
View File

@ -1,9 +1,9 @@
Kirmah 2.17 (2013-05-06) Kirmah 2.18 (2013-05-15)
========================= =========================
Install on Archlinux Install on Archlinux
------------------------- -------------------------
sudo pacman -U http://sourceforge.net/projects/kirmah/files/packages/archlinux/kirmah-2.17-1-any.pkg.tar.xz/download sudo pacman -U http://sourceforge.net/projects/kirmah/files/packages/archlinux/kirmah-2.18-1-any.pkg.tar.xz/download
(re)build instruction (re)build instruction

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>
@ -36,8 +36,8 @@ def main():
c = 0 c = 0
Cli('.'+Sys.sep) Cli('.'+Sys.sep)
except Exception as e : except Exception as e :
raise e
Sys.pwarn((('main : ',(str(e),Sys.CLZ_ERROR_PARAM), ' !'),), True) Sys.pwarn((('main : ',(str(e),Sys.CLZ_ERROR_PARAM), ' !'),), True)
#~ raise e
c = 1 c = 1
return c return c

View File

@ -36,8 +36,8 @@ def main():
c = 0 c = 0
AppGui() AppGui()
except Exception as e: except Exception as e:
raise e
Sys.pwarn((('main : ',(str(e),Sys.CLZ_ERROR_PARAM), ' !'),), True) Sys.pwarn((('main : ',(str(e),Sys.CLZ_ERROR_PARAM), ' !'),), True)
#~ raise e
c = 1 c = 1
return c return c

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>
@ -167,25 +167,28 @@ class KirmahApp:
if path is not None : if path is not None :
self.dst = ''.join([path, Sys.sep, '' if self.src is None else Sys.basename(self.src)]) self.dst = ''.join([path, Sys.sep, '' if self.src is None else Sys.basename(self.src)])
if self.encmode: if self.encmode:
self.dst = ''.join([self.dst, conf.DEFVAL_CRYPT_EXT]) self.dst = ''.join([self.dst, Kirmah.EXT if not self.splitmode else Kirmah.EXT_TARK])
else : else :
self.dst, ext = Sys.getFileExt(self.dst) self.dst, ext = Sys.getFileExt(self.dst)
if Io.file_exists(self.dst): if not ext == (Kirmah.EXT if not self.splitmode else Kirmah.EXT_TARK):
raise FileNeedOverwriteException(self.dst) self.dst += ext
#~ if Io.file_exists(self.dst):
#~ raise FileNeedOverwriteException(self.dst)
else : self.dst = None else : self.dst = None
@Log(Const.LOG_DEFAULT) @Log(Const.LOG_DEFAULT)
def getCall(self): def getCall(self):
q = ''
action = ('enc' if self.encmode else 'dec') if not self.splitmode else ('split' if self.encmode else 'merge') action = ('enc' if self.encmode else 'dec') if not self.splitmode else ('split' if self.encmode else 'merge')
comp = '-a' if self.compression==1 else ('-z' if self.compression==2 else '-Z') comp = '-a' if self.compression==1 else ('-z' if self.compression==2 else '-Z')
mproc = '' if self.nproc==0 or self.splitmode else '-j'+str(self.nproc) mproc = '' if self.nproc==0 or self.splitmode else '-j'+str(self.nproc)
rmode = '-r' if self.random else '-R ' rmode = '-r' if self.random else '-R '
mmode = '-m' if self.mix else '-M' mmode = '-m' if self.mix else '-M'
debug = '-fd' if Sys.g.DEBUG else '-f' debug = '-fd' if Sys.g.DEBUG else '-f'
key = '-k'+q+self.kpath+q if self.kpath != self.getDefaultKeyPath() else ''
#~ q = '"' #~ q = '"'
q = '' call = ['kirmah-cli.py',debug, action,q+self.src+q,comp,mproc,rmode,mmode,'-o',q+self.dst+q,key]
call = ['kirmah-cli.py',debug, action,q+self.src+q,comp,mproc,rmode,mmode,'-o',q+self.dst+q]
print('python '+(' '.join(call))) print('python '+(' '.join(call)))
return call return call

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>
@ -158,11 +158,9 @@ class CliApp:
km.decrypt(self.a[1], self.o.outputfile, nproc) km.decrypt(self.a[1], self.o.outputfile, nproc)
except BadKeyException as e : except BadKeyException:
done = False done = False
Sys.pwarn(('BadKeyException',)) Sys.pwarn((('BadKeyException : ',('wrong key ',Sys.CLZ_WARN_PARAM), ' !'),), False)
if Sys.g.DEBUG :
raise e
if not Sys.g.QUIET : if not Sys.g.QUIET :
self.onend_cmd('Kirmah Decrypt', self.stime, done, self.o.outputfile) self.onend_cmd('Kirmah Decrypt', self.stime, done, self.o.outputfile)
@ -257,35 +255,52 @@ class CliApp:
key = Io.get_data(self.o.keyfile) key = Io.get_data(self.o.keyfile)
km = Kirmah(key) km = Kirmah(key)
kcf = None
istar = True
try: try:
import tarfile import tarfile
dpath = Sys.dirname(Sys.realpath(self.o.outputfile))+Sys.sep if self.o.outputfile is not None else Sys.dirname(Sys.realpath(self.a[1]))+Sys.sep
if self.o.outputfile is None :
self.o.outputfile = dpath
with tarfile.open(self.a[1], mode='r') as tar: with tarfile.open(self.a[1], mode='r') as tar:
dpath = Sys.dirname(Sys.realpath(self.o.outputfile))+Sys.sep if self.o.outputfile is not None else '.'+Sys.sep #~ print(dpath)
print(dpath)
tar.extractall(path=dpath) tar.extractall(path=dpath)
kcf = None kcf = None
for tarinfo in tar: for tarinfo in tar:
print(tarinfo.name) #~ print(tarinfo.name)
if tarinfo.isreg() and tarinfo.name[-4:]=='.kcf': if tarinfo.isreg() and tarinfo.name[-4:]=='.kcf':
#~ print(dpath+tarinfo.name)
kcf = dpath+tarinfo.name kcf = dpath+tarinfo.name
if kcf is not None : if kcf is not None :
toPath = km.mergeFile(kcf) km.DIR_OUTBOX = dpath
except Exception as e: toPath = km.mergeFile(kcf, self.o.outputfile)
Sys.pwarn((('onCommandMerge : ',(str(e),Sys.CLZ_WARN_PARAM), ' !'),), False) except BadKeyException:
raise e Sys.pwarn((('BadKeyException : ',('wrong key ',Sys.CLZ_WARN_PARAM), ' !'),), False)
toPath = km.mergeFile(self.a[1]) done = False
if self.o.outputfile is not None :
Io.rename(toPath, self.o.outputfile) except Exception :
toPath = self.o.outputfile istar = False
toPath = km.mergeFile(self.a[1], self.o.outputfile)
#~ if self.o.outputfile is not None :
#~ Io.rename(toPath, self.o.outputfile)
#~ toPath = self.o.outputfile
except BadKeyException:
Sys.pwarn((('BadKeyException : ',('wrong key ',Sys.CLZ_WARN_PARAM), ' !'),), False)
done = False
except Exception as e : except Exception as e :
done = False done = False
if Sys.g.DEBUG : if Sys.g.DEBUG :
print(e) print(e)
raise e
elif not Sys.g.QUIET : elif not Sys.g.QUIET :
Sys.pwarn((str(e),)) Sys.pwarn((str(e),))
if not done :
if istar :
with tarfile.open(self.a[1], mode='r') as tar:
for tarinfo in tar:
Sys.removeFile(dpath+tarinfo.name)
if not Sys.g.QUIET : if not Sys.g.QUIET :
self.onend_cmd('Kirmah Merge', self.stime, done, toPath) self.onend_cmd('Kirmah Merge', self.stime, done, toPath)
@ -312,6 +327,7 @@ class CliApp:
Sys.print(s, Sys.CLZ_HEAD_LINE) Sys.print(s, Sys.CLZ_HEAD_LINE)
Sys.wlog([(s, Const.CLZ_HEAD_SEP)]) Sys.wlog([(s, Const.CLZ_HEAD_SEP)])
if done and outputfile is not None: if done and outputfile is not None:
Sys.cli_emit_progress(100)
Sys.print(' '*5+Sys.realpath(outputfile), Sys.Clz.fgB1, False) Sys.print(' '*5+Sys.realpath(outputfile), Sys.Clz.fgB1, False)
Sys.print(' ('+Sys.getFileSize(outputfile)+')', Sys.Clz.fgB3) Sys.print(' ('+Sys.getFileSize(outputfile)+')', Sys.Clz.fgB3)
bdata = [(' '*5+Sys.realpath(outputfile), 'io'),(' ('+Sys.getFileSize(outputfile)+')','func')] bdata = [(' '*5+Sys.realpath(outputfile), 'io'),(' ('+Sys.getFileSize(outputfile)+')','func')]

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>
@ -39,7 +39,7 @@ PRG_NAME = 'Kirmah'
PRG_PACKAGE = PRG_NAME.lower() PRG_PACKAGE = PRG_NAME.lower()
PRG_SCRIPT = PRG_NAME.lower() PRG_SCRIPT = PRG_NAME.lower()
PRG_CLI_NAME = PRG_SCRIPT+'-cli' PRG_CLI_NAME = PRG_SCRIPT+'-cli'
PRG_VERS = '2.1' PRG_VERS = '2.18'
PRG_AUTHOR = 'a-Sansara' PRG_AUTHOR = 'a-Sansara'
PRG_COPY = 'pluie.org' PRG_COPY = 'pluie.org'
PRG_YEAR = '2013' PRG_YEAR = '2013'

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>
@ -669,11 +669,13 @@ class Kirmah:
clist = literal_eval(data) clist = literal_eval(data)
Sys.removeFile('.cfg') Sys.removeFile('.cfg')
theList = self.ck.getHashList(clist['name'], clist['count'], True) theList = self.ck.getHashList(clist['name'], clist['count'], True)
dirs = Sys.dirname(Sys.realpath(toPath)) if toPath is not None else None
ext = '' ext = ''
if toPath is None : if toPath is None :
toPath = clist['name'] toPath = clist['name']
elif Sys.isdir(toPath) :
toPath += clist['name']
toPath, ext = Sys.getFileExt(toPath) toPath, ext = Sys.getFileExt(toPath)
dirs = (Sys.dirname(Sys.realpath(toPath)) if toPath is not None else Sys.dirname(Sys.realpath(fromPath)))+Sys.sep
Sys.cli_emit_progress(10) Sys.cli_emit_progress(10)
toPath = self.merge(theList, toPath, ext, uid, dirs) toPath = self.merge(theList, toPath, ext, uid, dirs)
Sys.removeFile(fromPath) Sys.removeFile(fromPath)
@ -688,16 +690,21 @@ class Kirmah:
p = 0 p = 0
# ensure correct order # ensure correct order
hlst['data'] = sorted(hlst['data'], key=lambda lst: lst[0]) hlst['data'] = sorted(hlst['data'], key=lambda lst: lst[0])
#~ print(hlst['head'])
if dirs is not None and dirs!='none' : #~ for row in hlst['data']:
dirPath = Sys.join(self.DIR_DEPLOY,dirs)+Sys.sep #~ print(row)
Sys.mkdir_p(dirPath) #~ if dirs is not None and dirs!='none' :
else: dirPath = self.DIR_DEPLOY #~ dirPath = Sys.join(self.DIR_DEPLOY,dirs)+Sys.sep
filePath = dirPath+fileName #~ Sys.mkdir_p(dirPath)
#~ else: dirPath = self.DIR_DEPLOY
#~ print('dirPath')
#~ print(dirPath)
#~ filePath = dirPath+fileName
filePath = fileName
if Io.file_exists(filePath+ext): if Io.file_exists(filePath+ext):
filePath += '-'+str(uid) filePath += '-'+str(uid)
filePath = Sys.abspath(filePath+ext) filePath += ext
depDir = self.DIR_INBOX if not fake else self.DIR_OUTBOX depDir = dirs
perc = 10 perc = 10
frav = 2.7 frav = 2.7
with Io.wfile(filePath) as fo : with Io.wfile(filePath) as fo :
@ -895,11 +902,9 @@ class Kirmah:
if Sys.g.DEBUG : Sys.wlog(Sys.dprint()) if Sys.g.DEBUG : Sys.wlog(Sys.dprint())
if decHeader['smode'] == self.mark[fsize%len(self.mark)] : if decHeader['smode'] == self.mark[fsize%len(self.mark)] :
Sys.pstep('Reading Header', d, True) Sys.pstep('Reading Header', d, True)
#~ print('ok valid')
""""""
else : else :
Sys.pstep('Reading Header', d, False) Sys.pstep('Reading Header', d, False, False, False)
raise BadKeyException() raise BadKeyException('wrong key')
compend, compstart = not decHeader['cmode']== KirmahHeader.COMP_NONE, decHeader['cmode']== KirmahHeader.COMP_ALL compend, compstart = not decHeader['cmode']== KirmahHeader.COMP_NONE, decHeader['cmode']== KirmahHeader.COMP_ALL
fp, tp = fromPath, self.tmpPath1 fp, tp = fromPath, self.tmpPath1
@ -1022,6 +1027,7 @@ class Kirmah:
fp, tp, compstart = self.decrypt_sp_start(fromPath, toPath, emit=emit) fp, tp, compstart = self.decrypt_sp_start(fromPath, toPath, emit=emit)
self.decrypt_mproc(fp, tp, nproc, emit=emit) self.decrypt_mproc(fp, tp, nproc, emit=emit)
self.decrypt_sp_end(tp, toPath, compstart, emit=emit) self.decrypt_sp_end(tp, toPath, compstart, emit=emit)
Sys.cli_emit_progress(100) Sys.cli_emit_progress(100)
@ -1211,4 +1217,4 @@ class Noiser:
# ~~ class BadKeyException ~~ # ~~ class BadKeyException ~~
class BadKeyException(BaseException): class BadKeyException(BaseException):
pass """"""

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>
@ -229,7 +229,7 @@ class AppGui(Gui):
if not self.app.splitmode : if not self.app.splitmode :
for n in ['checkbutton2','checkbutton4','comboboxtext1','label12']: for n in ['checkbutton2','checkbutton4','comboboxtext1','label12']:
self.disable(n, not self.app.encmode) self.disable(n, not self.app.encmode)
self.on_new_file_dest(self.get('filechooserbutton3')) #~ self.on_new_file_dest(self.get('filechooserbutton3'))
if self.start: self.refreshProceed() if self.start: self.refreshProceed()
@ -259,26 +259,22 @@ class AppGui(Gui):
try: try:
self.app.setSourceFile(fc.get_filename()) self.app.setSourceFile(fc.get_filename())
self.IS_SOURCE_DEF = True self.IS_SOURCE_DEF = True
self.on_new_file_dest(self.get('filechooserbutton3'))
except FileNotFoundException as e: except FileNotFoundException as e:
Sys.eprint('FileNotFoundException :' + str(fc.get_filename()), Const.ERROR) Sys.eprint('FileNotFoundException :' + str(fc.get_filename()), Const.ERROR)
self.IS_SOURCE_DEF = False self.IS_SOURCE_DEF = False
self.refreshProceed()
@Log(Const.LOG_UI)
def on_dest_changed(self, fc, data=None):
""""""
self.on_new_file_dest(fc, data)
@Log(Const.LOG_UI) @Log(Const.LOG_UI)
def on_new_file_dest(self, fc, data=None): def on_new_file_dest(self, fc, data=None):
"""""" """"""
if self.start:
try : try :
self.app.setDestFile(fc.get_filename()) self.app.setDestFile(fc.get_filename())
except : print(self.app.dst)
except Exception as e :
print(e)
pass pass
if self.start:
self.IS_DEST_DEF = True self.IS_DEST_DEF = True
self.refreshProceed() self.refreshProceed()
@ -301,6 +297,7 @@ class AppGui(Gui):
self.disable('spinbutton1',False) self.disable('spinbutton1',False)
self.disable('filechooserbutton1',False) self.disable('filechooserbutton1',False)
self.get('filechooserbutton1').set_current_folder(conf.DEFVAL_UKEY_PATH) self.get('filechooserbutton1').set_current_folder(conf.DEFVAL_UKEY_PATH)
self.get('filechooserbutton1').set_filename(conf.DEFVAL_UKEY_PATH+'.rename.key')
@Log(Const.LOG_UI) @Log(Const.LOG_UI)
@ -351,7 +348,7 @@ class AppGui(Gui):
@Log(Const.LOG_UI) @Log(Const.LOG_UI)
def refreshProceed(self): def refreshProceed(self):
"""""" """"""
if self.start : #~ if self.start :
self.get('button1').set_sensitive(self.IS_DEST_DEF and self.IS_SOURCE_DEF) self.get('button1').set_sensitive(self.IS_DEST_DEF and self.IS_SOURCE_DEF)
@ -369,12 +366,12 @@ class AppGui(Gui):
self.PROCEED = True self.PROCEED = True
self.STOPPED = False self.STOPPED = False
btn.set_sensitive(False) btn.set_sensitive(False)
self.on_new_file_dest(self.get('filechooserbutton3')) self.app.setDestFile(self.get('filechooserbutton3').get_filename())
if not Io.file_exists(self.app.dst) or self.warnDialog('file '+self.app.dst+' already exists', 'Overwrite file ?'):
self.pb = self.get('progressbar1') self.pb = self.get('progressbar1')
self.pb.set_fraction(0) self.pb.set_fraction(0)
self.pb.show() self.pb.show()
self.pb.pulse() self.pb.pulse()
if not Io.file_exists(self.app.dst) or self.warnDialog('file '+self.app.dst+' already exists', 'Overwrite file ?'):
btn.set_sensitive(True) btn.set_sensitive(True)
btn.set_label(conf.GUI_LABEL_CANCEL) btn.set_label(conf.GUI_LABEL_CANCEL)
self.clear_log(self.get('checkbutton3')) self.clear_log(self.get('checkbutton3'))
@ -395,6 +392,9 @@ class AppGui(Gui):
self.thkmh.cancel() self.thkmh.cancel()
else : else :
self.textbuffer.insert_at_cursor('Kmh Thread is not Alive\n') self.textbuffer.insert_at_cursor('Kmh Thread is not Alive\n')
self.on_proceed_end(True)
self.pb.hide()
self.show_log()
@Log(Const.LOG_UI) @Log(Const.LOG_UI)

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>
@ -358,7 +358,7 @@ class CliThread(Thread, IdleObject):
"""""" """"""
if self.isAlive(): if self.isAlive():
self.cancel() self.cancel()
if current_thread() .getName()==self.getName(): if current_thread().getName()==self.getName():
try: try:
self.emit("interrupted") self.emit("interrupted")
Sys.thread_exit() Sys.thread_exit()

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>
@ -241,6 +241,7 @@ class Io:
try: try:
if path is not None : if path is not None :
with open(path) as f: exist = True with open(path) as f: exist = True
f.close()
except IOError as e: pass except IOError as e: pass
return exist return exist

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>
@ -353,18 +353,18 @@ class Sys:
if not dbcall : Sys.print(w, clzp, False, False) if not dbcall : Sys.print(w, clzp, False, False)
bdata = [] bdata = []
if Sys.g.DEBUG : if not Sys.g.QUIET :
bdata.append((w, uiclzp)) bdata.append((w, uiclzp))
for i, line in enumerate(data) : for i, line in enumerate(data) :
if i > 0 : if i > 0 :
if not dbcall : Sys.print(' '*len(w), clz, False, False) if not dbcall : Sys.print(' '*len(w), clz, False, False)
if Sys.g.DEBUG : if not Sys.g.QUIET :
bdata.append((' '*len(w), uiclz)) bdata.append((' '*len(w), uiclz))
if isinstance(line,str) : if isinstance(line,str) :
s = line.ljust(length-len(w),' ') s = line.ljust(length-len(w),' ')
if not dbcall : Sys.print(s, clz, True, True) if not dbcall : Sys.print(s, clz, True, True)
if Sys.g.DEBUG : if not Sys.g.QUIET :
bdata.append((s, uiclz)) bdata.append((s, uiclz))
Sys.wlog(bdata) Sys.wlog(bdata)
bdata = [] bdata = []
@ -381,7 +381,7 @@ class Sys:
sl += len(p[0]) sl += len(p[0])
s = ' '.ljust(length-sl-len(w),' ') s = ' '.ljust(length-sl-len(w),' ')
if not dbcall : Sys.print(s, clz, True, True) if not dbcall : Sys.print(s, clz, True, True)
if Sys.g.DEBUG : if not Sys.g.QUIET :
bdata.append((s, uiclz)) bdata.append((s, uiclz))
Sys.wlog(bdata) Sys.wlog(bdata)
bdata = [] bdata = []

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>

View File

@ -720,7 +720,6 @@
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="action">select-folder</property> <property name="action">select-folder</property>
<signal name="file-set" handler="on_new_file_dest" swapped="no"/> <signal name="file-set" handler="on_new_file_dest" swapped="no"/>
<signal name="current-folder-changed" handler="on_dest_changed" swapped="no"/>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@ -917,6 +916,8 @@
<object class="GtkProgressBar" id="progressbar1"> <object class="GtkProgressBar" id="progressbar1">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="no_show_all">True</property> <property name="no_show_all">True</property>
<property name="margin_left">5</property>
<property name="margin_right">5</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>

View File

@ -4,7 +4,7 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : Kirmah <http://kirmah.sourceforge.net/> # software : Kirmah <http://kirmah.sourceforge.net/>
# version : 2.17 # version : 2.18
# date : 2013 # date : 2013
# licence : GPLv3.0 <http://www.gnu.org/licenses/> # licence : GPLv3.0 <http://www.gnu.org/licenses/>
# author : a-Sansara <[a-sansara]at[clochardprod]dot[net]> # author : a-Sansara <[a-sansara]at[clochardprod]dot[net]>