davidre (David Redondo)
User

Projects

User does not belong to any projects.

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Monday

  • Clear sailing ahead.

User Details

User Since
Nov 21 2018, 9:30 AM (21 w, 3 d)
Availability
Available

Recent Activity

Tue, Apr 16

davidre added a comment to D20598: [WIP] Port kcm energy info to kirigami 2, fix colors issues.

I haven't found a way to align Kirigami.FormLayout together in a repeater.

Maybe you could use twinFormLayouts like in D19873 and D19932?

Tue, Apr 16, 9:28 AM · Plasma

Fri, Apr 12

davidre added a comment to D19591: Add Compression Quality slider for lossy formats.

P370 (Warning may write many files)
All judging from file sizes:
JPG/JPEG: Quality has an effect
PIC: compression 0 disables compression (enabled by default?)
PNG: see above
TIF/TIFF: same as PIC
WEBP: only quality seems to have an effect

Fri, Apr 12, 1:10 PM · Spectacle
davidre created P370 (An Untitled Masterwork) in the S1 KDE Community space.
Fri, Apr 12, 1:04 PM

Thu, Apr 11

davidre added a comment to D19591: Add Compression Quality slider for lossy formats.

I looked into Qt and it actually uses compression. It just falls back to quality if compression is not set. See: https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/image/qpnghandler.cpp#n1075
I did a quick test P367 and it seems to work. The question now is do we want to special case this for png to not accidentally break another format (would be a quick fix) or to enable it for all formats that support it. In my opinion if we do the latter we should now do testing (maybe automated?) to not run into weird quality/compression interactions for other formats.
@nrother Do you want to fix it for 19.04.1?

Thu, Apr 11, 2:12 PM · Spectacle
davidre created P367 (An Untitled Masterwork) in the S1 KDE Community space.
Thu, Apr 11, 2:03 PM

Tue, Apr 9

davidre added a comment to T10636: Announcement text for the Applications 19.04 release.

Go for it!

Tue, Apr 9, 12:06 PM · KDE Promo, KDE Applications
davidre added a comment to T10636: Announcement text for the Applications 19.04 release.

Yeah seems fine.
One small nitpick, you could always tweak the template the new thing is that you don't have to manually type it but click on the available placeholders.
So

Save settings now shows you what the filename of a screenshot will look like. You can tweak the filename template to your preferences by clicking on the available placeholders in addition to typing them in.

?

Tue, Apr 9, 11:58 AM · KDE Promo, KDE Applications
davidre added a comment to T10636: Announcement text for the Applications 19.04 release.

It means that the %Y, %H, .. are now clickable.
I think the original text was from @ngraham. But maybe we could so something like

Tue, Apr 9, 10:06 AM · KDE Promo, KDE Applications
davidre added a comment to T10636: Announcement text for the Applications 19.04 release.

I'v changed it in https://notes.kde.org/p/Applications_19.04_-_Announcement

Tue, Apr 9, 9:42 AM · KDE Promo, KDE Applications
davidre added a comment to T10636: Announcement text for the Applications 19.04 release.

@paulb I added a new feature of Spectacle to the list and updated the corresponding screenshot. You should see it based on the different color.

Tue, Apr 9, 9:28 AM · KDE Promo, KDE Applications

Fri, Apr 5

davidre added a comment to T9223: Notifications backend rewrite.

@meven I think Kai already implemented that in D20266

Fri, Apr 5, 5:26 PM · Plasma

Wed, Apr 3

davidre added a comment to D19310: [WIP] Port to KGlobalAccel.

Broken Editor:

Wed, Apr 3, 2:35 PM · Spectacle
davidre updated the diff for D19310: [WIP] Port to KGlobalAccel.
  • remove setup shortcuts
Wed, Apr 3, 2:34 PM · Spectacle
davidre added a comment to D19310: [WIP] Port to KGlobalAccel.

@davidedmundson is /usr/share/kglobalaccel the correct folder?

