D12896: Add Telegram plugin

2018-05-23 Thread Nicolas Fella
This revision was automatically updated to reflect the committed changes. Closed by commit R495:6f74cbb9659f: Add Telegram plugin (authored by nicolasfella). REPOSITORY R495 Purpose Library CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D12896?vs=34737&id=34750 REVISION DETAIL http

D12896: Add Telegram plugin

2018-05-23 Thread Aleix Pol Gonzalez
apol accepted this revision. apol added a comment. This revision is now accepted and ready to land. Okay, let's land this and I'll try to fix it myself. REPOSITORY R495 Purpose Library BRANCH master REVISION DETAIL https://phabricator.kde.org/D12896 To: nicolasfella, apol Cc: ngraham,

D12896: Add Telegram plugin

2018-05-23 Thread Nicolas Fella
nicolasfella updated this revision to Diff 34737. nicolasfella added a comment. : - Hardcode commands and try until success REPOSITORY R495 Purpose Library CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D12896?vs=34213&id=34737 BRANCH master REVISION DETAIL https://phabricat

D12896: Add Telegram plugin

2018-05-23 Thread Nicolas Fella
nicolasfella added a comment. I played around a bit and it turns out more difficult than expected. - telegram-desktop-bin from AUR has telegramdesktop.desktop whereas the Flatpak version has org.telegram.desktop.desktop, so we would need to look for at least those desktop files - the f

D12896: Add Telegram plugin

2018-05-23 Thread Aleix Pol Gonzalez
apol added a comment. In D12896#267091 , @nicolasfella wrote: > In D12896#266713 , @apol wrote: > > > Then just read the Exec field and we'll add the sendpath by hand. This is ad-hoc for telegram an

D12896: Add Telegram plugin

2018-05-23 Thread Nicolas Fella
nicolasfella added a comment. In D12896#266713 , @apol wrote: > Then just read the Exec field and we'll add the sendpath by hand. This is ad-hoc for telegram anyway. I'm not quite sure what to do. Best I came up with is something like

D12896: Add Telegram plugin

2018-05-22 Thread Aleix Pol Gonzalez
apol added a comment. In D12896#266351 , @nicolasfella wrote: > I've played around with flatpaked Telegram and made it working. However: > My Telegram.desktop file executes this: > /usr/bin/flatpak run --branch=stable --arch=x86_64 --comma

D12896: Add Telegram plugin

2018-05-22 Thread Nicolas Fella
nicolasfella added a comment. I've played around with flatpaked Telegram and made it working. However: My Telegram.desktop file executes this: /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=telegram-desktop --file-forwarding org.telegram.desktop -- @@u %u @@ I can share a f

D12896: Add Telegram plugin

2018-05-21 Thread Aleix Pol Gonzalez
apol added a comment. In D12896#265606 , @nicolasfella wrote: > Can this even work with Telegram installed as sandboxed Flatpak? If we use the desktop file, yes. :) REPOSITORY R495 Purpose Library REVISION DETAIL https://phabricator

D12896: Add Telegram plugin

2018-05-20 Thread Nicolas Fella
nicolasfella added a comment. Can this even work with Telegram installed as sandboxed Flatpak? REPOSITORY R495 Purpose Library REVISION DETAIL https://phabricator.kde.org/D12896 To: nicolasfella, apol Cc: ngraham, kde-frameworks-devel, apol, michaelh, bruns

D12896: Add Telegram plugin

2018-05-15 Thread Aleix Pol Gonzalez
apol added inline comments. INLINE COMMENTS > nicolasfella wrote in telegramplugin.cpp:61 > How would I do that? https://api.kde.org/frameworks/kio/html/classKIO_1_1DesktopExecParser.html https://cgit.kde.org/discover.git/tree/libdiscover/backends/PackageKitBackend/runservice/main.cpp?h=Plasma/5

D12896: Add Telegram plugin

2018-05-15 Thread Nicolas Fella
nicolasfella added inline comments. INLINE COMMENTS > apol wrote in telegramplugin.cpp:61 > Instead of finding the program, we could execute using > `org.telegram.desktop.desktop`, it would allow it to work even if it's > installed from appimage/flatpak. > > I'm not sure how this would work wi

D12896: Add Telegram plugin

2018-05-15 Thread Nicolas Fella
nicolasfella marked 2 inline comments as done. REPOSITORY R495 Purpose Library REVISION DETAIL https://phabricator.kde.org/D12896 To: nicolasfella, apol Cc: ngraham, kde-frameworks-devel, apol, michaelh, bruns

D12896: Add Telegram plugin

2018-05-15 Thread Nicolas Fella
nicolasfella updated this revision to Diff 34213. nicolasfella added a comment. - Use url.toLocalfile() REPOSITORY R495 Purpose Library CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D12896?vs=34200&id=34213 BRANCH master REVISION DETAIL https://phabricator.kde.org/D12896 AF

D12896: Add Telegram plugin

2018-05-15 Thread Aleix Pol Gonzalez
apol added inline comments. INLINE COMMENTS > telegramplugin.cpp:53 > +foreach(const QJsonValue& val, array) { > +ret += toPath(val.toString()); > +} toUrl().toLocalFile(). Also I would Check if(url.isLocalFile()). > telegramplugin.cpp:61 > +

D12896: Add Telegram plugin

2018-05-15 Thread Nathaniel Graham
ngraham added a comment. If it's 99% identical except for the name and command, would it make more sense to create a generic "send to app/service" plugin that you can feed different executables into? Then we could even expose that configuration in the UI somewhere to allow people to easily d

D12896: Add Telegram plugin

2018-05-15 Thread Nicolas Fella
nicolasfella created this revision. nicolasfella added a reviewer: apol. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: kde-frameworks-devel. nicolasfella requested review of this revision. REVISION SUMMARY Add a "Share via Telegram plugin". It's a