Widget managing saved database connections

 Methods

Constructor method

__construct() 

Creates and displays a context menu for the selected connection

conn_popup_menu(array $all) : void

Parameters

$all

array

Create connection to a database

db_connect() : void

Disconnect from a database

db_disconnect() : void

Update the connection information for an existing connection

edit_connection() : void

Return the current instance of the class

get_instance() : \Connection_Sidebar

Returns window for creating a new database connection

new_conn() : \Add_DB

Returns

\Add_DBobject

Event for mouse clicks on connection sidebar

on_button(\GtkTreeView $view, $event) : void

Parameters

$view

\GtkTreeView

$event

Recreate sidebar widget to update connections

refresh() : void

Remove a connection from the connection manager

remove_connection() : void

Sets the icon for the current db type

set_icon(\GtkTreeView $col, \GtkCellRenderer $cell, \GtkTreeModel $model, \GtkTreeIter $iter) : void

Parameters

$col

\GtkTreeView

Column $col

$cell

\GtkCellRenderer

$model

\GtkTreeModel

$iter

\GtkTreeIter

Sets the label of the current db connection

set_label(\GtkTreeViewColumn $col, \GtkCellRenderer $cell, \GtkTreeModel $model, \GtkTreeIter $iter) : void

Parameters

$col

\GtkTreeViewColumn

$cell

\GtkCellRenderer

$model

\GtkTreeModel

$iter

\GtkTreeIter

Sets the status icon of the current db connection

set_status_icon(\GtkTreeViewColumn $col, \GtkCellRenderer $cell, \GtkTreeModel $model, \GtkTreeIter $iter) : void

Parameters

$col

\GtkTreeViewColumn

$cell

\GtkCellRenderer

$model

\GtkTreeModel

$iter

\GtkTreeIter

Change tabs based on db connection selected

switch_tab(\GtkTreeView $view) : void

Parameters

$view

\GtkTreeView

Renders the connection sidebar widget

_render() : void

 Properties

 

Reference to popup menu

$menu 

 

Reference to Settings instance

$settings 

 

Treeview for displaying connections

$treeview 

 

Name of current db connection

$conn_name 

 

Singleton instance

$instance