Beispiel #1
0
import os
import sys
import subprocess
import threading
from cStringIO import StringIO

from mailpile.config.defaults import CONFIG_RULES
from mailpile.config.manager import ConfigManager
from mailpile.i18n import ActivateTranslation
from mailpile.i18n import gettext as _
from mailpile.plugins.gui import GetUserSecret

APPDIR = os.path.abspath(os.path.dirname(__file__))
if not os.path.exists(os.path.join(APPDIR, 'media', 'splash.jpg')):
    APPDIR = os.path.abspath(
        os.path.join(ConfigManager.DEFAULT_SHARED_DATADIR(), 'mailpile-gui'))

MEDIA_PATH = os.path.join(APPDIR, 'media')
ICONS_PATH = os.path.join(APPDIR, 'icons-%(theme)s')

MAILPILE_HOME_IMAGE = os.path.join(MEDIA_PATH, 'background.jpg')
MAILPILE_SPLASH_IMAGE = os.path.join(MEDIA_PATH, 'splash.jpg')


def SPLASH_SCREEN(state, message):
    return {
        "background": MAILPILE_SPLASH_IMAGE,
        "width": 396,
        "height": 594,
        "message_y": 0.80,
        "progress_bar": True,
Beispiel #2
0
import json
import os
import sys
import subprocess
import threading
from cStringIO import StringIO

from mailpile.config.defaults import CONFIG_RULES
from mailpile.config.manager import ConfigManager
from mailpile.i18n import ActivateTranslation
from mailpile.i18n import gettext as _
from mailpile.plugins.gui import GetUserSecret

APPDIR = os.path.dirname(__file__)
if not os.path.exists(os.path.join(APPDIR, 'media', 'splash.jpg')):
    APPDIR = os.path.join(ConfigManager.DEFAULT_SHARED_DATADIR(),
                          'mailpile-gui')

MEDIA_PATH = os.path.join(APPDIR, 'media')
ICONS_PATH = os.path.join(APPDIR, 'icons-%(theme)s')

MAILPILE_HOME_IMAGE = os.path.join(MEDIA_PATH, 'background.jpg')
MAILPILE_SPLASH_IMAGE = os.path.join(MEDIA_PATH, 'splash.jpg')


def SPLASH_SCREEN(state, message):
    return {
        "image": MAILPILE_SPLASH_IMAGE,
        "width": 396,
        "height": 594,
        "message_y": 0.80,