[PATCH 08/16] Update the hack we use to preload AnacondaWidgets - we need to load the typelib not just the .so file

Martin Sivak msivak at redhat.com
Thu Dec 6 15:46:31 UTC 2012


---
 pyanaconda/ui/gui/__init__.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index a09ce20..748a614 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -59,9 +59,14 @@ class GraphicalUserInterface(UserInterface):
         self._isFinal = isFinal
 
         # This is a hack to make sure the AnacondaWidgets library gets loaded
-        # before the introspection stuff.
-        import ctypes
-        ctypes.CDLL("libAnacondaWidgets.so.0", ctypes.RTLD_GLOBAL)
+        # before glade tries to use Anaconda types
+        # glade file should contain the following line to make this seamless
+        #
+        # <requires lib="AnacondaWidgets" version="1.0"/>
+        #
+        # but the current (3.4) version of GtkBuilder does not support
+        # requires elementrs with 3rd party libraries
+        from gi.repository import AnacondaWidgets
 
     @property
     def basemask(self):
-- 
1.7.11.7



More information about the anaconda-patches mailing list