Re: GtkOptionMenu
- From: Havoc Pennington <hp redhat com>
- To: Harring Figueiredo <harringf yahoo com>
- Cc: gjc inescporto pt, audrey vernon colorado edu, gtk-app-devel-list gnome org
- Subject: Re: GtkOptionMenu
- Date: Thu, 6 Mar 2003 15:57:25 -0500
On Thu, Mar 06, 2003 at 10:40:49AM -0800, Harring Figueiredo wrote:
I guess this is more of a question/advice-request to Havoc.
I agree that your application should rely as little as possible on the GUI
toolkit you use. In my case; however, wrote an pp that has a linked list of
struct and MOST of the fields of this struct needs to be shown on a
GtkListStore/TreeView.
Now are find myself writting spaggetti code just to keep the to lists (My own
GList and the GtkListStore synchronized.)
It's probably not that bad to use a GtkListStore as a program data
structure, since it's independent of specific widgets.
The other thing you could do is write a custom GtkTreeModel that
accesses your program's data structure directly.
As if I do have enought time on my hands, I am trying to modify the program
to use only one list (GtkListStore). and modify my stuct to something like.
struct gui_fields{
.
..
..
strcut no_gui_fields* extra_info;
}
I would usually do it the other way around, make your no_gui_fields
the main data then hang the GUI off of that.
But it is certainly useful to put structs like this in GtkListStore,
e.g. I think the stock browser in gtk-demo works that way.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]