Gtk/Glade Beginner: widget lookup, text input etc



Hi listers,
I am a GTK/Glade beginner. I have a few questions, of which I have not been 
able to find answers on my own.

1. What exactly does lookup_widget do? 
If I have a widget called diaog1 in a file interface.c in order to 
destroy/hide/show it I need a pointer to it. Can I do something like 
GtkWidget *localname = lookup_widget(GtkWidget "External Name", localname);
On account of this, the following should work ...

void on_about1_activate (GtkMenuItem *menuitem, gpointer user_data) {
GtkWidget* show1 = lookup_widget(GTK_WIDGET(dialog1     ), "show1");
gtk_widget_show(show1); }

It doesn't.

2. I have a form that comes up on activation of a menuitem. It has n number of 
fields (gtk entry widgets). How do i take information for them simulatenously 
at the click of a button in the form. gtk_editable_get_chars, needs user to 
press enter at the end if used with activate signal. OTOH if used with 
changed signal the output is emitted as it occurs (by keystroke).

Right now I doing this in glade's framework of things, mainly becuase
a. I wasn't able to modularise my code properly.
b. I save keyboard miles this way.

Regards
-- 
Sukrit K Mehra
Email Id: holysmoke amaltaas biz
Website: http://www.symonds.net/~holysmoke





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