[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Wed Jul 6 17:21:28 CEST 2005


SVN commit 432193 by staikos:

work around kmdi brokenness (tiny close button).  Close button is now disabled
BUG: 108123


 M  +15 -1     kst.cpp  
 M  +2 -0      kst.h  


--- trunk/extragear/graphics/kst/kst/kst.cpp #432192:432193
@@ -35,6 +35,7 @@
 #include <kprogress.h>
 #include <kstandarddirs.h>
 #include <kstatusbar.h>
+#include <ktabwidget.h>
 #include <qdatetime.h>
 
 // application specific includes
@@ -158,13 +159,16 @@
   connect(KstEventMonitorI::globalInstance(), SIGNAL(modified()), doc, SLOT(wasModified()));
   connect(KstImageDialogI::globalInstance(), SIGNAL(modified()), doc, SLOT(wasModified()));
   connect(KstMatrixDialogI::globalInstance(), SIGNAL(modified()), doc, SLOT(wasModified()));
+  connect(this, SIGNAL(mdiModeHasBeenChangedTo(KMdi::MdiMode)), SLOT(fixKMdi()));
 
   initActions();
   readOptions();
   toggleMouseMode();
   toggleGfxMode();
   XYZoomAction->setChecked(true);
-  
+
+  fixKMdi();
+
   _updateThread = new UpdateThread(doc);
   _updateThread->setUpdateTime(KstSettings::globalSettings()->plotUpdateTimer);
   _updateThread->start();
@@ -2123,10 +2127,12 @@
 #endif
 }
 
+
 const QStringList KstApp::recentFiles() const {
   return recent->items();
 }
 
+
 void KstApp::showQuickStartDialog() {
 #ifdef KST_QUICKSTART_DLG  
   if (KstSettings::globalSettings()->showQuickStart) {
@@ -2135,5 +2141,13 @@
 #endif
 }
 
+
+void KstApp::fixKMdi() {
+  KTabWidget *tw = tabWidget();
+  if (tw) {
+    tw->setHoverCloseButton(false);
+  }
+}
+
 #include "kst.moc"
 // vim: ts=2 sw=2 et
--- trunk/extragear/graphics/kst/kst/kst.h #432192:432193
@@ -203,6 +203,8 @@
     void slotSettingsChanged();
     void addNewWindowMenu();
 
+    void fixKMdi();
+
   public slots:
     void fromEnd();
 


More information about the Kst mailing list