new showdesktop plugin and plugin questions

Jani Monoses jani.monoses at gmail.com
Thu Jan 12 13:45:57 CET 2006


Hello

I wrote a simple showdesktop internal panel plugin

Differences from the 4.2 plugin:

user visible:

    -single toggle button icon (gnome/tango desktop icon) not one or two
green arrows.
    -do not include a properties dialog (found the existing one
confusing) and there is nothing to configure

implementation:

    -toggling show/hide windows done using libxfcegui4 not X libs
    -figuring out whether WM supports this feature uses gdk
not X libs
    -of course the new panel api :)

If somebody needs the UI options of the existing plugin I can add them,
I just wanted to keep it simple for now.

I am not sure what is best to do if the WM does not support showing the
desktop or there's no WM. Gnome panel plugin pops up a dialog, the 4.2
xfce plugin tries to do this using libxfce4 gui.
Right now I just emit a g_message warning.

I have a few questions regarding plugin writing

-what exactly is to be freed on the "free-data" signal? Does the plugin
object itself need to be freed there? Which gtk/xfce objects need to be
handled? How does this function relate (if at all) to glib/gtk object
references? I see for instance the Tooltips object is in some plugins
created g_object_ref()-ed gtk_object_sink()-ed and unrefe in
plugin_free(). While in others (xfdesktop) it is just created then
sinked in plugin_free()

-panel resizing

the existing plugins behave differently when the panel is resized:
    -mailwatch seems to be the most OK in this respect as the icon
grows/shinks proportionally with the panel.
     -the launchers grwo/shink but do not go over a certain maximum siz
this look OK too
    -iconbox icons after shinked no longer grow, they always keep the
smalles size
    -mixer icon shinks to the point of totally disappearing :)

it would be nice if it was a helper function for plugin button with one
icon scenario which could be reused. Rigth now gtk pixbuf, image and
libxfcegui helpers are mixed and this causes inconsistency.

is it ok to declare the set_size function with just two params as some
plugins do? I know the 3rd arg will just be ignored if it's passed from
the panel but I am asking from a coding style POV.

-orientation
this was not clear either to me what do do. The simple plugins which are
just a box with an icon seem to work ok whatever the panels orientation.


thanks
Jani



-------------- next part --------------
A non-text attachment was scrubbed...
Name: showdesktop.c
Type: text/x-csrc
Size: 4070 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20060112/d68e71f4/attachment.c>


More information about the Xfce4-dev mailing list