Re: GtkList and GList......please...anybody???



Hi there,

Thanks for your response. I think I've got the hang of the lists and how
they work! Thanks for the code Vincent, however I get no compile errors but
the items do not show up in the list. Is there any chance that it may be
because as Imran said that GtkList is depreciated?

Thanks to both of you!!!
Uni

----- Original Message -----
From: "Syed Imranullah Azeezullah" <s i azeezullah massey ac nz>
To: "Uni" <unimatrix 001 ntlworld com>
Cc: "GTK App Development list" <gtk-app-devel-list gnome org>
Sent: Sunday, February 16, 2003 11:27 PM
Subject: Re: GtkList and GList......please...anybody???


Hello,

Read about GtkList here:
http://developer.gnome.org/doc/API/2.0/gtk/GtkList.html

You can also read about GList here:
http://developer.gnome.org/doc/API/2.0/glib/glib-Doubly-Linked-Lists.html

You might also want to know that GtkList is deprecated. There are some
very good tutorials / examples about data structures like linkedlists
around on the internet. I suggest you just glance at them.

Regards,
Imran

On Mon, 2003-02-17 at 09:03, Uni wrote:
Hi,

I'm using Anjuta an IDE for Glade and using makefiles etc...What this
does it allows you to build your GUI (visually) using Glade and all you have
to do is write the callback functions behind the objects. The files that are
automatically generated are:

callbacks.c
callbacks.h
interface.c
interface.h
main.c
support.c
support.h

All I'm wanting to do is have a list box where strings are simply put
into it...Since Anjuta creates the code to generate your chosen GUI it
generated the following for the List object:

(in the interface.c, but only relevant code is shown)

GtkWidget*
create_window_main (void)
{
    ...
    ...

    GtkWidget *list_shopping_list;        <- As I called the item
"list_shopping_list" minus quotes, from inside the GUI editor

    ...
    ...

    list_shopping_list = gtk_list_new();
    gtk_widget_ref (list_shopping_list);
    gtk_object_set_data_full (GTK_OBJECT (window_main),
"list_shopping_list", list_shopping_list, (GtkDestroyNotify)
gtk_widget_unref);
    gk_widget_show (list_shopping_list);
    gtk_box_pack_start (GTK_BOX (hbox3), list_shopping_list, TRUE, TRUE,
0);
}


And that's it as far as anything to do with the list box is concerned.
Right...That was in the interface.c. I have then created my own file called
"list_handler.c". In "list_handler.c" (minus quotes) I'm wanting a function
that simply adds items to this list box that was set up in the interface.c
file. If I can get that I'd be ecstatic. Please if you could help I'd be
very grateful...


Thanks for your time,
Uni


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




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