DevHeads.net

Review Request: Port shutdown dialog to QML

Review request for KDE Base Apps and KDE Runtime.

Description
Port the shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & fell, and countour, which is used in Plasma Active.

Diffs
ksmserver/CMakeLists.txt 295b96e
ksmserver/shutdown.cpp 7fd1e11
ksmserver/shutdowndlg.h e5f0942
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/default/metadata.desktop PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the patch requires kde-runtime 4.8's declarative imports.

Thanks,

Lamarque Vieira Souza

Comments

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/03/2012 - 13:20

(Updated Jan. 3, 2012, 5:20 p.m.)

Review request for KDE Base Apps and KDE Runtime.

Changes
Adding screenshot for the default QML theme.

Description
Port the shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & fell, and countour, which is used in Plasma Active.

Diffs
ksmserver/CMakeLists.txt 295b96e
ksmserver/shutdown.cpp 7fd1e11
ksmserver/shutdowndlg.h e5f0942
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/default/metadata.desktop PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the patch requires kde-runtime 4.8's declarative imports.

Screenshots (updated)

<a href="http://git.reviewboard.kde.org/r/103621/s/400/" title="http://git.reviewboard.kde.org/r/103621/s/400/">http://git.reviewboard.kde.org/r/103621/s/400/</a>

Thanks,

Lamarque Vieira Souza

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/03/2012 - 13:34

(Updated Jan. 3, 2012, 5:34 p.m.)

Review request for KDE Base Apps and KDE Runtime.

Changes
Adding comment about the last bug left that I could not solve.

Description
Port the shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & fell, and countour, which is used in Plasma Active.

Diffs
ksmserver/CMakeLists.txt 295b96e
ksmserver/shutdown.cpp 7fd1e11
ksmserver/shutdowndlg.h e5f0942
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/default/metadata.desktop PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing (updated)
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the patch requires kde-runtime 4.8's declarative imports.

There is still one bug left: keyboard nagivation works with TAB, BACKSPACE, and arrow-keys, but only the TAB key works at first. You always have to press the TAB key at least once for the other keys to work for navigation. The first TAB press only activates the navigation, you still need a second press to actually move focus to the next element.

Screenshots

<a href="http://git.reviewboard.kde.org/r/103621/s/400/" title="http://git.reviewboard.kde.org/r/103621/s/400/">http://git.reviewboard.kde.org/r/103621/s/400/</a>

Thanks,

Lamarque Vieira Souza

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/04/2012 - 11:57

(Updated Jan. 4, 2012, 3:57 p.m.)

Review request for KDE Base Apps and KDE Runtime.

Changes
Use theme.desktopFont instead of theme.defaultFont, this last one does not change when changing font size in systemsettings. Fix keyboard navigation not working from start.

Description
Port the shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & fell, and countour, which is used in Plasma Active.

Diffs (updated)
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/contour/screenshot.png PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/CMakeLists.txt 295b96e
ksmserver/shutdown.cpp 7fd1e11
ksmserver/shutdowndlg.h e5f0942
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/themes/default/metadata.desktop PRE-CREATION
ksmserver/themes/default/screenshot.png PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the patch requires kde-runtime 4.8's declarative imports.

There is still one bug left: keyboard nagivation works with TAB, BACKSPACE, and arrow-keys, but only the TAB key works at first. You always have to press the TAB key at least once for the other keys to work for navigation. The first TAB press only activates the navigation, you still need a second press to actually move focus to the next element.

Screenshots

<a href="http://git.reviewboard.kde.org/r/103621/s/400/" title="http://git.reviewboard.kde.org/r/103621/s/400/">http://git.reviewboard.kde.org/r/103621/s/400/</a>

Thanks,

Lamarque Vieira Souza

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/04/2012 - 13:03

(Updated Jan. 4, 2012, 5:03 p.m.)

Review request for KDE Base Apps and KDE Runtime.

Changes
Add missing change. Also fix compilation error.

Description
Port the shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & fell, and countour, which is used in Plasma Active.

Diffs (updated)
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/shutdowndlg.h e5f0942
ksmserver/shutdown.cpp 7fd1e11
ksmserver/CMakeLists.txt 295b96e
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/contour/screenshot.png PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/default/metadata.desktop PRE-CREATION
ksmserver/themes/default/screenshot.png PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the patch requires kde-runtime 4.8's declarative imports.

