sebastien - in flumotion/trunk: . common flumotion/component/base
flumotion-commit at lists.fluendo.com
flumotion-commit at lists.fluendo.com
Wed Feb 14 12:20:40 CET 2007
Author: sebastien
Date: Wed Feb 14 12:20:38 2007
New Revision: 4484
Modified:
flumotion/trunk/ChangeLog
flumotion/trunk/common/pychecker.mk
flumotion/trunk/flumotion/component/base/admin_gtk.py
Log:
2007-02-14 Sebastien Merle <sebastien at fluendo.com>
* common/pychecker.mk:
Keep the environment PYTHONPATH variable.
Now uninstalled gst-python can be used.
* flumotion/component/base/admin_gtk.py:
Keep a reference to the glade file in BaseAdminGtkNode to be able
to create more widgets from the same file.
Added a method to create a new instance of a widget by name.
Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog (original)
+++ flumotion/trunk/ChangeLog Wed Feb 14 12:20:38 2007
@@ -1,3 +1,13 @@
+2007-02-14 Sebastien Merle <sebastien at fluendo.com>
+
+ * common/pychecker.mk:
+ Keep the environment PYTHONPATH variable.
+ Now uninstalled gst-python can be used.
+ * flumotion/component/base/admin_gtk.py:
+ Keep a reference to the glade file in BaseAdminGtkNode to be able
+ to create more widgets from the same file.
+ Added a method to create a new instance of a widget by name.
+
2007-02-13 Andy Wingo <wingo at pobox.com>
* flumotion/test/test_common_netutils.py
Modified: flumotion/trunk/common/pychecker.mk
==============================================================================
--- flumotion/trunk/common/pychecker.mk (original)
+++ flumotion/trunk/common/pychecker.mk Wed Feb 14 12:20:38 2007
@@ -35,8 +35,8 @@
pychecker_010_files = $(filter %010.py,$(pychecker_all_files))
pychecker_indep_files = $(filter-out $(pychecker_010_files),$(pychecker_all_files))
-pychecker_indep = PYTHONPATH=$(OUR_PATH) $(pychecker)
-pychecker_010 = PYTHONPATH=$(PYGST_010_DIR):$(OUR_PATH) FLU_GST_VERSION=0.10 $(pychecker)
+pychecker_indep = PYTHONPATH=$(OUR_PATH):$$PYTHONPATH $(pychecker)
+pychecker_010 = PYTHONPATH=$(OUR_PATH):$$PYTHONPATH FLU_GST_VERSION=0.10 $(pychecker)
pychecker_if_010 = if test "x$(GST_010_SUPPORTED)" = "xyes"; then
pychecker_fi = else echo "passing, gstreamer version not supported"; fi
Modified: flumotion/trunk/flumotion/component/base/admin_gtk.py
==============================================================================
--- flumotion/trunk/flumotion/component/base/admin_gtk.py (original)
+++ flumotion/trunk/flumotion/component/base/admin_gtk.py Wed Feb 14 12:20:38 2007
@@ -211,6 +211,7 @@
self.wtree = None
self.widget = None
self.uiState = None
+ self.gladefile = None
def status_push(self, str):
if self.statusbar:
@@ -260,6 +261,7 @@
gladeFile, path))
self.debug("Switching glade text domain to %s" % domain)
self.debug("loading widget tree from %s" % path)
+ self.gladefile = path
old = gtk.glade.textdomain()
gtk.glade.textdomain(domain)
self.wtree = gtk.glade.XML(path)
@@ -281,6 +283,20 @@
return widget
+ def createWidget(self, name):
+ """
+ Create a new widget instance from the glide file.
+ Can be used to make multiple instances of the same widget.
+ """
+ if not self.gladefile:
+ raise IndexError
+ wtree = gtk.glade.XML(self.gladefile, name)
+ widget = wtree.get_widget(name)
+ if not widget:
+ self.warning('Could not create widget %s' % name)
+
+ return widget
+
def haveWidgetTree(self):
"""
I am called when the widget tree has been gotten from the glade
More information about the flumotion-commit
mailing list