~emihalac/mnemosyne-proj/mnemosyne-proj

« back to all changes in this revision

Viewing changes to mnemosyne/mnemosyne/libmnemosyne/__init__.py

  • Committer: Peter Bienstman
  • Date: 2017-03-21 18:58:09 UTC
  • Revision ID: peter.bienstman@ugent.be-20170321185809-4pd9slxfin1y1l8t
Bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
251
251
        for component_name in self.gui_for_component:
252
252
            for gui_module_name, gui_class_name in \
253
253
                    self.gui_for_component[component_name]:
254
 
                gui_component = getattr(\
 
254
                gui_class = getattr(\
255
255
                    importlib.import_module(gui_module_name), gui_class_name)
256
256
                self.component_manager.add_gui_to_component(\
257
 
                    component_name, gui_component)
 
257
                    component_name, gui_class)
258
258
 
259
259
    def activate_components(self):
260
260
 
357
357
                    self.main_widget().show_error(str(e))
358
358
                    
359
359
    def start_review(self):
360
 
        print("current mode before", self.component_manager.current_study_mode)
361
360
        if self.component_manager.current_study_mode is not None:
362
361
            self.component_manager.current_study_mode.deactivate()
363
362
        for study_mode_i in self.component_manager.all("study_mode"):
364
363
            if study_mode_i.__class__.__name__ == \
365
364
               self.config()["study_mode"]:
366
365
                study_mode = study_mode_i
367
 
        print("current mode after", study_mode)
368
366
        study_mode.activate()
369
367
        # Design wart: log().load_database() needs the scheduler to be active,
370
368
        # so we can only call it here.