D28744: Rewrite of the global shortcuts kcm

2020-04-30 Thread David Redondo
This revision was automatically updated to reflect the committed changes.
Closed by commit R119:1ee6660ceb62: Rewrite of the global shortcuts kcm 
(authored by davidre).

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=81441=81607

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-30 Thread Nathaniel Graham
ngraham accepted this revision.
ngraham added a comment.


  My spacebar shortcut issue will be fixed with D29292 
. I think this deserves to get into Plasma 
5.19, and the sooner the better so there's no rush before the deadline.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-29 Thread Nathaniel Graham
ngraham added a comment.


  In D28744#659600 , @davidre wrote:
  
  > In D28744#659447 , @ngraham 
wrote:
  >
  > > I find that I'm not able to set shortcuts involving the space key. The 
key sequence get repeated twice in the button and the Apply button ever becomes 
enabled. Can you reproduce?
  >
  >
  > That's the current behavior of KeySequenceItem and KKeySequenceWidget. You 
should be able to observe it everywhere such an item is used
  
  
  Ah, I can indeed reproduce that with other instances of that in QML software 
(e.g. applet config windows' shortcut pages). I think we need that fixed before 
this lands as otherwise it would be a regression compared to the existing KCM.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-29 Thread David Redondo
davidre added a comment.


  In D28744#659447 , @ngraham wrote:
  
  > I find that I'm not able to set shortcuts involving the space key. The key 
sequence get repeated twice in the button and the Apply button ever becomes 
enabled. Can you reproduce?
  
  
  That's the current behavior of KeySequenceItem and KKeySequenceWidget. You 
should be able to observe it everywhere such an item is used

REPOSITORY
  R119 Plasma Desktop

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-28 Thread Nathaniel Graham
ngraham added a comment.


  I find that I'm not able to set shortcuts involving the space key. The key 
sequence get repeated twice in the button and the Apply button ever becomes 
enabled. Can you reproduce?

REPOSITORY
  R119 Plasma Desktop

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-28 Thread David Redondo
davidre updated this revision to Diff 81441.
davidre added a comment.


  - Reinstate the pointingHand mouseAreas
  - Make delegate automatically expand if it's the only one

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=81435=81441

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-28 Thread David Redondo
davidre updated this revision to Diff 81435.
davidre added a comment.


  - Make the delegate use states

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=81305=81435

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-27 Thread Nathaniel Graham
ngraham accepted this revision.
ngraham added a comment.


  UI approved :)

REPOSITORY
  R119 Plasma Desktop

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-27 Thread David Redondo
davidre updated this revision to Diff 81305.
davidre added a comment.


  rebasae

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=81304=81305

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-27 Thread David Redondo
davidre updated this revision to Diff 81304.
davidre added a comment.


  - Use model.* properties
  - Use placeholder message
  - Still don't know why model properties are undefined when switching 
components

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=81016=81304

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-23 Thread David Redondo
davidre updated this revision to Diff 81016.
davidre added a comment.


  - Don't drop installing scheme files

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80767=81016

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-22 Thread Nathaniel Graham
ngraham added a comment.


  Also you can now use `Kirigami.PlaceholderMessage` in this diff instead of 
making the messages manually using level 3 Headings.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-22 Thread Nathaniel Graham
ngraham added a comment.


  JFYI once this is ready to land, before doing so, please do an `arc amend` 
locally to pick up the changes in the description that I've made and ensure 
that all those bugs get closed!

REPOSITORY
  R119 Plasma Desktop

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-21 Thread Nathaniel Graham
ngraham accepted this revision.
ngraham added a comment.
This revision is now accepted and ready to land.


  Boom.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma, ngraham
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-21 Thread David Redondo
davidre updated this revision to Diff 80767.
davidre added a comment.


  - Fix defaults
  - Add pending deletion thing

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80675=80767

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-21 Thread David Redondo
davidre added a comment.


  In D28744#652925 , @ngraham wrote:
  
  > Here's how it looks with the old KCM: F8249724: 
Screenshot_20200420_125405.png 
  >
  > So my KDE Daemon category has one entry in French for some odd reason. And 
the two KRunner entries are indeed still there and different, not merged.
  >
  > And the Power Management entry is full of duplicates internally and it's 
very confusing: F8249731: Screenshot_20200420_130010.png 

  >
  > So yeah, it's not great in the existing KCM. In the new one it's nice that 