There is still one bug left: keyboard nagivation works with TAB, BACKSPACE, and arrow-keys, but only the TAB key works at first. You always have to press the TAB key at least once for the other keys to work for navigation. The first TAB press only activates the navigation, you still need a second press to actually move focus to the next element.

Screenshots

<a href="http://git.reviewboard.kde.org/r/103621/s/400/" title="http://git.reviewboard.kde.org/r/103621/s/400/">http://git.reviewboard.kde.org/r/103621/s/400/</a>

Thanks,

Lamarque Vieira Souza

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/04/2012 - 14:08

(Updated Jan. 4, 2012, 6:08 p.m.)

Review request for KDE Base Apps and KDE Runtime.

Changes
Fix problem with font size. Remove unneeded code.

Description
Port the shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & fell, and countour, which is used in Plasma Active.

Diffs (updated)
ksmserver/CMakeLists.txt 295b96e
ksmserver/shutdown.cpp 7fd1e11
ksmserver/shutdowndlg.h e5f0942
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/contour/screenshot.png PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/default/metadata.desktop PRE-CREATION
ksmserver/themes/default/screenshot.png PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the patch requires kde-runtime 4.8's declarative imports.

There is still one bug left: keyboard nagivation works with TAB, BACKSPACE, and arrow-keys, but only the TAB key works at first. You always have to press the TAB key at least once for the other keys to work for navigation. The first TAB press only activates the navigation, you still need a second press to actually move focus to the next element.

Screenshots

<a href="http://git.reviewboard.kde.org/r/103621/s/400/" title="http://git.reviewboard.kde.org/r/103621/s/400/">http://git.reviewboard.kde.org/r/103621/s/400/</a>

Thanks,

Lamarque Vieira Souza

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/04/2012 - 14:41

(Updated Jan. 4, 2012, 6:41 p.m.)

Review request for KDE Base Apps and KDE Runtime.

Changes
Extract strings from QML themes for translation. Update header.

Description
Port the shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & fell, and countour, which is used in Plasma Active.

Diffs (updated)
ksmserver/CMakeLists.txt 295b96e
ksmserver/Messages.sh 0aa8bab
ksmserver/shutdown.cpp 7fd1e11
ksmserver/shutdowndlg.h e5f0942
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/contour/screenshot.png PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/default/metadata.desktop PRE-CREATION
ksmserver/themes/default/screenshot.png PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing (updated)
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the patch requires kde-runtime 4.8's declarative imports.

TODO:

. implement something equivalent to QLabel's accelerators.
. check if there are bugs in bugs.kde.org that could be solved by this patch.

Screenshots

<a href="http://git.reviewboard.kde.org/r/103621/s/400/" title="http://git.reviewboard.kde.org/r/103621/s/400/">http://git.reviewboard.kde.org/r/103621/s/400/</a>

Thanks,

Lamarque Vieira Souza

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/04/2012 - 15:19

(Updated Jan. 4, 2012, 7:19 p.m.)

Review request for KDE Base Apps and KDE Runtime.

Changes
Update header.

Description (updated)
Port shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & feel, and contour, which is used in Plasma Active.

Diffs
ksmserver/CMakeLists.txt 295b96e
ksmserver/Messages.sh 0aa8bab
ksmserver/shutdown.cpp 7fd1e11
ksmserver/shutdowndlg.h e5f0942
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/contour/screenshot.png PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/default/metadata.desktop PRE-CREATION
ksmserver/themes/default/screenshot.png PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing (updated)
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the default theme requires kde-runtime 4.8's declarative imports.

TODO:

. implement something equivalent to QLabel's accelerators.
. check if there are bugs in bugs.kde.org that could be solved by this patch.

Screenshots

<a href="http://git.reviewboard.kde.org/r/103621/s/400/" title="http://git.reviewboard.kde.org/r/103621/s/400/">http://git.reviewboard.kde.org/r/103621/s/400/</a>

Thanks,

Lamarque Vieira Souza

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/05/2012 - 10:13

(Updated Jan. 5, 2012, 2:13 p.m.)

