window title in xulrunner
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Jul 2005 22:25:35 +0000 (22:25 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Jul 2005 22:25:35 +0000 (22:25 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1512 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/chrome/content/evergreen/auth/auth.js
Evergreen/staff_client/chrome/content/evergreen/main/app_shell.xul
Evergreen/staff_client/chrome/content/evergreen/util/spawn_win.js
Evergreen/staff_client/chrome/content/evergreen/util/win.js

index 632be4d..53c8b21 100644 (file)
@@ -7,6 +7,7 @@ G['win_list'] = [];
 G['appshell_list'] = [];
 G['doc_list'] = [];
 G['window_name_increment'] = 0;
+G['appshell_name_increment'] = 0;
 G['auth_ses'] = '';
 G['user_ou'] = '';
 G['main_test_variable'] = 'Hello World';
index 0be2c36..8870cf6 100644 (file)
@@ -7,7 +7,13 @@
 <window id="app_shell_win"
        orient="vertical" style="overflow: auto" width="800" height="500"
        sizemode="maximized" persist="width height" 
-       onload="params.tabbox = 'main_tabbox'; params.w = window; params.app = 'AppShell'; mw.OpenILS_init(params);"
+       onload="
+               params.tabbox = 'main_tabbox'; 
+               params.w = window; 
+               params.app = 'AppShell'; 
+               mw.OpenILS_init(params); 
+               window.document.title = mw.G.user.usrname() + '@' + mw.G.user_ou.name() + ' : ' + (++mw.G.appshell_name_increment);
+       "
        onunload="mw.OpenILS_exit(params);"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
index caf9d85..1a71f82 100644 (file)
@@ -80,10 +80,9 @@ function spawn_fieldmapper(d,placement,place,passthru_params,clone) {
 function spawn_main() {
        sdump('D_SPAWN','trying to spawn app_shell\n');
        try {
-               var w = new_window('chrome://evergreen/content/main/app_shell.xul');
+               var w = new_window('chrome://evergreen/content/main/app_shell.xul', {});
                if (!w) { throw('window ref == null'); }
                try {
-                       w.document.title = G.user.usrname() + '@' + G.user_ou.name();
                        w.params = {};
                } catch(E) {
                        alert('Hrmm. ' + pretty_print( js2JSON(E) ) );
index c2a25e2..7df98dd 100644 (file)
@@ -70,7 +70,7 @@ function yns_alert(s,title,b1,b2,b3,c) {
 
 function new_window(chrome,params) {
        sdump('D_WIN',arg_dump(arguments));
-       var name = self.name + '_' + ++mw.G['window_name_increment'];
+       var name = ++mw.G['window_name_increment'];
        var options = 'chrome,resizable=yes,scrollbars=yes,width=800,height=600,fullscreen=yes';
        try {
                if (params) {