Re: freezing an entire window + search algorithms for clist



On 30 Dec, Daniel Macedo wrote:
Does anybody know how to "freeze " a window? I have a main window, which
opens dialogs. If I click the window's button more than once, it will
open more than one dialog. Is it possible to freeze the main window
while the other window is open, so it doesn't receive any signals?

Just set the button used to lauch the window to insensitive in the
"clicked" callback:

void 
button_clicked (GtkWidget *widget, gpointer data)
{
   gtk_widget_set_sensitive (widget, FALSE);
   /* now show the dialog */
}

And make the button sensitive again in the "delete_event" handler of the
dialog.


Another thing i need help with is the clist.
when I was reading /usr/include/gtk/gtkclist.h, i found only one search
function,
prototyped like this:
gint gtk_clist_find_row_from_data (GtkCList *clist,
                                   gpointer  data);
and with this description:
/* givin a data pointer, find the first (and hopefully only!)
 * row that points to that data, or -1 if none do
 */
I cant find a way here to find multiple ocurrences of a search.

I think you're right. 

Is there any other function that does find more than one match, or I
will have to do this myself?

You could loop through all the rows with gtk_clist_get_row_data. But that
counts as doing it yourself, I guess. :)

Maybe you should look into the source code to see if there is an easier way
of doing this.

Roland
-- 
Roland Smith                        "When life hands you a lemon,
r s m i t h @ x s 4 a l l . n l      make lemonade."
http://www.xs4all.nl/~rsmith/

Attachment: pgpbDhzK2SJ8q.pgp
Description: PGP signature



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