from awn.extras import _, awnlib, __version__ from desktopagnostic import fdo, vfs try: import dbus from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) except ImportError: dbus = None import gio import glib import gmenu # TODO Remove the check and the else as soon as Ubuntu Moaning Monkey is not supported anymore if awnlib.is_required_version(glib.pyglib_version, (2, 26, 0)): xdg_data_dirs = [glib.get_user_data_dir()] + list(glib.get_system_data_dirs()) else: xdg_data_dirs = [os.path.expanduser("~/.local/share")] if "XDG_DATA_DIRS" in os.environ: xdg_data_dirs += os.environ["XDG_DATA_DIRS"].split(":") applet_name = _("YAMA") applet_description = _("Main menu with places and recent documents") # Applet's themed icon, also shown in the GTK About dialog applet_logo = "start-here" menu_editor_apps = ("alacarte", "gmenu-simple-editor") # Describes the pattern used to try to decode URLs
def compare_linux_version(wanted_version): version = map(int, platform.release().split("-")[0].split(".")) return awnlib.is_required_version(version, wanted_version)
from awn.extras import _, awnlib, __version__ from desktopagnostic import fdo, vfs try: import dbus from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) except ImportError: dbus = None import gio import glib import matemenu # TODO Remove the check and the else as soon as Ubuntu Moaning Monkey is not supported anymore if awnlib.is_required_version(glib.pyglib_version, (2, 26, 0)): xdg_data_dirs = [glib.get_user_data_dir()] + list(glib.get_system_data_dirs()) else: xdg_data_dirs = [os.path.expanduser("~/.local/share")] if "XDG_DATA_DIRS" in os.environ: xdg_data_dirs += os.environ["XDG_DATA_DIRS"].split(":") applet_name = _("MATE-YAMA") applet_description = _("Main menu with places and recent documents") # Applet's themed icon, also shown in the GTK About dialog applet_logo = "start-here" menu_editor_apps = ("alacarte", "mozo", "matemenu-simple-editor") # Describes the pattern used to try to decode URLs