[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Write to AppletGlobals in plasma-desktop-appletsrc with
From: Antony Loebs <barefootedjournalist () gmail ! com>
Date: 2010-04-25 19:56:51
Message-ID: u2l469a3d631004251256x728a5920w280249d658bd9751 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Sun, Apr 25, 2010 at 3:08 PM, Aaron J. Seigo <aseigo@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.)
Also, on a somewhat related note, I've discovered that some applets start
too quickly. :) For example, take the example of the quicklaunch applet. In
the script, I have:
---
qlaunch = panel.addWidget("quicklaunch");
qlaunch.writeConfig("iconSize", "24");
qlaunch.writeConfig("iconUrls",
"file:///usr/share/applications/firefox.desktop");
---
However, when quicklaunch starts, it displays the default Konqueror,
Dolphin, and Kopete icons at size 16. If I go back and insert the lines into
plasma-desktop-appletsrc, it works. Additionally, for some applets
(Lancelot, yaWP), I don't have to even edit anything; if I just restart
plasma-desktop, they then display correctly. From this I conclude that it's
a matter of the applets trying to read the configuration file before their
configurations are written. Any suggestions on how to overcome this; perhaps
a way to write the configuration first, and then start the applet?
Thanks!
[Attachment #5 (text/html)]
<div class="gmail_quote">On Sun, Apr 25, 2010 at 3:08 PM, Aaron J. Seigo <span \
dir="ltr"><<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>></span> \
wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; \
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div style="font-family: 'Bitstream Vera Sans'; font-size: 12pt; font-weight: \
400; font-style: normal;"><div class="im"><p style="margin: 0px; text-indent: \
0px;"></p> </div><p style="margin: 0px; text-indent: 0px;">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.</p> <p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">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.</p> </div></blockquote><div><br>Pity. \
Would it be possible to brute-force it some other way? For example, at the beginning \
of the script, to do something like:<br>---<br><font style="font-size: 10pt; \
font-family: Courier New;" color="#0000ff">var</font> fh = fopen(<font \
style="font-size: 10pt; font-family: Courier New;" \
color="#ff00ff">"~/.kde/share/config/plasma-desktop-appletsrc", \
3)</font><br><font style="font-size: 10pt; font-family: Courier New;" \
color="#0000ff"></font>fwrite(fh, <font style="font-size: 10pt; font-family: Courier \
New;" color="#ff00ff">"</font>[AppletGlobals][plasma_applet_pager]\nrows=1<font \
style="font-size: 10pt; font-family: Courier New;" \
color="#ff00ff">"</font>);<br> fclose(fh);<br>---<br>(This doesn't work, \
btw, since plasma-desktop complains about fopen, but it's just to make my meaning \
clear.)<br><br>Also, on a somewhat related note, I've discovered that some \
applets start too quickly. :) For example, take the example of the quicklaunch \
applet. In the script, I have:<br>
---<br>qlaunch = panel.addWidget("quicklaunch");<br>qlaunch.writeConfig("iconSize", \
"24");<br>qlaunch.writeConfig("iconUrls", \
"file:///usr/share/applications/firefox.desktop");<br>
---<br>However, when quicklaunch starts, it displays the default Konqueror, Dolphin, \
and Kopete icons at size 16. If I go back and insert the lines into \
plasma-desktop-appletsrc, it works. Additionally, for some applets (Lancelot, yaWP), \
I don't have to even edit anything; if I just restart plasma-desktop, they then \
display correctly. From this I conclude that it's a matter of the applets trying \
to read the configuration file before their configurations are written. Any \
suggestions on how to overcome this; perhaps a way to write the configuration first, \
and then start the applet?<br> <br>Thanks!<br></div></div>
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic