Re: Gnome2 0.90 and GnomeUIInfo



On Tue, 2003-12-23 at 13:43, Sylvain Daubert wrote:
Hi all,

Aloha.

I recently updated my Gtk2/Gnome2-Perl modules and i discovered that 
user_data field is no more recognized in GnomeUIInfo.

As far as I can tell, all versions of Gnome(1|2) don't recognize that
field.  Which version did it work with for you?

Unfortunately, i used this field with radio items to known which item 
was selected.

Would using closures be an alternative?  Instead of

            {
              type => "item",
              label => "A",
              callback => \&bla,
              user_data => $data_for_a
            },
            {
              type => "item",
              label => "B",
              callback => \&bla,
              user_data => $data_for_b
            }

you'd use

            {
              type => "item",
              label => "A",
              callback => sub { bla(@_, $data_for_a); }
            },
            {
              type => "item",
              label => "B",
              callback => sub { bla(@_, $data_for_b); }
            }

Is this a bug, or a feature ?

Well, if there were versions of Gnome(1|2) that allowed using the
user_data member, it's at least a regression.  Unfortunately, the
internal implementation of the GnomeUIInfo wrapping relies on being able
to use user_data for its own purposes.

Bye,
-Torsten




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