Re: Example programs



After looking at the latest release of Gtk+, I still
find the same code in the new version as in the old
version which caused a problem with the example
menu/itemfactory.c. This problem is internal to the
Gtk+ library in file gtkmenu.c at line 1588 of
gtk+-2.4.10 and in file gtkmenu.c at line 1632 of
gtk+-2.5.5. I believe that the line
  g_return_if_fail (accel_path[0] == '<' && strchr 
    (accel_path, '/'));
should be
  g_return_if_fail (accel_path[0] == '<' || strchr 
    (accel_path, '/'));
instead. After making this modification, the example
program works. Without it, I get
    (itemfactory.c:780): Gtk-CRITICAL **: file
    gtkmenu.c: line 1588: assertion 
    `accel_path[0] == '<' && strchr accel_path, '/')'
    failed

Stephen

--- Owen Taylor <otaylor redhat com> wrote:

> On Wed, 2004-11-10 at 18:12 -0800, Stephen Nestinger
> wrote:
> > Going through your example programs and found some
> > that when compiled, produce an error during use. I
> am
> > using gtk v. 2.4.10 with glib v. 2.4.5
> 
> The code in examples/ is just the programs from the
> (quite out of date)
> tutorial. gtk-demo is much more appropriate as a
> source of current GTK+
> sample code.
> 
> Help updating the tutorial would, of course, be
> appreciated.
> 
> Regards,
> 						Owen
> 
> 
> > example/menu/itemfactory.c gives me
> >      (itemfactory.c:780): Gtk-CRITICAL **: file
> > gtkmenu.c:
> >      line 1588: assertion `accel_path[0] == '<'
> >      && strchr (accel_path, '/')' failed
> >   I believe it should be 
> >      `accel_path[0] == '<' || strchr (accel_path,
> > '/')' at line 1588 of
> >   gtkmenu.c instead. After modifying the code, it
> > produces no errors.
> > 
> > example/list/list.c, after right clicking on a
> > selection the first time
> > it gives me
> >   (list.exe:556): Gtk-CRITICAL **: file gtklist.c:
> > line 832: assertion
> >     `GTK_IS_LIST_ITEM (widget)' failed
> >   (list.exe:556): GLib-GObject-WARNING **: invalid
> > unclassed pointer in
> >      cast to `GtkWidget'
> >   (list.exe:556): GLib-GObject-WARNING **: invalid
> > unclassed pointer in
> >      cast to `GObject'
> >   (list.exe:556): GLib-GObject-CRITICAL **: file
> > gobject.c: line 624:
> >      assertion `G_IS_OBJECT (object)' failed
> >     
> > tests/testcombochange.c: Click animate after
> running
> > it gives
> >    (testcombochange.exe:3372): Gtk-CRITICAL **:
> file
> > gtkliststore.c:
> >      line 1662: assertion `new_order != NULL'
> failed
> > 
> > tests/treestoretest.c: clicking on
> > gtk_tree_store_insert of the Sorted List window
> gives
> >    (treestoretest.exe:3580): GLib-GObject-WARNING
> **:
> > invalid cast
> >      from 'GtkTreeModelSort' to `GtkTreeStore'
> >    (treestoretest.exe:3580): Gtk-CRITICAL **: file
> > gtktreestore.c: line 
> >      1143: assertion `GTK_IS_TREE_STORE
> (tree_store)'
> > failed
> >    (treestoretest.exe:3580): Gtk-CRITICAL **: file
> > gtktreestore.c: line 
> >      1044: assertion `VALID_ITER (iter,
> tree_store)'
> > failed
> >    (treestoretest.exe:3580): Gtk-CRITICAL **: file
> > gtktreestore.c: line 
> >      1044: assertion `VALID_ITER (iter,
> tree_store)'
> > failed
> > 
> > 
> > Stephen
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> > _______________________________________________
> > gtk-devel-list mailing list
> > gtk-devel-list gnome org
> >
>
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
> -- 
> Owen Taylor <otaylor redhat com>
> 

> ATTACHMENT part 2 application/pgp-signature
name=signature.asc




		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 




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