Re: Close GTK Main window

2009-09-24 Thread Ardhan Madras
Hi, GTK+ application should use at least one main loop, once you have called gtk_main() then the loop is running, your main window keep showing because this loop, you can exit from the main loop (or your main window) anytime by calling gtk_main_quit() or use standard function exit() to just

Re: Close GTK Main window

2009-09-24 Thread Pavel A. da Mek
Is it possible to close a GTK main window through the code? gtk_widget_destroy (mainWindow); The application can continue running after the window is destroyed, if you simply omit the usual g_signal_connect (G_OBJECT (mainWindow), destroy, G_CALLBACK (gtk_main_quit), NULL); P.A.

Treeview Row Count

2009-09-24 Thread dhk
Is there a function to give the number of rows in a treeview? Thanks, dhk ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Treeview Row Count

2009-09-24 Thread Tadej Borovšak
Hello. Is there a function to give the number of rows in a treeview? You probably want to know how many lines are in the GtkTreeModel that serves as data source for GtkTreeView. There is no simple function that would serve you this number, so you'll have to take one of the two available paths:

Re: Treeview Row Count

2009-09-24 Thread Kristian Rietveld
Also note that for *lists* (so no parent nodes, no children) a call like gtk_tree_model_iter_n_children (model, NULL) will suffice. -kris. On Thu, Sep 24, 2009 at 1:32 PM, Tadej Borovšak tadeb...@gmail.com wrote: Hello. Is there a function to give the number of rows in a treeview? You

Re: Treeview Row Count

2009-09-24 Thread dhk
Kristian Rietveld wrote: Also note that for *lists* (so no parent nodes, no children) a call like gtk_tree_model_iter_n_children (model, NULL) will suffice. -kris. On Thu, Sep 24, 2009 at 1:32 PM, Tadej Borovšak tadeb...@gmail.com wrote: Hello. Is there a function to give the number

Re: main loop asynchronous queues

2009-09-24 Thread Thomas Stover
Chris Vine wrote: In your code you didn't create a GMainContext object for each of your threads, which is the key point. Each thread in which you want a main loop should call g_main_context_new() which will create a GMainContext object for the calling thread, then use that to create a GMainLoop

How to suppress text on GtkCellRendererToggle

2009-09-24 Thread rpoe
I'm trying to make a column in a GtkTreeView which shows only a checkbox, tied to a column in the underlying GtkTreeModel which is a gboolean. I have defined the renderer to be a GtkCellRendererToggle. The problem I'm having is with display. I'd like it only to show the checkbox. I can write a

Re: How to suppress text on GtkCellRendererToggle

2009-09-24 Thread Tadej Borovšak
Hi. The problem I'm having is with display. I'd like it only to show the checkbox. I can write a cell data display function to read the value from the model and set the checkbox appropriately. That works fine. But if I make the underlying value a G_TYPE_INTEGER then the column displays 1's

Re: How to suppress text on GtkCellRendererToggle

2009-09-24 Thread Tadej Borovšak
Hi. I'm returning this back to the mailing list. Hmm. OK, going through gtk_tree_view_insert_column_with_attributes works for me, too. So there's something about the sequence of calls generating this other column that creates this behavior. This is part of a large GUI project so it goes

Re: main loop asynchronous queues

2009-09-24 Thread Chris Vine
On Thu, 24 Sep 2009 14:32:30 -0500 Thomas Stover tho...@wsinnovations.com wrote: [snip] For anyone in the future searching around for more info on this topic, here is a variation of the gtk hello world program I was doing some experiments with. My main question at this point to anyone who