From fc14bb98642e9ad762bd604d598d5fe563c41b79 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 17 Dec 2008 18:04:16 +0000 Subject: Further simplification for certain plugin actions (hopefully) ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2428 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm | 54 +++-------------------- 1 file changed, 6 insertions(+), 48 deletions(-) (limited to 'os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm') diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm index 962fb3db..b8e966b8 100644 --- a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm @@ -46,9 +46,9 @@ sub getDefaultDesktopManager my $self = shift; # the default implementation prefers GDM over KDM over XDM - return $self->isGDMInstalled() ? 'gdm' - : $self->isKDMInstalled() ? 'kdm' - : $self->isXDMInstalled() ? 'xdm' : undef; + return $self->isPackInstalled('gdm') ? 'gdm' + : $self->isPackInstalled('kdm') ? 'kdm' + : $self->isPackInstalled('xdm') ? 'xdm' : undef; } sub getDefaultDesktopKind @@ -56,16 +56,9 @@ sub getDefaultDesktopKind my $self = shift; # the default implementation prefers GNOME over KDE over XFCE - return $self->isGNOMEInstalled() ? 'gnome' - : $self->isKDEInstalled() ? 'kde' - : $self->isXFCEInstalled() ? 'xfce' : undef; -} - -sub isGNOMEInstalled -{ - my $self = shift; - - return $self->isInPath('gnome-session'); + return $self->isPackInstalled('gnome-session') ? 'gnome' + : $self->isPackInstalled('startkde') ? 'kde' + : $self->isPackInstalled('startxfce') ? 'xfce' : undef; } sub installGNOME @@ -79,13 +72,6 @@ sub installGNOME return 1; } -sub isGDMInstalled -{ - my $self = shift; - - return $self->isInPath('gdm'); -} - sub installGDM { my $self = shift; @@ -224,13 +210,6 @@ sub GDMConfigHashForChooser return $configHash; } -sub isKDEInstalled -{ - my $self = shift; - - return $self->isInPath('startkde'); -} - sub installKDE { my $self = shift; @@ -242,13 +221,6 @@ sub installKDE return 1; } -sub isKDMInstalled -{ - my $self = shift; - - return $self->isInPath('kdm'); -} - sub installKDM { my $self = shift; @@ -383,13 +355,6 @@ sub KDMConfigHashForChooser return $configHash; } -sub isXFCEInstalled -{ - my $self = shift; - - return $self->isInPath('startxfce4'); -} - sub installXFCE { my $self = shift; @@ -401,13 +366,6 @@ sub installXFCE return 1; } -sub isXDMInstalled -{ - my $self = shift; - - return $self->isInPath('xdm'); -} - sub installXDM { my $self = shift; -- cgit v1.2.3-55-g7522