kdeconnect-kde/plugins/clipboard/CMakeLists.txt

24 lines
866 B
CMake
Raw Normal View History

kdeconnect_add_plugin(kdeconnect_clipboard SOURCES clipboardplugin.cpp clipboardlistener.cpp)
ecm_qt_declare_logging_category(kdeconnect_clipboard
HEADER plugin_clipboard_debug.h
IDENTIFIER KDECONNECT_PLUGIN_CLIPBOARD CATEGORY_NAME kdeconnect.plugin.clipboard
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin clipboard)")
target_link_libraries(kdeconnect_clipboard kdeconnectcore
Qt::DBus
KF${QT_MAJOR_VERSION}::GuiAddons
${kdeconnect_clipboard_WL_LINK_LIBS}
)
Add config for clipboard plugin on content types to share. ## Summary This MR adds a config dialog for the Clipboard plugin, where the user can toggle whether to share password and/or anything else with other devices. Implements !39 BUG: 458063 According to previous discussion at !39 (and the bug linked), some users want to skip sending passwords to other devices while others rely on the existing behavior. This MR addresses that by allowing users to control those two types separately and will replace !39 if merged. ![Screenshot with new config dialog](/uploads/3dfc6c6d69b86e6512e6a8948320a839/Screenshot_1661407807.png) Borrowing the idea from !39, the `x-kde-passwordManagerHint` MIME data hint is used to determine whether the content is considered secret. I've tested this method with KeepassXC which [sets this correctly](https://github.com/keepassxreboot/keepassxc/blob/a6d3f973fa8449f0f7dac864b3bd3928c29c649f/src/gui/Clipboard.cpp#L62). See test plan below. In theory, MIME also can be used to test for images and another checkbox can be easily added should we decided to support images later. For now though, the enum and the config supports only passwords or "anything else". Both defaults to true, thus keeping full backwards compatibility. I've been keeping both unchecked since I only share in one direction (Android to Linux), which wasn't possible until this MR. Others may want to make their own choices. ## Test Plan Please reference the screenshot above for the steps. From the indicator, right-click and select `Configure`. Select a device from the left side (or pair one if needed). In "available plugins", make sure "Clipboard" is checked, and verify that a "Configure" icon button is now shown on the right. Clicking that icon should bring up the new config dialog, where the two check boxes can be toggled as desired. Click on "OK" to save and apply the settings. Clicking on "Defaults" should bring both back to checked (the default behavior). Copy normal plain text from your favorite text editor and it should be sent to another device if the "anything else" checkbox is checked. I've tested this on an Android phone but I see no reason it won't work elsewhere given the code for sending has not been changed. (Feel free to test on other devices.) Open KeepassXC and select an entry, right click and select "Copy password". This sets the MIME hint so it should be treated as a password, controlled by the "passwords" checkbox. I've toggled the settings multiple times on and off. Once "OK" is clicked, the next clipboard change should pick up the latest settings. I've only tested on Linux desktops (Arch Linux) since I do not own a Mac. I don't believe any OS X application sets `x-kde-passwordManagerHint` at all, so they may be controlled by "anything else".
2022-10-17 22:04:20 +01:00
kcoreaddons_add_plugin(kdeconnect_clipboard_config SOURCES clipboard_config.cpp INSTALL_NAMESPACE "kdeconnect/kcms")
Add config for clipboard plugin on content types to share. ## Summary This MR adds a config dialog for the Clipboard plugin, where the user can toggle whether to share password and/or anything else with other devices. Implements !39 BUG: 458063 According to previous discussion at !39 (and the bug linked), some users want to skip sending passwords to other devices while others rely on the existing behavior. This MR addresses that by allowing users to control those two types separately and will replace !39 if merged. ![Screenshot with new config dialog](/uploads/3dfc6c6d69b86e6512e6a8948320a839/Screenshot_1661407807.png) Borrowing the idea from !39, the `x-kde-passwordManagerHint` MIME data hint is used to determine whether the content is considered secret. I've tested this method with KeepassXC which [sets this correctly](https://github.com/keepassxreboot/keepassxc/blob/a6d3f973fa8449f0f7dac864b3bd3928c29c649f/src/gui/Clipboard.cpp#L62). See test plan below. In theory, MIME also can be used to test for images and another checkbox can be easily added should we decided to support images later. For now though, the enum and the config supports only passwords or "anything else". Both defaults to true, thus keeping full backwards compatibility. I've been keeping both unchecked since I only share in one direction (Android to Linux), which wasn't possible until this MR. Others may want to make their own choices. ## Test Plan Please reference the screenshot above for the steps. From the indicator, right-click and select `Configure`. Select a device from the left side (or pair one if needed). In "available plugins", make sure "Clipboard" is checked, and verify that a "Configure" icon button is now shown on the right. Clicking that icon should bring up the new config dialog, where the two check boxes can be toggled as desired. Click on "OK" to save and apply the settings. Clicking on "Defaults" should bring both back to checked (the default behavior). Copy normal plain text from your favorite text editor and it should be sent to another device if the "anything else" checkbox is checked. I've tested this on an Android phone but I see no reason it won't work elsewhere given the code for sending has not been changed. (Feel free to test on other devices.) Open KeepassXC and select an entry, right click and select "Copy password". This sets the MIME hint so it should be treated as a password, controlled by the "passwords" checkbox. I've toggled the settings multiple times on and off. Once "OK" is clicked, the next clipboard change should pick up the latest settings. I've only tested on Linux desktops (Arch Linux) since I do not own a Mac. I don't believe any OS X application sets `x-kde-passwordManagerHint` at all, so they may be controlled by "anything else".
2022-10-17 22:04:20 +01:00
ki18n_wrap_ui(kdeconnect_clipboard_config clipboard_config.ui)
target_link_libraries(kdeconnect_clipboard_config
Add config for clipboard plugin on content types to share. ## Summary This MR adds a config dialog for the Clipboard plugin, where the user can toggle whether to share password and/or anything else with other devices. Implements !39 BUG: 458063 According to previous discussion at !39 (and the bug linked), some users want to skip sending passwords to other devices while others rely on the existing behavior. This MR addresses that by allowing users to control those two types separately and will replace !39 if merged. ![Screenshot with new config dialog](/uploads/3dfc6c6d69b86e6512e6a8948320a839/Screenshot_1661407807.png) Borrowing the idea from !39, the `x-kde-passwordManagerHint` MIME data hint is used to determine whether the content is considered secret. I've tested this method with KeepassXC which [sets this correctly](https://github.com/keepassxreboot/keepassxc/blob/a6d3f973fa8449f0f7dac864b3bd3928c29c649f/src/gui/Clipboard.cpp#L62). See test plan below. In theory, MIME also can be used to test for images and another checkbox can be easily added should we decided to support images later. For now though, the enum and the config supports only passwords or "anything else". Both defaults to true, thus keeping full backwards compatibility. I've been keeping both unchecked since I only share in one direction (Android to Linux), which wasn't possible until this MR. Others may want to make their own choices. ## Test Plan Please reference the screenshot above for the steps. From the indicator, right-click and select `Configure`. Select a device from the left side (or pair one if needed). In "available plugins", make sure "Clipboard" is checked, and verify that a "Configure" icon button is now shown on the right. Clicking that icon should bring up the new config dialog, where the two check boxes can be toggled as desired. Click on "OK" to save and apply the settings. Clicking on "Defaults" should bring both back to checked (the default behavior). Copy normal plain text from your favorite text editor and it should be sent to another device if the "anything else" checkbox is checked. I've tested this on an Android phone but I see no reason it won't work elsewhere given the code for sending has not been changed. (Feel free to test on other devices.) Open KeepassXC and select an entry, right click and select "Copy password". This sets the MIME hint so it should be treated as a password, controlled by the "passwords" checkbox. I've toggled the settings multiple times on and off. Once "OK" is clicked, the next clipboard change should pick up the latest settings. I've only tested on Linux desktops (Arch Linux) since I do not own a Mac. I don't believe any OS X application sets `x-kde-passwordManagerHint` at all, so they may be controlled by "anything else".
2022-10-17 22:04:20 +01:00
kdeconnectcore
kdeconnectpluginkcm
2023-04-15 11:57:52 +01:00
KF${QT_MAJOR_VERSION}::I18n
KF${QT_MAJOR_VERSION}::KCMUtils
Add config for clipboard plugin on content types to share. ## Summary This MR adds a config dialog for the Clipboard plugin, where the user can toggle whether to share password and/or anything else with other devices. Implements !39 BUG: 458063 According to previous discussion at !39 (and the bug linked), some users want to skip sending passwords to other devices while others rely on the existing behavior. This MR addresses that by allowing users to control those two types separately and will replace !39 if merged. ![Screenshot with new config dialog](/uploads/3dfc6c6d69b86e6512e6a8948320a839/Screenshot_1661407807.png) Borrowing the idea from !39, the `x-kde-passwordManagerHint` MIME data hint is used to determine whether the content is considered secret. I've tested this method with KeepassXC which [sets this correctly](https://github.com/keepassxreboot/keepassxc/blob/a6d3f973fa8449f0f7dac864b3bd3928c29c649f/src/gui/Clipboard.cpp#L62). See test plan below. In theory, MIME also can be used to test for images and another checkbox can be easily added should we decided to support images later. For now though, the enum and the config supports only passwords or "anything else". Both defaults to true, thus keeping full backwards compatibility. I've been keeping both unchecked since I only share in one direction (Android to Linux), which wasn't possible until this MR. Others may want to make their own choices. ## Test Plan Please reference the screenshot above for the steps. From the indicator, right-click and select `Configure`. Select a device from the left side (or pair one if needed). In "available plugins", make sure "Clipboard" is checked, and verify that a "Configure" icon button is now shown on the right. Clicking that icon should bring up the new config dialog, where the two check boxes can be toggled as desired. Click on "OK" to save and apply the settings. Clicking on "Defaults" should bring both back to checked (the default behavior). Copy normal plain text from your favorite text editor and it should be sent to another device if the "anything else" checkbox is checked. I've tested this on an Android phone but I see no reason it won't work elsewhere given the code for sending has not been changed. (Feel free to test on other devices.) Open KeepassXC and select an entry, right click and select "Copy password". This sets the MIME hint so it should be treated as a password, controlled by the "passwords" checkbox. I've toggled the settings multiple times on and off. Once "OK" is clicked, the next clipboard change should pick up the latest settings. I've only tested on Linux desktops (Arch Linux) since I do not own a Mac. I don't believe any OS X application sets `x-kde-passwordManagerHint` at all, so they may be controlled by "anything else".
2022-10-17 22:04:20 +01:00
)