From: hickert Date: Thu, 18 May 2006 11:35:46 +0000 (+0000) Subject: Added resolution hook results to WS & Terminal service X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fc812fcb4eb576a98fcea925d49853516ecbd32a;p=gosa.git Added resolution hook results to WS & Terminal service git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3427 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc index 27caf1a01..5a8018c61 100644 --- a/plugins/admin/systems/class_terminalService.inc +++ b/plugins/admin/systems/class_terminalService.inc @@ -78,6 +78,24 @@ class termservice extends plugin "1400x1050" => "1400x1050", "1600x1200" => "1600x1200"); + if(isset($this->config->data['MAIN']['RESOLUTION_HOOK'])){ + $file = $this->config->data['MAIN']['RESOLUTION_HOOK']; + + if(is_readable($file)){ + $str = file_get_contents($file); + $lines = split("\n",$str); + foreach($lines as $line){ + $line = trim($line); + if(!empty($line)){ + $this->XResolutions[$line]=$line; + } + } + //natcasesort($this->gotoXResolutions); + }else{ + print_red(sprintf(_("You have specified an external resolution hook which can't be read, please check the permission of the file '%s'."),$file)); + } + } + $this->XColordepths= array( "default" => "["._("inherited")."]", "8" => "8 " ._("bit"), diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc index 315df0e52..340091fde 100644 --- a/plugins/admin/systems/class_workstationService.inc +++ b/plugins/admin/systems/class_workstationService.inc @@ -72,6 +72,25 @@ class workservice extends plugin "1400x1050" => "1400x1050", "1600x1200" => "1600x1200"); + if(isset($this->config->data['MAIN']['RESOLUTION_HOOK'])){ + $file = $this->config->data['MAIN']['RESOLUTION_HOOK']; + + if(is_readable($file)){ + $str = file_get_contents($file); + $lines = split("\n",$str); + foreach($lines as $line){ + $line = trim($line); + if(!empty($line)){ + $this->XResolutions[$line]=$line; + } + } + //natcasesort($this->gotoXResolutions); + }else{ + print_red(sprintf(_("You have specified an external resolution hook which can't be read, please check the permission of the file '%s'."),$file)); + } + } + + array_unshift($this->XDrivers, "["._("unknown")."]"); $this->XColordepths= array(