[meld] bin/meld: Fix order of settings creation



commit 2de2a08a51054b28f60bd6b9cd169310ae4fe569
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Wed Jan 1 07:55:17 2014 +1000

    bin/meld: Fix order of settings creation

 bin/meld |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/bin/meld b/bin/meld
index d32838f..c2065fc 100755
--- a/bin/meld
+++ b/bin/meld
@@ -64,11 +64,9 @@ if os.path.exists(os.path.join(melddir, "meld.doap")):
 devel = os.path.exists(os.path.join(melddir, ".git"))
 
 import meld.conf
-import meld.settings
 
 if uninstalled:
     meld.conf.uninstalled()
-meld.settings.create_settings(uninstalled=uninstalled)
 
 # TODO: Possibly move to elib.intl
 import gettext
@@ -164,13 +162,15 @@ def setup_resources():
 
 
 def setup_settings():
-    if not uninstalled:
-        return
+    import meld.conf
 
-    if os.path.exists(os.path.join(meld.conf.DATADIR, "gschemas.compiled")):
-        return
+    schema_path = os.path.join(meld.conf.DATADIR, "gschemas.compiled")
+    if uninstalled and not os.path.exists(schema_path):
+        subprocess.call(["glib-compile-schemas", meld.conf.DATADIR],
+                        cwd=melddir)
 
-    subprocess.call(["glib-compile-schemas", meld.conf.DATADIR], cwd=melddir)
+    import meld.settings
+    meld.settings.create_settings(uninstalled=uninstalled)
 
 
 def setup_logging():


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