[kupfer: 9/18] websearch: find all search plugin from firefox/iceweasel
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer: 9/18] websearch: find all search plugin from firefox/iceweasel
- Date: Tue, 22 Jan 2013 20:44:28 +0000 (UTC)
commit 7f8a52a1f11b8d67d5491c584a40234c9175ccbf
Author: Karol BÄdkowski <karol bedkowski gmail com>
Date: Tue Oct 16 18:45:05 2012 +0200
websearch: find all search plugin from firefox/iceweasel
+ load search plugins from more standard dirs
Closes: lp#799332
kupfer/plugin/websearch.py | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/plugin/websearch.py b/kupfer/plugin/websearch.py
index 84f492e..9655275 100644
--- a/kupfer/plugin/websearch.py
+++ b/kupfer/plugin/websearch.py
@@ -167,7 +167,7 @@ class OpenSearchSource (Source):
# firefox in home directory
ffx_home = firefox_support.get_firefox_home_file("searchplugins")
- if ffx_home:
+ if ffx_home and os.path.isdir(ffx_home):
plugin_dirs.append(ffx_home)
plugin_dirs.extend(config.get_data_dirs("searchplugins",
@@ -186,6 +186,22 @@ class OpenSearchSource (Source):
plugin_dirs.append(addon_lang_dir)
break
+ # debian iceweasel
+ if os.path.isdir("/etc/iceweasel/searchplugins/common"):
+ plugin_dirs.append("/etc/iceweasel/searchplugins/common")
+ for suffix in suffixes:
+ addon_dir = os.path.join("/etc/iceweasel/searchplugins/locale",
+ suffix)
+ if os.path.isdir(addon_dir):
+ plugin_dirs.append(addon_dir)
+
+ # try to find all versions of firefox
+ for dirname in os.listdir("/usr/lib/"):
+ if dirname.startswith("firefox") or dirname.startswith("iceweasel"):
+ addon_dir = os.path.join("/usr/lib", dirname, "searchplugins")
+ if os.path.isdir(addon_dir):
+ plugin_dirs.append(addon_dir)
+
self.output_debug("Found following searchplugins directories",
sep="\n", *plugin_dirs)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]