Start on sidebar functionality

This commit is contained in:
Timothy Warren 2012-06-04 16:49:30 -04:00
parent 4709afd878
commit f5ffccb0de
7 changed files with 782 additions and 9 deletions

View File

@ -148,9 +148,9 @@ class Settings {
return FALSE;
}
if( ! isset($this->current->dbs->{$name}))
if ( ! isset($this->current->dbs->{$name}))
{
$params['name'] = $name;
$params->name = $name;
$this->current->dbs->{$name} = array();
$this->current->dbs->{$name} = $params;
@ -180,17 +180,22 @@ class Settings {
return FALSE;
}
if (isset($this->current->dbs->{$name}) && ($name === $params['name']))
if (is_object($params))
{
$params = (array) $params;
}
if (isset($this->current->dbs->{$name}) && ($name === $params->name))
{
$this->current->dbs->{$name} = $params;
}
elseif ($name !== $params['name'])
elseif ($name !== $params->name)
{
unset($this->current->dbs->{$name});
if ( ! isset($this->current->dbs->{$params['name']}))
if ( ! isset($this->current->dbs->{$params->name}))
{
$this->current->dbs->{$params['name']} = $params;
$this->current->dbs->{$params->name} = $params;
}
else
{

View File

@ -0,0 +1,241 @@
/* XPM */
static char *firebirdlogo__[] = {
/* columns rows colors chars-per-pixel */
"32 32 203 2",
" c #D7160A",
". c #D81E19",
"X c #F40F09",
"o c #F4170A",
"O c #F41E0A",
"+ c #D83119",
"@ c #F4250A",
"# c #F42C09",
"$ c #E5330A",
"% c #F4340A",
"& c #F43B0A",
"* c #F52619",
"= c #F52D28",
"- c #BD593A",
"; c #D84F0B",
": c #D95319",
"> c #E6470A",
", c #F4420A",
"< c #F44C0A",
"1 c #F5550A",
"2 c #F55D0B",
"3 c #F54219",
"4 c #F54E19",
"5 c #CB6D1B",
"6 c #E6690B",
"7 c #F5640B",
"8 c #F56C0B",
"9 c #F5740B",
"0 c #F57B0C",
"q c #F66E1A",
"w c #F6741A",
"e c #CB592A",
"r c #F54029",
"t c #F64E38",
"y c #F65537",
"u c #F65A38",
"i c #CC7F3B",
"p c #E76229",
"a c #F66729",
"s c #BF7A67",
"d c #F74647",
"f c #F74C47",
"g c #F75647",
"h c #F75556",
"j c #CD7349",
"k c #F76847",
"l c #DB7967",
"z c #C07E77",
"x c #DC7676",
"c c #F86A66",
"v c #F87466",
"b c #BC8B1B",
"n c #D88C0C",
"m c #D9841B",
"M c #CB9B1C",
"N c #D99E1B",
"B c #E6880C",
"V c #F5810C",
"C c #F5890B",
"Z c #E69C0B",
"A c #F5910C",
"S c #F59B0C",
"D c #CBB51C",
"F c #F5A60B",
"G c #F5AD0B",
"H c #F5B50C",
"J c #F5BB0C",
"K c #E7AD1B",
"L c #F6A51B",
"P c #F6B21A",
"I c #F6BA1B",
"U c #CB902B",
"Y c #F6972A",
"T c #F69E2A",
"R c #F78239",
"E c #CCAC3A",
"W c #CCB03A",
"Q c #CCBE3A",
"! c #F6A52A",
"~ c #E7B42A",
"^ c #F6B82A",
"/ c #F7A83A",
"( c #D9C81B",
") c #F5C20B",
"_ c #F5C90B",
"` c #E6D30B",
"' c #F5D20C",
"] c #F5D90C",
"[ c #F6D31B",
"{ c #F6DA1B",
"} c #F7C23A",
"| c #F7DA3A",
" . c #BFA14A",
".. c #BFAF59",
"X. c #BFB859",
"o. c #BF8267",
"O. c #BFA769",
"+. c #DB9A58",
"@. c #E99949",
"#. c #F89448",
"$. c #F89D49",
"%. c #CDBC4A",
"&. c #CDA958",
"*. c #F8A448",
"=. c #F8AC49",
"-. c #E9B848",
";. c #F8B249",
":. c #F8BB48",
">. c #EAA658",
",. c #F8A458",
"<. c #DC9267",
"1. c #C08C77",
"2. c #CF9D77",
"3. c #DD9476",
"4. c #F88666",
"5. c #F98576",
"6. c #F99A76",
"7. c #DCA667",
"8. c #DCB567",
"9. c #CFAB77",
"0. c #CFB077",
"q. c #EBA377",
"w. c #F9AD76",
"e. c #F9B076",
"r. c #F8D258",
"t. c #F8E058",
"y. c #F8EA58",
"u. c #DCD167",
"i. c #DDD677",
"p. c #F9D567",
"a. c #F9DD67",
"s. c #EBC676",
"d. c #F9C277",
"f. c #F9D276",
"g. c #F9E867",
"h. c #F9EE76",
"j. c #C19786",
"k. c #DE9A95",
"l. c #FA8584",
"z. c #FA9694",
"x. c #FA9A94",
"c. c #C1AD87",
"v. c #DEAA86",
"b. c #CFB686",
"n. c #C1BD87",
"m. c #C2B596",
"M. c #DEBF96",
"N. c #FAA685",
"B. c #FAAB85",
"V. c #FAB785",
"C. c #FABB85",
"Z. c #ECA294",
"A. c #FAAA94",
"S. c #ECB395",
"D. c #FAB094",
"F. c #FBBD95",
"G. c #D0ADA5",
"H. c #C3BFA6",
"J. c #FBA4A3",
"K. c #FBA9A4",
"L. c #FCBFB3",
"P. c #CFCA86",
"I. c #DECC86",
"U. c #FAD485",
"Y. c #FBC695",
"T. c #ECD995",
"R. c #FBD395",
"E. c #FBD995",
"W. c #FAE585",
"Q. c #FAEC86",
"!. c #D1CDA5",
"~. c #DFD5A5",
"^. c #DFC5B4",
"/. c #FBC3A4",
"(. c #FBDAA4",
"). c #EEDFB4",
"_. c #FBE9A4",
"`. c #FCF6B4",
"'. c gray77",
"]. c #D2C8C4",
"[. c #FCC2C2",
"{. c #E0D1C3",
"}. c #E0DEC3",
"|. c #FCD0C2",
" X c #FDDBC3",
".X c #E1D7D3",
"XX c #E1DCD3",
"oX c #EFDDD2",
"OX c #FDE2C3",
"+X c #FDEAC3",
"@X c #FDE6D2",
"#X c #FDEDD2",
"$X c #FDF7D2",
"%X c #FDFAD2",
"&X c #E2E2E2",
"*X c #FEE1E1",
"=X c #F0EEE2",
"-X c #FEEAE1",
";X c #FEFBE1",
":X c #F1F1F1",
">X c #FEF3F1",
",X c #FEFAF1",
"<X c gray100",
/* pixels */
"<X<X<X<X<X<X<X<X<X<X<X<X}.n.i.:X=XX.P.!.&X<X<X<X<X<X<X<X<X<X<X<X",
"<X<X<X<X<X<X<X<X<X}.u.( h.%X<X<X<X<X`.y.` Q !.:X<X<X<X<X<X<X<X<X",
"<X<X<X<X<X<X<X=X%.{ Q.<X<X<X<X<X<X<X<X<X;Xg.] D H.<X<X<X<X<X<X<X",
"<X<X<X<X<X<X~.[ r.,X<X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XS.2 2 7 2 2 S.",
"<Xa 1 < o.<X<XB.1 1 1 1 1 1 1 1 1 1 ].<X<X<X<X.Xj 1 1 1 1 1 1 oX",
"<X6.< < > .X<XN.1 < < 1 < < 1 < < 1 : 1.j.3.e < 1 < < 1 < 1 p <X",
"<X-X, , , - <XN.< < < , < < , < < , < < , < < < < , < , < , A.<X",
"<X<X4.& & & s |., , , , , , , , , , , , , , , , , , , , , 4 ,X<X",
"<X<X>X3 % % $ G.& & & & & & & & & & & & & % & & & & & & & A.<X<X",
"<X<X<XL.# # % l u % % % % % % % % % % % % % % % % % % % k <X<X<X",
"<X<X<X<X5.@ @ + Z.# # # # # # # # # # # # # # # # # # y >X<X<X<X",
"<X<X<X<X<Xv O O 1.= @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ t >X<X<X<X<X",
"<X<X<X<X<X<XK.* k.O O O O O O O O O O O O O O O g >X<X<X<X<X<X",
"<X<X<X<X<X<X<X*Xd . k.* o o o o o o o o o o o * x.<X<X<X<X<X<X<X",
"<X<X<X<X<X<X<X<X<X[.x >Xc X X X X X X X X = z.>X<X<X<X<X<X<X<X<X",
"<X<X<X<X<X<X<X<X<X<X<X<X<X*Xz.h d d l.J.*X<X<X<X<X<X<X<X<X<X<X<X"
};

243
sys/images/mysqllogo32.xpm Normal file
View File

@ -0,0 +1,243 @@
/* XPM */
static char *mysqllogo__[] = {
/* columns rows colors chars-per-pixel */
"32 32 205 2",
" c #2E6E85",
". c #37768A",
"X c #337A8B",
"o c #42738A",
"O c #477889",
"+ c #427F8E",
"@ c #4F7B8A",
"# c #407C92",
"$ c #467D90",
"% c #457C9A",
"& c #487C99",
"* c #338093",
"= c #438197",
"- c #488492",
"; c #4F8597",
": c #44829C",
"> c #4C809B",
", c #498599",
"< c #4D869B",
"1 c #448B9C",
"2 c #528696",
"3 c #5C8B94",
"4 c #51879A",
"5 c #56849A",
"6 c #52879F",
"7 c #59869E",
"8 c #548B9A",
"9 c #5F909C",
"0 c #64909A",
"q c #4B8CA0",
"w c #508FA0",
"e c #5389A6",
"r c #518BA6",
"t c #5B8EA0",
"y c #5F8CA0",
"u c #5D97B2",
"i c #6089A0",
"p c #6494A2",
"a c #6493A4",
"s c #6492A7",
"d c #6896A1",
"f c #6894A4",
"g c #6397AA",
"h c #6893AB",
"j c #6A95A9",
"k c #6997AA",
"l c #669FAA",
"z c #6D9EAA",
"x c #7896A9",
"c c #719AAA",
"v c #7A99AB",
"b c #7998AE",
"n c #7E98AF",
"m c #6895B2",
"M c #679FB2",
"N c #5FA5B1",
"B c #68A1AE",
"V c #6FA1AF",
"C c #71A0AB",
"Z c #74A0AC",
"A c #7BA4AF",
"S c #6AA1B3",
"D c #6BA3B4",
"F c #64A5BB",
"G c #66AFBE",
"H c #6FABBB",
"J c #70A3B2",
"K c #75A5B6",
"L c #74A6B7",
"P c #7AA8B1",
"I c #7EA4B8",
"U c #79A8BA",
"Y c #7FAABA",
"T c #7BADC6",
"R c #809FBB",
"E c #88A6AA",
"W c #85A3B1",
"Q c #83A2B7",
"! c #82A5B6",
"~ c #83A7B7",
"^ c #83A8B3",
"/ c #80AAB6",
"( c #86ACB7",
") c #89A9B0",
"_ c #84AAB9",
"` c #88AEB9",
"' c #85B2B7",
"] c #8CB3BD",
"[ c #97B5BA",
"{ c #92B0BF",
"} c #A2BABD",
"| c #8AAEC0",
" . c #86B3C5",
".. c #87B1C6",
"X. c #8EB4C2",
"o. c #91B3C1",
"O. c #92B3C1",
"+. c #94BAC6",
"@. c #93B8CA",
"#. c #91BDC9",
"$. c #9ABCCB",
"%. c #9BBECA",
"&. c #8CB7D2",
"*. c #99C1C5",
"=. c #95C7CE",
"-. c #9EC3D3",
";. c #9FC4D5",
":. c #93C5DB",
">. c #9EC5D8",
",. c #A0C1C8",
"<. c #A6C2CC",
"1. c #A9CACF",
"2. c #B7CACC",
"3. c #A2C5D0",
"4. c #A4C5D1",
"5. c #A9C5D0",
"6. c #A1CCD5",
"7. c #AEC6DC",
"8. c #A4CCDC",
"9. c #A9CED9",
"0. c #B3CFDA",
"q. c #B3CFDF",
"w. c #B2D1DD",
"e. c #B7D1DC",
"r. c #B9D5DE",
"t. c #BAD8DC",
"y. c #9DD1E4",
"u. c #A5CFE1",
"i. c #ABCEE1",
"p. c #A5D3E1",
"a. c #B6D5E0",
"s. c #B5D5E2",
"d. c #BBD5E3",
"f. c #BCD7E4",
"g. c #BDD7E7",
"h. c #B7D9E5",
"j. c #B6DAE4",
"k. c #BEDBE3",
"l. c #B6DAE9",
"z. c #BBE0E8",
"x. c #BDE2EC",
"c. c #BEE1EE",
"v. c #BFE5F1",
"b. c #C3D3D1",
"n. c #C6D4DB",
"m. c #C3D6DC",
"M. c #CBD8D8",
"N. c #CDD9DE",
"B. c #CCDFDF",
"V. c #C8DDE6",
"C. c #C3DAE8",
"Z. c #C2DBE9",
"A. c #D2DDEA",
"S. c #CBE0E6",
"D. c #C3E0EC",
"F. c #C3E3EF",
"G. c #C5E5EE",
"H. c #C5E7EE",
"J. c #C9E0EB",
"K. c #CDE0E8",
"L. c #C8E4EB",
"P. c #CFE2EC",
"I. c #C8E6EF",
"U. c #CDE5EE",
"Y. c #C6E8EF",
"T. c #C5EAEF",
"R. c #D4E5E2",
"E. c #D1E0E6",
"W. c #D2E2EA",
"Q. c #D7E7EA",
"!. c #D0E1EC",
"~. c #D5E5EE",
"^. c #DEEBEC",
"/. c #DDEDEE",
"(. c #C7E5F0",
"). c #C0EDF4",
"_. c #CCEAF1",
"`. c #CDEAF1",
"'. c #D2EBF3",
"]. c #D6EAF0",
"[. c #D5EAF3",
"{. c #D7EFF1",
"}. c #D6ECF7",
"|. c #DAE9F0",
" X c #DDEEF1",
".X c #DBECF6",
"XX c #DEEFF7",
"oX c #D8EDF9",
"OX c #D7F1F3",
"+X c #D6F1F5",
"@X c #D7F0F7",
"#X c #DFF1F7",
"$X c #DCF7F6",
"%X c #D6F4F9",
"&X c #DAF5FA",
"*X c #DFF5F9",
"=X c #DBF2FD",
"-X c #DEF6FC",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2X2X2X2X",
"2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X",
"2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X"
};

View File

@ -0,0 +1,142 @@
/* XPM */
static char *postgresqllogo__[] = {
/* columns rows colors chars-per-pixel */
"32 33 103 2",
" c #010101",
". c #0D0D0D",
"X c #121212",
"o c #191919",
"O c #252525",
"+ c gray18",
"@ c #343434",
"# c gray24",
"$ c #454545",
"% c #4C4C4C",
"& c #535353",
"* c #5C5C5D",
"= c #656565",
"- c #676868",
"; c #6C6C6C",
": c #707172",
"> c #777878",
", c #7A7C7D",
"< c #336791",
"1 c #356992",
"2 c #3B6D95",
"3 c #44749A",
"4 c #4C7A9E",
"5 c #7E7F80",
"6 c #4F7CA0",
"7 c #527EA2",
"8 c #5681A3",
"9 c #5B85A7",
"0 c #5D87A8",
"q c #5F88A9",
"w c #658CAC",
"e c #688EAD",
"r c #6B91AF",
"t c #6E93B1",
"y c #7195B3",
"u c #7599B5",
"i c #799BB7",
"p c #7D9DB8",
"a c #818283",
"s c #858788",
"d c #8A8C8D",
"f c #929496",
"g c #97999A",
"h c #9A9C9E",
"j c #82A2BC",
"k c #88A6BE",
"l c #8CA8BF",
"z c #A2A4A5",
"x c #A7A9AB",
"c c #A9ABAD",
"v c #A9ADB0",
"b c #AEB2B5",
"n c #A3B2BF",
"m c #B4B7BA",
"M c #8EABC2",
"N c #93AEC4",
"B c #99AFC0",
"V c #95B0C6",
"C c #9AB2C5",
"Z c #9CB5C9",
"A c #A4B5C2",
"S c #AEBAC4",
"D c #A1B6C8",
"F c #A3BACC",
"G c #ABBBC9",
"H c #B7BDC1",
"J c #BABDC0",
"K c #A9BFD1",
"L c #B8C3CC",
"P c #ABC0D1",
"I c #B4C5D3",
"U c #BBC7D2",
"Y c #B5C8D7",
"T c #BDCBD6",
"R c #BACCDA",
"E c #C1C8CE",
"W c #C9CCCF",
"Q c #C5CED6",
"! c #CCCFD1",
"~ c #C2CFD8",
"^ c #CDD1D5",
"/ c #C3D2DF",
"( c #CCD5DD",
") c #D1D3D6",
"_ c #D2D5D8",
"` c #D6DADD",
"' c #C5D5E0",
"] c #C8D6E1",
"[ c #CDD9E4",
"{ c #D2DDE7",
"} c #D5DFE8",
"| c #DEE0E2",
" . c #D5E0E8",
".. c #DBE4EB",
"X. c #E1E3E6",
"o. c #E3E6E9",
"O. c #E3E8ED",
"+. c #E9EBEE",
"@. c #E5ECF1",
"#. c #EAEEF2",
"$. c #EDF1F4",
"%. c #FCFDFD",
"&. c None",
/* pixels */
"&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&. &. X . &.&.&.&.&.&.",
"&.&.&. O - h z a = $ X X ; g J v s c ` $.o.+.X.m a o &.&.&.",
"&.&. 5 X.B u u l D L O.! o.D i 0 e j ' #.M < < 3 w N o., &.&.",
"&. h I 2 < < < < < < k ..3 < < < < < < 3 / I 1 < < < 2 T f &.",
"&.+ o.2 < < < < < < 9 O.3 < < < < < < < < 1 P ] 2 < < < 1 ~ * &.",
" c p < < < < < < < R i < < < < < < < < < < < C ' < < < < u z ",
" ) 3 < < < < < < 2 $.1 < < < < < < < < < < < < { y < < < 3 ` ",
" o.1 < < < < < < w / < < < < < < < < < < < < < 9 O.1 < < 7 _ ",
" +.< < < < < < < N N 1 7 6 2 < < < < < < < < r u ..e < < y v ",
" #.< < < < < < < Y F O.} { O.4 < < < < < 2 ./ P .j < < M 5 &.",
" ) 4 < < < < < < [ [ 9 0 { F F < < < < < p P F i Y t < < I & &.",
" x y < < < < < < / 0 < < 7 7 [ < < < < < M N < < ] 9 < 2 +.. &.",
"&.> N < < < < < < ] 9 < < < 2 @.< < < < < t R < < } 7 < u b &.",
"&.@ Q < < < < < < [ 8 < < < < $.< < < < < 1 @.3 < ' 0 < U % &.&.",
"&. O.2 < < < < < { 7 < < < 1 $.< < < < < < Z N < Y t 3 +. &.&.",
"&. c y < < < < < ] 9 < < < 6 ..< < < < < < 4 @.2 K i Z d &.&.",
"&.&.* G < < < < < R y < < < V C < < < < < < < P N R p O.. &.&.&.",
"&.&.o o.< < < < < u ] < < < O.4 < < < < < < < 3 #.$.I : &.&.&.",
"&.&. W q < < < < < [ F 2 7 } < < < < < < < < < N ..| &.&.&.&.",
"&.&.&.* I < < < < < N ^ +.o.[ w < < < < < < < < 9 %.z @ $ * $ ",
"&.&.&. X.4 < < < i ` X . ) R @.8 < < < < < < 1 #.i F Q U O.X. ",
"&.&.&.&.* ( 1 < w X.# a X.Z < .F < < < < < < 7 $.9 w M T ! O ",
"&.&.&.&. x ~ Z X.& %.C 4 2 Z X.Z < < < < < < e ` H b , $ &.&.",
"&.&.&.&.&. & a . . g #.#.+.h = C < < < < < < j d &.&.&.&.&.",
"&.&.&.&.&.&.&. &.&. & A < < < < < < C - &.&.&.&.&.&.&.",
"&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.$ S < < < < < < G $ &.&.&.&.&.&.&.",
"&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.# L < < < < < < Q O &.&.&.&.&.&.&.",
"&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.+ E < < < < < < X.. &.&.&.&.&.&.&.",
"&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.O ^ < < < < < 4 ) &.&.&.&.&.&.&.",
"&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.o o.2 < < < < n ; &.&.&.&.&.&.&.&.",
"&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.d G 1 < 4 A | . &.&.&.&.&.&.&.&.",
"&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.. x +.X.X.: . &.&.&.&.&.&.&.&.&.",
"&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&. . . &.&.&.&.&.&.&.&.&.&.&."
};

View File

@ -0,0 +1,56 @@
/* XPM */
static char *sqlitelogo__[] = {
/* columns rows colors chars-per-pixel */
"32 32 18 1",
" c #7DA397",
". c #7FA296",
"X c #7EA396",
"o c #7FA396",
"O c #7EA297",
"+ c #7FA297",
"@ c #7EA397",
"# c #7FA397",
"$ c #7DA497",
"% c #7EA496",
"& c #7FA496",
"* c #7EA497",
"= c #7FA497",
"- c #7DA398",
"; c #7FA298",
": c #7EA398",
"> c #7FA398",
", c None",
/* pixels */
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,&X@:@,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,, @,,,,,,,,,@",
",,,,,,,,,,,,,,,,,,,,X,,,,,,,,,,,",
",,,,,,,,,,,,,,@,,,,@,,,,,,,,,,,,",
",,,,,,,,,,,,O@=,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,>+,,,,,,,,,,,,,,,,,,",
",,,,,,,,,#,,@,,,>,,,,,,,,,,,,,,,",
",,,,,, @>,,,,,@.,,,,,,,,,,,,,,,,",
",,,,:#,,*,,,@o;,,,,;-,,,,,,,,,,,",
",,,@,,,,,,o>O@,,,,#@:,,,,,,,,,,,",
",,,,,,,,,@# ,,,,,,,,,,,,,,,,,,,,",
",,,,,,,+@@,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,@.*,,,,,@*,,,,,,,,,,,,,,,,",
",,,,,$,@,,,% ,,,,,,,,,,,,,,,,,,,",
",,,,=,:,,,O,,,,,,,,,,,,,,,,,,,,,",
",,#,,O,,,,,,,,,,,,,,,,,,,,,,,,,,",
",#,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,",
"o,,:,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
" ,+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
"@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
};

View File

@ -95,11 +95,15 @@ class Connection_Sidebar extends \wxPanel {
$this->list = new \wxListCtrl($parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_LIST|wxLC_SINGLE_SEL);
$this->settings =& Settings::get_instance();
$this->list->Connect(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, array($this, 'menu'));
// Create a button for adding new connections
$new_conn = new \wxButton($this, self::BTN_ADD, 'New Connection');
$new_conn->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, 'add_conn'));
// Layout the connection list
$this->_layout();
// Add a sizer
$sizer = new \wxBoxSizer(wxVERTICAL);
$sizer->add($this->list, 1, wxALL|wxEXPAND);
@ -120,7 +124,7 @@ class Connection_Sidebar extends \wxPanel {
*/
public function menu($event)
{
if ($this->list->GetCount() > 0 && $this->list->GetSelection() >= 0)
if ($this->list->GetSelectedItemCount() === 1)
{
// Create the menu items
$menu = new \wxMenu();
@ -145,7 +149,7 @@ class Connection_Sidebar extends \wxPanel {
*/
public function menu_event($event)
{
//alert(print_r($event, TRUE));
}
// --------------------------------------------------------------------------
@ -161,6 +165,62 @@ class Connection_Sidebar extends \wxPanel {
$win = new Connection_Manager($this);
$win->show();
}
// --------------------------------------------------------------------------
/**
* Add the existing items to the connection sidebar
*
* @return void
*/
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
$conns = $this->settings->get_dbs();
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);
//}
}
}
}
// End of connection_sidebar.php

View File

@ -32,6 +32,7 @@ class Connection_Manager extends \wxFrame {
const TXT_DB_USER = 7;
const TXT_DB_PASS = 8;
const BTN_TEST = 9;
const BTN_ADD = 10;
/**
* Array of fields for Connection Information manipulation
@ -50,6 +51,9 @@ class Connection_Manager extends \wxFrame {
{
parent::__construct($parent, 32, "Connection Manager", wxDefaultPosition);
// Save a reference to the settings class
$this->settings =& Settings::get_instance();
// Layout the window
$this->_layout($params);
}
@ -113,10 +117,12 @@ class Connection_Manager extends \wxFrame {
$test_button->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, 'test_conn'));
// Add Connection Button
// TODO: Add connection button
$add_button = new \wxButton($this, self::BTN_ADD, 'Add Connection');
$add_button->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, 'add_conn'));
// Add the buttons to the sizer
$sizer->Add($test_button, 1, wxEXPAND);
$sizer->Add($add_button, 1, wxEXPAND);
// Add the sizer to the window
// Add it inside of another sizer for padding.
@ -179,6 +185,26 @@ class Connection_Manager extends \wxFrame {
// --------------------------------------------------------------------------
/**
* Adds a connection to the connection manager
*
* @return void
*/
public function add_conn()
{
$params = $this->_get_vals();
if (empty($params->name))
{
error("You need a name for the connection");
return;
}
$this->settings->add_db($params->name, $params);
}
// --------------------------------------------------------------------------
/**
* Set defaults for new database type
*