Skip to content

Commit facdae6

Browse files
author
Todd Whiteman
committed
addons: sbsdiff: update to support Komodo 7
git-svn-id: http://svn.openkomodo.com/repos/addons/sbsdiff@8378 b87d16e7-d29f-4ee1-b5ec-817d645d335f
1 parent 1e49cc4 commit facdae6

File tree

5 files changed

+21
-14
lines changed

5 files changed

+21
-14
lines changed

chrome.manifest

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
content sbsdiff content/ xpcnativewrappers=yes contentaccessible=yes
1+
content sbsdiff content/ contentaccessible=yes
22
skin sbsdiff classic/1.0 pylib/reviewboard/htdocs/media/rb/css/
3+
locale sbsdiff en-US locale/en-US/
4+
35
overlay chrome://komodo/content/dialogs/diff.xul chrome://sbsdiff/content/diff-overlay.xul
6+
7+
manifest components/component.manifest

content/diff-overlay.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,19 @@ function loadSBSDiff() {
8080
html = unicodeConverter.ConvertFromUnicode(html);
8181

8282
// Get the extension's on-disk location.
83-
var MY_ID = "[email protected]";
84-
var em = Components.classes["@mozilla.org/extensions/manager;1"].
85-
getService(Components.interfaces.nsIExtensionManager);
86-
var aFile = em.getInstallLocation(MY_ID).getItemFile(MY_ID, "content");
83+
var aFile = Components.classes["@mozilla.org/file/directory_service;1"].
84+
getService( Components.interfaces.nsIProperties).
85+
get("ProfD", Components.interfaces.nsIFile);
86+
aFile.append("extensions");
87+
aFile.append("[email protected]");
88+
aFile.append("content");
8789
aFile.append("diff.html");
8890
if (aFile.exists())
8991
aFile.remove(false);
90-
aFile.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0660);
92+
aFile.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, parseInt("0660", 8));
9193
var stream = Components.classes["@mozilla.org/network/safe-file-output-stream;1"]
9294
.createInstance(Components.interfaces.nsIFileOutputStream);
93-
stream.init(aFile, 0x04 | 0x08 | 0x20, 0600, 0); // write, create, truncate
95+
stream.init(aFile, 0x04 | 0x08 | 0x20, parseInt("0600", 8), 0); // write, create, truncate
9496
stream.write(html, html.length);
9597
if (stream instanceof Components.interfaces.nsISafeOutputStream) {
9698
stream.finish();

content/diff-overlay.xul

+2-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@
3737
* ***** END LICENSE BLOCK ***** -->
3838

3939
<!DOCTYPE bindings PUBLIC "-//MOZILLA//DTD XBL V1.0//EN" "http://www.mozilla.org/xbl" [
40-
<!ENTITY % bindingsDTD SYSTEM "chrome://komodo/locale/bindings.dtd">
41-
%bindingsDTD;
42-
<!ENTITY % dialogsDTD SYSTEM "chrome://komodo/locale/dialogs.dtd">
43-
%dialogsDTD;
40+
<!ENTITY % sbsdiffDTD SYSTEM "chrome://sbsdiff/locale/sbsdiff.dtd">
41+
%sbsdiffDTD;
4442
]>
4543

4644
<?xml-stylesheet href="chrome://komodo/skin/global/global.css" type="text/css"?>

install.rdf

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
<Description about="urn:mozilla:install-manifest">
66

7-
<em:type>2</em:type> <!-- type=extension -->
7+
<em:type>2</em:type> <!-- type=extension -->
8+
<em:unpack>true</em:unpack>
89
<em:id>[email protected]</em:id>
910
<em:name>Side by Side Diffs</em:name>
1011
<em:version>0.2.3</em:version>
@@ -20,15 +21,15 @@
2021
<!-- Komodo IDE's uuid -->
2122
<em:id>{36E66FA0-F259-11D9-850E-000D935D3368}</em:id>
2223
<em:minVersion>5.2.0-alpha1</em:minVersion>
23-
<em:maxVersion>6.*</em:maxVersion>
24+
<em:maxVersion>7.*</em:maxVersion>
2425
</Description>
2526
</em:targetApplication>
2627
<em:targetApplication>
2728
<Description>
2829
<!-- Komodo Edit's uuid -->
2930
<em:id>{b1042fb5-9e9c-11db-b107-000d935d3368}</em:id>
3031
<em:minVersion>5.2.0-alpha1</em:minVersion>
31-
<em:maxVersion>6.*</em:maxVersion>
32+
<em:maxVersion>7.*</em:maxVersion>
3233
</Description>
3334
</em:targetApplication>
3435

locale/en-US/sbsdiff.dtd

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<!ENTITY revealPositionInEditor.label "Reveal Position in Editor">
2+
<!ENTITY revealPositionInEditor.tooltiptext "Show this file position in the main Komodo editor window.">

0 commit comments

Comments
 (0)