… | |
… | |
3765 | sub add { |
3765 | sub add { |
3766 | my ($self, $title, $widget, $tooltip) = @_; |
3766 | my ($self, $title, $widget, $tooltip) = @_; |
3767 | |
3767 | |
3768 | CFPlus::weaken $self; |
3768 | CFPlus::weaken $self; |
3769 | |
3769 | |
3770 | $self->{buttonbar}->add (new CFPlus::UI::Button |
3770 | unless (ref $title) { |
|
|
3771 | $title = new CFPlus::UI::Button |
3771 | markup => $title, |
3772 | markup => $title, |
3772 | tooltip => $tooltip, |
3773 | tooltip => $tooltip, |
|
|
3774 | ); |
|
|
3775 | } |
|
|
3776 | |
3773 | on_activate => sub { $self->set_current_page ($widget) }, |
3777 | $title->connect (activate => sub { $self->set_current_page ($widget) }); |
3774 | ); |
3778 | $self->{buttonbar}->add ($title); |
3775 | |
3779 | |
3776 | $self->{multiplexer}->add ($widget); |
3780 | $self->{multiplexer}->add ($widget); |
3777 | } |
3781 | } |
3778 | |
3782 | |
3779 | sub get_current_page { |
3783 | sub get_current_page { |