you can delete these duplicates, but I don't actually know what will happen 
when I do so, and the inability to get them back if I make a mistake makes me 
not want to try.
  
  
  In the old one you can delete them too.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread Nathaniel Graham
ngraham added a comment.


  Here's how it looks with the old KCM: F8249724: 
Screenshot_20200420_125405.png 
  
  So my KDE Daemon category has one entry in French for some odd reason. And 
the two KRunner entries are indeed still there and different, not merged.
  
  And the Power Management entry is full of duplicates internally and it's very 
confusing: F8249731: Screenshot_20200420_130010.png 

  
  So yeah, it's not great in the existing KCM. In the new one it's nice that 
you can delete these duplicates, but I don't actually know what will happen 
when I do so, and the inability to get them back if I make a mistake makes me 
not want to try.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread David Redondo
davidre added a comment.


  In D28744#652854 , @ngraham wrote:
  
  > Yay. Almost there! I just see a few more things:
  >
  > 1. If I delete a whole item from the left-most list, there's no obvious way 
to get it back (what if I delete a system entry by accident?)
  
  
  I agree. Probably should do it like other kcms with pending deletion then.
  
  > 2. The Defaults button is present, but always disabled
  
  Hmm it works for me when changing shortcuts or changing defaults but the 
initial state is wrong probably because loading is now async. Will look into it.
  
  > 3. I see duplicate entries with different items inside them:
  
  These are not really duplicated but boil down to that the backend is 
represented correctly here. Some components have a different unique identifier  
and happen to have the same user visible name. The old kcm merged them but I 
don't as I think most of these should be seperate because they  are related to 
different things.
  
  - The kded ones are not really duplicate but rather seperate. I think most of 
them are part of plasma(?) so I will see if I can change them to something more 
sensible (for example "Touchpad" or "Keyboard").
  - The powerdevil duplication  shouldn't even exist, @davidedmundson messed up 
while migrating the shortcuts but also fixed that. See D10668 
.
  - The run command one I have not seen but they also have different user 
visible names? How does the old kcm handle that?

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread Björn Feber
GB_2 added a comment.


  Nitpick: put the "Add Application..." button on the left (T10384 
).

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, 
plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread David Redondo
davidre updated this revision to Diff 80675.
davidre added a comment.


  - Implement Kai's idea for importing
  - Fix importing

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80673=80675

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread Nathaniel Graham
ngraham added a comment.


  Yay. Almost there! I just see a few more things:
  
  1. If I delete a whole item from the left-most list, there's no obvious way 
to get it back (what if I delete a system entry by accident?)
  2. The Defaults button is present, but always disabled
  3. I see duplicate entries with different items inside them: F8249655: 
vokoscreenNG-2020-04-20_11-56-18.webm 

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread David Redondo
davidre updated this revision to Diff 80673.
davidre added a comment.


  - Fix scrollview and use level 3 heading
  - use better string

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80672=80673

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread David Redondo
davidre marked an inline comment as done.
davidre added a comment.


  In D28744#652703 , @ngraham wrote:
  
  > Clicking the Apply button makes System Settings crash for me:
  
  
  Fixed now.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread David Redondo
davidre updated this revision to Diff 80672.
davidre added a comment.


  - Fix errors and leave error message disabled

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80631=80672

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread Nathaniel Graham
ngraham added a comment.


  Clicking the Apply button makes System Settings crash for me: P591 System 
Setting scrash log 

INLINE COMMENTS

