panel plugins want command combo tooo; was: Re: patch for xfce4-panel
danny.milo at gmx.net
Fri Jan 9 22:00:07 CET 2004
what about adding a function to the panel which
- is made available to the plugins, for use in create_options
Control * ?
an optional GtkSizeGroup
some boxes, eventboxes, whatever,
the command entry or the combo if applicable,
the "exec in terminal" checkbutton
the "use startup notification" checkbutton
the (outermost) GtkWidget *, to be used in packing
a GtkEntry *
an optional GtkCombo *
the two checkbuttons
[best all in a g_new'ed struct since additions are easier]
Would prevent code duplication ;)
It is almost there already, minor modifications on panel/item_dialog.c
's create_command_option required.
Signals or the like arent required since one cannot click the button as
long as its preferences dialog is open.
The plugin would read the *entry* for retrieving the command to execute
(on dialog "response").
The history combo needs to be notified on dialog close which entry is
used, to make it update its list, i think. This can be done by the panel
for all plugins which used create_command_option.
for historic correctness, previous idea which i discard because of the
"what if the history combo isn't available" problem follows:
------------------------------- old thinking: -----------------------
on a related note, what about adding a command_combo member to the
"Control" type for use by panel plugins ? :)
panel plugins would set ctrl->command_combo = my_combo; and it would do
the completion stuff all automatic (if available) :)
[hm, what if the history combo isn't available...]
This kinda runs against my idea of adding a entry to the combo list by
default (i.e. a sticky entry always on the bottom), so think about me
and add a callback for combo customization too :)
More information about the Xfce4-dev