[conduit] Kill gtkmozembed with fire



commit 5b912e61f727937a9f04482ba701bb97971e4f66
Author: John Stowers <john stowers gmail com>
Date:   Thu Sep 23 13:24:04 2010 +1200

    Kill gtkmozembed with fire

 conduit/Makefile.am                   |    2 -
 conduit/Settings.py                   |    2 +-
 conduit/Web.py                        |    6 +-
 conduit/__init__.py                   |    2 +-
 conduit/conduit                       |   35 +++------
 conduit/conduit.real                  |   24 ------
 conduit/platform/Makefile.am          |    3 +-
 conduit/platform/WebBrowserMozilla.py |  139 ---------------------------------
 conduit/platform/__init__.py          |    3 +-
 configure.ac                          |    9 ++-
 scripts/CheckGtkMozEmbed.py           |   12 ---
 11 files changed, 24 insertions(+), 213 deletions(-)
---
diff --git a/conduit/Makefile.am b/conduit/Makefile.am
index bc8c7cf..ad063b3 100644
--- a/conduit/Makefile.am
+++ b/conduit/Makefile.am
@@ -2,7 +2,6 @@ SUBDIRS = datatypes dataproviders modules gtkui hildonui utils platform vfs
 
 conduitbindir = $(bindir)
 conduitbin_SCRIPTS = \
-	conduit.real \
 	conduit
 
 conduitdir = $(pythondir)/conduit
@@ -40,7 +39,6 @@ DISTCLEANFILES = \
 	
 EXTRA_DIST = \
 	defs.py.in \
-	conduit.real \
 	conduit
 
 clean-local:
diff --git a/conduit/Settings.py b/conduit/Settings.py
index 599c95a..fa5e63e 100644
--- a/conduit/Settings.py
+++ b/conduit/Settings.py
@@ -78,7 +78,7 @@ class Settings(gobject.GObject):
         'gui_minimize_to_tray'      :   False,          #Behaviour when one minimizes the main window, should it iconify?
         'gui_initial_canvas_height' :   450,            #Reduce to ~300 for eepc, etc
         'gui_initial_canvas_width'  :   450,            #Reduce for eepc, etc
-        'gui_use_rgba_colormap'     :   False,          #Seems to corrupt gtkmozembed on some systems
+        'gui_use_rgba_colormap'     :   False,          #Seems to corrupt on some systems
         'gui_show_hints'            :   True,           #Show message area hints in the Conduit GUI
         'gui_show_treeview_lines'   :   False,          #Show treeview lines
     }
diff --git a/conduit/Web.py b/conduit/Web.py
index d67b1f9..68ca213 100644
--- a/conduit/Web.py
+++ b/conduit/Web.py
@@ -65,9 +65,7 @@ class LoginWindow(Singleton.Singleton):
             return False
 
         import gtk
-        if browserName == "gtkmozembed":
-            import conduit.platform.WebBrowserMozilla as WebBrowserImpl
-        elif browserName == "webkit":
+        if browserName == "webkit":
             import conduit.platform.WebBrowserWebkit as WebBrowserImpl
 
         #lazy init to save a bit of time
@@ -176,7 +174,7 @@ class LoginMagic(object):
             login = WebBrowserSystem.WebBrowserImpl()
         else:
             try:
-                if browser not in ("gtkmozembed","webkit"):
+                if browser != "webkit":
                     log.warn("Unknown browser type")
                     return
 
diff --git a/conduit/__init__.py b/conduit/__init__.py
index 97276a7..0da7375 100644
--- a/conduit/__init__.py
+++ b/conduit/__init__.py
@@ -50,7 +50,7 @@ else:
     SHARED_DATA_DIR =           os.path.join(DIRECTORY, "data")
     SHARED_MODULE_DIR =         os.path.join(DIRECTORY, "conduit", "modules")
     DESKTOP_FILE_DIR =          os.path.join(DIRECTORY, "data")
-                                #{gtkmozembed, webkit, system}
+                                #{webkit, system}
     BROWSER_IMPL =              os.environ.get("CONDUIT_BROWSER_IMPL","webkit")
                                 #{GConf,Python}
     SETTINGS_IMPL =             os.environ.get("CONDUIT_SETTINGS_IMPL","GConf")
