Bug 95849

Summary: kate savebutton marked as unclickable when no changes where made
Product: [Applications] kate Reporter: Markus Grob <snoopy>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: CLOSED INTENTIONAL    
Severity: wishlist CC: bjlockie, cfeck, christoph, daniel.moyne, felix, frans.englich, germano.massullo, med.medin.2014, niburu1, nortexoid, tnagy256, witchhunterpro
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Markus Grob 2004-12-26 19:41:55 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    SuSE RPMs
Compiler:          gcc 3.3.3 SuSE
OS:                Linux

In other programs is the savebutton unclickable, when no changes where made since the last save. I think, this is a useful function to see, that a file was saved right and that no changes where made since then.

I think, this is easy to do with only one boolean "is_save". It isn't necessary to check, if the file in the memory is the same like this on the harddisk (changes and then go back).
Comment 1 Anders Lund 2004-12-26 20:33:21 UTC
This is pr design. You can allways save the document, regardless if you changed it or not. The file is written, so saving a unmodified (in the editor) file will overwrite the disk file.
Katepart provides a signal as well as a method (isModified(), we're a KDE app so we use KDE naming style ;). The  cients are supposed to show the modification state of its documents otherwise, KDE applications typically has the phrase [Modified] in the title bar, kate also shows a idon in the status bar and in the file list modified documents are marked with a icon as well.
Comment 2 Dominik Haumann 2009-12-19 16:00:44 UTC
*** Bug 76912 has been marked as a duplicate of this bug. ***
Comment 3 Dominik Haumann 2009-12-19 16:00:52 UTC
*** Bug 77212 has been marked as a duplicate of this bug. ***
Comment 4 Dominik Haumann 2009-12-19 16:01:03 UTC
*** Bug 85071 has been marked as a duplicate of this bug. ***
Comment 5 Dominik Haumann 2009-12-19 16:01:46 UTC
*** Bug 219291 has been marked as a duplicate of this bug. ***
Comment 6 Dominik Haumann 2011-05-17 22:31:54 UTC
*** Bug 261865 has been marked as a duplicate of this bug. ***
Comment 7 Dominik Haumann 2011-12-18 10:00:45 UTC
*** Bug 289032 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Feck 2011-12-19 02:03:27 UTC
> The file is written, so saving a unmodified (in the editor) file
> will overwrite the disk file.

Kate has file monitoring, so it would make sense to disable the save action when the disk file is identical to the unmodified editor file.
Comment 9 Daniel Moyne 2011-12-31 11:53:48 UTC
There is no sense in saving a file that does not need to at least with the floppy icon ; now if you still want to proceed with such useless action you still can use the menu item "File/save" never disabled though we can argue that such menu item could be disabled as well.
Comment 10 Christoph Cullmann 2011-12-31 14:04:16 UTC
It is not true, that it makes no sense.
E.g. you may want to trigger a recompile, by just stating the file.
Relying on the file monitoring is no good idea either, if we screw that up, we end up in situations were we can't save files.
Comment 11 Dominik Haumann 2014-03-27 08:35:41 UTC
*** Bug 332667 has been marked as a duplicate of this bug. ***
Comment 12 Waqar Ahmed 2022-08-16 13:28:57 UTC
*** Bug 419574 has been marked as a duplicate of this bug. ***
Comment 13 Waqar Ahmed 2022-08-16 13:30:07 UTC
*** Bug 354545 has been marked as a duplicate of this bug. ***
Comment 14 Waqar Ahmed 2022-08-16 13:35:51 UTC
*** Bug 455186 has been marked as a duplicate of this bug. ***
Comment 15 Waqar Ahmed 2022-08-16 13:36:11 UTC
*** Bug 450942 has been marked as a duplicate of this bug. ***