yes.

@davidre can you put this back to being broken so we know what to fix.

Wed, Apr 3, 2:05 PM · Spectacle
davidre added a comment to D19591: Add Compression Quality slider for lossy formats.

It seems for the png implementation setQuality also sets the Compression instead of setCompression:
https://bugreports.qt.io/browse/QTBUG-43618

Well that explains it. Unfortunately it seems like the Qt devs don't plan on fixing so I guess it's on us?
Two options that make sense to me here is check if format is png and then either set a sane default value for compression
or take the current quality value and invert it so that higher values for compression quality mean higher png compression.
So setting compression quality to e.g 100 in the UI results in quality being set to 0 for the ImageWriter so that the resulting
image is compressed at level 9 (so the highest level for png).

Wed, Apr 3, 11:08 AM · Spectacle
davidre added a comment to D19591: Add Compression Quality slider for lossy formats.

It seems for the png implementation setQuality also sets the Compression instead of setCompression:
https://bugreports.qt.io/browse/QTBUG-43618

Wed, Apr 3, 10:35 AM · Spectacle

Tue, Apr 2

davidre added a comment to D19715: Add option to copy screenshot to clipboard in background mode.

Oooh, yeah that's a bug. I guess we should always add x-kde-force-image-copy to the metadata of a copied screenshot? Wanna do that on the Applications/19.04 branch?

That's where my confusion here and in D20180 is coming from. Isn't it always added unconditionally in ExportManager::doCopyToClipboard? And both the button regardless of quit after copy and spectacle -b -c go through that. Or am I missing a place where copying is done?

Tue, Apr 2, 6:00 PM · Spectacle
davidre added a comment to D20180: [RFC] Make notifications responsibility of SpectacleCore.

You're right. There seems to be some magic involved. If I wait 250 ms and directly quit like KSMainWindow did it works. Testing master I also found that spectacle -b -c does not work and if you copy to the clipboard and then exit manually the image doesn't appear Klipper.
Now to figure out the reason

Tue, Apr 2, 7:49 AM · Spectacle
davidre added a comment to D19715: Add option to copy screenshot to clipboard in background mode.

Testing master using quit after copy works but doing spectacle -b -c does not. Can you confirm?

Tue, Apr 2, 7:44 AM · Spectacle

Mon, Apr 1

davidre edited reviewers for D20180: [RFC] Make notifications responsibility of SpectacleCore, added: Spectacle; removed: VDG.
Mon, Apr 1, 5:38 PM · Spectacle
davidre requested review of D20180: [RFC] Make notifications responsibility of SpectacleCore.
Mon, Apr 1, 5:37 PM · Spectacle
davidre updated the diff for D19687: Allow single images to be excluded from the slideshow.
  • Change default of cfg_UncheckedSlides to []
  • Change toggled to checked
Mon, Apr 1, 8:01 AM · Plasma

Fri, Mar 29

davidre added a comment to D19687: Allow single images to be excluded from the slideshow.

almost weekly ping

Fri, Mar 29, 10:47 AM · Plasma

Sun, Mar 24

davidre added a comment to T10636: Announcement text for the Applications 19.04 release.

@paulb I added a new feature of Spectacle to the list and updated the corresponding screenshot. You should see it based on the different color.

Sun, Mar 24, 10:57 PM · KDE Promo, KDE Applications

Sat, Mar 23

davidre added a comment to D19687: Allow single images to be excluded from the slideshow.

Ping!

Sat, Mar 23, 10:44 PM · Plasma
davidre updated the diff for D19969: Add some tests for ExportManager::formatFilename.
  • Add some more test cases
Sat, Mar 23, 7:44 PM · Spectacle

Fri, Mar 22

davidre added a reviewer for D19969: Add some tests for ExportManager::formatFilename: Spectacle.
Fri, Mar 22, 11:33 AM · Spectacle
davidre requested review of D19969: Add some tests for ExportManager::formatFilename.
Fri, Mar 22, 11:29 AM · Spectacle
davidre added a comment to D19968: Change i18n of filename formatting options.

