Bug 97054 - Save icon enable/disable code is quite broken
Summary: Save icon enable/disable code is quite broken
Status: CONFIRMED
Alias: None
Product: kompare
Classification: Applications
Component: general (show other bugs)
Version: 3.3
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-15 08:43 UTC by David Liontooth
Modified: 2009-03-11 00:41 UTC (History)
2 users (show)

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 David Liontooth 2005-01-15 08:43:41 UTC
Version:           3.3 (using KDE 3.3.1,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-4)
OS:                Linux (x86_64) release 2.6.9-ac6

Saving in kompare now works great, but the 'save file' and 'save all' icons seem to have no effect.  At least when I exit the program, I'm always asked if I want to save. Aside from that, this is a great program.
Comment 1 Jeff Snyder 2005-01-16 01:36:41 UTC
Hi David,

thanks again for the report, and I'm glad to hear that you like kompare (:

I'm not sufficiently familiar with the saving code to know what's wrong here, but I'll be taking a good look at it before kompare3_branch is merged into HEAD. Unfortunately, that will probably be a while after kde 3.4 is released.

Otto may be able to do something about this sooner, but he's quite busy at the moment, so I can't make any promises!

- Jeff
Comment 2 David Liontooth 2005-01-16 03:28:59 UTC
Jeff Snyder wrote:

>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
>         
>http://bugs.kde.org/show_bug.cgi?id=97054         
>
>
>
>
>------- Additional Comments From jeff-kdecvs caffeinated me uk  2005-01-16 01:36 -------
>Hi David,
>
>thanks again for the report, and I'm glad to hear that you like kompare (:
>
>I'm not sufficiently familiar with the saving code to know what's wrong here, but I'll be taking a good look at it before kompare3_branch is merged into HEAD. Unfortunately, that will probably be a while after kde 3.4 is released.
>
>Otto may be able to do something about this sooner, but he's quite busy at the moment, so I can't make any promises!
>
>- Jeff
>  
>
Hi Jeff,

It's not a big deal, since the actual saving on exit seems to be working 
fine now.  I would imagine there's nothing complicated about getting
the icons to call the saving function.

Actually I have an additional comment. As I understand kompare, the 
source document is never altered. If this is the case, then there's
no call for a "save all" icon. All we need is a single "save" icon, and 
it should save B -- which is what happens when you exit kompare and
it asks if you want to save changes.

Cheers,
Dave

Comment 3 Jeff Snyder 2005-01-16 05:18:06 UTC
Hi Dave, 

On Sunday 16 January 2005 02:29, David Liontooth wrote:
> Hi Jeff,
>
> It's not a big deal, since the actual saving on exit seems to be working
> fine now.  I would imagine there's nothing complicated about getting
> the icons to call the saving function.
good to hear that it's working for you - Actually, I just had a play with it and it does call the saving function, and it does save.
It's just that the enable/disable icon code is broken in a way I hadn't considered before (I don't use kompare's saving myself) - It enables the save button when anything has been applied, regardless of wether it has been saved already (and possibly undone). 
This introduces a more serious problem that if someone applies something, hits the save button, then changes their mind and unapplies it.. Kompare decides nothing's applied and disables the save button. *sigh*.

> Actually I have an additional comment. As I understand kompare, the
> source document is never altered. If this is the case, then there's
> no call for a "save all" icon. All we need is a single "save" icon, and
> it should save B -- which is what happens when you exit kompare and
> it asks if you want to save changes.

Kompare can also be used to compare entire directories - the "save all" button should be used to save B in all the files, instead of just the current one

- Jeff
Comment 4 Otto Bruggeman 2005-01-16 18:01:20 UTC
Yes that is the biggest issue, I am currently considering to always enable the save button and always save to disk without doing some sort of md5 summing of the entire document to prevent some unnecessary saves. 
Comment 5 Jochen Riehm 2005-03-09 09:44:51 UTC
This bug is rather irritating since you don not get any feedback whether you did save. If I do a merge (patch application) of say twenty files and press the save button after each diff run and in the end close kompare it will ask me for every file whether it should save it - even though it did already.
Comment 6 David Liontooth 2005-03-09 17:51:36 UTC
The minimal expected behavior is relatively straightforward:

  * Allow saving at any time, even if already saved (cf. Otto's comment #4)
  * Allow saving the last changed file (Save) or all changed files (Save all)
  * Prompt the user on exit for each changed file that's not been saved
  * Don't prompt the user on exit when changes have been saved (comment #5)

The feedback on whether you've saved seems a bit less crucial (comment #5). 
Comment 7 Otto Bruggeman 2005-03-27 00:17:30 UTC
See bug 98667 for some comments regarding how this should be implemented ideally. But this will be hard and take a lot of time which I currently dont have but I hope to get around to it in 3.5/4.0 development cycle. I should take off a week from work to fix this but I cant at the moment. Too many issues that need to be resolved at work, hopefully around May.
Comment 8 Jeff Snyder 2005-06-06 21:44:06 UTC
This is gonna be a little spammy... I'm reassigning everything that's currently 
assigned to bruggie (who's been the default assignee for bugs since time began) 
to the new list address. 
 
Bruggie: if you're working on one or more of these atm, please snatch 'em 
back.. 
 
Everyone, esp. Joshua and Bruggie: if this genrates 33 mails, my sincere 
apologies.. 
Comment 9 Otto Bruggeman 2009-03-11 00:41:53 UTC
Should be fixed in trunk, please test it out.