aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ManaTools/Shared/GUI/ActionList.pm
diff options
context:
space:
mode:
authorMaarten Vanraes <alien@mageia.org>2016-04-24 21:37:30 +0200
committerMaarten Vanraes <alien@mageia.org>2016-04-24 23:23:39 +0200
commit71c941594e36b631d26e49049576e669e0798ccf (patch)
treeb58ecad8683ed42588a242cc8bc1fef5c4827833 /lib/ManaTools/Shared/GUI/ActionList.pm
parentcb5c1fb04b6a80b5af3313bdc679f09cd2ceac7d (diff)
downloadmanatools-71c941594e36b631d26e49049576e669e0798ccf.tar
manatools-71c941594e36b631d26e49049576e669e0798ccf.tar.gz
manatools-71c941594e36b631d26e49049576e669e0798ccf.tar.bz2
manatools-71c941594e36b631d26e49049576e669e0798ccf.tar.xz
manatools-71c941594e36b631d26e49049576e669e0798ccf.zip
Handle eventHandlers more consistently
Diffstat (limited to 'lib/ManaTools/Shared/GUI/ActionList.pm')
-rw-r--r--lib/ManaTools/Shared/GUI/ActionList.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/ManaTools/Shared/GUI/ActionList.pm b/lib/ManaTools/Shared/GUI/ActionList.pm
index 77c2b49e..2c3bba51 100644
--- a/lib/ManaTools/Shared/GUI/ActionList.pm
+++ b/lib/ManaTools/Shared/GUI/ActionList.pm
@@ -83,9 +83,9 @@ use ManaTools::Shared::GUI::ReplacePoint;
#=============================================================
-has 'parentDialog' => (
+has 'eventHandler' => (
is => 'ro',
- isa => 'ManaTools::Shared::GUI::Dialog',
+ does => 'ManaTools::Shared::GUI::EventHandlerRole',
required => 1,
);
@@ -109,7 +109,11 @@ has 'replacepoint' => (
lazy => 1,
default => sub {
my $self = shift;
- my $rpl = ManaTools::Shared::GUI::ReplacePoint->new(eventHandler => $self->parentDialog(), parentWidget => $self->parentWidget());
+ my $eventHandler = $self->eventHandler();
+ my $dialog = $eventHandler->parentDialog();
+ my $factory = $dialog->factory();
+ my $rpl = ManaTools::Shared::GUI::ReplacePoint->new(eventHandler => $self->eventHandler(), parentWidget => $self->parentWidget());
+ $factory->createVStretch($rpl->container());
$rpl->finished();
return $rpl;
},
@@ -132,7 +136,8 @@ has 'replacepoint' => (
#=============================================================
sub refresh {
my $self = shift;
- my $dialog = $self->parentDialog();
+ my $eventHandler = $self->eventHandler();
+ my $dialog = $eventHandler->parentDialog();
my $factory = $dialog->factory();
my $parentWidget = $self->parentWidget();
my $replacepoint = $self->replacepoint();