|
56 | 56 | import com.google.common.base.Preconditions; |
57 | 57 | import com.google.common.collect.Maps; |
58 | 58 | import com.google.common.collect.Sets; |
| 59 | +import com.timestored.connections.JdbcIcons; |
59 | 60 | import com.timestored.connections.JdbcTypes; |
60 | 61 | import com.timestored.connections.ServerConfig; |
61 | 62 | import com.timestored.kdb.KdbConnection; |
@@ -423,14 +424,16 @@ private boolean isTreeProblem() { |
423 | 424 | } |
424 | 425 |
|
425 | 426 | @Override public ImageIcon getIcon() { |
426 | | - if(serverModel.getServerConfig().getJdbcType().equals(JdbcTypes.DUCKDB)) { |
427 | | - return Theme.CIcon.DUCK.get(); |
| 427 | + JdbcTypes jdbcType = serverModel.getServerConfig().getJdbcType(); |
| 428 | + if(JdbcTypes.DUCKDB.equals(jdbcType) || JdbcTypes.BABELDB.equals(jdbcType)) { |
| 429 | + return serverModel.isConnected() ? Theme.CIcon.DUCK.get() : Theme.CIcon.DUCK_FADED.get(); |
428 | 430 | } else if(serverModel.isConnected() && isTreeProblem()) { |
429 | 431 | return Theme.CIcon.SERVER_LIGHTNING.get(); |
430 | 432 | } else if(serverModel.getServerConfig().isKDB() && serverModel.isConnected()) { |
431 | 433 | return Theme.CIcon.SERVER.get(); |
432 | 434 | } else if (!serverModel.getServerConfig().isKDB() && serverModel.isConnected()){ |
433 | | - return Theme.CIcon.SERVER_DATABASE.get(); |
| 435 | + JdbcIcons jicon = JdbcIcons.getIconFor(jdbcType); |
| 436 | + return jicon.get16(); |
434 | 437 | } |
435 | 438 | return Theme.CIcon.SERVER_CONNECT.get(); |
436 | 439 | } |
@@ -486,7 +489,7 @@ private boolean isTreeProblem() { |
486 | 489 | if(savedDocFile == null) { |
487 | 490 | savedDocFile = new File(myDocs, "table-docs.html"); |
488 | 491 | } |
489 | | - savedDocFile = SwingUtils.askUserSaveLocation("html", savedDocFile); |
| 492 | + savedDocFile = SwingUtils.askUserSaveLocation(savedDocFile, "html"); |
490 | 493 |
|
491 | 494 | if (savedDocFile != null) { |
492 | 495 | try { |
|
0 commit comments