Re: Problems with GtkPaned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2005-03-24 at 06:58, Owen Taylor wrote:
> > Thanks for the tip, unfortunately "position" is a property, not the event.
> > As you can see in my original post,
> > I've conencted to the events that should be triggered (at least sounding by
> > their name, there is no documentation), but they don't work.
> 
> Try notify::position

First, the suggestion did work for me so thanks to Miroslav for asking
and John for answering and Owen for patiently answering again. :)

I was right there with Miroslav in not realizing that a property and
"notify::" could be used as the signal description.  Is this possible
with all properties or just certain ones?

Why is this not a formal signal prototype?  Is there overhead in
formalizing it?  Is it a discouraged signal for some reason?  I ask
because I'm writing a GTK wrapper for my application and I've covered
almost all the controls except for the tree, about ~26 controls. Other
than some events that are not possible to trap on the combo, this is the
first time I haven't been able to use one of the "formal" signals listed
under the control.

For anyone reading this later, below is a code sample for handling
position change signal.

g_signal_connect (G_OBJECT(control), "notify::position",   G_CALLBACK
(position_change_event), NULL);

static void position_change_event(
       GObject *g_object, 
       GParamSpec *pspec, 
       gpointer *data) {
   printf("%i\n", gtk_paned_get_position(GTK_PANED(g_object)));
}

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux