cvs: pear /PEAR_Frontend_Gtk/Gtk Packages.php

From: Date: Sun, 02 Jun 2002 13:29:26 +0000
Subject: cvs: pear /PEAR_Frontend_Gtk/Gtk Packages.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4367@lists.php.net to get a copy of this message
alan_k Sun Jun 2 09:29:26 2002 EDT Modified files: /pear/PEAR_Frontend_Gtk/Gtk Packages.php Log: Fixed a bit of error handling - just needs to do display a dialog now, removed a bit of debugging Index: pear/PEAR_Frontend_Gtk/Gtk/Packages.php diff -u pear/PEAR_Frontend_Gtk/Gtk/Packages.php:1.7 pear/PEAR_Frontend_Gtk/Gtk/Packages.php:1.8 --- pear/PEAR_Frontend_Gtk/Gtk/Packages.php:1.7 Sun Jun 2 03:32:19 2002 +++ pear/PEAR_Frontend_Gtk/Gtk/Packages.php Sun Jun 2 09:29:25 2002 @@ -16,7 +16,7 @@ | Author: Alan Knowles <alan@akbkhome.com> | +----------------------------------------------------------------------+ - $Id: Packages.php,v 1.7 2002/06/02 07:32:19 alan_k Exp $ + $Id: Packages.php,v 1.8 2002/06/02 13:29:25 alan_k Exp $ */ require('PEAR/Frontend/Gtk/PackageData.php'); /** @@ -71,16 +71,17 @@ // get available if (!$this->_available_packages) { $r = new PEAR_Remote($this->ui->config); - $this->_available_packages = $r->call('package.listAll', true); - if (PEAR::isError($this->_available_packages)) { - // whats the official way to hanlde this? - echo $this->_available_packages->message . '\n'; - exit; - + $packages = $r->call('package.listAll', true); + if (PEAR::isError($packages)) { + $this->ui->displayFatalError($packages); + return; } + $this->_available_packages = $packages; } + // merge available + foreach ($this->_available_packages as $name => $info) { // installed already? $info['package'] = $name; @@ -100,7 +101,7 @@ } } ksort($this->_package_status); - echo "FINISHED LOADING DATA"; + } @@ -153,7 +154,7 @@ if ($s && !$parent && ($ar[0] != $name)) { // make a parent node - echo "making node $s"; + $this->_nodes[$s] = $this->widget->insert_node( NULL, NULL, //parent, sibling array($s, '','','','',''), @@ -342,11 +343,9 @@ function loadRemotePackages () { $r = new PEAR_Remote($this->ui->config); $remote = $r->call('package.listAll', true); - if (PEAR::isError($packagear)) { - // whats the official way to hanlde this? - echo $this->_available_packages->message . '\n'; - exit; - + if (PEAR::isError($remote)) { + $this->ui->displayFatalError($remote); + return; } foreach ($remote as $name => $packagear) { $package = PEAR_Frontend_Gtk_PackageData::staticNewFromArray($packagear); @@ -392,7 +391,6 @@ $ret[] = &$this->packages[$packagename]; } return $ret; - } function &getRemoveQueue() {

« previous php.pear.cvs (#4367) next »