apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: PEAR_Frontend_Gtk2

Source Location: /PEAR_Frontend_Gtk2-1.1.0/PEAR/Frontend/Gtk2.php

Class Overview

PEAR_Frontend
   |
   --PEAR_Frontend_Gtk2

Graphical frontend for PEAR, based on PHP-Gtk2


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 47]
Graphical frontend for PEAR, based on PHP-Gtk2

TODO:

  • Package categories aren't updated/extendet if there is an error at startup loading/packages are refreshed and a new category is required
  • Warn if the package list is older than 5 days
  • upgrade-all menu option
  • Filter by upgradeable/installed/installable/all packages
  • Channel server icons in channel.xml -> use them and cache locally
  • Config settings window
Don't know how to do:
  • installation dialog showing has to be updated correctly
  • Installation: shrink window if expander is collapsed
Done:
  • Drop package file onto install button -> install it
  • Install pecl packages - error messages aren't shown
  • channel discovery
  • better installation ok icon
  • Window icon - shows the php icon on windows currently
  • When no internet connection on startup, no categories are loaded and no local packages are shown
  • When no pear cache directory exists, the check warning is shown - pear cache directory is created now
  • uninstall: pear/liveuser is required by installed package "pear/Event_Dispatcher"
  • use menu options (deps, nodeps)
  • refresh online info (clear cache or so)
  • offline mode
  • save and load settings
  • scroll text in installation



[ Top ]


Class Variables

$arAnimationImages = array()

[line 72]

Array with images used for the progress animation
  • Access: protected

Type:   mixed


[ Top ]

$arRequestedWidgets = array(
        'dlgInstaller', 'lstCategories', 'lstPackages', 'txtPackageInfo',
        'cmbChannel', 'imgChannelLogo', 'lblSelectedCategory', 'hboxCategoryInfo',
        'btnInstall','btnUninstall','lblBtnInstall','evboxSelectedCategory','expPackageInfo',

        'mnuOptDepsNo','mnuOptDepsReq','mnuOptDepsAll','mnuOptDepNothing',
        'mnuOptForce',
        'mnuOffline','mnuQuit','mnuAbout','mnuUpdateOnline','mnuUpdateLocal',
        'mnuChannels','mnuConfig','mnuInstallLocal',

        'dlgProgress', 'lblDescription', 'imgProgress', 'lblProgress', 'progBar'
    )

[line 54]

The widgets which shall be loaded from the glade

file into the $arWidgets array

  • Access: protected

Type:   array


[ Top ]

$arSpecialCategories = array(
        PEAR_Frontend_Gtk2::CATEGORY_ALL      => '*All packages',
//        PEAR_Frontend_Gtk2::CATEGORY_SELECTED => '*Selected for install'
    )

[line 121]

Special categories which are added to the

channel categories

  • Access: protected

Type:   array


[ Top ]

$arWidgets =

[line 80]

Requested widgets are loaded from glade into this array.

So this is an associative array with all required widgets from the glade file: name => widget object

  • Access: protected

Type:   array


[ Top ]

$channelDialog =  null

[line 92]

The channel dialog
  • Access: protected

Type:   PEAR_Frontend_Gtk2_ChannelDialog


[ Top ]

$installer =  null

[line 86]

The PEAR_Frontend_Gtk2_Installation object to use
  • Access: protected

Type:   PEAR_Frontend_Gtk2_Installation


[ Top ]

$nProgressImage =  1

[line 67]

  • Access: protected

Type:   mixed


[ Top ]

$packages =  null

[line 102]

The package information class instance
  • Access: protected

Type:   PEAR_Frontend_Gtk2_Packages


[ Top ]

$selectedPackage =  null

[line 94]

  • Access: protected

Type:   mixed


[ Top ]

$strLastFile =  null

[line 109]

Last package file that has been installed
  • Access: protected

Type:   string


[ Top ]

$strSelectedCategoryKey =  null

[line 96]

  • Access: protected

Type:   mixed


[ Top ]

$strSelectedCategoryName =  null

[line 95]

  • Access: protected

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 127]

PEAR_Frontend_Gtk2 __construct( )

  • Access: public

[ Top ]

ableInstallButtons   [line 598]

void ableInstallButtons( PEAR_Frontend_Gtk2_Package $package)

Enables or disables the install buttons depending on the installation status of $package
  • Access: protected

Parameters:

PEAR_Frontend_Gtk2_Package   $package   —  The package to check

[ Top ]

appendSpecialCategories   [line 417]

array appendSpecialCategories( array $arCategories)

Appends defined special categories to the given list
  • Return: Array of categories with special ones

Parameters:

array   $arCategories   —  Array of categories

[ Top ]

buildDialog   [line 180]

void buildDialog( )

load the glade file, load the widgets, connect the signals
  • Access: protected

[ Top ]

deleteProgressWindow   [line 722]

void deleteProgressWindow( )

The user may not close the progress window by hand
  • Access: public

[ Top ]

displayFatalError   [line 869]

