From kde-panel-devel Fri Apr 29 09:42:43 2016 From: Marco Martin Date: Fri, 29 Apr 2016 09:42:43 +0000 To: kde-panel-devel Subject: Re: Review Request 125648: Add method to run a script from DBus directly Message-Id: <20160429094243.8442.95847 () mimi ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=146192297525080 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============5250901370367487001==" --===============5250901370367487001== Content-Type: multipart/alternative; boundary="===============8483853669565888298==" --===============8483853669565888298== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/125648/#review95005 ----------------------------------------------------------- Ship it! last change i would like is to not run the script if widgets are locked - Marco Martin On Oct. 15, 2015, 5:22 p.m., David Edmundson wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/125648/ > ----------------------------------------------------------- > > (Updated Oct. 15, 2015, 5:22 p.m.) > > > Review request for Plasma. > > > Repository: plasma-workspace > > > Description > ------- > > loadScriptInInteractiveConsole requires user interaction which blocks > some purposes, like setting the desktop background from an app. > > This runs a given script directly from a passed string without any prompts. > > > CCBUG: 217950 > > --- > > Questions: > > I also toyed with returning the value of a script as a QDBusVariant, thoughts? > > Should I not run if widgets are locked? > > > Diffs > ----- > > shell/dbus/org.kde.PlasmaShell.xml cf2d0bbfcdb5720bf19d42403ee8c7fd542adecd > shell/shellcorona.h 0e6fe041787b2f75d791b38661b63614e27d33bf > shell/shellcorona.cpp 37d05347d67b7178db4d29a1ac368aacaacf0c0a > > Diff: https://git.reviewboard.kde.org/r/125648/diff/ > > > Testing > ------- > > Ran this: > var allDesktops = desktops(); > print (allDesktops); > > for (i=0;i d = allDesktops[i]; > d.wallpaperPlugin = "org.kde.image"; > d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General"); > d.writeConfig("Image", "file:///home/david/pictures/Wallpapers/northern_lights-wide.jpg") > } > > > also ran some with errors, that behaved as expected too. > > > Thanks, > > David Edmundson > > --===============8483853669565888298== MIME-Version: 1.0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit
This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/125648/

Ship it!

last change i would like is to not run the script if widgets are locked


- Marco Martin


On October 15th, 2015, 5:22 p.m. UTC, David Edmundson wrote:

Review request for Plasma.
By David Edmundson.

Updated Oct. 15, 2015, 5:22 p.m.

Repository: plasma-workspace

Description

loadScriptInInteractiveConsole requires user interaction which blocks some purposes, like setting the desktop background from an app.

This runs a given script directly from a passed string without any prompts.

CCBUG: 217950


Questions:

I also toyed with returning the value of a script as a QDBusVariant, thoughts?

Should I not run if widgets are locked?

Testing

Ran this: var allDesktops = desktops(); print (allDesktops);

for (i=0;i<allDesktops.length;i++) { d = allDesktops[i]; d.wallpaperPlugin = "org.kde.image"; d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General"); d.writeConfig("Image", "file:///home/david/pictures/Wallpapers/northern_lights-wide.jpg") }

also ran some with errors, that behaved as expected too.

Diffs

  • shell/dbus/org.kde.PlasmaShell.xml (cf2d0bbfcdb5720bf19d42403ee8c7fd542adecd)
  • shell/shellcorona.h (0e6fe041787b2f75d791b38661b63614e27d33bf)
  • shell/shellcorona.cpp (37d05347d67b7178db4d29a1ac368aacaacf0c0a)

View Diff

--===============8483853669565888298==-- --===============5250901370367487001== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KUGxhc21hLWRl dmVsIG1haWxpbmcgbGlzdApQbGFzbWEtZGV2ZWxAa2RlLm9yZwpodHRwczovL21haWwua2RlLm9y Zy9tYWlsbWFuL2xpc3RpbmZvL3BsYXNtYS1kZXZlbAo= --===============5250901370367487001==--