Re: How can I access gtk_tree_view declared in interface.c from callback.c ?



I don't know if it will work, but you may try to use a pointer for
user_data like:
void on_new1_activate (GtkMenuItem *menuitem, gpointer *user_data)
then you can access an internal structure of this...



On 5/19/05, R.Rajaram <rajaram acmet com> wrote:
Have a look at "lookup_widget" in support.c. Hope it helps




-----Original Message-----
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org] On Behalf Of Colossus
Sent: Thursday, May 19, 2005 4:36 PM
To: gtk-app-devel-list gnome org
Subject: How can I access gtk_tree_view declared in interface.c from
callback.c ?


Hi,

I have a file interface.c where glade set up a gtk treeview named
treeview1. When in callbacks.c I try to use treeview1 I got this error:

callbacks.c: In function `on_new1_activate':
callbacks.c:56: warning: dereferencing `void *' pointer
callbacks.c:56: error: request for member `treeview1' in something not a

structure or union

This is the code:
void on_new1_activate (GtkMenuItem *menuitem, gpointer user_data) {
        //qui devo creare un nuovo archivio.
        gchar *path = Show_File_Dialog ( FALSE );
        if (path == NULL) return;
        g_print ("Hai scelto: %s\n",path);
        switch (ChoosenArchiveType)
        {
                case 0:
                g_print ("Hai scelto: bzip2\n");
                break;
                case 1:
                g_print ("Hai scelto: rar\n");
                break;
                case 2:
                g_print ("Hai scelto: tar\n");
                break;
                case 3:
                g_print ("Hai scelto: zip\n");
                break;
                default:
                break;
        }
        g_free (path);
56:     user_data->treeview1 = NULL;    <----- here I got the error
}

Thanks for the attention,
--
Colossus

Cpsed, a Linux OpenGL 3D scene editor http://cpsed.sourceforge.net/

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



-- 
André Pedralho
Bachelor in Computer Science
Instituto Nokia de Tecnologia



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