<br><br><div class="gmail_quote">2008/7/3 Aaron J. Seigo <<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hi Dong...<br>
<br>
good to see you on the lists. btw, <a href="mailto:panel-devel@kde.org">panel-devel@kde.org</a> is the more useful list<br>
for plasma related issues. i'm cc'ing the list on this reply and maybe we can<br>
take the discussion over there?<br>
<div class="Ih2E3d"></div></blockquote><div>Nice to see you too:)<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
<br>
On Wednesday 02 July 2008, Dong Tiger wrote:<br>
> 1. GGL(Google Gadgets for Linux) has its own GadgetBrowser. I want to use<br>
> it to install gadgets and add gadgets to desktop as an plasma applet. Does<br>
> plasma support this?<br>
<br>
</div>no.<br>
<br>
while i understand the apparent benefit from the gadget creator's POV (hey<br>
look, we can make it exactly how *we* want it!) it really doesn't do much at<br>
all for the user experience. in fact, it rather destroys the user experience<br>
because now they have to deal with N different control and listing UIs for<br>
their widgets. that's obviously not great.<br>
<br>
what we don't have yet in plasma is a way for gadget systems to provide links<br>
to their own listing systems. right now we provide support for DXS (the fd.o<br>
spec for listing app add-ons over the network). while i'd love to see everyone<br>
adopt DXS, i doubt that's realistic. the easiest thing to do would probably be<br>
to extend the capabilities of the "Install New Widgets" button to allow<br>
additional mechanisms to get widgets.</blockquote><div> </div><div>Agree that "Install New Widgets" should be able to handle this. But I still feel it will be convenient to be able to ask plasma to load a gadget. It can be used in the following cases:<br>
1. User clicks a dowloaded widget to run it.<br>2. Some programs can be turned into a widget on the fly. For example, Amarok can minimize itself to a widget on panel.<br>3. Before "Install New Widgets" is powerful enough, I still need this to let user browse google gadgets in GoogleGadgetsBrowser and install them into plasma.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
> 2. We have a QWidget subclass, QtViewWidget, that can draw a view of a<br>
> Google gadget and accept input from mouse and keyboard. To reuse the code,<br>
> I tried to use WoC approach. But the result is not so good. Check out the<br>
> screen shot attached. The black part is supposed to be transparent. What I<br>
> can do with it?<br>
<br>
</div>you may need to call setAttribute(Qt::WA_NoSystemBackground) on your QWidget.<br>
<br>
it would also probably be even better if it was at some point ported to a<br>
QGraphicsWidget, and maybe even use Plasma::WebContent directly? i mean, the<br>
Google widgets are just html/css at the base of it all, right? that might be a<br>
lot of work, though, depending on how the gadgets library is implemented.<br>
</blockquote><div><br>There are two kinds of Google gadgets. One is the iGoogle Gadgts which just use html/javascript. The other is Desktop Gadgets which uses self-brewed xml and javascript. Plasma::WebContent will only works with the iGoogle gadgets.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
i also see the sizing is wrong: it's not sized to the contentsRect() but to<br>
the boundingRect(). use contentsRect() always.<br>
<div class="Ih2E3d"><br>
> 3. Currently, GGL has one stable javascript runtime which is implemented<br>
> with spidermonkey. I don't feel comfortable that GGL on plasma has to link<br>
> to spidermonkey. So I wrote a runtime with QtScript. But it turned out a<br>
> lot of Google gadgets use syntax from M$ jscript that QtScript doesn't<br>
> support.<br>
<br>
</div>well, QtScript isn't really javascript, of course. it's ECMAScript, so you'd<br>
have to do a lot of work on top of it to turn it into JavaScript (ECMAScript +<br>
the web dom API)</blockquote><div> </div><div>The javacript runtime in GGL is used to support Desktop Gadgets. So web dom api is not needed. The problem is that many gadgets use non-ECMAScript syntax like "someobj('APropertyNmae') = something;". It's truely not the fault of QtScript. We are working on eliminating the usage of such syntax. But it takes time.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
> And I don't have much confidence on the quality of QtScript.<br>
<br>
</div>anything in particular? (it's easier to fix non-vague problems ;)</blockquote><div> I don't mean QtScript is not good. I just mean it's not widely used as spidermoney and webkit, especially in the way I use. As of bugs, I just filed one that QtScript crashed on this:<br>
</div><div> var a = new Array(); a.splice(0, 0, 'a');<br><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
> Thus, I need to choose between kjs and webkit. But QtWebKit doesn't<br>
> support standalone usage of its javascript engine. It looks only kjs is a<br>
> valid choice. What do you think?<br>
<br>
</div>this would be a simple if you were using Plasma::WebContent as it already has<br>
the webkit js runtime there. if you're going to do your own runtime from<br>
scratch, though, kjs is probably the easier starting point, yes.<br>
<font color="#888888"><br>
--<br>
Aaron J. Seigo<br>
humru othro a kohnu se<br>
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43<br>
<br>
KDE core developer sponsored by Trolltech<br>
<br>
</font></blockquote></div><br>