Review Request 120934: Fix Krita Gemini/Sketch window titles for filenames with %1 or %2 inside

Dan Leinir Turthra Jensen admin at leinir.dk
Thu Nov 13 19:36:14 GMT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120934/#review70340
-----------------------------------------------------------


The KoDocument::modified(bool) signal needs to be sniffed. You deduced correctly that DocumentManager::documentChanged is when the actual document changes, not when the contents of the current document changes, but given how that signal works, that is emitted when there is a new document to watch, and in the appropriate slot in MainWindow in the various apps, the new document's modified(bool) signal can be attached to the window title changer slot :)

- Dan Leinir Turthra Jensen


On Nov. 1, 2014, 3:28 a.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120934/
> -----------------------------------------------------------
> 
> (Updated Nov. 1, 2014, 3:28 a.m.)
> 
> 
> Review request for Calligra, Arjen Hiemstra, Dan Leinir Turthra Jensen, and Boudewijn Rempt.
> 
> 
> Repository: calligra
> 
> 
> Description
> -------
> 
> When testing Calligra Gemini with the Calligra test document set, I was wondering why "CalligraGemini" suddenly was inside the filenames displayed in the title. Reason is that the window title composing is custom made, using "%1" and "%2", strings which can be also found in the filenames of the test document set, as they are created from encoded origin urls.
> 
> And the code of Calligra Gemini is the same as in Krita Gemini and Krita Sketch.
> 
> Attached patch proposes to just create the window title by falling back to the code KMainWindow also uses:
> http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/kmainwindow_8cpp_source.html#l00552
> 
> There is one issue though, which I need input for. I suspected this line actually will be called if the current document is modified:
> ```
>     connect(DocumentManager::instance(), SIGNAL(documentChanged()), SLOT(resetWindowTitle()));
> ```
> But seems that the signal `documentChanged()` is only about that there was a switch which document is loaded.
> 
> So even after this patch the window title will never show the "[modified]" flag, which is different from how Desktop Krita behaves.
> Intended (so the respective lines could be removed from this patch), or a bug?
> If not intended, how and where should the modified signal be registered to and unregistered from?
> 
> 
> Diffs
> -----
> 
>   krita/gemini/MainWindow.cpp d74c12c 
>   krita/sketch/MainWindow.cpp 98a6c02 
> 
> Diff: https://git.reviewboard.kde.org/r/120934/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20141113/cf4e8192/attachment.htm>


More information about the calligra-devel mailing list