Bug 70791 - Change the icon on the tab when the file has been edited
Summary: Change the icon on the tab when the file has been edited
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: UI: all modes (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-19 01:00 UTC by Jon Smirl
Modified: 2004-01-18 15:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Smirl 2003-12-19 01:00:33 UTC
Version:           CVS (using KDE Devel)
Installed from:    Compiled sources

Change the icon on the tab when the file has been edited. kdevelop used to do this but I think the feature got lost during the ideal model rewrite.

I checked that kdevelop knows whether the file has been modified. undoing all of the modification also undoes the modified flag.

How about the green icon if it hasn't been modified and a red or yellow version if it has?
Comment 1 Alexander Dymo 2003-12-19 17:21:33 UTC
I've restored this feature yesterday. Please update.
Comment 2 Jon Smirl 2003-12-21 00:40:27 UTC
I am rebuilt as of today, Saturday but I don't see any change in the tab after the file has been modified. I do see the undo/redo buttons change. What is the tab change supposed to look like? 

Which file is it implemented in so that I can check and make sure the change made it to the CVS mirrors. Sometimes the mirrors get broken and stop propogating.
Comment 3 Alexander Dymo 2003-12-21 12:07:17 UTC
kdevelop/src/mainwindow.cpp r.1.64
kdevelop/src/partcontroller.cpp r.1.110
kdevelop/src/partcontroller.h r.1.41

After you change the file, the "kdevelop" icon on the tab will be changed to "save file" icon.
Comment 4 Jon Smirl 2003-12-21 16:55:54 UTC
The changes finally made it out to the CVS mirrors. It looks like the QT update bogged the copying process down alot. Don't know what the changes look like yet, I've been building for four hours and still not done.
Comment 5 Jon Smirl 2003-12-21 19:07:30 UTC
Something is wrong with the check-in of partcontroller.cpp. It is only at version 1.109. Mainwindow.cpp is at 1.64 and partcontroller.h is at 1.41, those are the right versions.

I checked three CVS mirrors and they are all the same.

[jonsmirl@smirl src]$ cvs -z3 -d :pserver:anonymous@anoncvs.kde.org:/home/kde log partcontroller.cpp
 
RCS file: /home/kde/kdevelop/src/partcontroller.cpp,v
Working file: partcontroller.cpp
head: 1.109
branch:
locks: strict
access list:
keyword substitution: kv
total revisions: 111;   selected revisions: 111
description:
Comment 6 Alexander Dymo 2003-12-21 23:08:43 UTC
Oops, my bad ;) 1.109 is the correct revision.
Comment 7 Jon Smirl 2003-12-22 00:25:14 UTC
Well if that's case, then I don't see any change when the file is edited.
Comment 8 Jon Smirl 2003-12-22 19:32:09 UTC
I played around with this more. The icons are changing when the file gets modified but the change is not being displayed in ideal mode.

For example:
1) edit file in ideal mode
2) note no change in icon on tab
3) switch into top window mode, note file save icon is there
4) switch back into ideal mode.
5) tab has changed to filesave icon.

Another clue might be that the icons on the tabs in ideal mode and not the same as the icons used in top level window mode.
Comment 9 Amilcar do Carmo Lucas 2004-01-06 20:49:13 UTC
It works fine with HEAD and kde 3.1.3 QT 3.1.2

I think that if you use KDE 3.2 you need to recompile kdelibs.
Comment 10 Jens Dagerbo 2004-01-06 21:34:41 UTC
Yes, this _should_ work now, with kdelibs-HEAD. Not backported to kdevelop local kmdi for KDE-3.1/3.0 yet.
Comment 11 Sebastien 2004-01-18 15:21:12 UTC
Hello,

I have KDE 3.1 and Kdevelop 2004-01-05 and this isn't resolved.
So, for those that are in the same case (is this will be backported for KDE 3.1), I've done a small hack.
It's working for me in IDEAui mode (not tryed for others) :

369c369
<                 PartController::getInstance()->restorePartWidgetIcon(ro_part);
---
>                 ro_part->widget()->setIcon(0); //MOI: PartController::getInstance()->restorePartWidgetIcon(ro_part);
451,452c451,452
<     view->setIcon(SmallIcon("kdevelop"));
<     child->setIcon(SmallIcon("kdevelop")); // was empty or too big, take something useful
---
>     //MOI: view->setIcon(SmallIcon("kdevelop"));
>     //MOI: child->setIcon(SmallIcon("kdevelop")); // was empty or too big, take something useful
503c503
<         view->setIcon(SmallIcon("kdevelop")); // was empty or too big, take something useful
---
>         //MOI: view->setIcon(SmallIcon("kdevelop")); // was empty or too big, take something useful
535c535
<         view->setIcon(SmallIcon("kdevelop")); // was empty or too big, take something useful
---
>         //MOI: view->setIcon(SmallIcon("kdevelop")); // was empty or too big, take something useful


Sorry : I've used diff but it's a strange output :-/
No time to learn more.
In brief : comment all
  view->setIcon(SmallIcon("kdevelop"));
lines to not have the kdevelop icon and replace the first with
  ro_part->widget()->setIcon(0);
To reset icon when saved.