Review request for KDE Base Apps and KDE Runtime.

Changes
Implement support to label accelerators (the '&' in button's text). All strings are equal to the old ksmserver now.
Update screenshot.

Description
Port shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & feel, and contour, which is used in Plasma Active.

Diffs (updated)
ksmserver/CMakeLists.txt 295b96e
ksmserver/Messages.sh 0aa8bab
ksmserver/shutdown.cpp 7fd1e11
ksmserver/shutdowndlg.h e5f0942
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/contour/screenshot.png PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/helper.js PRE-CREATION
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/default/metadata.desktop PRE-CREATION
ksmserver/themes/default/screenshot.png PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing (updated)
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the default theme requires kde-runtime 4.8's declarative imports.

TODO:

. check if there are bugs in bugs.kde.org that could be solved by this patch.
. test right to left language support.

Screenshots (updated)

<a href="http://git.reviewboard.kde.org/r/103621/s/400/" title="http://git.reviewboard.kde.org/r/103621/s/400/">http://git.reviewboard.kde.org/r/103621/s/400/</a>
New version with label accelerator working
<a href="http://git.reviewboard.kde.org/r/103621/s/407/" title="http://git.reviewboard.kde.org/r/103621/s/407/">http://git.reviewboard.kde.org/r/103621/s/407/</a>

Thanks,

Lamarque Vieira Souza

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/30/2012 - 10:28

(Updated Jan. 30, 2012, 2:28 p.m.)

Review request for KDE Base Apps and KDE Runtime.

Changes
Fix remaining hard coded size problems.
Add FindKDeclarative.cmake as requested (it is not installed).

I would like to push this patch to kde-workspace master to have more people testing it. I have looked at all bugs assigned to ksmserver and I think this patch fix at least two of them and possibly others (I have not tested them and some I have never seen happening in my notebook). By the way, there seems to be a lot of duplicates in the list.

Description
Port shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & feel, and contour, which is used in Plasma Active.

This addresses bugs 216853 and 216853.
<a href="http://bugs.kde.org/show_bug.cgi?id=216853" title="http://bugs.kde.org/show_bug.cgi?id=216853">http://bugs.kde.org/show_bug.cgi?id=216853</a>
<a href="http://bugs.kde.org/show_bug.cgi?id=216853" title="http://bugs.kde.org/show_bug.cgi?id=216853">http://bugs.kde.org/show_bug.cgi?id=216853</a>

Diffs (updated)
ksmserver/CMakeLists.txt 295b96e
ksmserver/FindKDeclarative.cmake PRE-CREATION
ksmserver/Messages.sh 0aa8bab
ksmserver/shutdown.cpp 7fd1e11
ksmserver/shutdowndlg.h e5f0942
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/contour/screenshot.png PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/helper.js PRE-CREATION
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/default/metadata.desktop PRE-CREATION
ksmserver/themes/default/screenshot.png PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the default theme requires kde-runtime 4.8's declarative imports.

TODO:

. check if there are bugs in bugs.kde.org that could be solved by this patch.
. test right to left language support.

Screenshots

<a href="http://git.reviewboard.kde.org/r/103621/s/400/" title="http://git.reviewboard.kde.org/r/103621/s/400/">http://git.reviewboard.kde.org/r/103621/s/400/</a>
New version with label accelerator working
<a href="http://git.reviewboard.kde.org/r/103621/s/407/" title="http://git.reviewboard.kde.org/r/103621/s/407/">http://git.reviewboard.kde.org/r/103621/s/407/</a>

Thanks,

Lamarque Vieira Souza

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/30/2012 - 12:35

(Updated Jan. 30, 2012, 4:35 p.m.)

Review request for KDE Base Apps and KDE Runtime.

Changes
Change some issues with FindKDeclarative.cmake.

Description
Port shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & feel, and contour, which is used in Plasma Active.

This addresses bugs 216853 and 216853.
<a href="http://bugs.kde.org/show_bug.cgi?id=216853" title="http://bugs.kde.org/show_bug.cgi?id=216853">http://bugs.kde.org/show_bug.cgi?id=216853</a>
<a href="http://bugs.kde.org/show_bug.cgi?id=216853" title="http://bugs.kde.org/show_bug.cgi?id=216853">http://bugs.kde.org/show_bug.cgi?id=216853</a>

Diffs (updated)
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/contour/screenshot.png PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/helper.js PRE-CREATION
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/CMakeLists.txt 295b96e
ksmserver/FindKDeclarative.cmake PRE-CREATION
ksmserver/Messages.sh 0aa8bab
ksmserver/shutdown.cpp 7fd1e11
ksmserver/shutdowndlg.h e5f0942
ksmserver/themes/default/metadata.desktop PRE-CREATION
ksmserver/themes/default/screenshot.png PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing (updated)
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the default theme requires kde-runtime 4.8's declarative imports.

TODO:

. test right to left language support.

Screenshots

<a href="http://git.reviewboard.kde.org/r/103621/s/400/" title="http://git.reviewboard.kde.org/r/103621/s/400/">http://git.reviewboard.kde.org/r/103621/s/400/</a>
New version with label accelerator working
<a href="http://git.reviewboard.kde.org/r/103621/s/407/" title="http://git.reviewboard.kde.org/r/103621/s/407/">http://git.reviewboard.kde.org/r/103621/s/407/</a>

Thanks,

Lamarque Vieira Souza

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/30/2012 - 13:08

(Updated Jan. 30, 2012, 5:08 p.m.)

Review request for KDE Base Apps and KDE Runtime.

Changes
Added Copyright.txt file as requested.

Description
Port shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & feel, and contour, which is used in Plasma Active.

This addresses bugs 216853 and 216853.
<a href="http://bugs.kde.org/show_bug.cgi?id=216853" title="http://bugs.kde.org/show_bug.cgi?id=216853">http://bugs.kde.org/show_bug.cgi?id=216853</a>
<a href="http://bugs.kde.org/show_bug.cgi?id=216853" title="http://bugs.kde.org/show_bug.cgi?id=216853">http://bugs.kde.org/show_bug.cgi?id=216853</a>

Diffs (updated)
ksmserver/CMakeLists.txt 295b96e
ksmserver/Copyright.txt PRE-CREATION
ksmserver/FindKDeclarative.cmake PRE-CREATION
ksmserver/Messages.sh 0aa8bab
ksmserver/shutdown.cpp 7fd1e11
ksmserver/shutdowndlg.h e5f0942
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/contour/screenshot.png PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/helper.js PRE-CREATION
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/default/metadata.desktop PRE-CREATION
ksmserver/themes/default/screenshot.png PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the default theme requires kde-runtime 4.8's declarative imports.

TODO:

. test right to left language support.

Screenshots

<a href="http://git.reviewboard.kde.org/r/103621/s/400/" title="http://git.reviewboard.kde.org/r/103621/s/400/">http://git.reviewboard.kde.org/r/103621/s/400/</a>
New version with label accelerator working
<a href="http://git.reviewboard.kde.org/r/103621/s/407/" title="http://git.reviewboard.kde.org/r/103621/s/407/">http://git.reviewboard.kde.org/r/103621/s/407/</a>

Thanks,

Lamarque Vieira Souza

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 02/04/2012 - 10:04

(Updated Feb. 4, 2012, 2:04 p.m.)

Review request for KDE Base Apps and KDE Runtime.

Changes
More fixes in ksmserver/FindKDeclarative.cmake.

Description
Port shutdown dialog to QML. Two QML themes are included: default, which mimics the current shutdown dialog look & feel, and contour, which is used in Plasma Active.

This addresses bugs 216853 and 216853.
<a href="http://bugs.kde.org/show_bug.cgi?id=216853" title="http://bugs.kde.org/show_bug.cgi?id=216853">http://bugs.kde.org/show_bug.cgi?id=216853</a>
<a href="http://bugs.kde.org/show_bug.cgi?id=216853" title="http://bugs.kde.org/show_bug.cgi?id=216853">http://bugs.kde.org/show_bug.cgi?id=216853</a>

Diffs (updated)
ksmserver/CMakeLists.txt 295b96e
ksmserver/Copyright.txt PRE-CREATION
ksmserver/FindKDeclarative.cmake PRE-CREATION
ksmserver/Messages.sh 0aa8bab
ksmserver/shutdown.cpp 7fd1e11
ksmserver/shutdowndlg.h e5f0942
ksmserver/shutdowndlg.cpp a09a1a7
ksmserver/themes/contour/ContourButton.qml PRE-CREATION
ksmserver/themes/contour/main.qml PRE-CREATION
ksmserver/themes/contour/metadata.desktop PRE-CREATION
ksmserver/themes/contour/screenshot.png PRE-CREATION
ksmserver/themes/default/ContextMenu.qml PRE-CREATION
ksmserver/themes/default/KSMButton.qml PRE-CREATION
ksmserver/themes/default/MenuItem.qml PRE-CREATION
ksmserver/themes/default/helper.js PRE-CREATION
ksmserver/themes/default/main.qml PRE-CREATION
ksmserver/themes/default/metadata.desktop PRE-CREATION
ksmserver/themes/default/screenshot.png PRE-CREATION

Diff: <a href="http://git.reviewboard.kde.org/r/103621/diff/diff" title="http://git.reviewboard.kde.org/r/103621/diff/diff">http://git.reviewboard.kde.org/r/103621/diff/diff</a>

Testing
Works in Plasma Active Two using MeeGo image and KDE SC 4.8. It does not work in 4.7.x because the default theme requires kde-runtime 4.8's declarative imports.

TODO:

. test right to left language support.

Screenshots

<a href="http://git.reviewboard.kde.org/r/103621/s/400/" title="http://git.reviewboard.kde.org/r/103621/s/400/">http://git.reviewboard.kde.org/r/103621/s/400/</a>
New version with label accelerator working
<a href="http://git.reviewboard.kde.org/r/103621/s/407/" title="http://git.reviewboard.kde.org/r/103621/s/407/">http://git.reviewboard.kde.org/r/103621/s/407/</a>

Thanks,

Lamarque Vieira Souza

Re: Review Request: Port shutdown dialog to QML

By Commit Hook at 02/07/2012 - 18:25

This review has been submitted with commit 49e65509f9bada70382d2768670a31b568f28ce4 by Lamarque V. Souza to branch master.

- Commit Hook

On Feb. 4, 2012, 2:04 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Alexander Neundorf at 02/06/2012 - 17:38

Ship it!

Good from my POV (cmake stuff).

- Alexander Neundorf

On Feb. 4, 2012, 2:04 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Laszlo Papp at 03/02/2012 - 08:51

Alex, we need this FindKdeclarative.cmake in kdelibs, and not in this repository since it is used by almost every single KDE Mobile Applications in theory (one common use case is the localization)... Are you fine with this "quick" solution, if I push it against KDE/4.8 ? I do not personally have time for learning this *Config.cmake, and we would not like to hard code "kdeclarative" into the target_link_libraries either. If someone felt like volunteering with a proper config file, I would be happy. :-)

