[gedit-latex] FIXME: Don't segfault on missing schemas...



commit 9340b842dbf69282a681434844bbc1136e6ffacc
Author: John Stowers <john stowers gmail com>
Date:   Thu Jun 30 12:32:40 2011 +1200

    FIXME: Don't segfault on missing schemas...

 latex/__init__.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/latex/__init__.py b/latex/__init__.py
index 19febc6..db838af 100644
--- a/latex/__init__.py
+++ b/latex/__init__.py
@@ -18,6 +18,11 @@
 # this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
 # Street, Fifth Floor, Boston, MA  02110-1301, USA
 
+from gi.repository import Gio
+
+if "org.gnome.gedit.plugins.latex" not in Gio.Settings.list_schemas():
+    raise Exception("Plugin schema not installed")
+
 from base.appactivatable import LaTeXAppActivatable
 from base.windowactivatable import LaTeXWindowActivatable
 



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