@aspotashev does this work, too?

Fri, Mar 22, 8:38 AM · Spectacle
davidre added reviewers for D19968: Change i18n of filename formatting options: Spectacle, aspotashev, Localization, aacid.
Fri, Mar 22, 8:37 AM · Spectacle
davidre requested review of D19968: Change i18n of filename formatting options.
Fri, Mar 22, 8:35 AM · Spectacle

Mar 21 2019

davidre added a comment to D19873: [image-wallpaper] Port to Kirigami.FormLayout and use twinFormLayouts.

Great! I see that also fixes the issue that the label vanished when the window got to narrow.

Mar 21 2019, 9:00 AM · Plasma
davidre added a comment to D19914: Fix i18n in "Save" section of configuration dialog.

Using a KLocalizedString (i.e. ki18nc) seems like would be easier and less fragile since you wouldn't need to duplicate the context

I read the documentation of ki18n now. This means we would have a QMap<QString, KLocalizedString>{{"...", ki18nc(...)},..} and do arg(option.key(), option.value().toString()) now, right?

Mar 21 2019, 8:56 AM · Spectacle

Mar 20 2019

davidre added a comment to D19914: Fix i18n in "Save" section of configuration dialog.

Thank you for the explanation!

Mar 20 2019, 2:49 PM · Spectacle
davidre added a comment to D19914: Fix i18n in "Save" section of configuration dialog.

Sorry, this was caused by a change from me. Could you please explain what I did wrong so I can avoid it in the future? Also why is the duplicate context in SaveOptionsPage needed? Does the context in ExportManager.cpp not suffice?

Mar 20 2019, 2:08 PM · Spectacle

Mar 19 2019

davidre added a comment to D19873: [image-wallpaper] Port to Kirigami.FormLayout and use twinFormLayouts.

It seems it was changed in this commit to explicitly use Kirigami units: 98d9f681a37e2ac2feb6bf5cb5e8a54f4c7e874e
Was the Color wallpaper forgotten or did this reason not apply to it? Should we revert it?

Mar 19 2019, 5:17 PM · Plasma
davidre added a comment to D19873: [image-wallpaper] Port to Kirigami.FormLayout and use twinFormLayouts.

Mhm if I change it to use units like Color instead of Kirigami units it seems aligned properly:

Mar 19 2019, 5:02 PM · Plasma
davidre added a comment to D19873: [image-wallpaper] Port to Kirigami.FormLayout and use twinFormLayouts.

Maybe it would be worth it to check out how the other wallpaper plugins that don't suffer from this issue align their controls ?
potd:

color:

Color seems to do:

Mar 19 2019, 4:56 PM · Plasma

Mar 18 2019

davidre updated the diff for D19775: Show preview of the filename in the save settings.
  • Remove space
Mar 18 2019, 8:56 AM · Spectacle

Mar 17 2019

davidre updated the diff for D19775: Show preview of the filename in the save settings.
  • Fix indentation
Mar 17 2019, 6:45 PM · Spectacle
davidre updated the test plan for D19814: Fix bug in filename template parser.
Mar 17 2019, 7:31 AM · Spectacle
davidre requested review of D19814: Fix bug in filename template parser.
Mar 17 2019, 7:28 AM · Spectacle
davidre updated the test plan for D19775: Show preview of the filename in the save settings.
Mar 17 2019, 7:10 AM · Spectacle
davidre updated the diff for D19775: Show preview of the filename in the save settings.
  • Use form layout for filename preview
Mar 17 2019, 7:10 AM · Spectacle

Mar 16 2019

davidre updated the test plan for D19775: Show preview of the filename in the save settings.
Mar 16 2019, 8:25 PM · Spectacle
davidre updated the diff for D19775: Show preview of the filename in the save settings.
  • Drop explicit mention of 'Filename' in Label
