qsos-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qsos-commits] qsos/apps/xuleditor/chrome/content qsos-overlay.js


From: Raphaël Semeteys
Subject: [Qsos-commits] qsos/apps/xuleditor/chrome/content qsos-overlay.js
Date: Mon, 13 Apr 2009 19:56:20 +0000

CVSROOT:        /sources/qsos
Module name:    qsos
Changes by:     Raphaël Semeteys <rsemeteys>    09/04/13 19:56:20

Modified files:
        apps/xuleditor/chrome/content: qsos-overlay.js 

Log message:
        .qsos file browsed by Firefox are opened in Editor only after user 
confirmation

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qsos/apps/xuleditor/chrome/content/qsos-overlay.js?cvsroot=qsos&r1=1.2&r2=1.3

Patches:
Index: qsos-overlay.js
===================================================================
RCS file: /sources/qsos/qsos/apps/xuleditor/chrome/content/qsos-overlay.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- qsos-overlay.js     4 Jan 2007 22:18:59 -0000       1.2
+++ qsos-overlay.js     13 Apr 2009 19:56:20 -0000      1.3
@@ -1,5 +1,29 @@
+/*
+**  Copyright (C) 2006-2009 Atos Origin 
+**
+**  Author: Raphael Semeteys <address@hidden>
+**
+**  This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+**  the Free Software Foundation; either version 2 of the License, or
+**  (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+**
+**
+** QSOS XUL Editor
+** Listener to trap URI modification and .qsos file browsint to redirect to 
XUL Editor
+** qsos-overlay.js: functions associated with the qsos-overlay.xul file
+**
+*/
 
-//Listener to trap URI modification and .qsos file browsint to redirect to XUL 
Editor
 
 function registerMyListener() {
        window.getBrowser().addProgressListener(myListener, 
Components.interfaces.nsIWebProgressListener.STATE_START);
@@ -18,7 +42,11 @@
        onLocationChange:function(aProgress,aRequest,aURI) {
                var url = aURI.spec;
                url = url.split('?')[0];
-               if (url.substr(-5) == ".qsos") 
window.openDialog('chrome://qsos-xuled/content/editor.xul','test', '_blank', 
'chrome,dialog=no', url);
+               if (url.substr(-5) == ".qsos") {
+                 if (window.confirm("Open "+url+" with QSOS XUL Editor?")) {
+                   
window.openDialog('chrome://qsos-xuled/content/editor.xul','test', '_blank', 
'chrome,dialog=no', url);
+                 }
+               }
        },
        onProgressChange:function(a,b,c,d,e,f){},
        onStatusChange:function(a,b,c,d){},




reply via email to

[Prev in Thread] Current Thread [Next in Thread]