- Laszlo

On Feb. 4, 2012, 2:04 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 03/02/2012 - 10:29

Em Friday 02 March 2012, Laszlo Papp escreveu:
I am working on creating the *Config.cmake configuration. I send it to
reviewboard when it's ready.

Re: Review Request: Port shutdown dialog to QML

By Christoph Feck at 02/06/2012 - 19:13

UI-wise looks also fine. Was there anything else we needed to do? If not, merge to master. Thanks, you rock!

- Christoph

On Feb. 4, 2012, 2:04 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Alexander Neundorf at 02/01/2012 - 12:53

ksmserver/FindKDeclarative.cmake
<http://git.reviewboard.kde.org/r/103621/#comment8450>

You can simply include(FindPackageHandleStandardArgs).
The full path should not be necessary.
Especially not since ${kde_cmake_module_dir} is not set in this file, and I don't know where it comes from.
The prefix "kde_" makes it look like it comes from FindKDE4Internal.cmake, but there everything has the prefix "KDE4_".
Everything else is internal and should not be used.

ksmserver/FindKDeclarative.cmake
<http://git.reviewboard.kde.org/r/103621/#comment8451>

You should also add a
set(KDECLARATIVE_INCLUDE_DIRS ${KDECLARATIVE_INCLUDE_DIR}),
as recommended in the cmake module readme.txt, see
<a href="http://www.cmake.org/cgi-bin/viewcvs.cgi/Modules/readme.txt?root=CMake&amp;view=markup" title="http://www.cmake.org/cgi-bin/viewcvs.cgi/Modules/readme.txt?root=CMake&amp;view=markup">http://www.cmake.org/cgi-bin/viewcvs.cgi/Modules/readme.txt?root=CMake&amp;v...</a>