Mar 16 2019, 8:24 PM · Spectacle
davidre added a comment to D19775: Show preview of the filename in the save settings.

I'm thinking of dropping the "Filename" now and just having "Preview:". For comparison:

Mar 16 2019, 5:24 PM · Spectacle
davidre updated the test plan for D19775: Show preview of the filename in the save settings.
Mar 16 2019, 5:23 PM · Spectacle
davidre updated the diff for D19775: Show preview of the filename in the save settings.
  • Move preview up
Mar 16 2019, 5:22 PM · Spectacle
davidre added a comment to D19687: Allow single images to be excluded from the slideshow.

UI looks good now. I've done some code review below:

Thanks for the heads-up! I was orienting myself on the Code around.

Mar 16 2019, 11:42 AM · Plasma
davidre updated the diff for D19687: Allow single images to be excluded from the slideshow.
  • Use range-based for
Mar 16 2019, 11:41 AM · Plasma
davidre updated the test plan for D19775: Show preview of the filename in the save settings.
Mar 16 2019, 11:31 AM · Spectacle
davidre updated the diff for D19775: Show preview of the filename in the save settings.
  • Show preview in typewriter font
Mar 16 2019, 11:30 AM · Spectacle
davidre updated the summary of D19775: Show preview of the filename in the save settings.
Mar 16 2019, 11:24 AM · Spectacle

Mar 15 2019

davidre added a comment to T10615: Help create a good website for KDE Connect.

I don't like the content moving relative to the background while I'm scrolling. Feels weird to me. The same for the background moving in the direction I'm scrolling feels like it's fighting me.

Mar 15 2019, 10:14 AM · KDE Connect

Mar 14 2019

davidre added a reviewer for D19775: Show preview of the filename in the save settings: VDG.
Mar 14 2019, 11:46 PM · Spectacle
davidre updated the test plan for D19775: Show preview of the filename in the save settings.
Mar 14 2019, 11:46 PM · Spectacle
davidre requested review of D19775: Show preview of the filename in the save settings.
Mar 14 2019, 11:45 PM · Spectacle
davidre updated the diff for D19755: Make the filename placeholders clickable.
  • Minute
Mar 14 2019, 5:29 PM · Spectacle
davidre updated the diff for D19755: Make the filename placeholders clickable.
  • Add missing space
Mar 14 2019, 5:22 PM · Spectacle
davidre updated the diff for D19755: Make the filename placeholders clickable.

Don' use bullet list, go back to blockquote approach

Mar 14 2019, 3:29 PM · Spectacle
davidre added a comment to D19755: Make the filename placeholders clickable.

Will do. I just copied the bullet list from the Gwenview importer ;D

Mar 14 2019, 3:03 PM · Spectacle
davidre updated the summary of D19755: Make the filename placeholders clickable.
Mar 14 2019, 11:09 AM · Spectacle
davidre requested review of D19755: Make the filename placeholders clickable.
Mar 14 2019, 10:49 AM · Spectacle
davidre updated the diff for D19687: Allow single images to be excluded from the slideshow.

Change email address

Mar 14 2019, 10:24 AM · Plasma

Mar 13 2019

davidre added a comment to D19715: Add option to copy screenshot to clipboard in background mode.

Code structure wise I would prefer to decouple doing the notification from the ExportManager meaning emitting a signal copiedToClipboard and then connecting it to doNotify like done above. But then I saw doSave has also this parameter and emits forceNotify (although I found only one place where this is set to true). So we have mutliple ways we trigger a notifiacation: Emitting forceNotify() from the ExportManager and connecting the imageSaved signal to doNotify. I already stated my preference but can also see the argument for this being the responsibility of the ExportManager (but then I would also argue that the doNotify method should be moved). In my opinion having only one place being responsible makes the code clearer.
Anyways sorry for the ramble. I guess if I find the time I will submit a refactoring diff.

