Bug 313521 - Loading message resizes the window
Summary: Loading message resizes the window
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-19 20:38 UTC by Christoph Feck
Modified: 2013-04-10 10:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2013-01-19 20:38:19 UTC
When loading a remote file, a new message appears at the top. When the URL is long and does not contain spaces, the loading message causes the whole window to resize. When the message disappears, the window is not sized back to its original size.

The URL probably should be elided.
Comment 1 Dominik Haumann 2013-01-20 12:30:23 UTC
One simple approach is to show only the filename (QUrl::fileName()) instead of the entire QUrl::pathOrUrl().

KMessageWidget from kdelibs does not support squeezing, nor can we squeeze a priori to exactly fit the widgets (since we post the message in a document, not a view).

Would the proposed change above reflect a fix that is good enough?
Comment 2 Georgios Varisteas 2013-02-12 22:44:45 UTC
Same goes with any file nested in a series of folders. Given the maximum length of 255 characters per full path, kate should behave and not resize in all cases.

Maybe truncate the path (or URL) to the maximum amount of visible columns?

Worst case, add a scrollbar, or allow the message to wrap. Non-broken strings are wrapped in the editor anyway, why not apply the same algorithm to the message?
Comment 3 Dominik Haumann 2013-02-13 20:19:13 UTC
Word wrap of the message widget is enabled.

@Aurelien: Is there anything we can do? My current solution would be to just show the fileName instead of the full path. Eliding the url depending on the width does not work, since we just pass a QString to the KMessageWidget ;)
Comment 4 Aurelien Gateau 2013-02-14 09:56:42 UTC
Not much can be done at KMessageWidget level I am afraid. I would say the best thing to do is to elide the url with KStringHandler::csqueeze(). We can assume the user already knows which url he is opening, so he does not need the complete url in the message.
Comment 5 Dominik Haumann 2013-04-10 10:23:56 UTC
Ok, this is fixed in KDE 4.11 by just using the fileName(). In addition, the fileName is a link, if you click on or hover over it, a tooltip shows the complete path. I hope this solution is ok.

Due to string freeze we can not simply backport to KDE 4.10. If you think that it's deadly needed, I'll ask the translators, though.