Connection sidebar shows db icon based on type

This commit is contained in:
Timothy Warren 2012-02-22 20:23:49 -05:00
parent c3ca31a916
commit d2f8b424ef
5 changed files with 7 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 861 B

View File

@ -247,12 +247,17 @@ class Main extends GtkWindow {
{
$info = $model->get_value($iter, 0);
$db_type = strtolower($info->type);
$img_file = BASE_DIR."/images/{$type}-logo-32.png";
$img_file = BASE_DIR."/images/{$db_type}-logo-32.png";
if(is_file($img_file))
{
$cell->set_property('pixbuf', GdkPixbuf::new_from_file($img_file));
}
else
{
$img = new GtkImage();
$cell->set_property('pixbuf', $img->get_pixbuf());
}
}
/**
@ -265,7 +270,7 @@ class Main extends GtkWindow {
*/
public function set_label($col, $cell, $model, $iter)
{
$info = $model->get_value($iter, 1);
$info = $model->get_value($iter, 0);
$cell->set_property('text', $info->name);
}