Mar 13 2019, 2:18 PM · Spectacle
davidre added a comment to D19715: Add option to copy screenshot to clipboard in background mode.

It seems we were to fast in testing. I guess I tried copying somewhere while the notification was still displaying.

Mar 13 2019, 2:00 PM · Spectacle
davidre added a comment to D19715: Add option to copy screenshot to clipboard in background mode.

Shouldn't this work as it uses the same function as the "Copy to clipboard" button or am I missing something?

Mar 13 2019, 1:55 PM · Spectacle
davidre added a comment to D19715: Add option to copy screenshot to clipboard in background mode.

I have trouble applying your patch. Could you please diff against master and not your last diff? You can also so use arc to post patches to Phabricator. Doing so also makes context available in phabricator. Being able to expand the file makes reviewing the changes much easier. Thanks!
https://community.kde.org/Infrastructure/Phabricator#Using_Arcanist_to_post_patches

Mar 13 2019, 1:19 PM · Spectacle

Mar 12 2019

davidre added inline comments to D19715: Add option to copy screenshot to clipboard in background mode.
Mar 12 2019, 11:22 PM · Spectacle
davidre added a comment to D19715: Add option to copy screenshot to clipboard in background mode.

I understand what you're saying, but in the code I added there's nothing stopping the

if (!mNotify) {
    emit allDone();
}

code from running, as far as I can tell. Correct me if I'm wrong.

No, you're right the code still runs. The issue is that notify is true per default if not run with --nonotify.

As for the -b flag, I followed the way it's set up for the -n, -o and -d flags. If you'd still like to use one of the two options you specified, tell me which one and I'll update the code.

I see, I'm not using Spectacle from the shell and just added my thoughts on what would be clear behavior for the user. But if the other options already work like this then it's fine for me.

Mar 12 2019, 11:12 PM · Spectacle
davidre added a comment to D19715: Add option to copy screenshot to clipboard in background mode.

This only works if -b is also specified otherwise it is ignored. I could see 2 possible options to this instead of ignoring it. Either implicitly setting backgroundMode when -c is specified or copying the automatically taken screenshot at application launch to the clipboard.

Mar 12 2019, 8:47 PM · Spectacle
davidre added a comment to D19715: Add option to copy screenshot to clipboard in background mode.

If you follow the chain what happens in background mode if mNotify is set or not you can see that SpectacleCore emits allDone() at the end of both. Because you never emit that signal, spectacle doesn't quit.

Mar 12 2019, 8:19 PM · Spectacle
davidre added a comment to D19687: Allow single images to be excluded from the slideshow.

One thing that might work is the behavior that google photos uses. When you select an item, the item shrinks by about 20% and a blue selection box appears around the image. It just makes it more noticeable that the item has been selected.

Since all items are selected by default here, I'm not sure that behavior would be the most appropriate.

Oh I thought it was a selection. Could the checkbox be located at a top corner sticking out a bit?

Mar 12 2019, 3:19 PM · Plasma

Mar 11 2019

davidre added a comment to D19687: Allow single images to be excluded from the slideshow.

Also, this has nothing to do with your patch specifically, but seeing so many checkesd checkboxes in the slideshow's preview pane makes me realize just how much I want the Breeze style checkbox to actually look like a checkbox, with a checkmark instead of just a filled in roundrect.

Yeah also not a fan of that. I had the idea to give it maybe a small grey rectangle like the action icons as the empty checkboxes or the blue blob can be hard to spot. See the empty checkbox in the last row or the checkbox on Cascade in the screenshot.

Mar 11 2019, 11:13 PM · Plasma
davidre added a comment to D19687: Allow single images to be excluded from the slideshow.

How would the folders on the folder list on the left be removed as sources?

In D18809 I changedthe ListItems to Kirigami SwipeListItems. This changed the remove icon from always visible to visible on hover

Mar 11 2019, 11:08 PM · Plasma
davidre updated the diff for D19687: Allow single images to be excluded from the slideshow.

