jdahlin - in flumotion/trunk: .
flumotion/component/producers/looper flumotion/ui
flumotion-commit at lists.fluendo.com
flumotion-commit at lists.fluendo.com
Wed Dec 5 13:34:59 CET 2007
Author: jdahlin
Date: Wed Dec 5 13:34:41 2007
New Revision: 5986
Modified:
flumotion/trunk/ChangeLog
flumotion/trunk/flumotion/component/producers/looper/flufileinfo.glade
flumotion/trunk/flumotion/component/producers/looper/looper.glade
flumotion/trunk/flumotion/ui/glade.py
Log:
2007-12-05 Johan Dahlin <johan at gnome.org>
* flumotion/ui/glade.py:
Monkey patch _open_glade and remove LibgladeWidgeTree monkey patch.
Which allows you to specify a path instead of a resource string.
* flumotion/component/producers/looper/flufileinfo.glade:
Hide the window by default.
* flumotion/component/producers/looper/looper.glade:
Rename the main window to window1 for consistency
Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog (original)
+++ flumotion/trunk/ChangeLog Wed Dec 5 13:34:41 2007
@@ -1,3 +1,14 @@
+2007-12-05 Johan Dahlin <johan at gnome.org>
+
+ * flumotion/ui/glade.py:
+ Monkey patch _open_glade and remove LibgladeWidgeTree monkey patch.
+ Which allows you to specify a path instead of a resource string.
+
+ * flumotion/component/producers/looper/flufileinfo.glade:
+ Hide the window by default.
+ * flumotion/component/producers/looper/looper.glade:
+ Rename the main window to window1 for consistency
+
2007-12-05 Michael Smith <msmith at fluendo.com>
* flumotion/manager/component.py:
Modified: flumotion/trunk/flumotion/component/producers/looper/flufileinfo.glade
==============================================================================
--- flumotion/trunk/flumotion/component/producers/looper/flufileinfo.glade (original)
+++ flumotion/trunk/flumotion/component/producers/looper/flufileinfo.glade Wed Dec 5 13:34:41 2007
@@ -4,7 +4,6 @@
<glade-interface>
<widget class="GtkWindow" id="window1">
- <property name="visible">True</property>
<property name="title" translatable="yes">window1</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
Modified: flumotion/trunk/flumotion/component/producers/looper/looper.glade
==============================================================================
--- flumotion/trunk/flumotion/component/producers/looper/looper.glade (original)
+++ flumotion/trunk/flumotion/component/producers/looper/looper.glade Wed Dec 5 13:34:41 2007
@@ -3,7 +3,7 @@
<glade-interface>
-<widget class="GtkWindow" id="mainwindow">
+<widget class="GtkWindow" id="window1">
<property name="title" translatable="yes">window1</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
Modified: flumotion/trunk/flumotion/ui/glade.py
==============================================================================
--- flumotion/trunk/flumotion/ui/glade.py (original)
+++ flumotion/trunk/flumotion/ui/glade.py Wed Dec 5 13:34:41 2007
@@ -21,12 +21,13 @@
__version__ = "$Rev$"
+import os
import gtk
from gtk import glade
import gobject
from kiwi.environ import environ
-from kiwi.ui import libgladeloader
+from kiwi.ui import views
from kiwi.ui.delegates import GladeDelegate
from twisted.python.reflect import namedAny
@@ -86,8 +87,20 @@
def get_sizegroups(self):
return []
-libgladeloader.LibgladeWidgetTree = FluLibgladeWidgetTree
+def _open_glade(view, gladefile, domain):
+ if not gladefile:
+ raise ValueError("A gladefile wasn't provided.")
+ elif not isinstance(gladefile, basestring):
+ raise TypeError(
+ "gladefile should be a string, found %s" % type(gladefile))
+
+ if not '/' in gladefile:
+ filename = os.path.splitext(os.path.basename(gladefile))[0]
+ gladefile = environ.find_resource("glade", filename + '.glade')
+ return FluLibgladeWidgetTree(view, gladefile, domain)
+
+views._open_glade = _open_glade
class GladeBacked(GladeDelegate):
"""
More information about the flumotion-commit
mailing list