diff --git a/conduit/conduit b/conduit/conduit
index 54e266b..899c87a 100755
--- a/conduit/conduit
+++ b/conduit/conduit
@@ -1,27 +1,14 @@
-#!/bin/sh
-# Start Conduit
+#!/usr/bin/env python
+import sys
+import os.path
 
-# Work around https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/26436
-# Note: This bug is also present in Mandriva and Fedora, for this reason, 
-# We will use run-mozilla in all cases
+#support running uninstalled
+_dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+if os.path.exists(os.path.join(_dirname,"NEWS")):
+    sys.path.insert(0, _dirname)
 
-# Run mozilla takes care of settin up the appropriate environment variables
-# to run a program using mozilla libs
-
-if [ x$CONDUIT_BROWSER_IMPL = x"gtkmozembed" ]; then
-    for d in `ls -d /usr/lib*/firefox* /usr/lib*/mozilla-firefox* 2> /dev/null | sort -r`
-    do
-        if [ -x $d/run-mozilla.sh ]; then
-            echo INFO: FOUND FIREFOX LIBS AT $d
-            $d/run-mozilla.sh `dirname $0`/conduit.real $*
-            exit
-        fi
-    done
-
-    echo "WARNING: COULD NOT FIND FIREFOX LIBRARIES"
-    echo "WARNING: CONDUIT MAY CRASH UNEXPECTEDLY"
-    echo "WARNING: PLEASE TALK TO THE PERSON WHO PACKAGED CONDUIT"
-fi
-
-`dirname $0`/conduit.real $*
+import conduit
+import conduit.Main
 
+app = conduit.Main.Application()
+ 
diff --git a/conduit/platform/Makefile.am b/conduit/platform/Makefile.am
index ddb653b..b9a89bd 100644
--- a/conduit/platform/Makefile.am
+++ b/conduit/platform/Makefile.am
@@ -4,8 +4,7 @@ conduit_PYTHON = \
 	SettingsGConf.py		\
 	SettingsPython.py		\
 	WebBrowserWebkit.py		\
-	WebBrowserSystem.py		\
-	WebBrowserMozilla.py
+	WebBrowserSystem.py
 	
 clean-local:
 	rm -rf *.pyc *.pyo
diff --git a/conduit/platform/__init__.py b/conduit/platform/__init__.py
index b4acca8..367ea93 100644
--- a/conduit/platform/__init__.py
+++ b/conduit/platform/__init__.py
@@ -26,8 +26,7 @@ class Settings:
     
 class WebBrowser(gobject.GObject):
     """
-    Basic webbrowser abstraction to provide an upgrade path
-    to webkit from gtkmozembed
+    Basic webbrowser abstraction
     """
     __gsignals__ = {
         "location_changed" : (
diff --git a/configure.ac b/configure.ac
index 1df830c..85d2267 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,9 +30,10 @@ AM_PATH_PYTHON(2.4)
 BROWSER_IMPL="webkit"
 
 AC_ARG_WITH([browser_impl],
-            AC_HELP_STRING([--with-browser-impl], [webkit (default), gtkmozembed, system]))
+            AC_HELP_STRING([--with-browser-impl], [webkit (default), system]),
+            [],
+            [with_browser_impl=webkit])
 if test "$with_browser_impl" = "webkit" || 
-   test "$with_browser_impl" = "gtkmozembed" || 
    test "$with_browser_impl" = "system"; then
         BROWSER_IMPL=$with_browser_impl
 fi
@@ -51,6 +52,10 @@ AM_CHECK_PYMOD_VERSION([gudev], [__version__], [147.1], , AC_MSG_ERROR([Python m
 AM_CHECK_PYMOD_VERSION([gobject], [pygobject_version], [2.21.1], , AC_MSG_ERROR([Python module gobject >= 2.21.1 required to run Conduit]))
 AM_CHECK_PYMOD_VERSION([glib], [pyglib_version], [2.21.1], , AC_MSG_ERROR([Python module glib >= 2.21.1 required to run Conduit]))
 
+if test "$with_browser_impl" = "webkit"; then
+    AM_CHECK_PYMOD([webkit], , , AC_MSG_ERROR([Python module webkit required to run Conduit]))
+fi
+
 ################################################################################
 # DBus
 ################################################################################



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]