diff --git a/gpyfsa/CHANGELOG b/gpyfsa/CHANGELOG index 45bc29f..313326f 100644 --- a/gpyfsa/CHANGELOG +++ b/gpyfsa/CHANGELOG @@ -1,15 +1,18 @@ -GPyFSA 0.33 (2012-14-07) +GPyFSA 0.34 (2012-15-07) ========================= New General Features ------------------------- + * Add Tab Archives Infos * Add Archlinux Package Bugfixes ------------------------- + * [#3544379] disable selection if vfat type devices + * [#3544364] untruncated password on savefs command * [#3540527] images displaying * [#3540526] application launching with strict call python2 * [#2988575] add log file wich doesn't exist by default diff --git a/gpyfsa/GPyFSA/gpyfsa_about.py b/gpyfsa/GPyFSA/gpyfsa_about.py new file mode 100644 index 0000000..8422623 --- /dev/null +++ b/gpyfsa/GPyFSA/gpyfsa_about.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # +# software : GPyFSA # +# version : 0.34 # +# date : 2012-07-15 # +# licence : GPLv3.0 # +# author : a-Sansara # +# copyright : pluie.org # +# # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# +# This file is part of GPyFSA. +# +# GPyFSA is free software (free as in speech) : you can redistribute it and/or +# modify it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GPyFSA is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GPyFSA. If not, see . + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +import gtk +import gpyfsa_conf as conf + +class AboutDialog(gtk.AboutDialog): + + def __init__(self, parent=None): + gtk.AboutDialog.__init__(self) + + # Set up the UI + self.__initialize_dialog_widgets() + + #################### Private Methods #################### + + def __initialize_dialog_widgets(self): + self.set_name(conf.APPNAME) + self.set_version(conf.APPVERSION) + self.set_copyright(conf.COPYRIGHTS) + self.set_logo(gtk.gdk.pixbuf_new_from_file(conf.SCALABLE_ICON)) + self.set_translator_credits(conf.TRANSLATORS) + self.set_license(conf.LICENSE) + self.set_website(conf.WEBSITE) + self.set_website_label(conf.APPNAME) + self.set_authors(conf.AUTHORS) + self.set_artists(conf.ARTISTS) + + # Show all widgets + self.show_all() diff --git a/gpyfsa/GPyFSA/gpyfsa_conf.py b/gpyfsa/GPyFSA/gpyfsa_conf.py index b44a316..2809863 100644 --- a/gpyfsa/GPyFSA/gpyfsa_conf.py +++ b/gpyfsa/GPyFSA/gpyfsa_conf.py @@ -3,8 +3,8 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : GPyFSA # -# version : 0.33 # -# date : 2012-07-14 # +# version : 0.34 # +# date : 2012-07-15 # # licence : GPLv3.0 # # author : a-Sansara # # copyright : pluie.org # @@ -33,6 +33,7 @@ def get_path(default, destination): if not os.path.exists(destination): return os.path.abspath(default)+'/' else: + # print(os.path.abspath(destination)+'/') return os.path.abspath(destination)+'/' PATH_SRC = os.path.abspath(os.path.dirname(sys.argv[0])) @@ -68,9 +69,13 @@ K_DEV_RWRIT = 8 ####################### (K_NAME , K_NOVAL, K_SELFVAL) SAVEOPT = (('o' , True , ),('v',True,),('d',True,),('L',False,True),('s',False,False),('e',False,False),('c',False,False),('z',False,True),('j',False,True)) K_DEV_PIX = 0 -K_DEV_ACTIVATABLE = 1 -K_DEV_ACTIVE = 2 -K_DEV = 3 +K_DEV_ROOT = 1 +K_DEV_UNSUP = 2 +K_DEV_SUPPORT = 3 +K_DEV_ACTIVATABLE = 4 +K_DEV_ACTIVE = 5 +K_DEV = 6 + L_COLSNAME = ('',_('device'),_('type'),_('label'),_('size'),_('used'),_('free'),_('%used'),_('mount point')) IMG_TV_DEVICE = PATH_IMG+'gpyfsa_dev.png' IMG_TV_DEVICE_LOCKED = PATH_IMG+'gpyfsa_devlocked.png' @@ -79,6 +84,7 @@ K_TYPE = K_FILTER_NAME = PAGE_SAVE = 0 K_TITLE = K_FILTER_PATTERN = PAGE_REST = 1 K_FILTER = PAGE_ARCH = 2 CBDT_SAVEFS = 'SAVE', _('Save archive') , ((_('all'),'*'),(_('fsa archive'),'*.fsa')) +CBDT_ARCHFS = 'OPEN', _('Select archive') , ((_('all'),'*'),(_('fsa archive'),'*.fsa')) COMPRESSION_LEVEL = ['lzo -3', 'gzip -2', 'gzip -6', 'gzip -9', 'bzip2 -2', 'bzip2 -5', 'lzma -1', 'lzma -6', 'lzma -9'] @@ -94,9 +100,35 @@ sh = Shell() def getClDev(key) : return K_DEV+key def getGladeXML() : - #print(PATH_RES+APP_NAME+'/glade/'+APP_NAME+'.glade') - return gtk.glade.XML(PATH_RES+APP_NAME+'/glade/'+APP_NAME+'.glade',APP_NAME) + #print(PATH_RES+APP_NAME+'/glade/'+APP_NAME+'2.glade') + return gtk.glade.XML(PATH_RES+APP_NAME+'/glade/'+APP_NAME+'2.glade',APP_NAME) def chdir(path) : return os.chdir(path) def getShell() : return sh + +def file_get_contents(filename): + with open(filename) as f: + return f.read() + +# Application info +SCALABLE_ICON = PATH_IMG+'gpyfsa.png' +APPNAME = "GPyFSA" +APPVERSION = "0.33" +COPYRIGHTS = _("Copyright © 2010-2012 a-Sansara\n Copyright © 2010-2012 pluie.org") +WEBSITE = "https://sourceforge.net/projects/gpyfsa/" +AUTHORS = [ + _('Developers:'), + 'a-Sansara (http://www.a-sansara.net)', + '', + _('Contributors:'), + 'Francois Dupoux for fsarchiver (http://www.fsarchiver.org/)', +] + +ARTISTS = [ + '' +] + +TRANSLATORS = _("translator-credits") + +LICENSE = file_get_contents(os.path.abspath('../LICENSE')) diff --git a/gpyfsa/GPyFSA/gpyfsa_devlistmanager.py b/gpyfsa/GPyFSA/gpyfsa_devlistmanager.py index a504cda..afbf687 100644 --- a/gpyfsa/GPyFSA/gpyfsa_devlistmanager.py +++ b/gpyfsa/GPyFSA/gpyfsa_devlistmanager.py @@ -3,8 +3,8 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : GPyFSA # -# version : 0.33 # -# date : 2012-07-14 # +# version : 0.34 # +# date : 2012-07-15 # # licence : GPLv3.0 # # author : a-Sansara # # copyright : pluie.org # @@ -63,12 +63,13 @@ class DevListManager(): if not self.bseldev: (model, miter) = self.gpyfsa['w_treedev'].get_selection().get_selected() path = model.get_path(miter) + bunsup = model.get_value(miter, self.conf.K_DEV_UNSUP) # disk expand if len(path)==1 : if self.gpyfsa['w_treedev'].row_expanded(path): self.gpyfsa['w_treedev'].collapse_row(path) else : self.gpyfsa['w_treedev'].expand_row(path,True) - # device selection - elif miter != None and not model.get_value(miter, self.conf.getClDev(self.conf.K_DEV_RWRIT)): + # device selection + elif miter != None and not model.get_value(miter, self.conf.getClDev(self.conf.K_DEV_RWRIT)) and not bunsup: toggled = model.get_value(miter, self.conf.K_DEV_ACTIVE) model.set_value(miter, self.conf.K_DEV_ACTIVE, not toggled) self.setDevicesSelection(model.get_value(miter, self.conf.K_DEV),not toggled) @@ -135,20 +136,24 @@ class DevListManager(): return ["/dev/%s" % k for k,v in ldev] # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - def preformatStoreData(self,ldata,activatable,imgFileName,active=False): - ldata.insert(0,active) - ldata.insert(0,activatable) + def preformatStoreData(self,ldata,activatable,isRoot,imgFileName,active=False,unsupport=False): + #print(str((active,activatable,unsupport))) + ldata.insert(0,bool(active and not unsupport)) + ldata.insert(0,bool(activatable and not unsupport)) + ldata.insert(0,not unsupport and not isRoot) + ldata.insert(0,unsupport) + ldata.insert(0,isRoot) ldata.insert(0,gtk.gdk.pixbuf_new_from_file(imgFileName)) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def getTreeStoreDevices(self,oldModel=None): - # ICO ACTIVATABLE ACTIVE _K_DEV_ NO READ-WRITE - store = gtk.TreeStore(gtk.gdk.Pixbuf, 'gboolean', 'gboolean', str, str, str, str, str, str, str, str, 'gboolean') + # ICO ROOT UNSUPPORT SUPPORT ACTIVATABLE ACTIVE _K_DEV_ NO READ-WRITE UNSUPPORT + store = gtk.TreeStore(gtk.gdk.Pixbuf, 'gboolean', 'gboolean', 'gboolean','gboolean','gboolean', str, str, str, str, str, str, str, str, 'gboolean') ldev = ProbeReader(self.conf).getListDevices() for i,l in enumerate(ldev): hasntLockedDev = True - self.preformatStoreData(l[self.conf.K_DISK],False,self.conf.IMG_TV_DEVICE) + self.preformatStoreData(l[self.conf.K_DISK],False,True,self.conf.IMG_TV_DEVICE) diter = store.append(None,l[self.conf.K_DISK]) for j,dev in enumerate(l[self.conf.K_DEVICE]): imgn = self.conf.IMG_TV_DEVICE @@ -163,28 +168,35 @@ class DevListManager(): if oiter != None: active = oldModel.get_value(oiter,self.conf.K_DEV_ACTIVE) except : pass - self.preformatStoreData(dev,not dev[self.conf.K_DEV_RWRIT],imgn,active) + bunsup = bool(dev[self.conf.K_DEV_TYPE]=="vfat") + self.preformatStoreData(dev,not dev[self.conf.K_DEV_RWRIT],False,imgn,active,bunsup) # inspect later possible wrong length - store.append(diter,dev[:12]) + + if bunsup : + #print('dev[14] : '+str(dev[14])) + dev[14] = True + + #print(str(dev[:15])) + store.append(diter,dev[:15]) return store # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def buildTreeDevices(self): self.gpyfsa['w_treedev'].set_model(self.getTreeStoreDevices()) - crtog = getNewWidget(gtk.CellRendererToggle(),(('activatable',False),('active',False))) - crtxt = getNewWidget(gtk.CellRendererText() ,(('scale',1.0),('foreground','#6C6C6C'))) + crtog = getNewWidget(gtk.CellRendererToggle(),(('activatable',True ),('active',False))) + crtxt = getNewWidget(gtk.CellRendererText() ,(('scale',1.0),('foreground','#6C6C6C'),('background','#D4C8C8'))) for i,col in enumerate(self.conf.L_COLSNAME): if i == 0: tvcol = gtk.TreeViewColumn(col, gtk.CellRendererPixbuf(), pixbuf=0) tvcol.pack_start(gtk.CellRendererPixbuf(),True) tvcol.pack_start(crtog,True) - tvcol.set_attributes(crtog, active=self.conf.K_DEV_ACTIVE, visible=self.conf.K_DEV_ACTIVATABLE) + tvcol.set_attributes(crtog, active=self.conf.K_DEV_ACTIVE, sensitive=self.conf.K_DEV_ACTIVATABLE, visible=self.conf.K_DEV_SUPPORT) tvcol.set_clickable(True) insertWidget(self.gpyfsa['w_refresh_devices'],tvcol) else : tvcol = gtk.TreeViewColumn(col) tvcol.pack_start(crtxt,True) - tvcol.set_attributes(crtxt, text=i+2, foreground_set=self.conf.getClDev(self.conf.K_DEV_RWRIT)) + tvcol.set_attributes(crtxt, text=i+5, background_set=self.conf.K_DEV_UNSUP,foreground_set=self.conf.getClDev(self.conf.K_DEV_RWRIT)) self.gpyfsa['w_treedev'].append_column(tvcol) self.gpyfsa['w_treedev'].set_rules_hint(True) diff --git a/gpyfsa/GPyFSA/gpyfsa_fsa.py b/gpyfsa/GPyFSA/gpyfsa_fsa.py index 915bcdc..24d1360 100644 --- a/gpyfsa/GPyFSA/gpyfsa_fsa.py +++ b/gpyfsa/GPyFSA/gpyfsa_fsa.py @@ -3,8 +3,8 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : GPyFSA # -# version : 0.33 # -# date : 2012-07-14 # +# version : 0.34 # +# date : 2012-07-15 # # licence : GPLv3.0 # # author : a-Sansara # # copyright : pluie.org # diff --git a/gpyfsa/GPyFSA/gpyfsa_main.py b/gpyfsa/GPyFSA/gpyfsa_main.py index 7b5cc2b..cc76449 100644 --- a/gpyfsa/GPyFSA/gpyfsa_main.py +++ b/gpyfsa/GPyFSA/gpyfsa_main.py @@ -3,8 +3,8 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : GPyFSA # -# version : 0.33 # -# date : 2012-07-14 # +# version : 0.34 # +# date : 2012-07-15 # # licence : GPLv3.0 # # author : a-Sansara # # copyright : pluie.org # @@ -38,10 +38,12 @@ except: import gtk, pango, re #, thread, threading from time import sleep from gpyfsa_devlistmanager import DevListManager +from gpyfsa_about import AboutDialog import gpyfsa_conf as conf import gpyfsa_ui as ui import gpyfsa_fsa as fsa + #gtk.gdk.threads_init() # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @@ -49,6 +51,7 @@ class GPyFSA(gtk.Window): # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def bugFix_GladeComboBoxEntry(self): + # save tab self.w_saveArchiveHistory,combo,browse = gtk.combo_box_entry_new_text(),self.xml.get_widget('w_saveArchiveHistory'),self['w_saveArchiveBrowse'] self['w_saveArchiveHistory'].set_model(gtk.ListStore(str)) box = browse.get_parent() @@ -56,6 +59,14 @@ class GPyFSA(gtk.Window): box.remove(browse) box.pack_start(self['w_saveArchiveHistory'],True,True,0) box.pack_start(browse,False,False,0) + # archive tab + self.w_infoArchiveHistory,combo1,browse1 = gtk.combo_box_entry_new_text(),self.xml.get_widget('w_infoArchiveHistory'),self['w_infoArchiveBrowse'] + self['w_infoArchiveHistory'].set_model(gtk.ListStore(str)) + box1 = browse1.get_parent() + box1.remove(combo1) + box1.remove(browse1) + box1.pack_start(self['w_infoArchiveHistory'],True,True,0) + box1.pack_start(browse1,False,False,0) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def cleaningSaveFS(self): @@ -66,6 +77,13 @@ class GPyFSA(gtk.Window): self.timer = 0 if self.pfsa.poll()==0: self['w_nb_savefs'].set_current_page(0) + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + def evt_aboutDialogActivate(self, widget): + about = AboutDialog() + ret = about.run() + about.destroy() + return ret + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def checkCleaningSaveFS(self): self.endTime+=100 @@ -78,6 +96,15 @@ class GPyFSA(gtk.Window): self.endSaveFSTime = 500 self.timer = ui.setTimeout(100, ui.endSaveFS, self.cleaningSaveFS, self.checkCleaningSaveFS, self['w_progress_savefs']) + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + def terminateArchInfos(self): + ui.clearTimeout(self.timer) + self.endTime = 0 + buff = self['w_info_log'].get_buffer(); + content = conf.file_get_contents(conf.PATH_LOG) + buff.set_text(content) + + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def switchControlSaveFS(self,active): self['w_nb_savefs'].set_show_tabs(True) @@ -101,14 +128,32 @@ class GPyFSA(gtk.Window): # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def evt_setArchivePath(self,path): self.archivePath = path.rpartition('/') - if(self.archivePath[2]!=""):conf.chdir(self.archivePath[0]) - self['w_saveArchiveHistory'].insert_text(0, path) - self['w_saveArchiveHistory'].set_active(0) + if(self.archivePath[2]!=""):conf.chdir(self.archivePath[0]) + if(self['w_notebook'].get_current_page() == self['w_notebook'].page_num(self['frame_save'])): + self['w_saveArchiveHistory'].insert_text(0, path) + self['w_saveArchiveHistory'].set_active(0) + elif(self['w_notebook'].get_current_page() == self['w_notebook'].page_num(self['frame_archive'])): + self['w_infoArchiveHistory'].insert_text(0, path) + self['w_infoArchiveHistory'].set_active(0) + self.switchStateArchInfos() # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def evt_editComboBoxEntry(self,txt): self['w_savefs'].set_sensitive(bool(self.dlm.dicseldev and txt and self.checkPassword(None,None,False))) - + + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + def evt_archInfos(self,widget): + buff = self['w_info_log'].get_buffer(); + path = self['w_infoArchiveHistory'].get_model().get_value(self['w_infoArchiveHistory'].get_active_iter(),0) + self.archivePath = path.rpartition('/') + cmd = ['fsarchiver','archinfo',path] + if self['w_infopass'].get_active(): + cmd.append('-c'+self['w_infopass_value'].get_text()) + self.logFile.close() + self.logFile = open(conf.PATH_LOG, 'w') + self.pfsa = conf.getShell().call(cmd,self.logFile,False) + self.timer = ui.setTimeout(100, ui.waitTimeout, self.terminateArchInfos, self.checkProgressAborting, (self.logReader,)) + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def evt_saveFS(self,widget): cmd = ui.buildFsaOptions(self,conf) @@ -122,8 +167,9 @@ class GPyFSA(gtk.Window): self['w_saveArchiveHistory'].get_model().set_value(self['w_saveArchiveHistory'].get_active_iter(), 0, path) cmd.append(path) cmd.extend(self.dlm.getSortedSelDevList()) - pcmd = cmd - if self.tmp!=0: pcmd[self.tmp] = "-c"+re.sub(r".","*",pcmd[self.tmp][2:]) + pcmd = list(cmd) + if self.tmp!=0: + pcmd[self.tmp] = "-c"+re.sub(r".","*",pcmd[self.tmp][2:]) del self.tmp self.logReader.clear("\n"+" ".join(pcmd)+"\n\n") self.logReader.setVerbooseMode(self['w_fsaOpt_v'].get_active()) @@ -159,6 +205,15 @@ class GPyFSA(gtk.Window): aiter = self['w_saveArchiveHistory'].get_active_iter() if(aiter != None): self['w_savefs'].set_sensitive(bool(self.dlm.dicseldev and self['w_saveArchiveHistory'].get_model().get_value(aiter,0) and password)) + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + def switchStateArchInfos(self, data=None): + password = True + if self['w_infopass'].get_active(): + pass1 = self['w_infopass_value'].get_text() + password = bool(len(pass1)>5 and len(pass1)<65) + aiter = self['w_infoArchiveHistory'].get_active_iter() + if(aiter != None): self['w_archinfo'].set_sensitive(bool(self['w_infoArchiveHistory'].get_model().get_value(aiter,0) and password)) + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def setCompressionStore(self): liststore = gtk.ListStore(int, str) @@ -174,7 +229,10 @@ class GPyFSA(gtk.Window): def manageStyle(self): self['w_log'].modify_base(gtk.STATE_NORMAL,gtk.gdk.color_parse('#2E3436')) self['w_log'].modify_text(gtk.STATE_NORMAL,gtk.gdk.color_parse('#FFF7BA')) - self['w_log'].modify_font(pango.FontDescription("Liberation mono normal 10")) + self['w_log'].modify_font(pango.FontDescription("Liberation mono normal 10")) + self['w_info_log'].modify_base(gtk.STATE_NORMAL,gtk.gdk.color_parse('#2E3436')) + self['w_info_log'].modify_text(gtk.STATE_NORMAL,gtk.gdk.color_parse('#FFF7BA')) + self['w_info_log'].modify_font(pango.FontDescription("Liberation mono normal 10")) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def checkPassword(self,widget=None,data=None,testRefresh=True): @@ -207,11 +265,19 @@ class GPyFSA(gtk.Window): self['w_savefs'].connect('clicked', self.evt_saveFS) self['w_cancel_savefs'].connect('clicked', self.evt_cancelSaveFS) self['gpyfsa'].connect("delete_event", gtk.main_quit) + dic = {"on_aboutDialog_activate" : self.evt_aboutDialogActivate } + self.xml.signal_autoconnect(dic) + self['w_infoArchiveBrowse'].connect("clicked", self.evt_browseFile, conf.CBDT_ARCHFS, self.evt_setArchivePath) + self['w_infopass'].connect("toggled", ui.setSensitivity , (self['w_infopass_value'])) + self['w_infopass'].connect("toggled", self.switchStateArchInfos ) + self['w_archinfo'].connect('clicked', self.evt_archInfos) + self['w_infopass_value'].connect("changed", self.switchStateArchInfos) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def __getitem__(self, key): # # # # > BUG FIX ! see bugFix_GladeComboBoxEntry() # # # # - if key == 'w_saveArchiveHistory': return self.w_saveArchiveHistory + if key == 'w_saveArchiveHistory' : return self.w_saveArchiveHistory + if key == 'w_infoArchiveHistory': return self.w_infoArchiveHistory # # # # < BUG FIX # # # # # # # # # # # # # # # # # # # # # return self.xml.get_widget(key) @@ -220,7 +286,7 @@ class GPyFSA(gtk.Window): self.xml = conf.getGladeXML() self.dlm = DevListManager(self,conf) self.bugFix_GladeComboBoxEntry() - self.setCompressionStore() + self.setCompressionStore() self.manageStyle() self.bindEvents() self.logReader = fsa.LogReader(conf.PATH_LOG,self['w_log']) @@ -231,6 +297,7 @@ class GPyFSA(gtk.Window): # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def main(): GPyFSA() + gtk.window_set_default_icon_list(gtk.gdk.pixbuf_new_from_file(conf.SCALABLE_ICON)) gtk.main() # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # diff --git a/gpyfsa/GPyFSA/gpyfsa_savefs.py b/gpyfsa/GPyFSA/gpyfsa_savefs.py index a1a8b88..58b5189 100644 --- a/gpyfsa/GPyFSA/gpyfsa_savefs.py +++ b/gpyfsa/GPyFSA/gpyfsa_savefs.py @@ -3,8 +3,8 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : GPyFSA # -# version : 0.33 # -# date : 2012-07-14 # +# version : 0.34 # +# date : 2012-07-15 # # licence : GPLv3.0 # # author : a-Sansara # # copyright : pluie.org # diff --git a/gpyfsa/GPyFSA/gpyfsa_shell.py b/gpyfsa/GPyFSA/gpyfsa_shell.py index 573e92d..da04784 100644 --- a/gpyfsa/GPyFSA/gpyfsa_shell.py +++ b/gpyfsa/GPyFSA/gpyfsa_shell.py @@ -50,7 +50,9 @@ class Shell: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def __call(self,cmd,stdoe=subp.PIPE,fdsClose=False): p = None - if self.authCmd.has_key(cmd[0]): p = subp.Popen(cmd, stdout=stdoe, stderr=stdoe, close_fds=fdsClose) + if self.authCmd.has_key(cmd[0]): + print cmd[0]+' auth => '+str(cmd) + p = subp.Popen(cmd, stdout=stdoe, stderr=stdoe, close_fds=fdsClose) return p # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # diff --git a/gpyfsa/GPyFSA/gpyfsa_ui.py b/gpyfsa/GPyFSA/gpyfsa_ui.py index d1a9b1c..3845852 100755 --- a/gpyfsa/GPyFSA/gpyfsa_ui.py +++ b/gpyfsa/GPyFSA/gpyfsa_ui.py @@ -3,8 +3,8 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : GPyFSA # -# version : 0.33 # -# date : 2012-07-14 # +# version : 0.34 # +# date : 2012-07-15 # # licence : GPLv3.0 # # author : a-Sansara # # copyright : pluie.org # @@ -113,6 +113,7 @@ def buildFsaOptions(gpyfsa,conf): if opt[conf.K_NAME]=="c": gpyfsa.tmp = len(cmd) if not noAdd : noAdd = v.strip() == '' if not noAdd : cmd.append('-'+opt[conf.K_NAME]+v) + print(str(cmd)) return cmd # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @@ -141,6 +142,18 @@ def progressTimeout(callBack, clearCallback, fsaLogReader, progressbar, msgWait= if not progress : callBack() return progress +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +def waitTimeout(callBack, clearCallback, fsaLogReader): + progress = not clearCallback() + if not progress : callBack() + return progress + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +def endArchInfos(callBack,clearCallback): + bnotclear = not clearCallback() + if(bnotclear):callBack() + return bnotclear + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # def endSaveFS(callBack,clearCallback,progressbar): progressbar.pulse() diff --git a/gpyfsa/gpyfsa b/gpyfsa/gpyfsa index 32ebee4..e211de7 100755 --- a/gpyfsa/gpyfsa +++ b/gpyfsa/gpyfsa @@ -3,8 +3,8 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : GPyFSA # -# version : 0.33 # -# date : 2012-07-14 # +# version : 0.34 # +# date : 2012-07-15 # # licence : GPLv3.0 # # author : a-Sansara # # copyright : pluie.org # diff --git a/gpyfsa/resources/gpyfsa.desktop b/gpyfsa/resources/gpyfsa.desktop index 17ee667..d423b2a 100644 --- a/gpyfsa/resources/gpyfsa.desktop +++ b/gpyfsa/resources/gpyfsa.desktop @@ -2,7 +2,7 @@ [Desktop Entry] Name=GPyFSA Comment=GUI front end of fsarchiver with mounting facilities -Version=0.33 +Version=0.34 Icon=gpyfsa Exec=gpyfsa Terminal=false diff --git a/gpyfsa/resources/gpyfsa/glade/gpyfsa-0.33.glade b/gpyfsa/resources/gpyfsa/glade/gpyfsa-0.33.glade new file mode 100644 index 0000000..199cff1 --- /dev/null +++ b/gpyfsa/resources/gpyfsa/glade/gpyfsa-0.33.glade @@ -0,0 +1,1099 @@ + + + + + + GPyFSA + center + 900 + 680 + True + ../../pixmaps/gpyfsa/gpyfsa.png + + + + True + vertical + + + True + + + True + _Files + True + + + True + + + gtk-new + True + True + True + + + + + gtk-open + True + True + True + + + + + gtk-save + True + True + True + + + + + gtk-save-as + True + True + True + + + + + True + + + + + gtk-quit + True + True + True + + + + + + + + + True + E_dit + True + + + True + + + gtk-cut + True + True + True + + + + + gtk-copy + True + True + True + + + + + gtk-paste + True + True + True + + + + + gtk-delete + True + True + True + + + + + + + + + True + H_elp + True + + + True + + + gtk-about + True + True + True + + + + + + + + + False + 0 + + + + + True + 10 + 10 + 10 + 10 + + + True + True + left + + + True + 0 + none + + + True + 10 + 10 + 10 + + + True + vertical + + + True + 0.029999999329447746 + + + True + 10 + 10 + + + True + vertical + + + True + 4 + 8 + + + True + 4 + 3 + 8 + 3 + + + True + 1 + archive path : + + + GTK_FILL + + 5 + + + + + True + 1 + compression level : + + + 1 + 2 + GTK_FILL + + 5 + + + + + True + 1 + compression thread : + + + 2 + 3 + GTK_FILL + + 5 + + + + + overwrite existing archive + True + True + False + 0 + True + True + + + 2 + 3 + GTK_FILL + + + + + + True + + + True + + + 0 + + + + + browse + True + True + True + + + False + False + 1 + + + + + 1 + 2 + + + + + + True + + + True + + + False + 0 + + + + + True + 0 + (1: very fast to 9: very good) + + + 4 + 1 + + + + + 1 + 2 + 1 + 2 + + + + + + True + + + True + True + + 2 1 4 1 2 0 + + + False + False + 0 + + + + + True + 0 + (usefull on multi-core cpu) + + + 4 + 1 + + + + + 1 + 2 + 2 + 3 + + + + + + verboose mode + True + True + False + 0 + True + + + 2 + 3 + 2 + 3 + GTK_FILL + + + + + + force .fsa extension + True + True + False + 0 + True + True + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + + 142 + True + 1 + archive description : + + + 3 + 4 + GTK_FILL + 5 + + + + + True + True + + + + 1 + 3 + 3 + 4 + + + + + + + False + False + 0 + + + + + True + + + False + 1 + + + + + True + True + + + True + 18 + + + True + vertical + + + True + + + False + 0 + + + + + True + vertical + + + True + 6 + 3 + + + debug mode + True + True + False + 0 + 1 + True + + + + + 0 + + + + + True + + + split archive into several files of : + True + True + False + True + + + False + False + 0 + + + + + True + False + True + + 500 5 5000 5 50 0 + + + False + 5 + 1 + + + + + True + MB each + + + False + 2 + + + + + False + False + 4 + 1 + + + + + True + + + exclude files and directories that match the pattern : + True + True + False + True + + + False + False + 0 + + + + + True + False + True + + + + 4 + 1 + + + + + 2 + + + + + True + 6 + + + encrypt data in archive (6 to 64 characters max) : + True + True + False + True + + + + + 3 + + + + + True + 2 + 4 + 2 + + + show password + True + False + True + False + 1 + True + + + GTK_FILL + + 40 + + + + + True + False + 1 + password : + + + 1 + 2 + GTK_FILL + + 5 + + + + + True + False + 1 + confirm : + + + 1 + 2 + 1 + 2 + GTK_FILL + + 5 + + + + + True + False + True + False + + gtk-dialog-authentication + + + 2 + 3 + GTK_FILL + + + + + + True + False + True + False + + gtk-dialog-authentication + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + + don't confirm + 28 + True + False + True + False + True + + + 1 + 2 + GTK_FILL + + 40 + + + + + True + False + 0 + gtk-yes + + + 3 + 4 + GTK_FILL + + 5 + + + + + + + + False + False + 4 + 4 + + + + + 1 + + + + + + + + + True + Advanced Options + + + label_item + + + + + 2 + + + + + + + + + True + <b>Main Options</b> + True + + + label_item + + + + + False + False + 0 + + + + + True + + + True + + + True + refresh + + + 0 + + + + + 25 + True + ../../pixmaps/gpyfsa/gpyfsa_refresh.png + + + 3 + 1 + + + + + False + False + 0 + + + + + + + + False + False + 2 + 1 + + + + + True + True + bottom + False + + + True + True + automatic + automatic + + + True + True + + + + + + + True + devices + + + False + tab + + + + + True + True + automatic + + + True + True + False + 5 + 5 + False + + + + + 1 + + + + + True + log + + + 1 + False + tab + + + + + 2 + 2 + + + + + True + + + gtk-media-record + True + False + True + True + True + + + False + 0 + + + + + True + True + 0.050000000000000003 + running... + + + 1 + + + + + gtk-cancel + True + True + True + True + + + False + False + 5 + 2 + + + + + False + False + 5 + 3 + + + + + + + + + + + True + + + True + 0 + ../../pixmaps/gpyfsa/gpyfsa_tab1.png + + + False + 0 + + + + + True + 1 + Save FS + + + 8 + 1 + + + + + False + tab + + + + + True + 0 + none + + + True + 10 + 10 + 10 + 10 + + + + + + + + + label_item + + + + + 1 + + + + + True + + + True + 0 + ../../pixmaps/gpyfsa/gpyfsa_tab2.png + + + False + 0 + + + + + True + 1 + Restore FS + + + 8 + 1 + + + + + 1 + False + tab + + + + + True + 0 + none + + + True + 10 + 10 + 10 + 10 + + + + + + + + + label_item + + + + + 2 + + + + + True + + + True + 0 + ../../pixmaps/gpyfsa/gpyfsa_tab3.png + + + False + 0 + + + + + True + 1 + Archives + + + 8 + 1 + + + + + 2 + False + tab + + + + + + + 1 + + + + + True + 2 + + + False + 2 + + + + + + diff --git a/gpyfsa/resources/gpyfsa/glade/gpyfsa.glade b/gpyfsa/resources/gpyfsa/glade/gpyfsa.glade index e1afdaa..30b6d0f 100644 --- a/gpyfsa/resources/gpyfsa/glade/gpyfsa.glade +++ b/gpyfsa/resources/gpyfsa/glade/gpyfsa.glade @@ -1,9 +1,9 @@ - + - - + + False GPyFSA center 900 @@ -14,22 +14,26 @@ True - vertical + False True + False True + False _Files True True + False gtk-new True + False True True @@ -38,6 +42,7 @@ gtk-open True + False True True @@ -46,6 +51,7 @@ gtk-save True + False True True @@ -54,6 +60,7 @@ gtk-save-as True + False True True @@ -61,12 +68,14 @@ True + False gtk-quit True + False True True @@ -78,15 +87,18 @@ True + False E_dit True True + False gtk-cut True + False True True @@ -95,6 +107,7 @@ gtk-copy True + False True True @@ -103,6 +116,7 @@ gtk-paste True + False True True @@ -111,6 +125,7 @@ gtk-delete True + False True True @@ -122,17 +137,21 @@ True + False H_elp True True + False gtk-about True + False True True + @@ -142,12 +161,14 @@ False + True 0 True + False 10 10 10 @@ -158,41 +179,47 @@ True left - + True + False 0 none True + False 10 10 10 True - vertical + False True + False 0.029999999329447746 True + False 10 10 True - vertical + False True + False 4 8 True + False 4 3 8 @@ -200,6 +227,7 @@ True + False 1 archive path : @@ -212,6 +240,7 @@ True + False 1 compression level : @@ -226,6 +255,7 @@ True + False 1 compression thread : @@ -257,11 +287,24 @@ True + False True + False + + + False + False + False + True + True + + + True + True 0 @@ -288,22 +331,28 @@ True + False True + False False + True 0 True + False 0 (1: very fast to 9: very good) + True + True 4 1 @@ -320,11 +369,16 @@ True + False True True - + + False + False + True + True 2 1 4 1 2 0 @@ -336,10 +390,13 @@ True + False 0 (usefull on multi-core cpu) + True + True 4 1 @@ -394,6 +451,7 @@ 142 True + False 1 archive description : @@ -408,7 +466,11 @@ True True - + + False + False + True + True 1 @@ -429,9 +491,11 @@ True + False False + True 1 @@ -442,27 +506,31 @@ True + False 18 True - vertical + False True + False False + True 0 True - vertical + False True + False 6 3 @@ -478,12 +546,15 @@ + True + True 0 True + False split archive into several files of : @@ -503,11 +574,16 @@ True False True - + + False + False + True + True 500 5 5000 5 50 0 False + True 5 1 @@ -515,10 +591,12 @@ True + False MB each False + True 2 @@ -533,6 +611,7 @@ True + False exclude files and directories that match the pattern : @@ -552,21 +631,30 @@ True False True - + + False + False + True + True + True + True 4 1 + True + True 2 True + False 6 @@ -579,16 +667,22 @@ + True + True 3 True + False 2 4 2 + + + show password True @@ -608,6 +702,7 @@ True False + False 1 password : @@ -623,6 +718,7 @@ True False + False 1 confirm : @@ -642,8 +738,12 @@ False True False - + gtk-dialog-authentication + False + False + True + True 2 @@ -658,8 +758,12 @@ False True False - + gtk-dialog-authentication + False + False + True + True 2 @@ -692,6 +796,7 @@ True False + False 0 gtk-yes @@ -703,9 +808,6 @@ 5 - - - False @@ -716,6 +818,8 @@ + True + True 1 @@ -726,6 +830,7 @@ True + False Advanced Options @@ -734,6 +839,8 @@ + True + True 2 @@ -744,6 +851,7 @@ True + False <b>Main Options</b> True @@ -761,15 +869,20 @@ True + False True + False True + False refresh + True + True 0 @@ -777,9 +890,12 @@ 25 True + False ../../pixmaps/gpyfsa/gpyfsa_refresh.png + True + True 3 1 @@ -825,6 +941,7 @@ True + False devices @@ -855,6 +972,7 @@ True + False log @@ -865,6 +983,8 @@ + True + True 2 2 @@ -872,6 +992,7 @@ True + False gtk-media-record @@ -882,18 +1003,22 @@ True + True False 0 + False True True 0.050000000000000003 running... + True + True 1 @@ -929,24 +1054,30 @@ True + False True + False 0 ../../pixmaps/gpyfsa/gpyfsa_tab1.png False + True 0 True + False 1 Save FS + True + True 8 1 @@ -958,24 +1089,69 @@ - + True + False 0 none True + False 10 - 10 10 10 - + + True + False + 0.029999999329447746 + + + True + False + 10 + 10 + 10 + 10 + + + True + False + + + + + + + + + + + + + + + + True + False + <b>Restore FS</b> + True + + + label_item + + + - + + 1 + False + 0 + label_item @@ -988,24 +1164,30 @@ True + False True + False 0 ../../pixmaps/gpyfsa/gpyfsa_tab2.png False + True 0 True + False 1 Restore FS + True + True 8 1 @@ -1018,24 +1200,251 @@ - + True + False 0 + 0 none True + False 10 - 10 10 10 - + + True + False + 0.029999999329447746 + + + True + False + 10 + 10 + 10 + 10 + + + True + False + + + True + False + + + True + False + Archive Path : + + + False + False + 24 + 0 + + + + + True + False + + + True + False + + + True + False + + + False + + False + False + True + True + + + + + True + True + 0 + + + + + browse + True + True + True + + + False + False + 1 + + + + + + + True + True + 1 + + + + + + + + False + False + 5 + 0 + + + + + True + False + 2 + + + Password : + 0 + True + True + False + 0 + True + + + False + False + 18 + 0 + + + + + 279 + True + False + True + False + + True + gtk-dialog-authentication + False + True + True + True + + + False + False + 5 + 1 + + + + + + + + False + True + 5 + 1 + + + + + True + False + + + gtk-ok + True + False + True + True + True + + + False + False + 142 + 0 + + + + + + + + False + False + 2 + + + + + True + True + automatic + + + True + True + 3 + False + 5 + 5 + no archive selected + + + + + True + True + 5 + 3 + + + + + + + + + True + False + <b>Archives Infos</b> + True + + + label_item + + + - + + 1 + True + False + 0 + 0 + label_item @@ -1043,29 +1452,36 @@ 2 + False True + False True + False 0 ../../pixmaps/gpyfsa/gpyfsa_tab3.png False + True 0 True + False 1 Archives + True + True 8 1 @@ -1081,16 +1497,20 @@ + True + True 1 True + False 2 False + True 2 diff --git a/gpyfsa/setup.py b/gpyfsa/setup.py index c3bbeb4..7271cca 100644 --- a/gpyfsa/setup.py +++ b/gpyfsa/setup.py @@ -3,8 +3,8 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : GPyFSA # -# version : 0.33 # -# date : 2012-07-14 # +# version : 0.34 # +# date : 2012-07-15 # # licence : GPLv3.0 # # author : a-Sansara # # copyright : pluie.org #