[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Mon Jul 7 02:53:18 CEST 2003


CVS commit by staikos: 

slightly improve the hack and apply it to the statusbar too


  M +9 -3      kst.cpp   1.39
  M +4 -0      kst.h   1.16


--- kdeextragear-2/kst/kst/kst.h  #1.15:1.16
@@ -146,4 +146,8 @@ protected:
   virtual void readProperties(KConfig *_cfg);
 
+private slots:
+  // Hack to update KStdActions
+  void updateActions();
+
 public slots:
 

--- kdeextragear-2/kst/kst/kst.cpp  #1.38:1.39
@@ -138,4 +138,12 @@ KstApp::KstApp(QWidget *parent, const ch
   _dcopIface = new KstIfaceImpl(doc, this);
   view->forceUpdate();
+
+  QTimer::singleShot(0, this, SLOT(updateActions()));
+}
+
+void KstApp::updateActions() {
+  // Hack
+  ToolBarAction->setChecked(toolBar("mainToolBar")->isShown());
+  StatusBarAction->setChecked(statusBar()->isShown());
 }
 
@@ -169,7 +177,4 @@ void KstApp::initActions() {
   ToolBarAction = KStdAction::showToolbar(this, SLOT(slotViewToolBar()),
                                           actionCollection());
-  // Hack
-  ToolBarAction->setChecked(toolBar("mainToolBar")->isVisible());
-
   /************/
   StatusBarAction = KStdAction::showStatusbar(this, SLOT(slotViewStatusBar()),
@@ -411,4 +416,5 @@ void KstApp::initStatusBar() {
   statusBar()->insertItem(i18n("Almost Ready"), KST_STATUSBAR_STATUS);
 
+  statusBar()->show();
   slotUpdateStatusMsg(i18n("Ready"));
 }




More information about the Kst mailing list