From da1673f956297f914d1385a5a4f2a53af5f1821c Mon Sep 17 00:00:00 2001 From: Maarten Vanraes Date: Mon, 9 May 2016 09:09:26 +0200 Subject: use the module's title and icon by default --- lib/ManaTools/Shared/GUI/Dialog.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/ManaTools/Shared/GUI/Dialog.pm b/lib/ManaTools/Shared/GUI/Dialog.pm index 4406daa8..efb8fab7 100644 --- a/lib/ManaTools/Shared/GUI/Dialog.pm +++ b/lib/ManaTools/Shared/GUI/Dialog.pm @@ -201,13 +201,21 @@ class_has 'popupDialog' => ( has 'title' => ( is => 'ro', isa => 'Str', - required => 1, + lazy => 1, + default => sub { + my $self = shift; + return $self->module->title(); + } ); has 'icon' => ( is => 'ro', isa => 'Str', - required => 1, + lazy => 1, + default => sub { + my $self = shift; + return $self->module->icon(); + } ); class_has 'cancelButton' => ( -- cgit v1.2.1