| 1 |
#!/usr/bin/env python3 |
| 2 |
|
| 3 |
# Copyright 2014 (C) Raster Software Vigo (Sergio Costas) |
| 4 |
# |
| 5 |
# This file is part of DeVeDe-NG |
| 6 |
# |
| 7 |
# DeVeDe-NG is free software; you can redistribute it and/or modify |
| 8 |
# it under the terms of the GNU General Public License version 3 |
| 9 |
# as published by the Free Software Foundation. |
| 10 |
# |
| 11 |
# DeVeDe-NG is distributed in the hope that it will be useful, |
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
# GNU General Public License for more details. |
| 15 |
# |
| 16 |
# You should have received a copy of the GNU General Public License |
| 17 |
# along with this program. If not, see <http://www.gnu.org/licenses/> |
| 18 |
|
| 19 |
|
| 20 |
import gi |
| 21 |
gi.require_version('Gtk', '3.0') |
| 22 |
import sys |
| 23 |
import gettext |
| 24 |
import locale |
| 25 |
from gi.repository import Gtk |
| 26 |
|
| 27 |
import devedeng.project |
| 28 |
import devedeng.configuration_data |
| 29 |
import devedeng.choose_disc_type |
| 30 |
|
| 31 |
_ = gettext.gettext |
| 32 |
|
| 33 |
config_data = devedeng.configuration_data.configuration.get_config() |
| 34 |
|
| 35 |
if config_data is None: |
| 36 |
print("Can't locate extra files. Aborting.") |
| 37 |
sys.exit(1) |
| 38 |
|
| 39 |
Gtk.init(sys.argv) |
| 40 |
|
| 41 |
gettext.install(config_data.gettext_domain, localedir=config_data.share_locale) |
| 42 |
locale.setlocale(locale.LC_ALL, "") |
| 43 |
locale.bindtextdomain(config_data.gettext_domain, config_data.share_locale) |
| 44 |
locale.bind_textdomain_codeset(config_data.gettext_domain, "UTF-8") |
| 45 |
locale.textdomain(config_data.gettext_domain) |
| 46 |
|
| 47 |
def py(): |
| 48 |
global config_data |
| 49 |
|
| 50 |
mwindow = devedeng.project.devede_project() |
| 51 |
ask_type = devedeng.choose_disc_type.choose_disc_type() |
| 52 |
|
| 53 |
Gtk.main() |
| 54 |
config_data.save_config() |