ksmserver/FindKDeclarative.cmake
<http://git.reviewboard.kde.org/r/103621/#comment8449>

KDECLARATIVE_LIBRARIES doesn't have to be marked as advanced, since it is not a cache variable.
(the other two variables are the result variables from find_path() and find_library(), so they are put automatically in the cache, and so should be marked as advanced, as done here)

- Alexander Neundorf

On Jan. 30, 2012, 5:08 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Raphael Kubo da... at 01/30/2012 - 12:44

ksmserver/FindKDeclarative.cmake
<http://git.reviewboard.kde.org/r/103621/#comment8433>

Where is Copyright.txt? :)

If you move this file to cmake/modules you can share the license header with the other files there and just point to COPYING-CMAKE-SCRIPTS (if you do so, it's probably better not to install it, btw).

ksmserver/FindKDeclarative.cmake
<http://git.reviewboard.kde.org/r/103621/#comment8434>

Can you elaborate on why KDECLARATIVE_LIBRARY is being used/set?

- Raphael Kubo da Costa

On Jan. 30, 2012, 4:35 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/30/2012 - 13:47

Copyright.txt added. By the way, kdelibs does not include that file for FindJPEG.cmake. If I move it to cmake/modules it is installed by default and Alexander Neundorf < ... at kde dot org> already said to do not install it.

I cannot. I used FindJPEG.cmake as an example as suggested by Alexander Neundorf. I do not know why it is used in FindJPEG.cmake and how it works.

- Lamarque Vieira

On Jan. 30, 2012, 5:08 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Raphael Kubo da... at 01/30/2012 - 11:40

Isn't it better to move FindKDeclarative.cmake to the top-level cmake/modules directory with the other find-files?

ksmserver/FindKDeclarative.cmake
<http://git.reviewboard.kde.org/r/103621/#comment8421>

As picky as it may seem, doesn't this file need a license?

ksmserver/FindKDeclarative.cmake
<http://git.reviewboard.kde.org/r/103621/#comment8422>

Why is this needed?

ksmserver/FindKDeclarative.cmake
<http://git.reviewboard.kde.org/r/103621/#comment8424>

Why not pass KDECLARATIVE_LIBRARIES directly to find_library() to get rid of this block?

ksmserver/FindKDeclarative.cmake
<http://git.reviewboard.kde.org/r/103621/#comment8423>

I don't see these being used anywhere in the patch, does it make sense to keep deprecated declarations in a new file?

ksmserver/FindKDeclarative.cmake
<http://git.reviewboard.kde.org/r/103621/#comment8425>

Missing KDECLARATIVE_LIBRARIES?

- Raphael Kubo da Costa

On Jan. 30, 2012, 2:28 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/30/2012 - 13:47

No if the intention is to prevent the file from being installed, which is the case here.

I do not know, I just used FindJPEG.cmake as example.

I think that FindJJPEG.cmake is like a template and using ${KDECLARATIVE_NAMES} is usefull in the case where one library can have more than one name or use a non-standard name (name.so instead of libname.so for example). For kdeclarative that is not necessary.

I guess no. I will remove them.

Probably. I do not know if this line is really required.

I will add one.

- Lamarque Vieira

On Jan. 30, 2012, 5:08 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Christoph Feck at 01/04/2012 - 12:58

ksmserver/themes/default/main.qml
<http://git.reviewboard.kde.org/r/103621/#comment7809>

Note that pointSize != pixelSize. With a high DPI display, a 10 pt font could be 30 pixels large, but if you set it to 9 pixels (10 * 0.9), then it will be unreadably small.

Also I am not sure I understand the comment "pixelSize does not work" correctly. The idea is to have the buttons be as big as neccessary for the selected font.

As far as I know, Martin Gräßlin had to add some QML code to get the "actual" pixel size of texts just to make the layout font size adaptive, but maybe in newer versions, the layout uses size hints automatically. Could you add him as a reviewer?

- Christoph Feck

On Jan. 4, 2012, 3:57 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/04/2012 - 14:08

That explains why the font is always smaller than the rest of the desktop. I should have used only pointSize, not pixelSize. Now it works, thanks.

- Lamarque Vieira

On Jan. 4, 2012, 5:03 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Christoph Feck at 01/03/2012 - 20:24

Very nice work, one of the things where QML makes sense.

Are there any i18n string regressions? If possible, I would see it in 4.8 (maybe not 4.8.0, but backport sometimes later, after it has received testing in master), but that will only work when translation files do not change.

ksmserver/themes/default/main.qml
<http://git.reviewboard.kde.org/r/103621/#comment7805>

Can you please check if it is possible to have the layout adapt to the font size specified by the user? Setting a fixed pixel size is one of the bugs I hoped to get fixed with a rewrite...

(You could also check the list of other bugs we have, so that you don't try to imitate the old dialog with all its bugs, but change/fix it where appropiate)

- Christoph Feck

On Jan. 3, 2012, 5:34 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/04/2012 - 14:08

I will research again if there is any new implemenation for the accelerator markers. Passing strings from C++ code is not a good ideia, two QML themes does not use the same strings. I could remove the accelerator markers in the QML code instead. I could try to implement accelerator mark support, too.

- Lamarque Vieira

On Jan. 4, 2012, 6:08 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Albert Astals Cid at 01/04/2012 - 13:40

QML is pretty stupid^Wbasic, so it is you that probably have to make accelerators work, it's not a bug but a feature!

BTW i find the fact that i can't use accelerators pretty disappointing since my workflow to shutdown my system involves Alt+F1->some right arrows->some down arrows->Use accelerator

- Albert

On Jan. 4, 2012, 5:03 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Christoph Feck at 01/04/2012 - 13:27

Oh, that's bad :(

Multiple options:
1) Keep the old strings in C++ code, and pass them as attributes to the QML code with accelerator markers stripped. This means more work for you now, but has the advantages that no translations need to be changed, and that we can even reactivate accelerators later, when QML supports those.

2) Ask i18n team if you could remove them *now* also in branch, so that they don't change later during 4.8 stabilization phase.

