[pitivi/ges: 152/287] loggable: Let user set log category at init
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 152/287] loggable: Let user set log category at init
- Date: Thu, 15 Mar 2012 16:38:36 +0000 (UTC)
commit 1d72b0650a0c06db5095f3e330fdfd0ee7218d98
Author: Thibault Saunier <thibault saunier collabora com>
Date: Mon Jan 9 11:18:15 2012 -0300
loggable: Let user set log category at init
Make use of it so the PitviviMainWindow class logging category
become "mainwindow" and not "pitivimainwindo" as it is more natural.
pitivi/log/loggable.py | 6 ++++--
pitivi/ui/mainwindow.py | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/log/loggable.py b/pitivi/log/loggable.py
index 2e3873c..4db04f7 100644
--- a/pitivi/log/loggable.py
+++ b/pitivi/log/loggable.py
@@ -24,8 +24,10 @@ from pitivi.log import log
class Loggable(log.Loggable):
- def __init__(self):
- if not hasattr(self, 'logCategory'):
+ def __init__(self, logCategory=None):
+ if logCategory:
+ self.logCategory = logCategory
+ elif not hasattr(self, 'logCategory'):
self.logCategory = self.__class__.__name__.lower()
def logObjectName(self):
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index 6d4691e..077e58e 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -168,7 +168,7 @@ class PitiviMainWindow(gtk.Window, Loggable):
def __init__(self, instance, allow_full_screen=True):
""" initialize with the Pitivi object """
gtk.Window.__init__(self)
- Loggable.__init__(self)
+ Loggable.__init__(self, "mainwindow")
self.log("Creating MainWindow")
self.actions = None
self.toggleactions = None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]