-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathc-s-gui.py
executable file
·62 lines (55 loc) · 2.18 KB
/
c-s-gui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ==============================================================================
# PAQUETE: canaima-semilla
# ARCHIVO: scripts/c-s.sh
# DESCRIPCIÓN: Script principal. Se encarga de invocar a los demás módulos y
# funciones según los parámetros proporcionados.
# USO: ./c-s.sh [MÓDULO] [PARÁMETROS] [...]
# COPYRIGHT:
# (C) 2010-2020 Luis Alejandro Martínez Faneyth <[email protected]>
# (C) 2012 Niv Sardi <[email protected]>
# LICENCIA: GPL-3
# ==============================================================================
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# COPYING file for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# CODE IS POETRY
import os, gtk, sys, gettext, locale
from canaimasemilla.main import Main
from canaimasemilla.constructor import UserMessage
from canaimasemilla.translator import MAIN_ROOT_ERROR_TITLE, MAIN_ROOT_ERROR_MSG
from canaimasemilla.config import *
gtk.gdk.threads_init()
if __name__ == "__main__":
settinglocale = locale.setlocale(locale.LC_ALL, '')
naminglocale = LOCALEDIR+'/'+locale.getlocale()[0]+'/LC_MESSAGES/c-s-gui.mo'
try:
gettext.GNUTranslations(open(naminglocale, 'rb')).install()
except Exception:
gettext.NullTranslations().install()
# if os.geteuid() != 0:
# dialog = UserMessage(
# message = MAIN_ROOT_ERROR_MSG, title = MAIN_ROOT_ERROR_TITLE,
# type = gtk.MESSAGE_ERROR, buttons = gtk.BUTTONS_OK,
# c_1 = gtk.RESPONSE_OK, f_1 = sys.exit, p_1 = (1,)
# )
# else:
# app = Main()
# gtk.main()
# sys.exit()
app = Main()
gtk.main()
sys.exit()