Re: Panel changes for 4.4
masse nicolas <[email protected]>
| Newsgroups | gmane.comp.desktop.xfce.goodies.devel |
|---|---|
| Message-ID | <[email protected]> |
--- Jasper Huijsmans <[email protected]> wrote: > Alexander Iliev wrote: > > Jasper Huijsmans <[email protected]> wrote: > > > > > >>Alexander Iliev wrote: > >> > >>>Hei, I thought of another addition to the new > API: > >>> > >>>gboolean > xfce_panel_plugin_test_availability(gchar > >>>**return_msg); > >>> > >> > >>Good idea, but I think it should be sufficient to > have a > >>'Unique = True' > >>field in the .desktop file for the plugin. I can't > really > >>think of a > >>situation where this wouldn't work. > >> > > > > > Ok, since this is pretty similar to my previous > suggestion > > some more explanation would be needed. First - the > idea > > is pretty different here. It's not about plugin > being > > unique or not, it's about cheching for certain > conditions > > which should be fulfilled. > > > > Take for example the xkb plugin. If I run a Xvnc > server > > and connect to the server there is no XKB > extension > > available > > (Xvnc does not implement XKB). So the xkb plugin > could not > > function at all. As a result the panel currently > crashes. > > This is firstly plugin's fault and I'm working on > a rewrite > > of this plugin which sould handle such situations > more > > gracefully. I also know that with the new > out-of-process > > plugins a crash in one plugin should not crash the > whole > > panel. But nevertheless I think such API would be > of help > > in making XFCE more user-oriented desktop. > > > > I think having such a function is a good thing, > since the > > plugin writers can use it to check for certain > conditions > > needed to run their plugins. If the plugin doesn't > depend > > on any such conditions or the plugin writer > doesn't want to > > implement it the simpliest thing is to "return > TRUE;". I > > think it wouldn't be hard to implement this from > the panel > > side. It might slow the add new item dialog (or > whatever > > it will become in the future), but this is pretty > rarely > > performed task. > > > > Hey, that's just my opinion. :-) > > It's up to you, I just think such an API would > help in > > creating a more "usable" desktop environment. > > > > Thanks, that's a very interesting use case. My > previous reply may have > sounded like I didn't agree with the feature, but > what I meant was to > ask you when it would be useful ;-) > > I'm trying to keep the interface as small as > possible, especially since > it must be based on sending messages because you > can't directly call a > function in an external plugin. That's why I'll be > asking for use cases > for every API addition and will try to find > alternatives that don't > involve communication. > > Anyway, back to your suggestion, there are two > situations here that are > important: > > - Add a new plugin. > > - Start the panel with an existing configuration in > a different environment. > > The second on will be much harder to handle, because > you do want it to > show up again the next time you log in to an > environment where the > plugin does work again. > > Don't you think it would be better if the plugin > would show an error > icon and/or a dialog explaining the situation, and > perhaps offering the > user to hide and try again in the next session? This > would not need > communication with the panel. > Alternatively what can be done is to do so that the function responsible of loading the plugin can return TRUE or FALSE, depending if the plugin was successfully loaded. If ot is not the case, the plugin can then dispay why and what was wrong. It seems that the current panel already work that way... The only benefit of Alexander's method (I think) is that the plugin writer will have to implement the ask_availability method, when for now nothing is done to say him that he needs to verify the availability of some plugin-required components. (Perhaps writing something like guidelines can help on this point) PS: In the case where a plugin fail to load, the panel can always ask if he must try to load this plugin next time. > Jasper Masse Nicolas. > _______________________________________________ > xfce-goodies-dev mailing list > [email protected] > http://lists.berlios.de/mailman/listinfo/xfce-goodies-dev > __________________________________________________________________ Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/