Re-add Data Grid
This commit is contained in:
parent
7075ae51fa
commit
382fb8e711
43
sys/common/data_grid.php
Normal file
43
sys/common/data_grid.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* OpenSQLManager
|
||||||
|
*
|
||||||
|
* Free Database manager for Open Source Databases
|
||||||
|
*
|
||||||
|
* @author Timothy J. Warren
|
||||||
|
* @copyright Copyright (c) 2012
|
||||||
|
* @link https://github.com/aviat4ion/OpenSQLManager
|
||||||
|
* @license http://philsturgeon.co.uk/code/dbad-license
|
||||||
|
*/
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
*Class to simplify dealing with GtkTreeView
|
||||||
|
*/
|
||||||
|
class Data_Grid extends GtkTreeView {
|
||||||
|
|
||||||
|
protected $model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the object
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->model = new GtkTreeStore(Gobject::TYPE_PHP_VALUE, Gobject::TYPE_PHP_VALUE);
|
||||||
|
parent::__construct($this->model);
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of the cell at the provided coordinate array
|
||||||
|
*
|
||||||
|
* @param array $coord
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function get(array $coord)
|
||||||
|
{
|
||||||
|
// @todo implement
|
||||||
|
}
|
||||||
|
}
|
@ -150,7 +150,7 @@ class Main extends GtkWindow {
|
|||||||
|
|
||||||
$scrolled_win = new GtkScrolledWindow();
|
$scrolled_win = new GtkScrolledWindow();
|
||||||
$scrolled_win->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
|
$scrolled_win->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
|
||||||
//$scrolled_win->add(new DataGrid());
|
$scrolled_win->add(new Data_Grid());
|
||||||
|
|
||||||
// Add the connection sidebar
|
// Add the connection sidebar
|
||||||
$this->connection_sidebar =& Connection_Sidebar::get_instance();
|
$this->connection_sidebar =& Connection_Sidebar::get_instance();
|
||||||
@ -189,10 +189,6 @@ class Main extends GtkWindow {
|
|||||||
|
|
||||||
//File Menu
|
//File Menu
|
||||||
{
|
{
|
||||||
//Set up the open item
|
|
||||||
//$open = new GtkImageMenuItem(GTK::STOCK_OPEN);
|
|
||||||
//$file_menu->append($open);
|
|
||||||
|
|
||||||
//Set up the quit item
|
//Set up the quit item
|
||||||
$quit = new GtkImageMenuItem(GTK::STOCK_QUIT);
|
$quit = new GtkImageMenuItem(GTK::STOCK_QUIT);
|
||||||
$quit->connect_simple('activate', array($this, 'quit'));
|
$quit->connect_simple('activate', array($this, 'quit'));
|
||||||
|
Loading…
Reference in New Issue
Block a user