From dffd6f978852434d495de70d37b6f7b9168408b8 Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Tue, 17 Feb 2015 16:02:17 +0100 Subject: Added common shortcut to dialog push button (About, Cancel, Ok) --- lib/AdminPanel/Module/Clock.pm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/AdminPanel/Module/Clock.pm') diff --git a/lib/AdminPanel/Module/Clock.pm b/lib/AdminPanel/Module/Clock.pm index b27e859..22fa059 100644 --- a/lib/AdminPanel/Module/Clock.pm +++ b/lib/AdminPanel/Module/Clock.pm @@ -59,12 +59,12 @@ use AdminPanel::Shared::Locales; use AdminPanel::Shared::TimeZone; use Time::Piece; - + use yui; extends qw( AdminPanel::Module ); -### TODO icon +### TODO icon has '+icon' => ( default => "/usr/share/mcc/themes/default/time-mdk.png", ); @@ -218,7 +218,7 @@ sub _adminClockPanel { my $factory = yui::YUI::widgetFactory; my $optFactory = yui::YUI::optionalWidgetFactory; - die "calendar widgets missing" if (!$optFactory->hasDateField() || !$optFactory->hasTimeField()); + die "calendar widgets missing" if (!$optFactory->hasDateField() || !$optFactory->hasTimeField()); # Create Dialog my $dialog = $factory->createMainDialog; @@ -243,7 +243,7 @@ sub _adminClockPanel { my $ntpFrame = $factory->createCheckBoxFrame($hbox, $self->loc->N("Enable Network Time Protocol"), 0); my $hbox1 = $factory->createHBox($ntpFrame); - my $changeNTPButton = $factory->createPushButton($hbox1, $self->loc->N("Change NTP server")); + my $changeNTPButton = $factory->createPushButton($hbox1, $self->loc->N("Change &NTP server")); $factory->createHSpacing($hbox1, 1.0); $factory->createLabel($hbox1,$self->loc->N("Current:")); $factory->createHSpacing($hbox1, 1.0); @@ -258,7 +258,7 @@ sub _adminClockPanel { $hbox = $factory->createHBox($align); $frame = $factory->createFrame ($hbox, $self->loc->N("TimeZone")); $hbox1 = $factory->createHBox( $frame ); - my $changeTZButton = $factory->createPushButton($hbox1, $self->loc->N("Change Time Zone")); + my $changeTZButton = $factory->createPushButton($hbox1, $self->loc->N("Change &Time Zone")); $factory->createHSpacing($hbox1, 1.0); $factory->createLabel($hbox1,$self->loc->N("Current:")); $factory->createHSpacing($hbox1, 1.0); @@ -275,19 +275,19 @@ sub _adminClockPanel { $align = $factory->createLeft($hbox); $hbox = $factory->createHBox($align); - my $aboutButton = $factory->createPushButton($hbox, $self->loc->N("About") ); - my $resetButton = $factory->createPushButton($hbox, $self->loc->N("Reset") ); + my $aboutButton = $factory->createPushButton($hbox, $self->loc->N("&About") ); + my $resetButton = $factory->createPushButton($hbox, $self->loc->N("&Reset") ); $align = $factory->createRight($hbox); $hbox = $factory->createHBox($align); - my $cancelButton = $factory->createPushButton($hbox, $self->loc->N("Cancel")); - my $okButton = $factory->createPushButton($hbox, $self->loc->N("Ok")); + my $cancelButton = $factory->createPushButton($hbox, $self->loc->N("&Cancel")); + my $okButton = $factory->createPushButton($hbox, $self->loc->N("&Ok")); $factory->createHSpacing($hbox, 1.0); ## no changes by default $dialog->setDefaultButton($cancelButton); - # End Dialof layout + # End Dialof layout ## default value my $info = $self->_restoreValues(); -- cgit v1.2.1