void KMMainView::reload() { removePluginActions(); loadPluginActions(); // redo the connection as the old manager object has been removed connect(m_manager, SIGNAL(updatePossible(bool)), SLOT(slotUpdatePossible(bool))); // We must delay the refresh such that all objects has been // correctly reloaded (otherwise, crash in KMJobViewer). reset(i18n("Initializing manager..."), true, true); }
void KMJobViewer::reload() { removePluginActions(); loadPluginActions(); // re-add the current printer to the job manager: the job // manager has been destroyed, so the new one doesn't know // which printer it has to list addToManager(); // no refresh needed: view has been cleared before reloading // and the actual refresh will be triggered either by the KControl // module, or by KJobViewerApp using timer. // reload the columns needed: remove the old one for (int c=m_view->columns()-1; c>5; c--) m_view->removeColumn(c); KMFactory::self()->uiManager()->setupJobViewer(m_view); // update the "History" action state actionCollection()->action("view_completed")->setEnabled(m_manager->actions() & KMJob::ShowCompleted); static_cast<KToggleAction*>(actionCollection()->action("view_completed"))->setChecked(false); }