[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qsos-commits] qsos/apps/xuleditor/chrome content/editor.js co...
From: |
Raphaël Semeteys |
Subject: |
[Qsos-commits] qsos/apps/xuleditor/chrome content/editor.js co... |
Date: |
Mon, 11 Dec 2006 22:54:50 +0000 |
CVSROOT: /sources/qsos
Module name: qsos
Changes by: Raphaël Semeteys <rsemeteys> 06/12/11 22:54:50
Modified files:
apps/xuleditor/chrome/content: editor.js editor.xul
apps/xuleditor/chrome/locale/en-US: editor.dtd
apps/xuleditor/chrome/locale/fr-FR: editor.dtd
Log message:
Localizations + File/New entry
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qsos/apps/xuleditor/chrome/content/editor.js?cvsroot=qsos&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/qsos/apps/xuleditor/chrome/content/editor.xul?cvsroot=qsos&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/qsos/apps/xuleditor/chrome/locale/en-US/editor.dtd?cvsroot=qsos&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/qsos/apps/xuleditor/chrome/locale/fr-FR/editor.dtd?cvsroot=qsos&r1=1.2&r2=1.3
Patches:
Index: content/editor.js
===================================================================
RCS file: /sources/qsos/qsos/apps/xuleditor/chrome/content/editor.js,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- content/editor.js 11 Dec 2006 18:05:55 -0000 1.10
+++ content/editor.js 11 Dec 2006 22:54:49 -0000 1.11
@@ -52,6 +52,33 @@
////////////////////////////////////////////////////////////////////
//////////////////////////
+//Submenu "File/New"
+//////////////////////////
+//Checks Document's state before opening a new one
+function checknewFile() {
+ if (myDoc) {
+ if (docChanged == "true") {
+ confirmDialog(strbundle.getString("closeAnyway"),
closeFile);
+ }
+ else {
+ closeFile();
+ }
+ }
+ newFileDialog();
+}
+
+//Menu "New File"
+//Shows the new.xul window in modal mode
+function newFileDialog() {
+ try {
+
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ } catch (e) {
+ alert("Permission to open file was denied.");
+ }
+
window.openDialog('chrome://qsos-xuled/content/new.xul','Properties','chrome,dialog,modal',myDoc,openRemoteFile);
+}
+
+//////////////////////////
//Submenu "File/Open"
//////////////////////////
//Opens a local QSOS XML file and populates the window (tree and generic
fields)
@@ -124,8 +151,10 @@
openFile();
}
-//Menu "Load Remote"
-//Shows the loads.xul window in modal mode
+//////////////////////////
+//Submenu "File/Load Remote File"
+//////////////////////////
+//Shows the load.xul window in modal mode
function loadRemoteDialog() {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
Index: content/editor.xul
===================================================================
RCS file: /sources/qsos/qsos/apps/xuleditor/chrome/content/editor.xul,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- content/editor.xul 11 Dec 2006 18:05:55 -0000 1.10
+++ content/editor.xul 11 Dec 2006 22:54:49 -0000 1.11
@@ -17,8 +17,9 @@
<menubar id="mymenubar">
<menu id="file-menu" label="&file-menu.label;"
onclick="document.getElementById('file-menu').focus();">
<menupopup id="file-popup">
+ <menuitem id="file-new" label="&file-new.label;"
onclick="checknewFile();"/>
<menuitem id="file-open" label="&file-open.label;"
onclick="checkopenFile();"/>
- <menuitem id="file-open-remote" label="Open remote"
onclick="checkopenRemoteFile();"/>
+ <menuitem id="file-open-remote"
label="&file-open-remote.label;" onclick="checkopenRemoteFile();"/>
<menuitem id="file-save" label="&file-save.label;"
onclick="saveFile();"/>
<menuitem id="file-saveas" label="&file-saveas.label;"
onclick="saveFileAs();"/>
<menuitem id="file-close" label="&file-close.label;"
onclick="checkcloseFile();"/>
Index: locale/en-US/editor.dtd
===================================================================
RCS file: /sources/qsos/qsos/apps/xuleditor/chrome/locale/en-US/editor.dtd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- locale/en-US/editor.dtd 22 Jun 2006 23:20:18 -0000 1.1
+++ locale/en-US/editor.dtd 11 Dec 2006 22:54:50 -0000 1.2
@@ -1,6 +1,8 @@
<!ENTITY QSOS.label "QSOS XUL Editor">
<!ENTITY file-menu.label "File">
-<!ENTITY file-open.label "Open">
+<!ENTITY file-new.label "New file">
+<!ENTITY file-open.label "Open local file">
+<!ENTITY file-open-remote.label "Open remote file">
<!ENTITY file-save.label "Save">
<!ENTITY file-saveas.label "Save As">
<!ENTITY file-close.label "Close">
Index: locale/fr-FR/editor.dtd
===================================================================
RCS file: /sources/qsos/qsos/apps/xuleditor/chrome/locale/fr-FR/editor.dtd,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- locale/fr-FR/editor.dtd 23 Jun 2006 12:32:42 -0000 1.2
+++ locale/fr-FR/editor.dtd 11 Dec 2006 22:54:50 -0000 1.3
@@ -1,6 +1,8 @@
<!ENTITY QSOS.label "Editeur XUL QSOS">
<!ENTITY file-menu.label "Fichier">
-<!ENTITY file-open.label "Ouvrir">
+<!ENTITY file-new.label "Nouveau fichier">
+<!ENTITY file-open.label "Ouvrir fichier local">
+<!ENTITY file-open-remote.label "Ouvrir fichier distant">
<!ENTITY file-save.label "Sauvegarder">
<!ENTITY file-saveas.label "Sauvegarder sous">
<!ENTITY file-close.label "Fermer">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qsos-commits] qsos/apps/xuleditor/chrome content/editor.js co...,
Raphaël Semeteys <=