RFC: Data Recovery

Currently, we use our own passive notification bar to show a recovery bar when a swap file was found:

Since version 4.7 we have a class called KMessageWidget (api documentation). Using KMessageWidget, the notification could also look like this:

Imo, the new one looks nicer, as it much better distinguishes the notification popup from the rest of the ui. However, it several drawbacks:

  • the minimum width is now 800 pixel due to the label (too large, might break layout in apps)
  • the title “Data Recovery” was omitted
  • the “Help” link, showing a tool tip with further information, can not be added anymore (the api does not allow it)

Possible solutions:

  • put the buttons under the label, as it was in the old version (currently, the api does not allow it, so we’d need something like setButtonsUnderText(bool))
  • wrap the text in the label (looks aweful, since the buttons appear then between two lines of text)
  • to get the “Help” label back, the api would need to forward the QLabel’s signal linkActivated(const QString&)

I’m not sure whether the API can be extended in the 4.x line, though…


15 thoughts on “RFC: Data Recovery

  1. I must say I quite like the old design and find it superior to the KMessageWidget. I personally don’t mind that the popup is not distinguished from the toolbar.

  2. The new one is also missing an icon on the Discard button. Also, the minimum width will probably be much higher than 800 pixels on other languages where words are longer on average.

  3. The new design looks much better, it especially lacks that geeky “Data Recovery (Help)” that makes it look unprofessional.
    If I am not mistaken, KMessageWidget allows multiple lines / automatic linebreak? Maybe use the close (X) icon for Discard, although I think Discard is a much too data-sensitive action to be put in a generic widget.

  4. Obviously I like the KMessageWidget one better, but I may be biaised :)

    More seriously: you can set the wordWrap property to true, this should move the buttons to their own line, reducing the minimum width.

      1. Adding the linkActivated() signal would make sense I think. It is probably too late for KDE SC 4.9, though.

        I would also be careful not to add too much content to the widget. For example, I don’t think you need the “Data Recovery” line you added to this new screenshot.

  5. Second one,
    What about shortening phrases, for example,
    “File not closed properly. ”

    The phrase “Do you want to recover the data?” is unnecessary
    because the Buttons already have descriptive text. perhaps change buttons to
    View Changes, Recover Data, Discard

    see ya

  6. Please use one of the dialog for changing file before thinking about this dialog. I am also not sure how well it work with different color scheme. Having the “file changed” popup when using git checkout or bisec is -very- frustrating. In some cases, the popup can happen multiple time over and you have to try them all to find the correct order to close them. Please make the file read-only until the choice to reload or overwrite have been made, but remove the model popup.

  7. First of all, it looks stylish and fitting. Good choice to add it in! Also some graphical unification amongst KDE applications like this is welcome (dolphin has it as well) so that’s another point for you :) Good job!

    “the minimum width is now 800 pixel due to the label (too large, might break layout in apps)”

    That one worries me. Do you mean that kwrite is now 800px in width minimal and always? If that’s the case then i would urge you to reconsider! I often make krwite very small in case i need to know a few lines. Having a minimum width of 800px renders kwrite useless for me.

  8. just lost my unsaved text in kate again; I have been using kate for over a year, but as of today, I will not be using it again; vim is far better, as it has autosave, so if your computer locks up or loses power, you don’t lose your work; after using vim and recovering your unsaved text, you will appreciate the value of that feature; so much for kate and microsoft notepad! don’t bother implementing autosave in kate, its low priority and who needs it anyway.

    if your editor does not have autosave, don’t use it.

    1. Sorry, but 1) this comment is unrelated to this blog, 2) such reports should go to bugs.kde.org, since this web page is not a bug database, 3) Kate does have data recovery, so you should not loose data. Maybe update?

      Besides that, I don’t give a fuck about your data loss, given the way you act here. Thanks ;)

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top