Set checked to false if checkboxes are not visible

Mar 11 2019, 11:01 PM · Plasma
davidre updated the diff for D19687: Allow single images to be excluded from the slideshow.

Sorry for that. Actually these warnings were the reason why the checkboxes were visible everywhere. Even if the checkboxes are not visible I got these warnings. In an attempt to get rid of them I tried enabled.

Mar 11 2019, 10:58 PM · Plasma
davidre updated the diff for D19687: Allow single images to be excluded from the slideshow.
  • Remove debug statement
Mar 11 2019, 4:16 PM · Plasma
davidre updated the test plan for D19687: Allow single images to be excluded from the slideshow.
Mar 11 2019, 4:15 PM · Plasma
davidre planned changes to D19687: Allow single images to be excluded from the slideshow.
Mar 11 2019, 4:08 PM · Plasma
davidre requested review of D19687: Allow single images to be excluded from the slideshow.
Mar 11 2019, 4:05 PM · Plasma

Mar 9 2019

davidre updated the diff for D18809: Image Wallpaper Slideshow - display the list of images that will be shown.

const &file

Mar 9 2019, 2:25 PM · Plasma

Mar 7 2019

davidre accepted D19591: Add Compression Quality slider for lossy formats.
Mar 7 2019, 7:44 PM · Spectacle
davidre added a comment to D19591: Add Compression Quality slider for lossy formats.

Looks good to me!

Mar 7 2019, 7:44 PM · Spectacle
davidre added inline comments to D19591: Add Compression Quality slider for lossy formats.
Mar 7 2019, 7:27 PM · Spectacle
davidre added a comment to D19591: Add Compression Quality slider for lossy formats.

@davidre, would you like to do the code review part?

As stated before I would make the label a local variable and remove the update method and connect directly.
With a lambda you would have

connect(mQualitySlider, &QSlider::valueChanged,  [=](int value){
    mQualityValue->setNum(value);
    markDirty();
});

Because we're using only pointers (mQualityValue and implicitly this) from the outer context inside the lambda capturing by value is ok.
Or you could simply connect the signal to two slots. Sadly we need an ugly cast* because setNum is overloaded.

connect(mQualitySlider, &QSlider::valueChanged, this, &SaveOptionsPage::markDirty);
connect(mQualitySlider, &QSlider::valueChanged, mQualityValue, static_cast<void (QLabel::*)(int)>(&QLabel::setNum));

Both options are used already in Spectacle so choose the one that you prefer.
*Qt has qOverload<T>(&function) as a replacement for the ugly static cast but that requires C++14. For C++ 11 you can use instead QOverload<int>::of(&function)
https://doc.qt.io/qt-5/qtglobal.html#qOverload

Mar 7 2019, 6:24 PM · Spectacle
davidre added a comment to D19591: Add Compression Quality slider for lossy formats.

I think I prefer the version the with the spacer.

Mar 7 2019, 4:07 PM · Spectacle
davidre added a comment to D19591: Add Compression Quality slider for lossy formats.

Something like this (quick copy & paste job):

Mar 7 2019, 3:48 PM · Spectacle
davidre added a comment to D19591: Add Compression Quality slider for lossy formats.

I think the slider looks a bit disconnected to the file format maybe putting it below the Filename and format would work.

I'm not sure I understand where exactly you mean? I feel the current position makes sense because the other two fields are both
related to WHERE the file is saved, whereas this new option is about HOW this file is saved, so it should be separate from those two.

The current layout just feels weird (cramped?) to me with the slider below the wall of very technical text. I just had the idea maybe we could seperate the filename and format. Because the current label is only Filename and have a seperate row for the format with Label "Default image format" and below the slider. What do you think of this idea?

Also the slider should only be usable if the selected format is not lossy in my opinion. But I don't know if it is possible to query if the selected format is lossy.

