Changeset 37 for trunk/src/CreateKit.py
- Timestamp:
- 21-09-2008 18:40:51 (5 years ago)
- Files:
-
- 1 modified
-
trunk/src/CreateKit.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/CreateKit.py
r34 r37 14 14 import gobject 15 15 import threading 16 import sexy17 16 18 17 import apt … … 25 24 __title__ = "Criador de Kits" 26 25 __version__ = "0.0.1" 26 __comments__ = "Frontend GTK para o criador de Kits." 27 27 __authors__= ["Paulo Cabido <paulo.cabido@gmail.com>"] 28 29 gtk.gdk.threads_init() 30 31 #controla o dialog da progressbar 32 class ProgressBar(): 33 def __init__(self, dialogName, pbobj): 34 self._progressbar = pbobj 35 self._dialog = dialogName 36 37 def progressbarTimeout(self, pbobj): 38 pbobj.pulse() 39 return True 40 41 def start(self): 42 self._dialog.show() 43 44 def active(self): 45 self._timer = gobject.timeout_add(100, self.progressbarTimeout, self._progressbar) 46 47 def stop(self): 48 gobject.source_remove(self._timer) 49 self._timer = 0 50 self._dialog.hide() 28 __copyright__ = "Paulo Cabido" 29 __license__ = "GNU GPL v3" 30 31 gtk.gdk.threads_init() 51 32 52 33 #main function … … 94 75 Creates the package list from the current system cache. 95 76 """ 77 78 #init progress dialog 79 self.cpbar = util.ProgressBar(self.dialogProgress, self.pbar) 80 self.cpbar.start() 81 96 82 gtk.gdk.threads_enter() 97 83 self.window.set_sensitive(False) … … 217 203 self.aboutDialog.set_name(__title__) 218 204 self.aboutDialog.set_version(__version__) 219 #self.aboutDialog.set_comments("GTK frontend para Criar Kits.")220 #self.aboutDialog.set_copyright("Copyright (C) Paulo Cabido 2008")205 self.aboutDialog.set_comments(__comments__) 206 self.aboutDialog.set_copyright(__copyright__) 221 207 self.aboutDialog.set_authors(__authors__) 208 self.aboutDialog.set_license(__license__) 222 209 #self.aboutDialog.set_logo(self.aboutDialogIcon) 223 210 … … 375 362 return False 376 363 364 #msg de sucesso 377 365 return True 378 366 … … 436 424 437 425 #Progress dialog 438 self.window_progress = self.wTree.get_widget("window_progress")439 426 self.dialogProgress = self.wTree.get_widget("dialogProgress") 440 427 self.pbar = self.wTree.get_widget("pbarCache") … … 455 442 self.loadImage(self.imageGenerate, "icons/application-x-deb.png") 456 443 457 #init progress dialog 458 self.cpbar = ProgressBar(self.dialogProgress, self.pbar) 459 self.cpbar.start() 444 460 445 461 446 #searchbox