Re: Retrieving one selected element in a GtkTreeSelection (multiple)?

2006-04-22 Thread Guy Rouillier
Daniel Pekelharing wrote: Hi all, What's the best way to retrieve just one of the selected items in a GtkTreeSelection which has been set to GTK_SELECT_MULTIPLE mode? Looks like gtk_tree_selection_get_selected_rows() is your available alternative. Just use the first path in the list. -- Gu

Re: building under mingw

2006-04-22 Thread Tor Lillqvist
Dov Kruger writes: > Any pointers to a prebuilt, clean environment under windows are > great. Would ftp://ftp.gtk.org/pub/gtk/v2.8/win32/ and ftp://ftp.gtk.org/pub/gtk/v2.8/win32/dependencies/ help? --tml ___ gtk-app-devel-list mailing list gtk-app-d

Re: gtk-app-devel-list Digest, Vol 24, Issue 16

2006-04-22 Thread Dov Kruger
Building the whole gtk is pretty frustrating at times, but on windows it's downright opaque. If anyone can help, I can't find any references We installed a working mingw, and can build c++ code. mingw is working under minsys. Make works. glib won't build without pkg-config: configure --prefix /opt

Re: building under mingw

2006-04-22 Thread Dov Kruger
Building the whole gtk is pretty frustrating at times, but on windows it's downright opaque. If anyone can help, I can't find any references We installed a working mingw, and can build c++ code. mingw is working under minsys. Make works. glib won't build without pkg-config: configure --prefix /opt

Re: Set up callbacks for dynamically created buttons

2006-04-22 Thread Daniel Pekelharing
On Sat, 2006-04-22 at 04:10 -0700, 3saul wrote: > So how should I implement this with the changes that David pointed out? It's not a very complex change actually, something like this: void button_callback(GtkWidget *button, gpointer data) { gint i = GPOINTER_TO_INT(data); printf("B

Re: Set up callbacks for dynamically created buttons

2006-04-22 Thread 3saul
So how should I implement this with the changes that David pointed out? -- View this message in context: http://www.nabble.com/Set-up-callbacks-for-dynamically-created-buttons-t1490320.html#a4039872 Sent from the Gtk+ - Apps Dev forum at Nabble.com. __

Re: Set up callbacks for dynamically created buttons

2006-04-22 Thread Daniel Pekelharing
On Sat, 2006-04-22 at 10:33 +0200, David Necas (Yeti) wrote: > Please do not do this. Perhaps it works on your i386 box, > but the macros GINT_TO_POINTER() and GPOINTER_TO_INT() exist > for a good reason. Thanks for pointing that out, I was not aware of these macros.. Not that it makes any differ

Re: Set up callbacks for dynamically created buttons

2006-04-22 Thread David Necas (Yeti)
On Sat, Apr 22, 2006 at 09:22:44AM +0200, Daniel Pekelharing wrote: > > gint button_callback(GtkWidget *button, gint i) > { > printf("Button %d was clicked\n", i); > } > > and connect to it like: > > g_signal_connect(G_OBJECT(buttons[i]), "clicked", > G_CALLBACK(button_callback), (gpointe

Re: Set up callbacks for dynamically created buttons

2006-04-22 Thread Daniel Pekelharing
On Fri, 2006-04-21 at 23:11 -0700, 3saul wrote: > I'm creating some buttons using: > buttons = g_new(GtkWidget*, n); > for (i = 0; i < n; i++) { >buttons[i] = gtk_button_new... >gtk_button_whatever(GTK_BUTTON(buttons[i])... >... >gtk_box_pack_start(GTK_BOX(some_box), buttons[i]... >