GTK newbie help on G_CALLBACK

B

bnrj.rudra

Dear Friends,
This is a question on GTK, but failed to find a forum on that. Since GTK is based on C, posting here with fingers crossed.
I have taken a project (my own, not homework) to develop a table. I
generally work with fortran, dont know C that much.
What I want is a gtk clist to pop up when I press a button, via
callback. The button widget in my code is


/* Create first button */
button = gtk_button_new_with_label ("B1");

/* When the button is clicked, we call the "callback" function
* with a pointer to "button 1" as its argument */
g_signal_connect (button, "clicked",
G_CALLBACK (callback), (gpointer) "B1");


/* Insert button 1 into the upper left quadrant of the table */
gtk_table_attach_defaults (GTK_TABLE (table), button, 0, 1, 0, 1);

gtk_widget_show (button);
The definations are mostly based on
http://developer.gnome.org/gtk-tutorial/2.24/x344.html

What I want to do is callback to execute another gtk file(a clist),
rather than what shown in the example

Code:
static void callback( GtkWidget *widget,
gpointer data ) {
g_print ("Hello again - %s was pressed\n", (gchar *) data);
}
Can you please show me how I can get this?
 
J

Jens Thoms Toerring

Dear Friends,
This is a question on GTK, but failed to find a forum on that.

What about all the mailing lists about GTK+ you find at

http://www.gtk.org/mailing-lists.php

There also seem to be some fora but I have no idea how
good they are (and e.g. www.gtkforums.com seems to suffer
from a massive attack by spammers at the moment).
Since GTK is based on C, posting here with fingers crossed.

No luck;-) This is all about how to use a certain library out
of probably millions written in C. You will need people with
knowledge about this specific library (beside C) to solve your
problem so I guess you will really be better off if you ask
in a place where discussions about GTK+ is the main topic.

Regards, Jens
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top