summaryrefslogtreecommitdiff
path: root/python/deskbar-handler
diff options
context:
space:
mode:
authorMichael Biebl <mbiebl@gmail.com>2009-03-06 17:23:04 +0000
committerMichael Biebl <mbiebl@src.gnome.org>2009-03-06 17:23:04 +0000
commita05826f6e29c33ad0db5ee090e1a14ac50b043a1 (patch)
tree7f9cbac7944d51043ad21b56c36a0a222d50d4c4 /python/deskbar-handler
parent7bd93d24d70efdff69cf92d21b9dd10b99544eb0 (diff)
downloadtracker-a05826f6e29c33ad0db5ee090e1a14ac50b043a1.tar.gz
Starting with version 2.23.6, deskbar-applet no longer ships the
2009-03-06 Michael Biebl <mbiebl@gmail.com> * python/deskbar-handler/tracker-module.py: * python/deskbar-handler/tracker-handler.py: Starting with version 2.23.6, deskbar-applet no longer ships the deskbar.core.gnomedeskop python module so we use gnomedesktop directly (requires python-gnome-desktop). Not only fix the imports but also the code, so the desktop file support keeps working. Patch pulled from Ubuntu. svn path=/trunk/; revision=3030
Diffstat (limited to 'python/deskbar-handler')
-rw-r--r--python/deskbar-handler/tracker-handler.py9
-rw-r--r--python/deskbar-handler/tracker-module.py8
2 files changed, 9 insertions, 8 deletions
diff --git a/python/deskbar-handler/tracker-handler.py b/python/deskbar-handler/tracker-handler.py
index 3e386ac2f..e1fc4e067 100644
--- a/python/deskbar-handler/tracker-handler.py
+++ b/python/deskbar-handler/tracker-handler.py
@@ -21,12 +21,13 @@ import time
import urllib
import string
import gnome
+import gnomedesktop
import gobject
import gettext
gettext.install('tracker')
-import deskbar, deskbar.Utils, deskbar.gnomedesktop
+import deskbar, deskbar.Utils
import deskbar.Handler
import deskbar.Match
@@ -345,13 +346,13 @@ class TrackerLiveSearchHandler(deskbar.Handler.SignallingHandler):
# this code is stolen from the programs handler of deskbar
def parse_desktop_file(desktop, only_if_visible=False):
try:
- desktop = deskbar.gnomedesktop.item_new_from_file(desktop, deskbar.gnomedesktop.LOAD_ONLY_IF_EXISTS)
+ desktop = gnomedesktop.item_new_from_file(desktop, gnomedesktop.LOAD_ONLY_IF_EXISTS)
except Exception, e:
print 'Couldn\'t read desktop file:%s:%s' % (desktop, e)
return None
- if desktop == None or desktop.get_entry_type() != deskbar.gnomedesktop.TYPE_APPLICATION:
+ if desktop == None or desktop.get_entry_type() != gnomedesktop.TYPE_APPLICATION:
return None
- if only_if_visible and desktop.get_boolean(deskbar.gnomedesktop.KEY_NO_DISPLAY):
+ if only_if_visible and desktop.get_boolean(gnomedesktop.KEY_NO_DISPLAY):
return None
return desktop
diff --git a/python/deskbar-handler/tracker-module.py b/python/deskbar-handler/tracker-module.py
index 580989d93..662b129ff 100644
--- a/python/deskbar-handler/tracker-module.py
+++ b/python/deskbar-handler/tracker-module.py
@@ -1,6 +1,7 @@
# This deskbar module was ported from deskbar <= 2.18 handler by Marcus Fritzsch
import gnome
+import gnomedesktop
import gobject
import re
import sys
@@ -9,7 +10,6 @@ import string
import time
import cgi
import os.path
-import gnomedesktop
import deskbar
import deskbar.core.Utils
import deskbar.interfaces.Module
@@ -470,13 +470,13 @@ class TrackerLiveSearchHandler(deskbar.interfaces.Module):
# this code is stolen from the programs handler of deskbar
def parse_desktop_file(desktop, only_if_visible=False):
try:
- desktop = deskbar.core.gnomedesktop.item_new_from_file(desktop, deskbar.core.gnomedesktop.LOAD_ONLY_IF_EXISTS)
+ desktop = gnomedesktop.item_new_from_file(desktop, gnomedesktop.LOAD_ONLY_IF_EXISTS)
except Exception, e:
print 'Couldn\'t read desktop file:%s:%s' % (desktop, e)
return None
- if desktop == None or desktop.get_entry_type() != deskbar.core.gnomedesktop.TYPE_APPLICATION:
+ if desktop == None or desktop.get_entry_type() != gnomedesktop.TYPE_APPLICATION:
return None
- if only_if_visible and desktop.get_boolean(deskbar.core.gnomedesktop.KEY_NO_DISPLAY):
+ if only_if_visible and desktop.get_boolean(gnomedesktop.KEY_NO_DISPLAY):
return None
return desktop