diff options
Diffstat (limited to 'CristianEdit/Globales.py')
-rw-r--r-- | CristianEdit/Globales.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/CristianEdit/Globales.py b/CristianEdit/Globales.py new file mode 100644 index 0000000..2575a03 --- /dev/null +++ b/CristianEdit/Globales.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Globales.py por: +# Cristian García <cristian99garcia@gmail.com> + +from gi.repository import Gtk +from gi.repository import GtkSource + +BIENVENIDA = '''\n\nTerminal creada en python, +por Cristian García <cristian99garcia@gmail.com>''' + +lenguaje_manager = GtkSource.LanguageManager() +lenguajes = lenguaje_manager.get_language_ids() + +lenguajes.insert(0, 'Texto Plano') + +estilo_manager = GtkSource.StyleSchemeManager() +estilos = estilo_manager.get_scheme_ids() + + +def get_clasico(): + """Devuelve la posisión de classic en el combo""" + + cuenta = 0 + clasico = 0 + + for estilo in estilos: + if estilo == 'classic': + clasico = cuenta + + cuenta += 1 + + return clasico |