Panel: Broken size-changed signal?
Jasper Huijsmans
jasper at xfce.org
Tue Feb 14 21:27:45 CET 2006
Jannis Pohlmann schreef:
> On Mon, 13 Feb 2006 20:24:06 +0100
> Jasper Huijsmans <jasper at xfce.org> wrote:
>
>> Jannis Pohlmann schreef:
>>> Hey Jasper,
>>>
>>> I noticed that today, I couldn't resize Verve anymore. It's width
>>> seems to be fixed at 5 chars. Re-adding, deleteing the rc files for
>>> the plugin etc. didn't change anything. Is it possible that your
>>> latest updates broke the size-changed signal or
>>> something else (for external plugins only?)?
>>>
>> If I look at what you have in SVN, I see that you use the update_size
>> function both for the user-configured size and as callback for the
>> size-changed signal. I don't think that is what you want, is it?
>
> It is. Whenever the panel sends this signal, the plugin should update
> the width of the GtkEntry to the user-defined char width, so we can
> keep the size the user requests, whenever it's possible.
> Nasty, I know. But I didn't want to use expand/non-expand like the
> spacer plugin does.
Yes, that's exactly what it should do, but it doesn't do that now...
static gboolean
verve_plugin_update_size (XfcePanelPlugin *plugin, gint size,
VervePlugin *verve)
{
verve->size = size;
gtk_entry_set_width_chars (GTK_ENTRY (verve->input), size);
return TRUE;
}
If you use this as the callback for the size-changed signal, it will set
the width based on the panel size.
Jasper
More information about the Xfce4-dev
mailing list