[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/kdevelop/3.4/src
From:       Jens Dagerbo <jens.dagerbo () swipnet ! se>
Date:       2006-12-29 22:30:13
Message-ID: 1167431413.569997.11543.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 617672 by dagerbo:

Consistency fix. This patch lets KDevelop show the [modified] flag in the window bar \
(and the kicker taskbar entry) like Kate and many other KDE apps.

 M  +14 -3     simplemainwindow.cpp  


--- branches/kdevelop/3.4/src/simplemainwindow.cpp #617671:617672
@@ -552,6 +552,7 @@
                 break;
         }
     }
+    setCaption(url.url());
 }
 
 void SimpleMainWindow::closeTab()
@@ -953,6 +954,16 @@
 
 void SimpleMainWindow::setCaption(const QString &caption)
 {
+    kdDebug(9000) << k_funcinfo << endl;
+
+    bool modified = false;
+    if ( !caption.isEmpty() )
+    {
+        KURL url( caption );
+        DocumentState const state = PartController::getInstance()->documentState( \
url ); +        modified = ( state == Modified || state == DirtyAndModified );
+    }
+
     KDevProject *project = API::getInstance()->project();
     if (project)
     {
@@ -963,12 +974,12 @@
             projectname.truncate(projectname.length() - suffix.length());
 
         if (!caption.isEmpty())
-            DMainWindow::setCaption(projectname + " - " + caption);
+            DMainWindow::setCaption(projectname + " - " + caption, modified);
         else
-            DMainWindow::setCaption(projectname);
+            DMainWindow::setCaption(projectname, modified);
     }
     else
-        DMainWindow::setCaption(caption);
+        DMainWindow::setCaption(caption, modified);
 }
 
 void SimpleMainWindow::projectClosed()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic