Misc tweaks

This commit is contained in:
Timothy Warren 2012-06-05 16:53:03 -04:00
parent f0ffcc577c
commit dfb975119d
5 changed files with 21 additions and 46 deletions

View File

@ -182,6 +182,14 @@ class OpenSQLManager extends \wxApp {
\wxExit(); \wxExit();
return 0; return 0;
} }
/**
* Handle Fatal Exceptions
*/
public function OnFatalException($e)
{
file_put_contents('errors.txt', print_r($e, TRUE), FILE_APPEND);
}
} }
// Create the app instance // Create the app instance

View File

@ -21,8 +21,8 @@ namespace OpenSQLManager;
* Decouples the Settings class from the query builder * Decouples the Settings class from the query builder
* and organizes database connections * and organizes database connections
* *
* @package Query * @package OpenSQLManager
* @subpackage Helper Classes * @subpackage Common
*/ */
class DB_Reg { class DB_Reg {

View File

@ -12,8 +12,13 @@
*/ */
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// ! Global Functions
// -------------------------------------------------------------------------- /**
* Global Functions
*
* @package OpenSQLManager
* @subpackage Common
*/
namespace OpenSQLManager; namespace OpenSQLManager;

View File

@ -18,8 +18,8 @@ namespace OpenSQLManager;
/** /**
* Class for manipulating datbase connections, and miscellaneous settings * Class for manipulating datbase connections, and miscellaneous settings
* *
* @package Query * @package OpenSQLManager
* @subpackage Helper Classes * @subpackage Common
*/ */
class Settings { class Settings {

View File

@ -175,50 +175,12 @@ class Connection_Sidebar extends \wxPanel {
*/ */
private function _layout() private function _layout()
{ {
// Create an ImageList
/*\wxBitmap::InitStandardHandlers();
$img_list = new \wxImageList();
$img_list->Add(new \wxBitmap(BASE_DIR . '/images/firebirdlogo32.xpm', wxBITMAP_TYPE_XPM));
$img_list->Add(new \wxBitmap(BASE_DIR . '/images/mysqllogo32.xpm', wxBITMAP_TYPE_XPM));
$img_list->Add(new \wxBitmap(BASE_DIR . '/images/posgresqllogo32.xpm', wxBITMAP_TYPE_XPM));
$img_list->Add(new \wxBitmap(file_get_contents(BASE_DIR . '/images/sqlitelogo32.xpm'), wxBITMAP_TYPE_XPM_DATA));*/
// Add the actual connections // Add the actual connections
$conns = $this->settings->get_dbs(); $conns = $this->settings->get_dbs();
foreach($conns as $c) foreach($conns as $c)
{ {
/*switch($c->type)
{
case "firebird":
$img_num = 0;
break;
case "mysql":
$img_num = 1;
break;
case "pgsql":
$img_num = 2;
break;
case "sqlite":
$img_num = 3;
break;
default:
$img_num = NULL;
break;
}*/
/*if ( ! is_null($img_num))
{
$this->list->InsertItem(0, $c->name, 0);
}
else
{*/
$this->list->InsertItem(0, $c->name); $this->list->InsertItem(0, $c->name);
//}
} }
} }
} }