3) Apply this patch only to master, and release it starting with KDE 4.9.

Of course I would prefer option 1.

- Christoph

On Jan. 4, 2012, 5:03 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/04/2012 - 11:55

Some strings changed because no QML component supports QLabel's accelerators, for example i18n("&Cancel") became i18n("Cancel").

I tried to do that, but the font size became smaller than the rest of the desktop.

- Lamarque Vieira

On Jan. 3, 2012, 5:34 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Albert Astals Cid at 01/03/2012 - 17:38

Some of your QtQuick imports are 1.0 and some others 1.1, i guess some consistency there would be nice

You need to extract the i18n messages from the qml files

And having the keyboard not working seems like a huge regression for my own usecase ;-)

ksmserver/CMakeLists.txt
<http://git.reviewboard.kde.org/r/103621/#comment7802>

no variable for kdeclarative?

ksmserver/shutdowndlg.h
<http://git.reviewboard.kde.org/r/103621/#comment7803>

make theme const &, not just &

- Albert Astals Cid

On Jan. 3, 2012, 5:34 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/04/2012 - 15:19

I do not think so. All CMakeLists.txt throughout kde-workspace, kde-runtime and plasma-mobile add the library name directly. Do you know where those that kind of variables are defined?

- Lamarque Vieira

On Jan. 4, 2012, 6:41 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Alexander Neundorf at 01/04/2012 - 15:54

