#!/usr/bin/python3
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
#
#   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 warranties of
#   MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
#   PURPOSE.  See the GNU General Public License 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/>.

import locale

import sys
import os

import gi

gi.require_version('Gtk', '3.0')
from gi.repository import Gtk  # nopep8

locale.textdomain('sgt-launcher')

# Check GTK Version, minimum required is 3.20
if Gtk.check_version(3, 20, 0):
    print("Gtk version too old, version 3.20 required.")
    sys.exit(1)

# Get project root directory (enable symlink and trunk execution)
PROJECT_ROOT_DIRECTORY = os.path.abspath(
    os.path.dirname(os.path.dirname(os.path.realpath(sys.argv[0]))))

# Add project root directory to python search path
sys.path.append(PROJECT_ROOT_DIRECTORY)

import sgtlauncher  # nopep8
sgtlauncher.main()
