diff --git a/ui/compatibility.js b/ui/compatibility.js index 1695b083..6f59755f 100755 --- a/ui/compatibility.js +++ b/ui/compatibility.js @@ -82,6 +82,11 @@ if(window.CEF_dumpJSON != null){ window.reload = function(){ gui.Window.get().reload() } + window.setWindowTitle = function(text){ + var title = text +' - '+ APP_NAME + gui.Window.get().title = title + $('.title-bar .title').text(title) + } // load UI stuff... $(function(){ diff --git a/ui/data.js b/ui/data.js index 812abc35..5d20e301 100755 --- a/ui/data.js +++ b/ui/data.js @@ -7,6 +7,8 @@ //var DEBUG = DEBUG != null ? DEBUG : true +var APP_NAME = 'ImageGrid.Viewer' + var DATA_ATTR = 'DATA' var LOAD_SCREENS = 6 diff --git a/ui/setup.js b/ui/setup.js index 84aeb96e..9d07b3d0 100755 --- a/ui/setup.js +++ b/ui/setup.js @@ -211,6 +211,10 @@ function setupDataBindings(viewer){ .on('focusingImage', function(evt, image){ image = $(image) DATA.current = getImageGID(image) + + if(window.setWindowTitle != null){ + setWindowTitle(IMAGES[getImageGID(image)].path.split('/').pop()) + } })