[tracker] firefox: Don't restrict plugin to JUST 0.12



commit 77743775907603152581b4cd8ba4f9847690fb1d
Author: Martyn Russell <martyn lanedo com>
Date:   Wed Feb 22 18:33:28 2012 +0000

    firefox: Don't restrict plugin to JUST 0.12

 src/plugins/firefox/chrome/content/bindings.js |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/firefox/chrome/content/bindings.js b/src/plugins/firefox/chrome/content/bindings.js
index 1c5dff2..727087c 100644
--- a/src/plugins/firefox/chrome/content/bindings.js
+++ b/src/plugins/firefox/chrome/content/bindings.js
@@ -2,7 +2,8 @@ if (!org.bustany.TrackerFox.TrackerSparql || !org.bustany.TrackerFox.TrackerSpar
 org.bustany.TrackerFox.TrackerSparql = {
 	__initialized: true,
 
-	_trackerSparqlPath: "libtracker-sparql-0.12.so.0",
+	_trackerSparqlPath1: "libtracker-sparql-0.12.so.0",
+	_trackerSparqlPath2: "libtracker-sparql-0.14.so.0",
 	_lib: null,
 
 	init: function () {
@@ -16,10 +17,16 @@ org.bustany.TrackerFox.TrackerSparql = {
 		Components.utils.import ("resource://gre/modules/ctypes.jsm");
 
 		try {
-			tracker._lib = ctypes.open (tracker._trackerSparqlPath);
+			tracker._lib = ctypes.open (tracker._trackerSparqlPath1);
 		} catch (e) {
-			dump("Could not load libtracker-sparql 0.12\n");
-			return false;
+			dump ("Could not load " + tracker._trackerSparqlPath1 + ": " + e + "\n");
+
+		        try {
+			        tracker._lib = ctypes.open (tracker._trackerSparqlPath2);
+			} catch (e) {
+			        dump ("Could not load " + tracker._trackerSparqlPath2 + ": " + e + "\n");
+			        return false;
+			}
 		}
 
 		// GLib types



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