Created the main window

This commit is contained in:
Timothy Warren 2012-01-27 11:57:13 -05:00
parent 7fa93a8886
commit cde1fbf83f
3 changed files with 34 additions and 4 deletions

14
src/databases/db_pdo.php Normal file
View 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 {
}

View File

@ -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]);
}
}
// Create the main window
$wnd = new Main();
$wnd->show_all();
//Start the GTK event loop // Start the GTK event loop
GTK::main(); GTK::main();

View File

@ -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'));
} }
} }