示例#1
0
文件: app.py 项目: qingsing/dupeguru
 def __init__(self, view, appdata):
     if view.get_default(DEBUG_MODE_PREFERENCE):
         logging.getLogger().setLevel(logging.DEBUG)
         logging.debug("Debug mode enabled")
     RegistrableApplication.__init__(self, view, appid=1)
     Broadcaster.__init__(self)
     self.appdata = appdata
     if not op.exists(self.appdata):
         os.makedirs(self.appdata)
     self.directories = directories.Directories()
     self.results = results.Results(self)
     self.scanner = scanner.Scanner()
     self.options = {
         'escape_filter_regexp': True,
         'clean_empty_dirs': False,
         'ignore_hardlink_matches': False,
         'copymove_dest_type': DestType.Relative,
     }
     self.selected_dupes = []
     self.details_panel = DetailsPanel(self)
     self.directory_tree = DirectoryTree(self)
     self.problem_dialog = ProblemDialog(self)
     self.ignore_list_dialog = IgnoreListDialog(self)
     self.stats_label = StatsLabel(self)
     self.result_table = self._create_result_table()
     self.deletion_options = DeletionOptions()
     self.progress_window = ProgressWindow(self._job_completed)
     children = [self.result_table, self.directory_tree, self.stats_label, self.details_panel]
     for child in children:
         child.connect()
示例#2
0
 def __init__(self, view, appdata):
     if view.get_default(DEBUG_MODE_PREFERENCE):
         logging.getLogger().setLevel(logging.DEBUG)
         logging.debug("Debug mode enabled")
     RegistrableApplication.__init__(self, view, appid=1)
     Broadcaster.__init__(self)
     self.appdata = appdata
     if not op.exists(self.appdata):
         os.makedirs(self.appdata)
     self.directories = directories.Directories()
     self.results = results.Results(self)
     self.scanner = scanner.Scanner()
     self.options = {
         'escape_filter_regexp': True,
         'clean_empty_dirs': False,
         'ignore_hardlink_matches': False,
         'copymove_dest_type': DestType.Relative,
     }
     self.selected_dupes = []
     self.details_panel = DetailsPanel(self)
     self.directory_tree = DirectoryTree(self)
     self.problem_dialog = ProblemDialog(self)
     self.ignore_list_dialog = IgnoreListDialog(self)
     self.stats_label = StatsLabel(self)
     self.result_table = self._create_result_table()
     self.deletion_options = DeletionOptions()
     self.progress_window = ProgressWindow(self._job_completed)
     children = [
         self.result_table, self.directory_tree, self.stats_label,
         self.details_panel
     ]
     for child in children:
         child.connect()
示例#3
0
文件: app.py 项目: hsoft/musicguru
 def __init__(self, appdata=None):
     RegistrableApplication.__init__(self, appid=3)
     if appdata is None:
         appdata = op.expanduser(op.join('~', '.hsoftdata', 'musicguru'))
     self.appdata = appdata
     if not op.exists(self.appdata):
         os.makedirs(self.appdata)
     self.collection = Root(op.join(appdata, 'music.db'))
     self.board = design.Board()
示例#4
0
文件: app.py 项目: hsoft/musicguru
 def __init__(self, appdata=None):
     RegistrableApplication.__init__(self, appid=3)
     if appdata is None:
         appdata = op.expanduser(op.join('~', '.hsoftdata', 'musicguru'))
     self.appdata = appdata
     if not op.exists(self.appdata):
         os.makedirs(self.appdata)
     self.collection = Root(op.join(appdata, 'music.db'))
     self.board = design.Board()