#!/usr/bin/env python
#
# File: gmpm/constants.py
# This file is part of the Gmpm-Project, a graphical MiKTeX Package Manager frontend.
#
# Copyright (C) 2008 Juan Fiol
# This is free software.  You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
#
# Written by Juan Fiol <juanfiol@gmail.com>

"""
Constants used through out the program. Mainly different pathes.
These should be set during the installation.

@var APP_NAME: the application name
@type APP_NAME: string
@var AUTHOR: the author name
@type APP: string
@var VERSION: the current version
@type VERSION: string

@var HOME: shortcut to $HOME
@type HOME: string
@var CONFIG_DIR: The configuration directory.
@type CONFIG_DIR: string
@var CONFIG_LOCATION: L{CONFIG_DIR} plus name of the config file.
@type CONFIG_LOCATION: string

@var ICON_DIR: directory containing the icons
@type ICON_DIR: string
@var APP_ICON: the path of the application icon
@type APP_ICON: string

@var DATA_DIR: Directory which contains all shared files.
@type DATA_DIR: string
@var LOCALE_DIR: the path to the directory where the locale files (*.mo) are stored.
@type LOCALE_DIR: string
@var PLUGIN_DIR: Directory containing the plugin xmls.
@type PLUGIN_DIR: string
@var SETTINGS_DIR: Directory containing the user specific settings.
@type SETTINGS_DIR: string
@var TEMPLATE_DIR: Directory containing the UI template files.
@type TEMPLATE_DIR: string
"""
import os
from os.path import join as pjoin

PREFIX='/usr/'
DATA_DIR = "share/gmpm"
# icons
ICON_DIR = pjoin(DATA_DIR, "icons")
APP_ICON = pjoin(ICON_DIR, "gmpm-icon.png")

# general
APP_NAME = "gmpm"
VERSION = "0.5.1"
AUTHOR= "Juan Fiol"
HOME = os.environ["HOME"]

# config  CHECK!!! THIS IS THE SITE CONFIG, EACH USER WILL HAVE HIS OWN
CONFIG_DIR = "/etc/gmpm"
CONFIG_LOCATION = pjoin(CONFIG_DIR, "gmpm.cfg")

# misc dirs
DOC_DIR= pjoin(DATA_DIR, "doc")
TEMPLATE_DIR = "share/gmpm"
LOCALE_DIR = "i18n/"

SETTINGS_DIR = pjoin(HOME, ".miktex")
SETTINGS_LOCAL_DIR = ".miktex"
TEMPLATE_FILE= os.path.join(TEMPLATE_DIR, 'gmpm.glade')


