Re: Gtk2::ItemFactory bug or feature?!




On Aug 13, 2004, at 1:22 AM, Jan Hudec wrote:

On Thu, Aug 12, 2004 at 20:08:24 -0400, muppet wrote:

On Aug 12, 2004, at 6:35 PM, Jens Wilke wrote:

        my $oitm = $factory->get_item_by_action('albumlist');
        my ($path, $tmp) =  $oitm->path;
        # $path is s'thing like 
#'GtkWindow.<main>/Album/Aktualisieren.<main>/Album/Aktualisieren/
Album'

the doubling here is curious. this hints to me that the paths you've inserted and the paths you expect to get back don't match up.


        $path =~ s/(.+)\.//g; # $path = '<main>/Album/Aktualisieren/Album'
        $factory->delete_item($path) # doesn't work too

do the hardcoded string and the subbed one match exactly by byte values, or do they just look the same to the eye?

in the helper function used for create_item(), we strip all of the accelerator underscores to get a "clean path" which we can pass to get_item() in order to fetch the widget so we can connect callbacks to it. perhaps there are embedded underscores?


the bindings for these are trivial passthroughs, so this is more a
question for gtk-list.

Well, if the variable and the hardcoded string are really the same, it
would be on the perl side. It'd need a bit of debugging. Print the
argument from perl and then from C to see whether it's passed right.

this is easy enough to do, but i am strapped for time this week and can't create a simple testcase to reproduce the problem. any volunteers?


--
Examples really shouldn't include unexploded ordinance.
  -- Joe Smith, referring to an example program i wrote.




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