Re: Gtk2::Ex::WYSIWYG



Matthew Braid <ptkperl mdb id au> writes:

  properties => [Glib::ParamSpec->uint('undo_stack',
                                       'Undo Stack Size',
                                       ('The maximum size of the undo '.
                                        'stack. Zero implies no limit'),
                                       0, 0xFFFFFFFF, 0,

POSIX::UINT_MAX() would be possible there instead of 0xFFF.  I wondered
if those paramspec constructors could take a magic value to mean "the
maximum", but I suppose there's no need for that if the POSIX module has
adequate values.

    # Popup the menu
    $menu->popup(undef, undef, undef, undef, $self, undef);
    $menu->popup(undef, undef, '_menu_pos', $self, $self, undef);
    my ($mx, $my) = $menu->get_size_request;
    my ($bx, $by) = $self->get_size_request;
    $menu->set_size_request($bx, -1) if $mx < $bx;
    $menu->select_item($menu->get_active);

That looks a bit scary :-)



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