[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-11-22 Thread Marco Silva
https://bugs.kde.org/show_bug.cgi?id=340225

Marco Silva  changed:

   What|Removed |Added

 CC||marco_silv...@sapo.pt

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-31 Thread Simon Andric
https://bugs.kde.org/show_bug.cgi?id=340225

Simon Andric  changed:

   What|Removed |Added

 CC||simonandr...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-29 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=340225

git...@chilon.net changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Latest Commit||http://commits.kde.org/kwin
   ||/0c4c529d6884c101cfe7aee055
   ||57f18dc86802e0
   Version Fixed In||5.8.4
 Resolution|--- |FIXED

--- Comment #27 from git...@chilon.net ---
Git commit 0c4c529d6884c101cfe7aee05557f18dc86802e0 by James Pike.
Committed on 30/10/2016 at 00:15.
Pushed by pikejames into branch 'Plasma/5.8'.

Support for KWin.registerShortcut() in declarative script

Summary:
registerShortcut is available to javascript KWin scripts but was not
available to those written in declarative script.
FIXED-IN: 5.8.4
REVIEW: 129250

M  +22   -0scripting/scripting.cpp
M  +2-0scripting/scripting.h

http://commits.kde.org/kwin/0c4c529d6884c101cfe7aee05557f18dc86802e0

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-25 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #26 from kdeb...@chilon.net ---
Created attachment 101782
  --> https://bugs.kde.org/attachment.cgi?id=101782=edit
Can be used to test registerShortcut in declarativescript, works with my latest
patcth which is currently in review

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-24 Thread Martin Gräßlin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #25 from Martin Gräßlin  ---
> if that would be okay?

yes of course. I also want to have the script API fixed. It was just an idea I
got for in addition.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-24 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #24 from kdeb...@chilon.net ---
Thanks for reviewing so quickly. Yes I'd considered adding a declarative method
but I'd like to get this bug sorted first so that the kwin-tiling guys can use
my work. I'll submit a future patch for a declarative version... if that would
be okay? First I want to work on plasmapkg2 removal of kwinscripts as without
this developing scripts is quite painful.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-23 Thread Martin Gräßlin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #23 from Martin Gräßlin  ---
An idea what could be done in addition. We could provide a declarative way to
export the shortcuts:
GlobalShortcut {
shortcut: "Ctrl+Alt+1"
onTriggered: console.log("triggered")
}

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-23 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #22 from kdeb...@chilon.net ---
Okay managed to get it working eventually... needed to manually remove a
plasmoid directory to get the script to refresh so I could see my logs. The
review is here: https://git.reviewboard.kde.org/r/129250/

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-23 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #21 from kdeb...@chilon.net ---
Got it running but can't find the `console.log` messages from my test script
anywhere so not sure if it is working. Guide online seems to be out of date,
found info on reddit on how to bring up the interactive console but don't see
anything logged.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-23 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #20 from kdeb...@chilon.net ---
Finished the code but trying to test the KDE I built but keep getting "All
shell packages missing. This is an installation issue, please contact your
distribution." I built plasmashell but maybe this isn't the "shell package" it
is looking for.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-23 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #19 from kdeb...@chilon.net ---
Yep, I added the shortcut registration to this class as a slot. I use the
QJSValue class to accept the callback and then use setObjectOwnership to keep
it alive in C++ world. I moved the stuff relating to shortcuts out of
AbstractScript and into Script. Then I wrote similar versions that use QJSValue
objects (instead of QScriptValue) objects in DeclarativeScript. Just testing it
now.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-23 Thread Martin Gräßlin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #18 from Martin Gräßlin  ---
Am 23. Oktober 2016 18:14:34 MESZ, schrieb via KDE Bugzilla
:
>https://bugs.kde.org/show_bug.cgi?id=340225
>
>--- Comment #17 from kdeb...@chilon.net ---
>I've written the code for it but the code necessary to handle calling a
>declarative js function from C++ seems a bit complicated. I'm trying to
>find
>another example in the KDE code so I can simplify this.

Have a look at JSEngineGlobalMethodsWrapper. Any slot in this class is exported
in the object KWin in declarative scripts. That's different to the normal
scripts, but iirc I introduced this class as a solution to the problem that we
cannot export method globally

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-23 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #17 from kdeb...@chilon.net ---
I've written the code for it but the code necessary to handle calling a
declarative js function from C++ seems a bit complicated. I'm trying to find
another example in the KDE code so I can simplify this.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-19 Thread Fabian Homborg via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #16 from Fabian Homborg  ---
>why does kwin-tiling need the declarative script? Does it do any user 
>interface? If not it should use the qscript based scripting where this is 
>still available.

Currently for Qt.include - the script is about 3000 lines total, and that's a
bit much for one file.

Adding a tiling-layout switcher is on my (distant) TODO, however.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-19 Thread Martin Gräßlin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #15 from Martin Gräßlin  ---
> we need this for kwin-tiling

why does kwin-tiling need the declarative script? Does it do any user
interface? If not it should use the qscript based scripting where this is still
available.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-19 Thread Martin Gräßlin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #14 from Martin Gräßlin  ---
if you have any specific questions please ask. I thought that this would be
sufficient as a starter.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-18 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

phyo.arkarl...@gmail.com changed:

   What|Removed |Added

 CC||phyo.arkarl...@gmail.com

--- Comment #12 from phyo.arkarl...@gmail.com ---
any progress on this ? we need this for kwin-tiling

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-13 Thread Martin Gräßlin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #11 from Martin Gräßlin  ---
the relevant code is in kwin/scripting/scripting.cpp

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-13 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #10 from kdeb...@chilon.net ---
A bunch of my code is already in KDE (from 7 years ago), pretty sure I could
handle this one.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-13 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

kdeb...@chilon.net changed:

   What|Removed |Added

 CC||kdeb...@chilon.net

--- Comment #9 from kdeb...@chilon.net ---
I really want to fix this myself, if a KDE dev could provide some brief
information on how to approach the solution for this (i.e. relevant source
files or changelog entries) that would be great.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-04 Thread Martin Gräßlin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

Martin Gräßlin  changed:

   What|Removed |Added

   Priority|NOR |VHI

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-10-01 Thread Rex Dieter via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

Rex Dieter  changed:

   What|Removed |Added

 CC||rdie...@math.unl.edu

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-09-21 Thread Fabian Homborg via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

Fabian Homborg  changed:

   What|Removed |Added

Version|5.1.0   |5.7.5

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-07-24 Thread bogdan via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

bogdan  changed:

   What|Removed |Added

 CC||bogdan.sinit...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-07-14 Thread Constantine via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

Constantine  changed:

   What|Removed |Added

 CC||hi-an...@yandex.ru

--- Comment #8 from Constantine  ---
It is pretty unfair. I wanted to go to KWin as everyone going to Wayland, but
that bug means that tiling script is broken, so I guess I have to stick either
to Sway, or to search whether gnome has tiling. It is very sad, everytime I try
to work with KDE, something wrong with it.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-05-18 Thread matejcik via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

matejcik  changed:

   What|Removed |Added

 CC||ja+...@matejcik.cz

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-05-11 Thread Martin Gräßlin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #7 from Martin Gräßlin  ---
(In reply to paul from comment #6)
> (In reply to Martin Gräßlin from comment #5)
> > sorry no, but I just added it on my todo list.
> 
> Is it still on the TODO list or already on "Done"? ; )

still on TODO list and that one is long, sorry

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-04-29 Thread paul via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

paul  changed:

   What|Removed |Added

 CC||panderpe...@mailbox.org

--- Comment #6 from paul  ---
(In reply to Martin Gräßlin from comment #5)
> sorry no, but I just added it on my todo list.

Is it still on the TODO list or already on "Done"? ; )

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-02-15 Thread Martin Gräßlin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #5 from Martin Gräßlin  ---
sorry no, but I just added it on my todo list.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 340225] registerShortcut is undefined in declarativescript

2016-02-15 Thread Piotr Dobrogost via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=340225

--- Comment #4 from Piotr Dobrogost  ---
(In reply to Martin Gräßlin from comment #2)
> 
> no it's a bug in scripting. The methods are only installed for QScriptEngine 
> which doesn't exist for QML any more.

Any news?

-- 
You are receiving this mail because:
You are watching all bug changes.