From f9bfed3fba01029c3267ef18f72eba87dee5dc54 Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Sat, 6 Sep 2014 22:30:27 +0200 Subject: fixed File::ShareDir::dist_file distName from Shared --- lib/AdminPanel/MainDisplay.pm | 7 ++++--- lib/AdminPanel/Module/Users.pm | 1 + lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm | 7 ++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/AdminPanel/MainDisplay.pm b/lib/AdminPanel/MainDisplay.pm index 72dd9b6..c5c496e 100644 --- a/lib/AdminPanel/MainDisplay.pm +++ b/lib/AdminPanel/MainDisplay.pm @@ -93,6 +93,7 @@ use AdminPanel::SettingsReader; use AdminPanel::ConfigReader; use AdminPanel::Category; use AdminPanel::Module; +use AdminPanel::Shared; use AdminPanel::Shared::GUI; use AdminPanel::Shared::Locales; use File::ShareDir ':ALL'; @@ -297,7 +298,7 @@ sub setupGui { yui::YUI::app()->setApplicationTitle($self->{name}); my $icon = defined($self->{settings}->{icon}) ? $self->{settings}->{icon} : - File::ShareDir::dist_file('AdminPanel', 'images/mageia.png'); + File::ShareDir::dist_file(AdminPanel::Shared::distName(), 'images/mageia.png'); yui::YUI::app()->setApplicationIcon($icon); @@ -349,7 +350,7 @@ sub setupGui { #logo from settings my $logofile = defined($self->{settings}->{logo}) ? $self->{settings}->{logo} : - File::ShareDir::dist_file('AdminPanel', 'images/logo_mageia.png'); + File::ShareDir::dist_file(AdminPanel::Shared::distName(), 'images/logo_mageia.png'); my $logo = $self->{factory}->createImage($self->{leftPane}, $logofile); $logo->setAutoScale(1); @@ -361,7 +362,7 @@ sub setupGui { $self->{factory}->createVStretch($self->{leftPane}); $self->{exitButton} = $self->{factory}->createPushButton($self->{leftPane}, "Exit"); - my $quitIcon = File::ShareDir::dist_file('AdminPanel', 'images/quit.png'); + my $quitIcon = File::ShareDir::dist_file(AdminPanel::Shared::distName(), 'images/quit.png'); $self->{exitButton}->setIcon($quitIcon); $self->{exitButton}->setStretchable(0, 1); } diff --git a/lib/AdminPanel/Module/Users.pm b/lib/AdminPanel/Module/Users.pm index 33d2ade..589a37e 100644 --- a/lib/AdminPanel/Module/Users.pm +++ b/lib/AdminPanel/Module/Users.pm @@ -79,6 +79,7 @@ use Sys::Syslog; use Glib; use English; use yui; +use AdminPanel::Shared; use AdminPanel::Shared::GUI; use AdminPanel::Shared::Locales; use AdminPanel::Shared::Users; diff --git a/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm b/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm index aa900b5..154f304 100644 --- a/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm +++ b/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm @@ -30,6 +30,7 @@ use File::HomeDir qw(home); use lib qw(/usr/lib/libDrakX); use common; +use AdminPanel::Shared; use AdminPanel::Shared::Locales; use AdminPanel::rpmdragora; use AdminPanel::Rpmdragora::init; @@ -1464,7 +1465,7 @@ sub readMedia { ## NOTE anaselli: next lines add check icon to cells, but they are 8x8, a dimension should ## be evaluated by font size, so disabled atm # my $cell = $item->cell(0); # Checked -# my $checkedIcon = File::ShareDir::dist_file('AdminPanel', 'images/Check_8x8.png'); +# my $checkedIcon = File::ShareDir::dist_file(AdminPanel::Shared::distName(), 'images/Check_8x8.png'); # # $cell->setIconName($checkedIcon) if (!$_->{ignore}); # $cell = $item->cell(1); # Updates @@ -1667,8 +1668,8 @@ sub mainwindow() { $hbox = $factory->createHBox( $vbox_commands ); ## TODO icon and label for ncurses - my $upIcon = File::ShareDir::dist_file('AdminPanel', 'images/Up_16x16.png'); - my $downIcon = File::ShareDir::dist_file('AdminPanel', 'images/Down_16x16.png'); + my $upIcon = File::ShareDir::dist_file(AdminPanel::Shared::distName(), 'images/Up_16x16.png'); + my $downIcon = File::ShareDir::dist_file(AdminPanel::Shared::distName(), 'images/Down_16x16.png'); my $upButton = $factory->createPushButton($factory->createHBox($hbox), $loc->N("Up")); my $downButton = $factory->createPushButton($factory->createHBox($hbox), $loc->N("Down")); $upButton->setIcon($upIcon); -- cgit v1.2.1