mirror of
https://github.com/pulb/mailnag.git
synced 2026-05-07 11:16:49 +02:00
moved distro specific vars to dist_cfg.py
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# config.py
|
||||
#
|
||||
# Copyright 2011 Patrick Ulbrich <zulu99@gmx.net>
|
||||
# Copyright 2011, 2012 Patrick Ulbrich <zulu99@gmx.net>
|
||||
#
|
||||
# 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
|
||||
@@ -26,8 +26,6 @@ import xdg.BaseDirectory as bd
|
||||
from ConfigParser import RawConfigParser
|
||||
from common.i18n import _
|
||||
|
||||
APP_VERSION = "0.4.2"
|
||||
|
||||
mailnag_defaults = {
|
||||
'general':
|
||||
{
|
||||
|
||||
44
Mailnag/common/dist_cfg.py
Normal file
44
Mailnag/common/dist_cfg.py
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# dist_cfg.py
|
||||
#
|
||||
# Copyright 2012 Patrick Ulbrich <zulu99@gmx.net>
|
||||
#
|
||||
# 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 2 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
|
||||
# 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, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
# MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
# This file contains variables that need to be adjusted for propper distro integration.
|
||||
# Additionally to those variables, packagers have to adjust the following paths:
|
||||
# * LOCALE_DIR in file gen_locales
|
||||
# * LIB_DIR in bash scripts mailnag and mailnag_cfg
|
||||
# * Exec and Icon paths in data/mailnag_config.desktop
|
||||
|
||||
# Application version displayed in the
|
||||
# about dialog of the config window.
|
||||
APP_VERSION = "0.4.2"
|
||||
|
||||
# The PACKAGE_NAME variable is used to configure
|
||||
# 1) the path where all app data (glade files, images) is loaded from
|
||||
# (usually /usr/share/<PACKAGE_NAME>) via get_data_file() (see utils.py).
|
||||
# 2) paths for localization files generated with gen_locales
|
||||
# (usually /usr/share/locale/<LANG>/LC_MESSAGES/<PACKAGE_NAME>.mo).
|
||||
# Typically, there's no need to touch this variable.
|
||||
PACKAGE_NAME = "mailnag"
|
||||
|
||||
# The LOCALE_DIR variable specifies the root path for localization files
|
||||
# (usually you have to make it point to '/usr/share/locale').
|
||||
LOCALE_DIR = './locale'
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# i18n.py
|
||||
#
|
||||
# Copyright 2011 Patrick Ulbrich <zulu99@gmx.net>
|
||||
# Copyright 2011, 2012 Patrick Ulbrich <zulu99@gmx.net>
|
||||
#
|
||||
# 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
|
||||
@@ -21,11 +21,9 @@
|
||||
# MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
LOCALE_DIR = './locale'
|
||||
|
||||
import locale
|
||||
import gettext
|
||||
from common.utils import PACKAGE_NAME
|
||||
from common.dist_cfg import PACKAGE_NAME, LOCALE_DIR
|
||||
|
||||
# bind textdomain for GTK Builder
|
||||
locale.bindtextdomain(PACKAGE_NAME, LOCALE_DIR)
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
from gi.repository import GObject, GLib, GdkPixbuf, Gtk
|
||||
import gnomekeyring
|
||||
|
||||
from common.i18n import PACKAGE_NAME, _
|
||||
from common.dist_cfg import PACKAGE_NAME
|
||||
from common.i18n import _
|
||||
from common.utils import get_data_file
|
||||
from common.account import Account
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import os
|
||||
import time
|
||||
import urllib2
|
||||
|
||||
PACKAGE_NAME = "mailnag"
|
||||
from common.dist_cfg import PACKAGE_NAME
|
||||
|
||||
def get_data_file(filename):
|
||||
"""
|
||||
|
||||
@@ -22,9 +22,10 @@
|
||||
#
|
||||
|
||||
from gi.repository import GLib, GdkPixbuf, Gtk
|
||||
from common.dist_cfg import PACKAGE_NAME
|
||||
from common.i18n import _
|
||||
from common.utils import get_data_file
|
||||
from common.account import Account
|
||||
from common.i18n import PACKAGE_NAME, _
|
||||
|
||||
class AccountDialog:
|
||||
def __init__(self, parent, acc):
|
||||
|
||||
@@ -25,9 +25,10 @@
|
||||
import os
|
||||
from gi.repository import GLib, GdkPixbuf, Gtk, GObject
|
||||
|
||||
from common.i18n import PACKAGE_NAME, _
|
||||
from common.dist_cfg import PACKAGE_NAME, APP_VERSION
|
||||
from common.i18n import _
|
||||
from common.utils import get_data_file
|
||||
from common.config import read_cfg, write_cfg, APP_VERSION
|
||||
from common.config import read_cfg, write_cfg
|
||||
from common.accountlist import AccountList
|
||||
from common.account import Account
|
||||
from configuration.accountdialog import AccountDialog
|
||||
|
||||
Reference in New Issue
Block a user