[Sciviews-commits] r242 - in komodo/SciViews-K: . content content/js locale/en-GB locale/fr-FR
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jan 23 14:43:40 CET 2010
Author: prezez
Date: 2010-01-23 14:43:40 +0100 (Sat, 23 Jan 2010)
New Revision: 242
Modified:
komodo/SciViews-K/content/RObjectsOverlay.xul
komodo/SciViews-K/content/js/robjects.js
komodo/SciViews-K/locale/en-GB/sciviewsk.dtd
komodo/SciViews-K/locale/fr-FR/sciviewsk.dtd
komodo/SciViews-K/sciviewsk-0.9.6-ko.xpi
Log:
Added "select all"/"select siblings" command in object browser. Corrected Ctrl+A key handling. Added items to popup menu.
French locale needs translation!
Modified: komodo/SciViews-K/content/RObjectsOverlay.xul
===================================================================
--- komodo/SciViews-K/content/RObjectsOverlay.xul 2009-12-29 20:05:42 UTC (rev 241)
+++ komodo/SciViews-K/content/RObjectsOverlay.xul 2010-01-23 13:43:40 UTC (rev 242)
@@ -56,9 +56,25 @@
command="robjects_cmd_insertfullname" acceltext="Ins"/>
<menuitem id="menu_robjects_cmd_insertname"
command="robjects_cmd_insertname" acceltext="Ctrl+Ins"/>
+ <menuitem id="menu_robjects_cmd_insertquoted"
+ command="robjects_cmd_insertquoted" acceltext="Shift+Ins"/>
+
+ <menuseparator keep="false" intoplevel="true"/>
+
<menuitem id="menu_robjects_cmd_removeobj"
command="robjects_cmd_removeobj" acceltext="Del"
- key="key_cmd_delete" class="menuitem-iconic list-item-remove-icon"/>
+ key="key_cmd_delete" />
+ <menuitem id="menu_robjects_cmd_deletenow"
+ command="robjects_cmd_deletenow" class="menuitem-iconic list-item-remove-icon"
+ acceltext="Shift+Del"/>
+
+ <menuseparator keep="false" intoplevel="true"/>
+
+ <menuitem id="menu_robjects_cmd_selectall"
+ command="robjects_cmd_selectall" acceltext="Ctrl+A"/>
+ <menuitem id="menu_robjects_cmd_selectsiblings"
+ command="robjects_cmd_selectsiblings" acceltext="Ctrl+Shift+A"/>
+
<!--<menuitem id="menu_robjects_cmd_attach" command="robjects_cmd_attach"/>
<menuitem id="menu_robjects_cmd_detach" command="robjects_cmd_detach"/>-->
<menuseparator keep="false" intoplevel="true"/>
@@ -104,6 +120,18 @@
oncommand="sv.r.objects.do('names');" accesskey="N"/>
<command id="robjects_cmd_help" label="&sciviews.robjects.help;"
oncommand="sv.r.objects.do('help');" accesskey="H"/>
+
+ <command id="robjects_cmd_deletenow" label="&sciviews.robjects.deleteNow;"
+ oncommand="sv.r.objects.removeSelected(true);" accesskey="&sciviews.robjects.deleteNow.acc;"/>
+ <command id="robjects_cmd_insertquoted" label="&sciviews.robjects.insertQuoted;"
+ oncommand="sv.r.objects.insertName(false, true);" accesskey="&sciviews.robjects.insertQuoted.acc;"/>
+ <command id="robjects_cmd_selectall" label="&sciviews.robjects.selectAll;"
+ oncommand="sv.r.objects.selection.selectAll();" accesskey="&sciviews.robjects.selectAll.acc;"/>
+ <command id="robjects_cmd_selectsiblings" label="&sciviews.robjects.selectSiblings;"
+ oncommand="sv.r.objects.selectAllSiblings(sv.r.objects.selection.currentIndex);"
+ accesskey="&sciviews.robjects.selectSiblings.acc;"/>
+
+
</commandset>
</commandset>
Modified: komodo/SciViews-K/content/js/robjects.js
===================================================================
--- komodo/SciViews-K/content/js/robjects.js 2009-12-29 20:05:42 UTC (rev 241)
+++ komodo/SciViews-K/content/js/robjects.js 2010-01-23 13:43:40 UTC (rev 242)
@@ -1364,11 +1364,15 @@
return;
case 45: // Insert
case 32: // Space
- sv.log.debug("Insert");
+ //sv.log.debug("Insert");
break;
case 65: // Ctrl + A
- if (event.ctrlKey){
- _this.selection.selectAll();
+ case 97: // Ctrl + a
+ if (event.ctrlKey) {
+ if (event.shiftKey) {
+ _this.selectAllSiblings(_this.selection.currentIndex, false);
+ } else
+ _this.selection.selectAll();
}
case 0:
return;
@@ -1400,7 +1404,7 @@
return;
default:
}
- sv.log.debug("event.type = " + event.type);
+
// Default action: insert selected names
_this.insertName(event.ctrlKey, event.shiftKey);
@@ -1513,6 +1517,19 @@
}
}
+ this.selectAllSiblings = function(idx, augment) {
+ var startIndex = _this.visibleData[idx].parentIndex + 1;
+ var curLvl = _this.visibleData[idx].level;
+ var endIndex;
+ for (endIndex = startIndex;
+ endIndex < _this.visibleData.length &&
+ _this.visibleData[endIndex].level >= curLvl;
+ endIndex++) { }
+ endIndex--;
+ _this.selection.rangedSelect(startIndex, endIndex, augment)
+ }
+
+
//_setOnEvent("sciviews_robjects_searchpath_listbox", "ondragdrop",
// "nsDragAndDrop.drop(event, sv.r.objects.packageListObserver);"
// );
Modified: komodo/SciViews-K/locale/en-GB/sciviewsk.dtd
===================================================================
--- komodo/SciViews-K/locale/en-GB/sciviewsk.dtd 2009-12-29 20:05:42 UTC (rev 241)
+++ komodo/SciViews-K/locale/en-GB/sciviewsk.dtd 2010-01-23 13:43:40 UTC (rev 242)
@@ -32,7 +32,7 @@
<!ENTITY sciviews.robjects.insName "Insert name into text">
<!ENTITY sciviews.robjects.insFullName "Insert full name into text">
-<!ENTITY sciviews.robjects.rmObj "Remove objects">
+<!ENTITY sciviews.robjects.rmObj "Insert remove code">
<!ENTITY sciviews.robjects.loadPkg "Load package">
<!ENTITY sciviews.robjects.detach "Detach package">
<!ENTITY sciviews.robjects.clrFilter "Clear filter text">
@@ -47,6 +47,15 @@
<!ENTITY sciviews.robjects.print "Print">
<!ENTITY sciviews.robjects.summary "Summary">
+<!ENTITY sciviews.robjects.deleteNow "Delete immediately">
+<!ENTITY sciviews.robjects.deleteNow.acc "D">
+<!ENTITY sciviews.robjects.insertQuoted "Insert special">
+<!ENTITY sciviews.robjects.insertQuoted.acc "Q">
+<!ENTITY sciviews.robjects.selectAll "Select all">
+<!ENTITY sciviews.robjects.selectAll.acc "A">
+<!ENTITY sciviews.robjects.selectSiblings "Select current level">
+<!ENTITY sciviews.robjects.selectSiblings.acc "L">
+
<!ENTITY sciviews.robjects.filterEmptyText "Filter objects...">
<!ENTITY pkgMgr "Package manager">
Modified: komodo/SciViews-K/locale/fr-FR/sciviewsk.dtd
===================================================================
--- komodo/SciViews-K/locale/fr-FR/sciviewsk.dtd 2009-12-29 20:05:42 UTC (rev 241)
+++ komodo/SciViews-K/locale/fr-FR/sciviewsk.dtd 2010-01-23 13:43:40 UTC (rev 242)
@@ -47,6 +47,15 @@
<!ENTITY sciviews.robjects.print "Contenu" >
<!ENTITY sciviews.robjects.summary "Résumé" >
+<!ENTITY sciviews.robjects.deleteNow "Delete immediately">
+<!ENTITY sciviews.robjects.deleteNow.acc "D">
+<!ENTITY sciviews.robjects.insertQuoted "Insert special">
+<!ENTITY sciviews.robjects.insertQuoted.acc "Q">
+<!ENTITY sciviews.robjects.selectAll "Select all">
+<!ENTITY sciviews.robjects.selectAll.acc "A">
+<!ENTITY sciviews.robjects.selectSiblings "Select current level">
+<!ENTITY sciviews.robjects.selectSiblings.acc "L">
+
<!ENTITY sciviews.robjects.filterEmptyText "Filtrer les objets..." >
<!ENTITY pkgMgr "Maintenance de package">
Modified: komodo/SciViews-K/sciviewsk-0.9.6-ko.xpi
===================================================================
(Binary files differ)
More information about the Sciviews-commits
mailing list