On Wednesday 04 January 2012, Lamarque Vieira Souza wrote:
libkdeclarative is from kdelibs/experimental/, right ?
So, it is not from within the same project.
And I didn't find a place where libkdeclarative would install a
KDeclarativeConfig.cmake file. Did I miss this somewhere ?

If not, is there a FindKDeclarative.cmake somewhere ?

If not, this is seriously messed up.

It would mean that simply using "kdeclarative" means that cmake interprets
this as name of a library and simply adds -lkdeclarative to the command line,
without checking whether it actually exists nor in which directory.

So, is there a FindKDeclarative.cmake or a KDeclarativeConfig.cmake file
somewhere ?
It seems kdeclarative is not checked in FindKDE4Internal.cmake, like all
"regular" kdelibs libraries.

Alex

Re: Review Request: Port shutdown dialog to QML

By Thomas Zander at 01/05/2012 - 05:02

On Wednesday 04 January 2012 20.54.27 Alexander Neundorf wrote:
I can confirm that this is what happens; it took me quite a while to figure out
why stuff didn't compile due to that missing lib.
I'm definitely in support of making this a configure check using the Find* cmake
file.

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/04/2012 - 21:07

Em Wednesday 04 January 2012, Alexander Neundorf escreveu:
Yes.

I guest that is indeed what happens now.

