Bug 72552 - Unsaved changes icon disappears even if save could not be performed.
Summary: Unsaved changes icon disappears even if save could not be performed.
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 3.0.0b2
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-13 15:22 UTC by Robin Stevens
Modified: 2004-01-21 09:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch (1.06 KB, patch)
2004-01-13 15:37 UTC, Jens Dagerbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Stevens 2004-01-13 15:22:57 UTC
Version:           3.0.0b2 (using KDE KDE 3.1.4)
Installed from:    Debian testing/unstable Packages
OS:          Linux

In the case of a "file could not be saved" dialog (due to lack of write permissions), the unsaved changes icon disappears upon dismissal of the dialog.

The save has not been performed.

Reference to Bug 72548 - which may cover this too.
Comment 1 Jens Dagerbo 2004-01-13 15:37:40 UTC
Created attachment 4144 [details]
patch

Right, we noticed yesterday. This patch should solve that, but CVS is in deep
freeze.. :/
Comment 2 Jens Dagerbo 2004-01-21 09:11:21 UTC
Subject: kdevelop/src

CVS commit by dagerbo: 

Fixes bug 72552.

CCMAIL: 72552-done@bugs.kde.org


  M +10 -6     partcontroller.cpp   1.112


--- kdevelop/src/partcontroller.cpp  #1.111:1.112
@@ -1127,14 +1127,18 @@ void PartController::slotFileDirty( cons
         kdDebug(9000) << k_funcinfo << endl;
         
-        KParts::ReadOnlyPart * ro_part = dynamic_cast<KParts::ReadOnlyPart*>( partForURL( url ) );
-        if ( !ro_part || !ro_part->widget() ) return;
+        KParts::ReadWritePart * rw_part = dynamic_cast<KParts::ReadWritePart*>( partForURL( url ) );
+        if ( !rw_part || !rw_part->widget() ) return;
         
-        if ( isDirty( ro_part ) ) 
+        if ( isDirty( rw_part ) ) 
         {
-                ro_part->widget()->setIcon( SmallIcon("revert") );
+                rw_part->widget()->setIcon( SmallIcon("revert") );
+        } 
+        else if ( !rw_part->isModified() )
+        {
+                rw_part->widget()->setIcon( SmallIcon("kdevelop") );
         } 
         else 
         {
-                ro_part->widget()->setIcon( SmallIcon("kdevelop") );
+                rw_part->widget()->setIcon( SmallIcon("filesave") );
         }
 }