def _parse_commandline(self):
        '''parse command line options'''
        options = optionprovider.PluggableOptionParser.get_parsing()[0]

        debugger.init(debuglevel=options.debuglevel)

        if options.version:
            print "Current Emesene Version: " + Info.EMESENE_VERSION
            print "Last Stable Version: " + Info.EMESENE_LAST_STABLE
            print "\n" + Info.EMESENE_WEBSITE
            sys.exit(0)

        #needed to check for autologin
        self.emesene_is_running = False
        try:
            if os.name == 'posix':
                from SingleInstance import SingleInstancePosix as SingleInstance
            else:
                from SingleInstance import SingleInstanceWin32 as SingleInstance

            self.single_instance = SingleInstance()
            if self.single_instance.emesene_is_running():
                self.emesene_is_running = True
                # try to show the instance that's already running
                if options.single_instance:
                    print "Another instance of emesene is already running."
                    self.single_instance.show()
                    extension.get_and_instantiate('quit')
        except ImportError:
            pass

        if options.minimized:
            self.minimize = True
Exemple #2
0
    def _parse_commandline(self):
        '''parse command line options'''
        options = optionprovider.PluggableOptionParser.get_parsing()[0]

        debugger.init(debuglevel=options.debuglevel)

        if options.version:
            print "Current Emesene Version: " + Info.EMESENE_VERSION
            print "Last Stable Version: " + Info.EMESENE_LAST_STABLE
            print "\n" + Info.EMESENE_WEBSITE
            sys.exit(0)

        #needed to check for autologin
        self.emesene_is_running = False
        try:
            if os.name == 'posix':
                from SingleInstance import SingleInstancePosix as SingleInstance
            else:
                from SingleInstance import SingleInstanceWin32 as SingleInstance

            self.single_instance = SingleInstance()
            if self.single_instance.emesene_is_running():
                self.emesene_is_running = True
                # try to show the instance that's already running
                if options.single_instance:
                    print "Another instance of emesene is already running."
                    self.single_instance.show()
                    extension.get_and_instantiate('quit')
        except ImportError:
            pass

        if options.minimized:
            self.minimize = True
Exemple #3
0
    def _parse_commandline(self):
        '''parse command line options'''
        options = optionprovider.PluggableOptionParser.get_parsing()[0]

        debugger.init(debuglevel=options.debuglevel)

        #needed to check for autologin
        self.emesene_is_running = False
        try:
            if os.name == 'posix':
                from SingleInstance import SingleInstancePosix as SingleInstance
            else:
                from SingleInstance import SingleInstanceWin32 as SingleInstance

            self.single_instance = SingleInstance()
            if self.single_instance.emesene_is_running():
                self.emesene_is_running = True
                # try to show the instance that's already running
                if options.single_instance:
                    print "Another instance of emesene is already running."
                    self.single_instance.show()
                    sys.exit(0)
        except ImportError:
            pass

        if options.minimized:
            self.minimize = True
Exemple #4
0
    def _parse_commandline(self):
        '''parse command line options'''
        options = PluggableOptionParser.get_parsing()[0]

        debugger.init(debuglevel=options.debuglevel)

        if options.single_instance:
            try:
                import SingleInstance
                self.single_instance = SingleInstance.SingleInstance()
                if self.single_instance.emesene_is_running():
                    print "Another instance of emesene is already running."
                    # try to show the instance that's already running
                    self.single_instance.show()
                    sys.exit(0)
            except ImportError:
                pass
Exemple #5
0
    def _parse_commandline(self):
        '''parse command line options'''
        options = PluggableOptionParser.get_parsing()[0]

        debugger.init(debuglevel=options.debuglevel)

        if options.single_instance:
            try:
                import SingleInstance
                self.single_instance = SingleInstance.SingleInstance()
                if self.single_instance.emesene_is_running():
                    print "Another instance of emesene is already running."
                    # try to show the instance that's already running
                    self.single_instance.show()
                    sys.exit(0)
            except ImportError:
                pass
Exemple #6
0
import gettext
# load translations
if os.path.exists('default.mo'):
    gettext.GNUTranslations(open('default.mo')).install()
elif os.path.exists('po/'):
    gettext.install('emesene', 'po/')
else:
    gettext.install('emesene')

import glib
import optparse
import shutil
import signal

import debugger
debugger.init()
import logging
log = logging.getLogger('emesene')

import e3
#from e3 import msn
from e3 import dummy

try:
    from e3.common.DBus import DBusController
except ImportError:
    DBusController = None

try:
    from e3.common.NetworkManagerHelper import DBusNetworkChecker
except ImportError:
Exemple #7
0
def import_and_register(category_name, cls):
    try:
        imported_cls = __import__('gui.common.' + cls)
        if extension.get_category(category_name) is None:
            extension.category_register(category_name, eval(cls + '.' + cls))
        else:
            extension.register(category_name, eval(cls + '.' + cls))
        return imported_cls
    except ImportError:
        return None


#FIXME: gi init the debugger and spam the console if a package isn't found
from gui.gtkui import check_gtk3
if check_gtk3():
    import debugger
    debugger.init(debuglevel=0)

import_and_register('tray icon', 'MessagingMenu')
import_and_register('tray icon', 'Indicator')
import_and_register('tray icon', 'TrayIcon')
import_and_register('tray icon', 'NoTrayIcon')
import_and_register(('notificationGUI'), 'GrowlNotification')
import_and_register(('notificationGUI'), 'GNTPNotification')
import_and_register(('notificationGUI'), 'PyNotification')
import_and_register(('notificationGUI'), 'GtkNotification')
import_and_register(('notificationImage'), 'ThemeNotificationImage')
import_and_register(('notificationImage'), 'DummyNotificationImage')
import_and_register('unity launcher', 'UnityLauncher')
Exemple #8
0
import extension

def import_and_register(category_name, cls):
    try:
        imported_cls = __import__('gui.common.'+cls)
        if extension.get_category(category_name) is None:
            extension.category_register(category_name, eval(cls+'.'+cls))
        else:
            extension.register(category_name, eval(cls+'.'+cls))
        return imported_cls
    except ImportError:
        return None

#FIXME: gi init the debugger and spam the console if a package isn't found
from gui.gtkui import check_gtk3
if check_gtk3():
    import debugger
    debugger.init(debuglevel=0)

import_and_register('tray icon', 'MessagingMenu')
import_and_register('tray icon', 'Indicator')
import_and_register('tray icon', 'TrayIcon')
import_and_register('tray icon', 'NoTrayIcon')
import_and_register(('notificationGUI'), 'GrowlNotification')
import_and_register(('notificationGUI'), 'PyNotification')
import_and_register(('notificationGUI'), 'GtkNotification')
import_and_register(('notificationImage'), 'ThemeNotificationImage')
import_and_register(('notificationImage'), 'DummyNotificationImage')
import_and_register('unity launcher', 'UnityLauncher')
Exemple #9
0
    def _parse_commandline(self):
        options, args = PluggableOptionParser.get_parsing()

        debugger.init(debuglevel=options.debuglevel)
Exemple #10
0
    def _parse_commandline(self):
        '''parse command line options'''
        options = PluggableOptionParser.get_parsing()[0]

        debugger.init(debuglevel=options.debuglevel)