Write to AppletGlobals in plasma-desktop-appletsrc with Javascript
Aaron J. Seigo
aseigo at kde.org
Sun Apr 25 23:18:22 CEST 2010
On April 25, 2010, Antony Loebs wrote:
> On Sun, Apr 25, 2010 at 3:08 PM, Aaron J. Seigo <aseigo at kde.org> wrote:
> > currently there isn't any way to do this in 4.4. in 4.5 you will be able
> >
> > to use read/writeGlobalConfig to do so.
> >
> > in any case, the # of rows of the pager is being moved to the window
> > manager where it really belongs (to follow the internal layout of virtual
> > desktops / viewports according to the WM), so even in this case it
> > probably won't work for very much longer.
>
> Pity. Would it be possible to brute-force it some other way? For example,
> at the beginning of the script, to do something like:
> ---
> var fh = fopen("~/.kde/share/config/plasma-desktop-appletsrc", 3)
> fwrite(fh, "[AppletGlobals][plasma_applet_pager]\nrows=1");
> fclose(fh);
> ---
> (This doesn't work, btw, since plasma-desktop complains about fopen, but
> it's just to make my meaning clear.)
the scripting API does not allow opening of random files. all the access goes
through existing plasma API to ensure that it's always correct and in sync
with what the plasma based application expects. one of the requirements of the
scripting API is that it produces results that work, and so there are some
constraints such as this one.
> Also, on a somewhat related note, I've discovered that some applets start
> too quickly. :)
it's not that they are starting too quickly, it's that they haven't
implemented Plasmsa::Applet::configChanged(). we've gone through and fixed the
ones in svn for 4.5 (with a few outstanding ones left, e.g. folderview.. but
those will also get done..)
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100425/a3fe35ce/attachment.htm
More information about the Plasma-devel
mailing list