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

Class: PEAR_Frontend_Gtk2

Source Location: /PEAR_Frontend_Gtk2-0.1.0/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 42]
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
  • Drop package file onto install button -> install it
  • Warn if the package list is older than 5 days
  • upgrade-all menu option
  • Filter by upgradeable/installed/installable/all packages
Don't know how to do:
  • installation dialog showing has to be updated correctly
  • Installation: shrink window if expander is collapsed
Done:
  • 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 66]

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',
        'mnuOffline','mnuQuit','mnuAbout','mnuUpdateOnline','mnuUpdateLocal',
        'mnuChannels',

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

[line 49]

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 108]

Special categories which are added to the

channel categories

  • Access: protected

Type:   array


[ Top ]

$arWidgets =

[line 74]

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 86]

The channel dialog
  • Access: protected

Type:   PEAR_Frontend_Gtk2_ChannelDialog


[ Top ]

$installer =  null

[line 80]

The PEAR_Frontend_Gtk2_Installation object to use
  • Access: protected

Type:   PEAR_Frontend_Gtk2_Installation


[ Top ]

$nProgressImage =  1

[line 61]

  • Access: protected

Type:   mixed


[ Top ]

$packages =  null

[line 96]

The package information class instance
  • Access: protected

Type:   PEAR_Frontend_Gtk2_Packages


[ Top ]

$selectedPackage =  null

[line 88]

  • Access: protected

Type:   mixed


[ Top ]

$strSelectedCategoryKey =  null

[line 90]

  • Access: protected

Type:   mixed


[ Top ]

$strSelectedCategoryName =  null

[line 89]

  • Access: protected

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 114]

PEAR_Frontend_Gtk2 __construct( )

  • Access: public

[ Top ]

ableInstallButtons   [line 555]

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 374]

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 167]

void buildDialog( )

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

[ Top ]

deleteProgressWindow   [line 678]

void deleteProgressWindow( )

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

[ Top ]

displayFatalError   [line 749]

void displayFatalError( PEAR_Error $error)

A fatal error occured
  • Access: public

Parameters:

PEAR_Error   $error   —  The error

[ Top ]

getInstaller   [line 252]

void getInstaller( )

  • Access: public

[ Top ]

getSelectedPackage   [line 587]

void getSelectedPackage( )

  • Access: protected

[ Top ]

getWidget   [line 707]

void getWidget( $strWidget)

  • Access: public

Parameters:

   $strWidget   — 

[ Top ]

getWorkOffline   [line 689]

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 667]

void hideProgressDialog( )

Hides the progress dialog
  • Access: protected

[ Top ]

installPackage   [line 606]

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 139]

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 126]

void loadConfig( )


[ Top ]

loadInstaller   [line 244]

void loadInstaller( )

  • Access: protected

[ Top ]

packagesCallback   [line 501]

void packagesCallback( $nPackageCount, $nCurrentPackage)

Callback for the package loading functions

Parameters:

   $nPackageCount   — 
   $nCurrentPackage   — 

[ Top ]

quitApp   [line 155]

void quitApp( )

  • Access: public

[ Top ]

refreshLocalPackages   [line 717]

void refreshLocalPackages( )

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

[ Top ]

refreshOnlinePackages   [line 729]

void refreshOnlinePackages( )

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

[ Top ]

selectCategory   [line 387]

void selectCategory( $selection)

A category has been selected

Parameters:

   $selection   — 

[ Top ]

selectChannel   [line 277]

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 524]

void selectPackage( $selection)

  • Access: public

Parameters:

   $selection   — 

[ Top ]

selectPackageByName   [line 437]

void selectPackageByName( string $strPackage)

Selects the given package
  • Access: public

Parameters:

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

[ Top ]

setChannelStyles   [line 342]

void setChannelStyles( $strChannel)

  • Access: protected

Parameters:

   $strChannel   — 

[ Top ]

setSelectedPackage   [line 594]

void setSelectedPackage( $package)

  • Access: protected

Parameters:

   $package   — 

[ Top ]

setWorkOffline   [line 700]

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 259]

void showChannelDialog( )

  • Access: public

[ Top ]

showPackageList   [line 410]

void showPackageList( $strCategory)

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

Parameters:

   $strCategory   — 

[ Top ]

showProgressDialog   [line 643]

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 577]

void updateInstallButtons( )

  • Access: protected

[ Top ]

updatePackageList   [line 476]

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 737]

void userConfirm( )

  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:38:32 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.