void displayFatalError( PEAR_Error $error)

A fatal error occured
  • Access: public

Parameters:

PEAR_Error   $error   —  The error

[ Top ]

getInstaller   [line 289]

void getInstaller( )

  • Access: public

[ Top ]

getSelectedPackage   [line 630]

void getSelectedPackage( )

  • Access: protected

[ Top ]

getWidget   [line 751]

void getWidget( $strWidget)

  • Access: public

Parameters:

   $strWidget   — 

[ Top ]

getWorkOffline   [line 733]

boolean getWorkOffline( )

Check if the user wants to work offline
  • Return: True, if the offline setting is active (work offline), false if working online
  • Access: protected

[ Top ]

hideProgressDialog   [line 711]

void hideProgressDialog( )

Hides the progress dialog
  • Access: protected

[ Top ]

installFile   [line 837]

void installFile( string $strFile)

Install the given package file
  • Access: protected

Parameters:

string   $strFile   —  File to install

[ Top ]

installPackage   [line 649]

void installPackage( [boolean $bInstall = true])

Installs (or uninstalls) the selected package

Parameters:

boolean   $bInstall   —  True if the package shall be installed, false if it shall be uninstalled

[ Top ]

loadChannels   [line 152]

void loadChannels( [string $strDefaultChannel = null])

Fill the channel dropdown with channel names
  • Access: public

Parameters:

string   $strDefaultChannel   —  The channel to set active

[ Top ]

loadConfig   [line 139]

void loadConfig( )


[ Top ]

loadInstaller   [line 281]

void loadInstaller( )

  • Access: protected

[ Top ]

onFilesDropped   [line 824]

void onFilesDropped( $widget, $arFiles)

Some files have been dropped on the install button
  • Access: public

Parameters:

   $widget   — 
   $arFiles   — 

[ Top ]

onInstallLocalPackage   [line 784]

void onInstallLocalPackage( )

Let the user select a .tgz package file that will be installed.
  • Access: public

[ Top ]

packagesCallback   [line 544]

void packagesCallback( $nPackageCount, $nCurrentPackage)

Callback for the package loading functions

Parameters:

   $nPackageCount   — 
   $nCurrentPackage   — 

[ Top ]

quitApp   [line 168]

void quitApp( )

  • Access: public

[ Top ]

refreshLocalPackages   [line 761]

void refreshLocalPackages( )

Reload local package information and update the list.
  • Access: public

[ Top ]

refreshOnlinePackages   [line 773]

void refreshOnlinePackages( )

Reload the online package list and package information, and update the list here.
  • Access: public

[ Top ]

selectCategory   [line 430]

void selectCategory( $selection)

A category has been selected

Parameters:

   $selection   — 

[ Top ]

selectChannel   [line 314]

void selectChannel( GtkComboBox $cmbChannel, [boolean $bSecondTime = false])

A channel has been selected from the channel combo box

Has to be public as it is a callback function

  • Access: public

Parameters:

GtkComboBox   $cmbChannel   —  The channel selection combo box
boolean   $bSecondTime   —  If the function is being run a second time (because the first run had a problem) - used to detect infinite loops.

[ Top ]

selectPackage   [line 567]

void selectPackage( $selection)

  • Access: public

Parameters:

   $selection   — 

[ Top ]

selectPackageByName   [line 480]

void selectPackageByName( string $strPackage)

Selects the given package
  • Access: public

Parameters:

string   $strPackage   —  The package name (without channel!)

[ Top ]

setChannelStyles   [line 385]

void setChannelStyles( $strChannel)

  • Access: protected

Parameters:

   $strChannel   — 

[ Top ]

setSelectedPackage   [line 637]

void setSelectedPackage( $package)

  • Access: protected

Parameters:

   $package   — 

[ Top ]

setWorkOffline   [line 744]

void setWorkOffline( boolean $bOffline)

Set the offline setting
  • Access: protected

Parameters:

boolean   $bOffline   —  If the user wants to work offline (true) or not (false)

[ Top ]

showChannelDialog   [line 296]

void showChannelDialog( )

  • Access: public

[ Top ]

showPackageList   [line 453]

void showPackageList( $strCategory)

Fill the package list for the given category
  • Access: protected

Parameters:

   $strCategory   — 

[ Top ]

showProgressDialog   [line 687]

void showProgressDialog( [boolean $bInitWithZero = false])

Shows the progress dialog if that hasn't already been done
  • Access: protected

Parameters:

boolean   $bInitWithZero   —  If the dialog's labels should be initialized (if the dialog has been hidden)

[ Top ]

updateInstallButtons   [line 620]

void updateInstallButtons( )

  • Access: protected

[ Top ]

updatePackageList   [line 519]

void updatePackageList( array $arPackages)

Update the package list model entries for the given packages.

Useful after installing/uninstalling a package

  • Access: protected

Parameters:

array   $arPackages   —  Array of packages which model entry shall be updated

[ Top ]

userConfirm   [line 857]

void userConfirm( )

  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:46:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.