[Kst] branches/work/kst/1.1/kst/kst

George Staikos staikos at kde.org
Wed Jul 6 17:23:02 CEST 2005


SVN commit 432194 by staikos:

backport fix for #108123 - disable close button


 M  +14 -0     kst.cpp  
 M  +2 -0      kst.h  


--- branches/work/kst/1.1/kst/kst/kst.cpp #432193:432194
@@ -35,6 +35,7 @@
 #include <kprogress.h>
 #include <kstandarddirs.h>
 #include <kstatusbar.h>
+#include <ktabwidget.h>
 #include <qdatetime.h>
 
 // application specific includes
@@ -150,10 +151,13 @@
   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();
 
+  fixKMdi();
+
   _updateThread = new UpdateThread(doc);
   _updateThread->setUpdateTime(KstSettings::globalSettings()->plotUpdateTimer);
   _updateThread->start();
@@ -1891,10 +1895,12 @@
 #endif
 }
 
+
 const QStringList KstApp::recentFiles() const {
   return recent->items();
 }
 
+
 void KstApp::showQuickStartDialog() {
 #ifdef KST_QUICKSTART_DLG
   if (KstSettings::globalSettings()->showQuickStart) {
@@ -1903,5 +1909,13 @@
 #endif
 }
 
+
+void KstApp::fixKMdi() {
+  KTabWidget *tw = tabWidget();
+  if (tw) {
+    tw->setHoverCloseButton(false);
+  }
+}
+
 #include "kst.moc"
 // vim: ts=2 sw=2 et
--- branches/work/kst/1.1/kst/kst/kst.h #432193:432194
@@ -193,6 +193,8 @@
     void slotSettingsChanged();
     void addNewWindowMenu();
 
+    void fixKMdi();
+
   public slots:
     void fromEnd();
 


More information about the Kst mailing list