DocManager: Don't show load trouble popup messages
ClosedPublic

Authored by loh.tar on Jan 8 2019, 7:49 PM.

Details

Summary

Since there are fancy "in view" messages which show all loading trouble,
is there no need to fetch and show some error message.

Diff Detail

Repository
R40 Kate
Lint
Lint Skipped
Unit
Unit Tests Skipped
loh.tar created this revision.Jan 8 2019, 7:49 PM
Restricted Application added a project: Kate. · View Herald TranscriptJan 8 2019, 7:49 PM
Restricted Application added a subscriber: kwrite-devel. · View Herald Transcript
loh.tar requested review of this revision.Jan 8 2019, 7:49 PM

I think we should tackle that differently:

  1. we can just skip the messaging always, we have always inline messages, I think that would be ok
  2. we should just set openSuccess to false if we have an doc->openingError() and the document is empty

> that should avoid extra popups + still heal the closeOrphaned stuff (single user of openSuccess).

we can just skip the messaging always, we have always inline messages, I think that would be ok

very well, will remove that too

we should just set openSuccess to false if we have an doc->openingError() and the document is empty

I think this not sufficient. These "openingError()" is somewhere used to change the document icon. So I believe there is a need to change this to an (u)int value, 0=good, 1=someTrouble, 3=seriousProblem=orphaned

This way someone can have in a document overview a hint that at some docs is something odd. This pic is taken after a session restore. It's my own (not finished) plugin, other looks similar.

  • Here is the gone foo file in a visible view. There was also a "New File" inline message which disappear quickly [1]. So I like to fix this that this "Not Exist" message is inline and not (only) the "New File"
  • The testfile has the "to big trouble" issue.

To solve this all we need a solution in D18116/KateBuffer::openFile

[1] I had Dominik pointed D16336 that this message stuff need love, but got no response

mwolff resigned from this revision.Jan 15 2019, 2:05 PM

I think this is not sufficient. These "openingError()" is somewhere used to change the document icon. So I believe there is a need to change this to an (u)int value, 0=good, 1=someTrouble, 3=seriousProblem=orphaned

@cullmann @dhaumann Need a "GO" for this or some other advice

Hmm,

perhaps I am a bit confused, but if we just keep the code in ktexteditor as is (e.g. not doing D18116) but in Kate just don't show any summary dialog, we have

  1. orphaned ok as we set info->openSuccess = false;
  2. some icon in the document list (until one reloads the files successfully thanks to the item->doc()->openingError() there)

the only problem is that the notifications vanish too fast? Or do I miss an other issue if we go that way.

  • if we just keep the code in ktexteditor as is
  • we should just set openSuccess to false if we have an doc->openingError() and the document is empty

Um, I think that are two differend suggestions.
So, well, yes, without to change the logic in D18116 (but still apply that to remove unneded text) it work as needed.
On the other hand is it that way not "full right", for me is some overlenght or encoding warning not an "open error".

  • if we just keep the code in ktexteditor as is
  • we should just set openSuccess to false if we have an doc->openingError() and the document is empty

    Um, I think that are two differend suggestions. So, well, yes, without to change the logic in D18116 (but still apply that to remove unneded text) it work as needed. On the other hand is it that way not "full right", for me is some overlenght or encoding warning not an "open error".

I could live with not "full right". We would get rid of the annoying popup and still have enough indication of issues in my opinion.

So, well, yes, without to change the logic in D18116 (but still apply that to remove unneded text) it work as needed.

Hm, I think I was wrong. There is the problem with these orphanet files. A really new file would be closed too.

Other question: We don't set m_openingErrorMessage anymore, so the access function Document::openingErrorMessage() becomes pointless

> A really new file would be closed too.

Grrr..no. Any with some trouble.

Hmm, but not with the

"we should just set openSuccess to false if we have an doc->openingError() and the document is empty"

change, or? Then only new files would die, but actually that would even make sense, as they are orphan, or?

loh.tar updated this revision to Diff 50025.Jan 21 2019, 9:26 PM
  • Only set "no success" when doc is empty
  • Remove unneded stuff

Then only new files would die,

Currently apparently not

but actually that would even make sense, as they are orphan, or?

Hm, not what I would expect

cullmann accepted this revision.Feb 2 2019, 3:31 PM

I think this is the best we can do with reasonable effort.

This revision is now accepted and ready to land.Feb 2 2019, 3:31 PM
loh.tar retitled this revision from DocManager: Don't show empty popup to DocManager: Don't show load trouble popup messages .Feb 3 2019, 7:55 AM
loh.tar edited the summary of this revision. (Show Details)
loh.tar set the repository for this revision to R40 Kate.

I get the following error when applying the patch:

Applied patch kate/katedocmanager.h cleanly.
Applying patch kate/katedocmanager.cpp with 2 rejects...
Hunk #1 applied cleanly.
Rejected hunk #2.
Rejected hunk #3.

Could you rebase your patch and post an updated version here?

loh.tar updated this revision to Diff 50954.Feb 5 2019, 2:31 PM
  • rebase on master
cullmann accepted this revision.Feb 9 2019, 4:00 PM

Thanks!

This revision was automatically updated to reflect the committed changes.