From fc812fcb4eb576a98fcea925d49853516ecbd32a Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 18 May 2006 11:35:46 +0000 Subject: [PATCH] Added resolution hook results to WS & Terminal service git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3427 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_terminalService.inc | 18 ++++++++++++++++++ .../systems/class_workstationService.inc | 19 +++++++++++++++++++ 2 files changed, 37 insertions(+) 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( -- 2.30.2