diff options
author | Maarten Vanraes <alien@mageia.org> | 2015-09-06 14:20:58 +0200 |
---|---|---|
committer | Maarten Vanraes <alien@mageia.org> | 2015-09-06 14:20:58 +0200 |
commit | 2c469e243daea9e73fe05009daa0d7bd6429fcbe (patch) | |
tree | 46bcc9861916044afcc8bd2b02f36cfbab0c0d94 /lib/ManaTools/Shared/GUI | |
parent | 5b03338ff3e41e43a328b60c89a2c6f853c4fe56 (diff) | |
download | manatools-2c469e243daea9e73fe05009daa0d7bd6429fcbe.tar manatools-2c469e243daea9e73fe05009daa0d7bd6429fcbe.tar.gz manatools-2c469e243daea9e73fe05009daa0d7bd6429fcbe.tar.bz2 manatools-2c469e243daea9e73fe05009daa0d7bd6429fcbe.tar.xz manatools-2c469e243daea9e73fe05009daa0d7bd6429fcbe.zip |
parentDialog function is only useful on EventRole classes
Diffstat (limited to 'lib/ManaTools/Shared/GUI')
-rw-r--r-- | lib/ManaTools/Shared/GUI/EventHandlerRole.pm | 24 | ||||
-rw-r--r-- | lib/ManaTools/Shared/GUI/EventRole.pm | 24 |
2 files changed, 24 insertions, 24 deletions
diff --git a/lib/ManaTools/Shared/GUI/EventHandlerRole.pm b/lib/ManaTools/Shared/GUI/EventHandlerRole.pm index cf554ed3..83db71b3 100644 --- a/lib/ManaTools/Shared/GUI/EventHandlerRole.pm +++ b/lib/ManaTools/Shared/GUI/EventHandlerRole.pm @@ -75,30 +75,6 @@ has 'events' => ( #============================================================= -=head2 parentDialog - -=head3 INPUT - - $self: this object - -=head3 DESCRIPTION - - finds the parent Dialog - -=cut - -#============================================================= -sub parentDialog { - my $self = shift; - my $eventHandler = $self->eventHandler(); - while (defined($eventHandler) && !$eventHandler->isa('ManaTools::Shared::GUI::Dialog') && $eventHandler->does('ManaTools::Shared::GUI::EventRole')) { - $eventHandler = $eventHandler->eventHandler(); - } - return $eventHandler; -} - -#============================================================= - =head2 addEvent =head3 INPUT diff --git a/lib/ManaTools/Shared/GUI/EventRole.pm b/lib/ManaTools/Shared/GUI/EventRole.pm index c0dc639b..f28b25ac 100644 --- a/lib/ManaTools/Shared/GUI/EventRole.pm +++ b/lib/ManaTools/Shared/GUI/EventRole.pm @@ -105,5 +105,29 @@ sub DEMOLISH { $eventHandler->delEvent($name) if defined($eventHandler); } +#============================================================= + +=head2 parentDialog + +=head3 INPUT + + $self: this object + +=head3 DESCRIPTION + + finds the parent Dialog + +=cut + +#============================================================= +sub parentDialog { + my $self = shift; + my $eventHandler = $self->eventHandler(); + while (defined($eventHandler) && !$eventHandler->isa('ManaTools::Shared::GUI::Dialog') && $eventHandler->does('ManaTools::Shared::GUI::EventRole')) { + $eventHandler = $eventHandler->eventHandler(); + } + return $eventHandler; +} + 1; |