RE: lookup_widget



Title: RE: lookup_widget

> -----Message d'origine-----
> De : Soren Schimkat [mailto:schimkat musik auc dk]
> Envoyé : mercredi 23 mai 2001 13:40
> À : Gtk
> Objet : lookup_widget
>
>
> Hi Everyone...

Hello

>
> (This is a repost cuz' the first mail (17/5) didn't reached the list
> ???)
>
> Using Glade, im trying to make my first gtk application. It's a simple
> frontend to the ping command. I've managed to get most of the
> data from
> the form into my callback function by writing 'do_ping'.
>
> My questions:
>
> 1: How do I get the state of the togglebutton called 'route'?

At http://developer.gnome.org/doc/API/gtk/gtktogglebutton.html, I got :

--8<---
gboolean    gtk_toggle_button_get_active    (GtkToggleButton *toggle_button);
 
Queries a GtkToggleButton and returns it's current state. Returns TRUE if the toggle button is pressed in and FALSE if it is raised.

toggle_button : a GtkToggleButton.
Returns : a gboolean value. 
--->8--

So the answer seems to be gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(route))

But if found no 'route' word in the pingfe-0.1.tar.gz


> 2. Host is an 'entry-box'; count, wait, timeout, packet are
> spinbuttons;
> output is a 'textbox'. This tell's me that GTK_WIDGET(button) in the
> lookup_widget lines should be something else. Isn't that correct?

lookup_widget was built by Glade and you can see its code in src/support.c it requires a GtkWidget as first parameter. As button is a GtkButton, it is good to use GTK_WIDGET(button) as a cast.


--
Jérôme Mainaud
jmainaud kleegroup com



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