I disagree, even if you select PNG in the Settings page, you can still save JPEGs by changing the file format in the "Save As" dialogue. It would be confusing if you
can't change the slider setting because of the dropdown setting, when the slider setting still has an effect.

Ah I didn't think of that that makes sense.

Mar 7 2019, 3:41 PM · Spectacle
davidre added a comment to D19591: Add Compression Quality slider for lossy formats.

I think the slider looks a bit disconnected to the file format maybe putting it below the Filename and format would work. Also the slider should only be usable if the selected format is not lossy in my opinion. But I don't know if it is possible to query if the selected format is lossy.

Mar 7 2019, 3:00 PM · Spectacle
davidre added a comment to D19310: [WIP] Port to KGlobalAccel.

I went looking for the difference what happens with and without Autoloading. With Autoloading we end up in this case:
https://cgit.kde.org/kglobalaccel.git/tree/src/runtime/kglobalacceld.cpp#n531
Apparently the shortcut is not fresh

Mar 7 2019, 2:39 PM · Spectacle

Mar 6 2019

davidre updated the task description for T10574: Make shortcuts consistent.
Mar 6 2019, 12:27 PM · Spectacle
davidre added a comment to T10574: Make shortcuts consistent.

Personally I think it would make sense to have the same shortcut for copy and non-copy with an additional modifier.
Also I am a fan of Meta + Print for taking a screenshot of the active window as it maps to the windows key on my laptop which is a great metaphor.

Mar 6 2019, 11:22 AM · Spectacle
davidre triaged T10574: Make shortcuts consistent as Normal priority.
Mar 6 2019, 11:19 AM · Spectacle
davidre updated the diff for D19310: [WIP] Port to KGlobalAccel.
  • Defaults in desktop file and symlink it to kglobalaccel also use NOAutoloading
  • Install update files

The calls to KGlobalaccel are still needed. Removing them from the updatescript caused the user specified shortcuts to be the default shortcuts.
And removing them from Spectacle broke the Editor. NoAutoloading is needed that the shortcuts are correctly set when the desktop file is installed.

Mar 6 2019, 10:50 AM · Spectacle
davidre added a comment to D19310: [WIP] Port to KGlobalAccel.

To clarify what works:
Only installing the desktop file in a running session (User installs Spectacle) doesn't work without additional registering of shortcuts.

Mar 6 2019, 10:22 AM · Spectacle
davidre added a comment to D19310: [WIP] Port to KGlobalAccel.

Maybe I should move this to a phab task, but I've done some looking:

Currently kglobalaccel searches

const QStringList desktopPaths = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("kglobalaccel"), QStandardPaths::LocateDirectory);

So our first step from spectacle POV is we need to copy/symlink our main .desktop file there.

This second directory is so that kglobalaccel doesn't have to search through all application .desktop files on startup. Kinda makes sense.
The KCM looks like it needs some code to handle this case correctly. It's weirdly copying the file

This will put the entries in the KCM/globalaccel without the user having to manually add it.

As for the default shortcut

We want in our .desktop file

[Desktop Action FullScreenScreenShot]
Name=Capture Entire Desktop
X-KDE-Shortcuts=Control+P <--- new entry

This is loaded by frameworks/kserviceactioncomponent.cpp though I don't know if it works.
(it definitely has a bug that it doesn't read X-KDE-Shortcuts for the default action)

Mar 6 2019, 9:40 AM · Spectacle

Mar 5 2019

davidre added a comment to D9117: Add shortcuts for copying screenshots to clipboard.

Yes I think this would be a good and practical feature to have.

Mar 5 2019, 4:11 PM · Spectacle

Mar 4 2019

davidre added a comment to D19310: [WIP] Port to KGlobalAccel.

On the positive side if Spectacle is run the jump list actions get added to the Global Shortcuts list.

\o/
I think it shows the concept works.

I think this never really worked only because I added the desktop file before manually. If I create a new user and run spectacle the shourtcuts get added but they do nothing

Mar 4 2019, 2:52 PM · Spectacle