Skip to content

Commit

Permalink
Display ddb source on the title of the start window "Choose Field Trip"
Browse files Browse the repository at this point in the history
  • Loading branch information
ggalibert committed Mar 27, 2017
1 parent ba3a1ae commit 17aba55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion DDB/executeDDBQuery.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,13 @@

% execute the query - the java method returns
% an ArrayList of org.imos.ddb.schema.* objects.
source = '';
driver = '';
connection = '';
dbuser = '';
dbpassword = '';
try
source = readProperty('toolbox.ddb');
driver = readProperty('toolbox.ddb.driver');
connection = readProperty('toolbox.ddb.connection');
dbuser = readProperty('toolbox.ddb.user');
Expand All @@ -104,7 +107,7 @@
end

if isempty(connection)
ddb = org.imos.ddb.DDB.getDDB(readProperty('toolbox.ddb'));
ddb = org.imos.ddb.DDB.getDDB(source);
else
ddb = org.imos.ddb.DDB.getDDB(driver, connection, dbuser, dbpassword);
end
Expand Down
6 changes: 5 additions & 1 deletion GUI/startDialog.m
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@
%

% dialog figure
f = figure('Name', 'Select Field Trip', ...
source = readProperty('toolbox.ddb');
if isempty(source)
source = readProperty('toolbox.ddb.connection');
end
f = figure('Name', ['Select Field Trip - ' source], ...
'Visible', 'off',...
'MenuBar', 'none',...
'Resize', 'off',...
Expand Down

0 comments on commit 17aba55

Please sign in to comment.