> main.qml:118
> +icon.width: Kirigami.Units.iconSizes.small
> +onClicked: kcm.removeComponent(index)
> +QQC2.ToolTip {

When I click on it, the KCM enters this state:

F8249469: Screenshot_20200420_094821.png 

> main.qml:120
> +QQC2.ToolTip {
> +text: i18n("Remove the selected 
> component")
> +}

How about "Remove all shortcuts for [model.name]"

> main.qml:167
> +Component.onCompleted: background.visible = true
> +QQC2.Label {
> +visible: components.currentIndex == -1

Make it a level 3 `Heading`

> main.qml:173
> +}
> +ListView {
> +clip:true

For some reason this list view doesn't get any sctollbars when it's scrollable. 
Also it implements kinetic scrolling while the other list view doesn't

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread David Redondo
davidre updated this revision to Diff 80631.
davidre added a comment.


  Use Nate's string

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80629=80631

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread David Redondo
davidre updated this revision to Diff 80629.
davidre added a comment.


  - Fix index reset when clicking reset button and use own property for 
shortcuts listview
  
  currentIndex was reset to 0 when resetting, now warnings are generated when 
switching components need to figure out why

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80622=80629

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread David Redondo
davidre updated this revision to Diff 80622.
davidre added a comment.


  - Add tooltip to remove toolbutton

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80620=80622

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-20 Thread David Redondo
davidre updated this revision to Diff 80620.
davidre added a comment.


  Make it build again

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80553=80620

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-19 Thread Nathaniel Graham
ngraham added inline comments.

INLINE COMMENTS

> shortcutsmodel.cpp:440
> +}
> +const QString  = m_components[index.row()].uniqueName);
> +auto watcher = new 
> QDBusPendingCallWatcher(m_globalAccelInterface->getComponent(uniqueName));

compile error

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-19 Thread David Redondo
davidre updated this revision to Diff 80553.
davidre added a comment.


  - Make loading async
  - Make everything async

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80405=80553

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-17 Thread David Redondo
davidre updated this revision to Diff 80405.
davidre added a comment.


  - Use less DBus calls for loading

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80398=80405

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-17 Thread David Redondo
davidre added inline comments.

INLINE COMMENTS

> broulik wrote in shortcutsmodel.cpp:38
> Hmm...
> how about
> 
>   QStringList actionId;
>   actionId.reserve(4);

This actually crashes now

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-17 Thread David Redondo
davidre updated this revision to Diff 80398.
davidre added a comment.


  - Fix defaults

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80387=80398

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-17 Thread Nathaniel Graham
ngraham added a comment.


  This is looking really good. Other than my previous comments (most of which 
have been resolved, yay) I have just nitpicks left, really.

INLINE COMMENTS

> ShortcutActionDelegate.qml:165
> +onClicked: 
> kcm.shortcutsModel.disableShortcut(originalIndex, modelData)
> +QQC2.ToolTip {
> +text: i18n("Delete this shortcut")

This tooltip is not working for me

> shortcutsmodel.cpp:165
> +
> +void ShortcutsModel::defaults() {
> +for (auto& component : m_components) {

Clicking the Defaults button does not seem to have any effect for me

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-17 Thread David Redondo
davidre updated this revision to Diff 80387.
davidre added a comment.


  - Remove components as good as the current kcm

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80224=80387

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-15 Thread David Redondo
davidre updated this revision to Diff 80224.
davidre added a comment.


  - Add section checkbox

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80216=80224

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-15 Thread David Redondo
davidre updated this revision to Diff 80216.
davidre marked an inline comment as done.
davidre added a comment.


  - Use pointing hand cursor
  - Rename error signals to errorOccured

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80198=80216

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-15 Thread David Redondo
davidre updated this revision to Diff 80198.
davidre added a comment.


  - Update the delegate

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80137=80198

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-14 Thread David Redondo
davidre updated this revision to Diff 80137.
davidre marked 3 inline comments as done.
davidre added a comment.


  - Use QCollator and one more coding style

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80136=80137

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-14 Thread David Redondo
davidre updated this revision to Diff 80136.
davidre marked an inline comment as done.
davidre added a comment.


  - Set transient window for application dialog

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80135=80136

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-14 Thread David Redondo
davidre updated this revision to Diff 80135.
davidre added a comment.


  - redo exportActive and exportWarning bindings

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80088=80135

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-14 Thread David Redondo
davidre marked 5 inline comments as done.
davidre added inline comments.

INLINE COMMENTS

> broulik wrote in main.qml:94
> Is `contentItem` the default property?

Yes

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-14 Thread David Redondo
davidre updated this revision to Diff 80088.
davidre added a comment.


  - Search when entering text and correctly color delegates
  - use fallback if action doesn't have a friendly name
  - Remove friend declaration

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=80074=80088

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-14 Thread David Redondo
davidre marked an inline comment as done.
davidre added inline comments.

INLINE COMMENTS

> shortcutsmodel.h:59
> +friend FilteredShortcutsModel;
> +enum Roles {
> +SectionRole = Qt::UserRole,

It does in filterAcceptRows to not have to go through data each time

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-14 Thread David Redondo
davidre added inline comments.

INLINE COMMENTS

> shortcutsmodel.h:59
> +friend FilteredShortcutsModel;
> +enum Roles {
> +SectionRole = Qt::UserRole,

Nevermind it goes through data, apparently I forgot that I changed that :)

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-14 Thread David Redondo
davidre added inline comments.

INLINE COMMENTS

> filteredmodel.cpp:41
> +bool displayMatches = 
> index.data(Qt::DisplayRole).toString().contains(m_filter, 
> Qt::CaseInsensitive);
> +if (!source_parent.isValid() || displayMatches) {
> +return displayMatches;

If it's a toplevel item we can just return if the name matches. Recursive 
filtering will take care of the rest

> filteredmodel.cpp:45
> +
> +if (index.parent().data(Qt::DisplayRole).toString().contains(m_filter, 
> Qt::CaseInsensitive)) {
> +return true;

No if the parent matches but the child not, the child is filtered. Recursive 
filtering makes the parent show if it doesn't match but the child does

> ShortcutActionDelegate.qml:58
> +if (model.activeShortcuts.length != 0) {
> +return model.display + ": " + 
> model.activeShortcuts.map(s => kcm.keySequenceToString(s)).join(", ")
> +} else {

Shouldn't QKeySequence::NativeText take care of that or because of the list 
format?

> main.qml:53
> +enabled: exportWarning.visible
> +function onNeedsSaveChanged () {
> +exportWarning.visible = kcm.needsSave

The way I used it caused a binding loop

  Binding on visible {
  when: exportWarning.visible
  value: kcm.needsSave
  restoreMode: Binding.RestoreValue
  }

> main.qml:141
> +icon.name: "list-add"
> +text: i18n("Add application...")
> +onClicked: {

I know...
I will look into what's the most reliable way of deleting things...

> metadata.desktop:4
> +
> +Comment=Global Keyboard Shortcuts
> +

It's the same as in the main desktop file. What will be the user visible one?

> shortcutsmodel.cpp:298
> +{
> +   if (!checkIndex(index) || !index.parent().isValid())  {
> +return;

I think that's wrong way round here

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-14 Thread David Redondo
davidre updated this revision to Diff 80074.
davidre marked 33 inline comments as done.
davidre added a comment.


  Minor things and codestyle

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=79940=80074

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, 
Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, 
ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-14 Thread Kai Uwe Broulik
broulik added a comment.


  Very nice!
  I really like the default shortcuts with checkboxes with additional ones to 
the right.

INLINE COMMENTS

> filteredmodel.cpp:40
> +const QModelIndex index = sourceModel()->index(source_row, 0, 
> source_parent);
> +bool displayMatches = 
> index.data(Qt::DisplayRole).toString().contains(m_filter, 
> Qt::CaseInsensitive);
> +if (!source_parent.isValid() || displayMatches) {

`const bool`

> filteredmodel.cpp:41
> +bool displayMatches = 
> index.data(Qt::DisplayRole).toString().contains(m_filter, 
> Qt::CaseInsensitive);
> +if (!source_parent.isValid() || displayMatches) {
> +return displayMatches;

Why this `!source_parent.isValid()` check?

> filteredmodel.cpp:45
> +
> +if (index.parent().data(Qt::DisplayRole).toString().contains(m_filter, 
> Qt::CaseInsensitive)) {
> +return true;

Shouldn't recursive filtering take care of this?

> filteredmodel.cpp:50
> +const auto  = 
> index.data(ShortcutsModel::DefaultShortcutsRole);
> +for (const auto& shortcut : 
> defaultShortcuts.value>()) {
> +if (shortcut.toString(QKeySequence::NativeText).contains(m_filter, 
> Qt::CaseInsensitive)) {

Put the `.value>` in the line above outside the `for`

> filteredmodel.h:26
> +
> +class FilteredShortcutsModel : public QSortFilterProxyModel {
> +Q_OBJECT

Coding style, `{` on next line

> filteredmodel.h:32
> +public:
> +FilteredShortcutsModel(QObject *parent);
> +

`explicit`

> filteredmodel.h:34
> +
> +bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) 
> const override;
> +

Coding style: `const QModelIndex _parent`

> kcm_keys.cpp:51
> +KAboutData *about = new KAboutData(QStringLiteral("kcm_keys"), 
> i18n("Global Shortcuts"),
> +QStringLiteral("1.0"), QString(), KAboutLicense::GPL);
> +about->addAuthor(i18n("David Redondo"), QString(), 
> QStringLiteral("k...@david-redondo.de"));

I guess this can be 2.0 at this point :)

> kcm_keys.cpp:106
> +{
> +  return m_lastError;
> +}

Not a huge fan of this `lastError` bookkeeping in the KCM

> kcm_keys.cpp:153
> +{
> +auto dialog = new KOpenWithDialog;
> +dialog->hideRunInTerminal();

Set a transient parent on the dialog like so:

  void KCMKeys::addApplication(QQuickItem *ctx)
  {
  auto *dialog = new KOpenWithDialog;
  if (ctx && ctx->window()) {
  dialog->winId(); // so it creates windowHandle
  
dialog->windowHandle()->setTransientParent(QQuickRenderControl::renderWindowFor(ctx->window()));
  dialog->setWindowModality(Qt::WindowModal);
  }
  ...
  }

Then call in QML like `onClicked: kcm.addApplication(this)`

Also, you might want to set `dialog->setAttribute(Qt::WA_DeleteOnClose);` so 
you don't need to `deleteLater()` yourself.

(I believe the `QQuickRenderControl` use may not be necessary when in the same 
process but I recall it behaving funky in `QQuickWidget` in some cases on 
Wayland otherwise)

> kcm_keys.cpp:159
> +const KService::Ptr service = dialog->service();
> +QString desktopFileName = service->entryPath().split('/').last();
> +if (m_shortcutsModel->match(m_shortcutsModel->index(0, 0), 
> ShortcutsModel::ComponentRole, desktopFileName).isEmpty()) {

Perhaps use `KService::desktopEntryName`

> kcm_keys.h:51
> +Q_INVOKABLE void loadScheme(const QUrl );
> +Q_INVOKABLE QVariantList defaultSchemes();
> +

`const`

> kcm_keys.h:54
> +Q_INVOKABLE void addApplication();
> +Q_INVOKABLE QString keySequenceToString(const QKeySequence );
> +

I presume `QKeySequence` is opaque to QML? Also, `const`

> ShortcutActionDelegate.qml:30
> +property int oldHeight: height
> +sourceComponent: ListView.isCurrentItem ? editRepresentation : 
> compactRepresentation
> +ListView.onIsCurrentItemChanged: {

I find the transition between editing and display state somewhat jarring

> ShortcutActionDelegate.qml:58
> +if (model.activeShortcuts.length != 0) {
> +return model.display + ": " + 
> model.activeShortcuts.map(s => kcm.keySequenceToString(s)).join(", ")
> +} else {

Please use `i18n`

> main.qml:33
> +enabled: kcm.lastError == ""
> +property bool exportActive: exportInfo.visible
> +ColumnLayout{

This appears to loop? `exportInfo`'s `visible` is bound to this

> main.qml:34
> +property bool exportActive: exportInfo.visible
> +ColumnLayout{
> +// otherwise we get scrollbars

Coding style: `ColumnLayout {`

> main.qml:36
> +// otherwise we get scrollbars
> +height: root.availableHeight - Kirigami.Units.smallSpacing
> +width: root.availableWidth

Huh?

> main.qml:40
> +Layout.fillWidth: true
> +visible:  kcm.lastError !=  ""
> +text: kcm.lastError

Coding style, also `!==`

> main.qml:53
> +enabled: exportWarning.visible
> +function 

D28744: Rewrite of the global shortcuts kcm

2020-04-14 Thread David Redondo
davidre edited subscribers, added: davidedmundson; removed: crossi.
davidre added a comment.


  Answering general comments first:
  
  In D28744#647378 , @ngraham wrote:
  
  > - When a shortcut is to launch an app, and that shortcut's name would be 
identical to the app name, maybe we should automatically change it to "Launch 
[app name]. Otherwise you get this following: F8234080: 
Screenshot_20200413_094908.png 
  
  
  I think that's what the old kcm did. It changed the friendly name to "Launch 
$app" which then would be saved if you changed the shortcut in the old kcm. 
That's why there is currently a mixture between "$app" and "Launch $app"...
  But we can change displayed name here, too.
  
  > - I'm seeing some duplicate entries here, and some with missing icons that 
aren't missing in the current version: F8234212: Screenshot_20200413_114058.png 

  
  The KDE Daemon ones are expected. They are different components with 
different unique identifiers that set the same display name (Probably to force 
the old kcm to merge them?). What I would like to happen is that we give them 
each a fitting name and they seperate. They are different modules after all. 
kcm_touchpad (the one with the touchpad icon) should call itself "Touchpad" for 
example. 
  Hmm I don't know about "Power Managment" wasn't their some fallout when d_ed 
ported shortcuts for that but I may be remembering wrong. Do you have these 
modules on dbus too or is it an error in the model? Try `qdbus --literal 
org.kde.kglobalaccel /kglobalaccel org.kde.KGlobalAccel.allMainComponents` or 
take a look in qdbusviewer
  Interested to hear which ones lost their icon compared to the old one.
  
  In D28744#647505 , @nicolasfella 
wrote:
  
  > I always get two horizontal scrollbars, no matter the window size:
  >  F8234349: Screenshot_20200413_212457.png 

  
  
  Not sure what's going on here but I had to 
  ColumnLayout{height: root.availableHeight - Kirigami.Units.smallSpacing 
to not get a vertical scrollbar. Probably `anchors.fill: parent`  works better. 
I will change to that
  
  > The first Choqok shortcut is missing a name, not sure if that's an issue 
here or in Choqok
  >  F8234357: Screenshot_20200413_212731.png 

  
  The action doesn't have a name 
https://lxr.kde.org/source/extragear/network/choqok/choqok/mainwindow.cpp#0215 
. But thanks for the reminder to have a fallback here
  
  In D28744#647507 , @nicolasfella 
wrote:
  
  > When I open the KCM and type 'Krun' + Enter I find KRunner as expected, but 
I still need to click on the KRunner item to actually see the shortcuts. When I 
then type 'Yaku' + Enter Yakuake is shown correctly in the results, but 
clicking on the entry does not show its shortcuts
  
  
  And the comment to always have something in the main view from @ngraham. I 
had some problems with loading and when I update the rootIndex of the 
DelegateModel that causes the issue you are seeing above and prevented me from 
having for example the first element selected when the kcm is openend. I will 
look into how I can make it better.

INLINE COMMENTS

> kcm_keys.desktop:2
>  [Desktop Entry]
> -Exec=kcmshell5 keys
> +Exec=kcmshell5 kcm_keys
>  Icon=preferences-desktop-keyboard-shortcut

From reading 
https://api.kde.org/frameworks/kdeclarative/html/classKQuickAddons_1_1ConfigModule.html
 I thought it had to be kcm_$(something) but I'm not sure now.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel, Orage, 
LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, 
ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, 
apol, ahiemstra, mart, crossi


D28744: Rewrite of the global shortcuts kcm

2020-04-14 Thread Cyril Rossi
crossi added inline comments.

INLINE COMMENTS

> shortcutsmodel.h:83
> +void save();
> +bool needsSave();
> +bool isDefault();

should be const

> shortcutsmodel.h:84
> +bool needsSave();
> +bool isDefault();
> +

should be const

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: crossi, nicolasfella, ngraham, iasensio, plasma-devel, Orage, LeGast00n, 
The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-13 Thread Nathaniel Graham
ngraham added inline comments.

INLINE COMMENTS

> ShortcutActionDelegate.qml:67
> +Layout.alignment: Qt.AlignRight
> +icon.name: "arrow-down"
> +onClicked: {

use `expand`

> ShortcutActionDelegate.qml:94
> +Layout.alignment: Qt.AlignRight
> +icon.name: "arrow-up"
> +onClicked: {

use `collapse`

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: nicolasfella, ngraham, iasensio, plasma-devel, Orage, LeGast00n, 
The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-13 Thread Nicolas Fella
nicolasfella added a comment.


  When I open the KCM and type 'Krun' + Enter I find KRunner as expected, but I 
still need to click on the KRunner item to actually see the shortcuts. When I 
then type 'Yaku' + Enter Yakuake is shown correctly in the results, but 
clicking on the entry does not show its shortcuts

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: nicolasfella, ngraham, iasensio, plasma-devel, Orage, LeGast00n, 
The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-13 Thread Nicolas Fella
nicolasfella added a comment.


  I always get two horizontal scrollbars, no matter the window size:
  F8234349: Screenshot_20200413_212457.png 

  
  The first Choqok shortcut is missing a name, not sure if that's an issue here 
or in Choqok
  F8234357: Screenshot_20200413_212731.png 


REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: nicolasfella, ngraham, iasensio, plasma-devel, Orage, LeGast00n, 
The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-13 Thread Nicolas Fella
nicolasfella added a comment.


  Cool stuff!

INLINE COMMENTS

> kcm_keys.cpp:110
> +{
> +auto includedComponents = 
> m_shortcutsModel->match(m_shortcutsModel->index(0, 0), 
> ShortcutsModel::CheckedRole, true, -1);
> +qCDebug(KCMKEYS) << "Exporting to " << url.toLocalFile();

const

> kcm_keys.cpp:159
> +const KService::Ptr service = dialog->service();
> +QString desktopFileName = service->entryPath().split('/').last();
> +if (m_shortcutsModel->match(m_shortcutsModel->index(0, 0), 
> ShortcutsModel::ComponentRole, desktopFileName).isEmpty()) {

const

> ShortcutActionDelegate.qml:27
> +
> +Loader{
> +id: loader

space before {

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: nicolasfella, ngraham, iasensio, plasma-devel, Orage, LeGast00n, 
The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-13 Thread Nathaniel Graham
ngraham added a comment.


  This is excellent work. A radical improvement over the existing KCM. In 
addition to the inline comments, here are some more general ones:
  
  - When a shortcut is to launch an app, and that shortcut's name would be 
identical to the app name, maybe we should automatically change it to "Launch 
[app name]. Otherwise you get this following: F8234080: 
Screenshot_20200413_094908.png 
  - I'm seeing some duplicate entries here, and some with missing icons that 
aren't missing in the current version: F8234212: Screenshot_20200413_114058.png 

  - I notice that `ShortcutActionDelegate.qml` looks suspiciously like the 
`ExpandableListItem` item I just added to PlasmaExtras. Now I'm wondering if it 
should be in Kirigami instead...

INLINE COMMENTS

> kcm_keys.desktop:2
>  [Desktop Entry]
> -Exec=kcmshell5 keys
> +Exec=kcmshell5 kcm_keys
>  Icon=preferences-desktop-keyboard-shortcut

If we're changing this and breaking compatibility with this old name, we might 
as well improve the string as well (e.g `kcm_globalshortcuts`). Alternatively I 
guess we could not change it.

> ShortcutActionDelegate.qml:50
> +width: shortcutsList.width
> +onClicked: shortcutsList.currentIndex = index
> +contentItem: RowLayout {

should should display the pointing hand cursor when hovered so people know the 
whole thing will expand when clicked as with the ExpandableListItem.

> ShortcutActionDelegate.qml:56
> +Layout.fillWidth: true
> +text: {
> +if (model.activeShortcuts.length != 0) {

The way you're (ab)using `xi18n()` to change the text weight of different parts 
of the string, it feels like this text would prefer to be two labels. This 
would facilitate right-aligning the right-most part too.

> ShortcutActionDelegate.qml:93
> +QQC2.ToolButton {
> +Layout.alignment: Qt.AlignRight
> +icon.name: "arrow-up"

Align top-right so it doesn't jump around vertically when the list item is 
collapsed

> ShortcutActionDelegate.qml:144
> +QQC2.Button {
> +icon.name: "list-remove"
> +onClicked: 
> kcm.shortcutsModel.disableShortcut(originalIndex, modelData)

Since this actually removes a shortcut, I'd probably make use the trashcan icon 
(`edit-delete`)

> ShortcutActionDelegate.qml:147
> +QQC2.ToolTip {
> +text: i18n("Disable this shortcut")
> +}

This isn't accurate; it actually deletes the shortcut

> main.qml:31
> +implicitWidth: 1000
> +implicitHeight: 400
> +enabled: kcm.lastError == ""

The ratio between these is kind of unpleasant; I would recommend 800x600

> main.qml:62
> +visible: exportActive
> +text: i18n("Select the components that should be included in the 
> exported scheme")
> +type: Kirigami.MessageType.Information

Maybe `Select the components below...` for extra clarity?

> main.qml:65
> +showCloseButton: true
> +actions: [
> +Kirigami.Action {

Probably needs a "select all" action to make exporting everything not be 
incredibly frustrating

> main.qml:81
> +Layout.fillWidth: true
> +onAccepted: kcm.filteredModel.filter = text
> +}

Would be nice to filter immediately as the user types rather than having to hit 
the return key

> main.qml:126
> +onRootIndexChanged: shortcutsList.currentIndex = -1
> +ListView {
> +clip:true

Need to do one of the following:

- Make this view never empty because something in the left view is always 
selected
- Add a standard-looking placeholder message that appears in the center of this 
view when nothing is selected that says something like "Select an item from the 
list to view its shortcuts here"

> metadata.desktop:4
> +
> +Comment=Global Keyboard Shortcuts
> +

Needs to be a sentence starting with an action verb (e.g. "Configure global 
keyboard shortcuts")

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: ngraham, iasensio, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, 
cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-12 Thread David Redondo
davidre updated this revision to Diff 79940.
davidre added a comment.


  Actually show the dialog

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=79938=79940

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: ngraham, iasensio, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, 
cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-12 Thread David Redondo
davidre updated this revision to Diff 79938.
davidre added a comment.


  Do not use dialog.exec()

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=79907=79938

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: ngraham, iasensio, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, 
cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-12 Thread David Redondo
davidre updated this revision to Diff 79907.
davidre added a comment.


  forgot to implement defaults()

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=79831=79907

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre, #vdg, #plasma
Cc: ngraham, iasensio, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, 
cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-11 Thread Nathaniel Graham
ngraham added a comment.


  Super-awesome!

INLINE COMMENTS

> ShortcutActionDelegate.qml:54
> +spacing: Kirigami.Units.smallSpacing
> +QQC2.Label {
> +Layout.fillWidth: true

I might right-align the text for improved visual parse-ability

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre, #vdg, #plasma
Cc: ngraham, iasensio, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, 
cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-11 Thread David Redondo
davidre updated this revision to Diff 79831.
davidre added a comment.


  enabled

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28744?vs=79829=79831

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-11 Thread David Redondo
davidre added a comment.


  - I omitted the remove button for now because removing things correctly from 
KGlobalAccel is hard and any program could add itself again, but I could add it 
again.
  - The expanded ui needs some work. Open for any idea there.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D28744

To: davidre
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D28744: Rewrite of the global shortcuts kcm

2020-04-11 Thread David Redondo
davidre created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
davidre requested review of this revision.

REVISION SUMMARY
  This is a total rewrite of the global shortcuts kcm from scratch. It uses an
  abstract item model backend with a qml frontend. This resolves some issues the
  old kcm inherently had because it just stacked KShortcutEditors. First it 
enables
  a global serach/filter which either matches the component name, actions, 
default
  or set key combinations across components. Secondly KGlobalAccel can have 
multiple
  default/active key combinations for each action - the old kcm only exposed 
two each.
  The new kcm displays all default or set key combinations.
  The main visual structure is similiar to the old kcm. On the left there is a 
list
  with all components but rather than divided into "Application Launchers" and
  "Other Shortcuts" the sections are now called "Applications" and "System 
Services"
  (cf. notifications kcm) and the components are now assigned whether the 
service
  we find for a component is an application or not rather if the component was
  added via .desktop file. In the main view the shortcuts are displayed. Each 
item
  corresponds to one action. Initially each item is collapsed and shows the 
action
  name and a list of the currently set key combinations for that action. In the
  expanded form all default shortcuts are shown which can be activated or
  deactivated and all other active shortcuts ("Custom Shortcuts"). It is 
possible
  to change, remove or add new custom shortcuts.
  The kcm and model communicate directly with the daemon over DBus. This removes
  the need to awkwardly construct actions to pass to the KGlobalAccel API.

TEST PLAN
  kcmshel kcm_keys

REPOSITORY
  R119 Plasma Desktop

BRANCH
  kcmkeys2 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28744

AFFECTED FILES
  kcms/keys/CMakeLists.txt
  kcms/keys/ChangeLog
  kcms/keys/Messages.sh
  kcms/keys/README
  kcms/keys/export_scheme_dialog.cpp
  kcms/keys/export_scheme_dialog.h
  kcms/keys/export_scheme_dialog.ui
  kcms/keys/filteredmodel.cpp
  kcms/keys/filteredmodel.h
  kcms/keys/globalshortcuts.cpp
  kcms/keys/globalshortcuts.h
  kcms/keys/kcm_keys.cpp
  kcms/keys/kcm_keys.desktop
  kcms/keys/kcm_keys.h
  kcms/keys/keys.desktop
  kcms/keys/kglobalshortcutseditor.cpp
  kcms/keys/kglobalshortcutseditor.h
  kcms/keys/kglobalshortcutseditor.ui
  kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
  kcms/keys/package/contents/ui/main.qml
  kcms/keys/package/metadata.desktop
  kcms/keys/select_application.ui
  kcms/keys/select_scheme_dialog.cpp
  kcms/keys/select_scheme_dialog.h
  kcms/keys/select_scheme_dialog.ui
  kcms/keys/shortcutsmodel.cpp
  kcms/keys/shortcutsmodel.h

To: davidre
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart