Created the main window
This commit is contained in:
parent
7fa93a8886
commit
cde1fbf83f
14
src/databases/db_pdo.php
Normal file
14
src/databases/db_pdo.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?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 DB_PDO extends PDO {
|
||||||
|
|
||||||
|
}
|
@ -14,12 +14,23 @@ if ( ! class_exists('gtk'))
|
|||||||
die("Please load the php-gtk2 module in your php.ini\r\n");
|
die("Please load the php-gtk2 module in your php.ini\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
//Load modules
|
$dir = dirname(__FILE__);
|
||||||
$dbs = array_map('require_once', glob('./databases/*.php'));
|
|
||||||
$wnds = array_map('require_once', glob('./windows/*.php'));
|
|
||||||
|
|
||||||
|
// Load modules
|
||||||
|
{
|
||||||
|
|
||||||
|
$requires = glob("{$dir}/databases/*.php");
|
||||||
|
$requires = array_merge($requires, glob("{$dir}/windows/*.php"));
|
||||||
|
|
||||||
|
for($i=0, $count=count($requires); $i<$count; $i++)
|
||||||
|
{
|
||||||
|
require_once($requires[$i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Start the GTK event loop
|
// Create the main window
|
||||||
|
$wnd = new Main();
|
||||||
|
$wnd->show_all();
|
||||||
|
|
||||||
|
// Start the GTK event loop
|
||||||
GTK::main();
|
GTK::main();
|
@ -14,6 +14,11 @@ class Main extends GtkWindow {
|
|||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->set_title('OpenSQLManager');
|
||||||
|
|
||||||
|
// Quit when this window is closed
|
||||||
|
$this->connect_simple('destroy', array('gtk', 'main_quit'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user