El lun, 31-05-2004 a las 23:08, -0400, German Poo Caaman~o escribió: > El mar, 18-05-2004 a las 17:41, Carlos Garcia Campos escribió: > > Hi all, > > > > In the last days I have been working a bit in gnome-nettool. I have > > attached a tar.bz2 that contains: > > > > * a src directory with the new files gn-combo-history.[ch] > > * a pixmaps directory with the new pixmaps > > * the patch nettool.diff > > > > There are a lot changes, so I will paste the ChangeLog entry here, that > > I think it's enough explanatory itself: > > > > * src/gnome-nettool.glade: s/GtkCombo/GtkComboBox and added a treeview > > to show the IP information when there are IPv6 ips. > > > > * src/info.c (set_nic, load_iface, ip6_masklen, > > ip6_construct_address, get_nic_information, get_interfaces), > > src/info.h, src/main.c (list_ip_addr_add_columns, > > load_info_widgets_from_xml), src/nettol.h: IPv6 support. > > When there are IPv6 addresses, a treeview is shown with > > the information about all of the ip addresses, but if there aren't IPv6 > > addresses, the IPv4 information is shown in text labels. > > It seems there are operations over a tree_model where it's not valid > yet. > > Just after run gnome-tool I get a bunch of warnings: > > (gnome-nettool:6578): Gtk-CRITICAL **: file gtktreemodel.c: line 998 > (gtk_tree_model_get_iter_first): assertion `GTK_IS_TREE_MODEL > (tree_model)' failed The warning is not referencing to the tree_model of the tree_view, but the tree_model of the new combo_boxes. There is one warning for each new combo_box added. AFAIK, is a bug in glade that doesn't add a tree_model by default. When the ui is loaded from glade, the combo_box doesn't have any tree_model, but just later, my tree_model is added to the combo_box and everything works perfectly. > > * src/callbacks.c (on_about_activate), src/main.c (main): uses > > PIXMAPS_DIR instead of GNOME_ICONDIR and gnome-nettool.png instead of > > gnome-netinfo.png > > > > * src/gn-combo-history.[ch]: files added. It is an object to manage > > the history of new combo boxes > > > > * src/main.c (load_*_widgets_from_xml), src/callbacks > > (on_*_activate): added support for history in > > new combo boxes > > The history stored could be shared between all tabs, because is > high probable that the same instructions will be applied to > the same hosts. The history is shared by all tabs, but not in real time. All of the combo_boxes use the same id to store the history information in gconf. But that one becomes in real time is necessary to share also the tree_model. At the moment each tool has its own struct with general and specific data, so is not possible to share nothing by all the tools unless we use one global variable (I don't like it) or change the current code design. We could use a common struct with the general common data and a specific struct for each tool. In the common struct there will be a pointer to the specific struct of each tool. But the solution I prefer is an Object Oriented model, with a parent class for the data and behavior common for all tools and one child class for each tool. IMHO this one is the logical model, since all of the tools have a common structure and behavior. > > * src/callbacks.c, src/info.c, src/ping.c, src/traceroute.c, > > src/lookup.c, src/util-mii.c: added #include <glib/gprintf.h> to avoid > > compile warnings about g_sprintf () > > Ok. If now nettool depends on gtk 2.4, the g_sprintf function in > util.c is not needed anymore. > > May you fix the TreeView warnings? > > Thanks, > Greetings, -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carlos Garcia Campos a.k.a. KaL elkalmail yahoo es carlosgc gnome org Grupo Linups Usuarios de SL/Linux de la UPSAM http://www.linups.org =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= PGP key: http://pgp.rediris.es:11371/pks/lookup?op=get&search=0x523E6462
Attachment:
signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente