Re: Which signal is emitted when the arrow in GtkComboBoxEntry() is pressed?

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

 



Jan-Marek Glogowski wrote:
Just checked the source for 2.4.13 and 2.5.5. Both use a
GtkToggleButton...

Check the following "scan" function - should print a list of found object
types:

static void scan_children( GtkWidget *w,  gpointer data )
{
	g_print( "%s\n", G_OBJECT_TYPE_NAME( w ) );
}

For me it finds:

GtkToggleButton
GtkEntry

Unfortunately I only get GtkEntry :-(

I've checked that the first argument to gtk_container_forall() is a GtkComboBoxEntry
And according to printout from the callback it has only one child which in an GtkEntry.


According to the documentation on my machine it should be 2.4.13 I have on my FC3 - this is really strange!

The test you ran was that on a 2.4.13 or 2.5.5 or both?


About GTK_IS_... macro:

There are six std macros defined by every Gtk+ "class". They are used for:
2* type checks (GTK_IS_...[_CLASS])
2* obj casts (GTK_...[_CLASS]), e.g. GTK_BIN( my_combo )->child
1* the type system internal type (GTK_TYPE_...)
1* get the objs class (GTK_..._GET_CLASS)

Thanks for the explanation.

E.g. if you look into the code, you will find a lot of

g_return_if_fail( GTK_IS_...( combo ) );

For more information read the Gtk+ tutorial and
http://www.le-hacker.org/papers/gobject/

I think these six macros should also be in the reference manual.
I expect to be able to find any (public) available function/macro in the reference manual.



And be sure you use gtk_container_forall not gtk_container_foreach!

I checked in the reference manual before use - and know the difference! But thanks for pointing it out.


Best regards
Egon Andersen
_______________________________________________

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