[gnome-music/wip/jfelder/tracker3-rebased: 20/49] trackerwrapper: Use the log object from the application
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/tracker3-rebased: 20/49] trackerwrapper: Use the log object from the application
- Date: Wed, 29 Jul 2020 14:15:24 +0000 (UTC)
commit 79546052573e06dd65a408450dd0c9b0031bbd80
Author: Jean Felder <jfelder src gnome org>
Date: Wed Jul 29 00:54:26 2020 +0200
trackerwrapper: Use the log object from the application
gnomemusic/coregrilo.py | 2 +-
gnomemusic/trackerwrapper.py | 11 ++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/coregrilo.py b/gnomemusic/coregrilo.py
index d2b04f78..e3e9cf3d 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -69,7 +69,7 @@ class CoreGrilo(GObject.GObject):
self._thumbnail_sources_timeout = None
self._wrappers = {}
- self._tracker_wrapper = TrackerWrapper()
+ self._tracker_wrapper = TrackerWrapper(application)
self._tracker_wrapper.bind_property(
"tracker-available", self, "tracker-available",
GObject.BindingFlags.SYNC_CREATE)
diff --git a/gnomemusic/trackerwrapper.py b/gnomemusic/trackerwrapper.py
index fff9734b..d2037187 100644
--- a/gnomemusic/trackerwrapper.py
+++ b/gnomemusic/trackerwrapper.py
@@ -25,8 +25,6 @@ from enum import IntEnum
from gi.repository import Gio, GLib, GObject, Tracker
-from gnomemusic.musiclogger import MusicLogger
-
class TrackerState(IntEnum):
"""Tracker Status
@@ -37,12 +35,15 @@ class TrackerState(IntEnum):
class TrackerWrapper(GObject.GObject):
- """Create a connection to an instance of Tracker"""
- def __init__(self):
+ def __init__(self, application):
+ """Create a connection to an instance of Tracker
+
+ :param Application application: The application object
+ """
super().__init__()
- self._log = MusicLogger()
+ self._log = application.props.log
self._tracker = None
self._tracker_available = TrackerState.UNAVAILABLE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]