locate /*Declarative*.cmake returned nothing here, so there is none in
my notebook.

I think so.

Re: Review Request: Port shutdown dialog to QML

By Alexander Neundorf at 01/05/2012 - 13:52

On Thursday 05 January 2012, Lamarque V. Souza wrote:
So, quick solution: write a simply FindKDeclarative.cmake file (mostly
find_library(), find_path() and a find_package_handle_standard_args() call)
and use this (but don't install it).

Good solution: kdeclarative should install a KDeclarativeConfig.cmake file, so
it will be found automatically. But this has to be done carefully.

Alex

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/05/2012 - 19:40

Em Thursday 05 January 2012, Alexander Neundorf escreveu:
I think the person to talk about this is Marco Martin. As far as I know
he is the one doing most of the work in kdeclarative. Kdeclarative is going to
be very important in Plasma 4.8, I think we should fix this properly before
the 4.8 final release.

Re: Review Request: Port shutdown dialog to QML

By Alexander Neundorf at 01/06/2012 - 14:28

On Friday 06 January 2012, Lamarque V. Souza wrote:
Still, if you are a user of kdeclarative, you have an interest in having a
FindKDeclarative.cmake file.
Have a look at some of the simpler find-files, e.g. FindJPEG.cmake coming with
cmake, and write a FindKDeclarative.cmake file similar to it.
This won't take you long.

Yes.

Alex

Re: Review Request: Port shutdown dialog to QML

By Alexander Neundorf at 01/17/2012 - 13:22

On Friday 06 January 2012, Alexander Neundorf wrote:
Any progress ?

Alex

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/17/2012 - 15:19

Em Tuesday 17 January 2012, Alexander Neundorf escreveu:
No, I am too busy with other implemenations in Plasma Active and I am
going to be even busier until next month (at least) :-/ If nobody takes this
task it will be postponed indefinitely. All my work in Plasma NM is already
postponed too :-/

Re: Review Request: Port shutdown dialog to QML

By Albert Astals Cid at 01/04/2012 - 14:49

I mean cmake variable like ${SOMETHING_SOMETHING}

- Albert

On Jan. 4, 2012, 6:41 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Albert Astals Cid at 01/04/2012 - 13:57

- Albert

On Jan. 4, 2012, 5:03 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/04/2012 - 11:55

It did not work but I have found what I did wrong, or more precisely forgot to do. In the original implementation the focus was on the dialog, but now the focus must go to the QML view. Not it works.

- Lamarque Vieira

On Jan. 3, 2012, 5:34 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Christoph Feck at 01/03/2012 - 20:26

Try Qt::StrongFocus, maybe it forces activation of the view.

- Christoph

On Jan. 3, 2012, 5:34 p.m., Lamarque Vieira Souza wrote:

Re: Review Request: Port shutdown dialog to QML

By Lamarque V. Souza at 01/03/2012 - 20:00

All QtQuick imports in Contour theme are 1.0, all QtQuick imports in default theme are 1.1. Why Contour theme should use 1.1 if it is not required? They are independent implementations.

How do I extract i18n messages in qml files? Is there any guide for that?

The keyboard works, you just need to press the TAB key once to activate it, then you can use the TAB, SHIFT+TAB and arrow-keys to navigate and ENTER or BAR to "click" the button. I have not figure out why the first TAB is required.

There is one in shutdowndlg.cpp, in KSMShutdownDlg's constructor.

- Lamarque Vieira

On Jan. 3, 2012, 5:34 p.m., Lamarque Vieira Souza wrote: