def set_last_active_prefix(self): current_item = self.list_environments.currentItem() if current_item: self.last_env_prefix = getattr(current_item, '_prefix') else: self.last_env_prefix = self.api.ROOT_PREFIX CONF.set('main', 'last_active_prefix', self.last_env_prefix)
def accept(self, show_startup): """ Qt override. """ CONF.set('main', 'provide_analytics', self.checkbox_track.checkState() == Qt.Checked) CONF.set('main', 'show_startup', show_startup) DialogBase.accept(self)
def post_visible_setup(self): if self.splash: self.splash.hide() CONF.set('main', 'first_run', False) # Start the tracker only after post_visible_setup self.tracker = GATracker() self._track_tab(0) # Start tracking home self.fix_tab_ordering() self.show_welcome_screen()
def post_setup(self, apps): CONF.set('main', 'first_run', False) self.set_splash('Loading applications...') self.home_tab.setup_tab(apps) # self.set_splash('Loading projects...') # self.projects_tab.setup_tab() self.set_splash('Loading environments...') self.environments_tab.setup_tab(metadata=self._metadata) self.set_splash('Loading content...') self.community_tab.setup_tab() self.set_splash('Loading content...') self.learning_tab.setup_tab() self.update_style_sheet() self.showMaximized() self.post_visible_setup()
def _metadata_updated(self, worker, path, error): self.set_splash('Updating repodata...') if error: logger.error(str(error)) if path and os.path.isfile(path): with open(path, 'r') as f: data = f.read() try: self._metadata = json.loads(data) except Exception: self._metadata = {} channels = CONF.get('main', 'conda_channels', default=tuple()) if not channels: channels = self.api.conda_get_condarc_channels() CONF.set('main', 'conda_channels', channels) CONF.set('main', 'conda_active_channels', channels) self.api.update_repodata(channels=channels) self.api.sig_repodata_updated.connect(self._repodata_updated)
def update_channels(self, channels, active_channels): """ Save updated channels to the CONF. """ CONF.set('main', 'conda_active_channels', active_channels) CONF.set('main', 'conda_channels', channels)
def accept(self): hide_dialog = self.checkbox.checkState() == Qt.Checked CONF.set('main', 'hide_quit_dialog', hide_dialog) super(QuitApplicationDialog, self).accept()
def set_option(self, option, value, default=False): CONF.set('main', option, value)