示例#1
0
    def setKeywords(self):
        try:
            cats = self.desktop["Categories"]
            if type(cats) == tuple:
                self.keywords = KwS(*cats)
            else:
                self.keywords = KwS(cats)
        except KeyError:
            if _kws:
                self.keywords = _kws
            else:
                raise Prophet.NotSet("Categories not found")

        if fnmatch.fnmatch(self.exename, "*kcmshell"):
            self.keywords |= KwS(KDE, Kw("X-KDE-settings"))
示例#2
0
class SystemApps(Menu):
    name = "System"
    keywords = KwS(System, Filesystem, Monitor, Security, PackageManager)

    def __init__(self, subs):
        subs = [_menu("Information", KwS("X-KDE-information")), SystemSettings]
        super(SystemApps, self).__init__([x([]) for x in subs])
示例#3
0
class SystemSettings(Menu):
    name = "Settings"
    keywords = KwS(Settings, DesktopSettings, HardwareSettings, Screensaver)

    def __init__(self, subs):
        subs = [GNOMESettings, KDESettings, XfceSettings]
        super(SystemSettings, self).__init__([x([]) for x in subs])
示例#4
0
class DevApps(Menu):
    name = "Development"
    keywords = KwS(Development, Building, Debugger, IDE, GUIDesigner,
                   Profiling, RevisionControl, Translation, WebDevelopment)

    def __init__(self, subs):
        subs = [KDevelop]
        super(DevApps, self).__init__([x([]) for x in subs])
示例#5
0
class netbeans(_DropIn, _X11App):
    name = "NetBeans"
    comment = "NetBeans Java IDE"
    keywords = KwS(Development, Debugger, Java, GTK)

    def relevant(self, path):
        if Prophet.isExe(os.path.join(path, "bin/netbeans")):
            raise netbeans.StopDescention(path)
示例#6
0
class lazarus(_DropIn, _X11App):
    name = "Lazarus"
    comment = "Delphi-like FreePascal IDE"
    keywords = KwS(Development, Debugger, GUIDesigner, GTK)

    def relevant(self, path):
        if Prophet.isExe(os.path.join(path, "lazarus")):
            raise lazarus.StopDescention(path)
示例#7
0
class eclipse(_DropIn, _X11App):
    name = "Eclipse"
    comment = "Eclipse Java IDE"
    keywords = KwS(Development, Debugger, Java, GTK)

    def relevant(self, path):
        if Prophet.isExe(os.path.join(path, "eclipse")):
            raise eclipse.StopDescention(path)
示例#8
0
class opera(_DropIn, _X11App):
    name = "Opera"
    comment = "Opera browser"
    keywords = KwS(WebBrowser, Email)

    def relevant(self, path):
        if Prophet.isExe(os.path.join(path, "opera")):
            raise opera.StopDescention(path)
示例#9
0
class estudio(_App, _X11App):
    name = "EiffelStudio"
    comment = "EiffelStudio IDE"
    keywords = KwS(Development, IDE, Debugger)

    def getPrefixes(self):
        return super(
            estudio,
            self).getPrefixes() + "$ISE_EIFFEL/studio/spec/$ISE_PLATFORM"
示例#10
0
class _HelixReal(_App, _X11App):
    comment = "Media player"
    keywords = KwS(AudioVideo, Audio, Video, TV, Tuner, Player, GTK)

    def __init__(self):
        try:
            super(_HelixReal, self).__init__()
        except Prophet.NotFound:
            raise
示例#11
0
class ee(_App, _ConsoleApp):
    name = "Easy Editor"
    comment = "Standard FreeBSD text editor"
    keywords = KwS(TextEditor, Core)

    def valid(self, pfx, exe):
        import os.path
        if os.path.isfile(os.path.join(pfx, "share/misc/init.ee")):
            return super(ee, self).valid(pfx, exe)
        else:
            return False
示例#12
0
class Games(Menu):
    name = "Games"
    keywords = KwS(Amusement, Game, ActionGame, AdventureGame, ArcadeGame,
                   BoardGame, BlocksGame, CardGame, KidsGame, LogicGame,
                   RolePlaying, Simulation, SportsGame, StrategyGame)

    def __init__(self, subs):
        subs = [
            AdventureGames, ArcadeGames, BoardGames, CardGames, PuzzleGames,
            SimGames, SportsGames, StrategyGames, ToyGames
        ]
        super(Games, self).__init__([x([]) for x in subs])
示例#13
0
def _dir2kws(dir):
    """Convert the directory name to the corresponding keyword set, if possible"""
    parts = [x.strip().lower() for x in dir.split("/")]
    if len(fnmatch.filter(parts, "kde")) and len(
            fnmatch.filter(parts, "*config*") +
            fnmatch.filter(parts, "*sett*")):
        # Catching KDE/Configuration or KDE/Settings
        kws = [KDE, Kw("X-KDE-settings")]
        kws += [
            k for m, k in _kdeCfgMap for x in parts if fnmatch.fnmatch(x, m)
        ]
    else:
        kws = [k for m, k in _genMap for x in parts if fnmatch.fnmatch(x, m)]
    if len(kws):
        return KwS(*kws)
    else:
        return None
示例#14
0
def _deb2kws(sec, hint):
    """Convert Debian style section/hints entries to an equivalent keyword set"""
    kws = []
    for x in sec.split("/"):
        x = Kw(x)
        if x in _rejs:
            raise Prophet.NotSet("section %s rejected" % x)
        try:
            kws += _secs[x]
        except KeyError:
            pass

    for x in hint.split(","):
        x = Kw(x)
        try:
            kws += _hints[x]
        except KeyError:
            pass

    return KwS(*kws)
示例#15
0
class jed(_App, _ConsoleApp):
    name = "Jed"
    comment = "Simple text editor"
    keywords = KwS(TextEditor)
示例#16
0
class emacs(_App, _ConsoleApp):  # FIXME : make this versioned
    name = "Emacs"
    comment = "A powerful text editing environment"
    keywords = KwS(TextEditor)
示例#17
0
class elvis(_App, _ConsoleApp):
    name = "Elvis"
    comment = "Vi compatible editor"
    keywords = KwS(TextEditor)
示例#18
0
class cute(_App, _X11App):
    name = "Cute"
    comment = "User-friendly editor with syntax hilighting"
    keywords = KwS(TextEditor, Qt)
示例#19
0
class cooledit(_App, _X11App):
    name = "CoolEdit"
    comment = "X11 text editor"
    keywords = KwS(TextEditor)
示例#20
0
class bluefish(_App, _X11App):
    name = "BlueFish"
    comment = "Advanced HTML editor and web publishing application"
    keywords = KwS(TextEditor, Development, GNOME, X_HTML)
示例#21
0
class yudit(_App, _X11App):
    name = "Yudit"
    comment = "X11 unicode text editor"
    keywords = KwS(TextEditor)
示例#22
0
class gxedit(_App, _X11App):
    name = "GXedit"
    comment = "Simple X11 text editor"
    keywords = KwS(TextEditor, GTK)
示例#23
0
class jove(_App, _ConsoleApp):
    name = "Jove"
    comment = "Emacs-like text editor"
    keywords = KwS(TextEditor)
示例#24
0
class asWedit(_App, _X11App):
    name = "asWedit"
    comment = "Advanced HTML editor"
    keywords = KwS(TextEditor, X_HTML)
示例#25
0
class joe(_App, _ConsoleApp):
    name = "Joe"
    comment = "Joe's own editor"
    keywords = KwS(TextEditor)
示例#26
0
class xemacs(_App, _X11App):  # FIXME : make this versioned
    name = "Xemacs"
    comment = "X11 version of Emacs"
    keywords = KwS(TextEditor)
示例#27
0
class gvim(_App, _X11App):
    name = "GVim"
    comment = "X11 version of Vim, a Vi clone"
    keywords = KwS(TextEditor)
示例#28
0
class xjed(_App, _X11App):
    name = "Xjed"
    comment = "X11 version of Jed"
    keywords = KwS(TextEditor)
示例#29
0
class nano(_App, _ConsoleApp):
    name = "Nano"
    comment = "Simple text editor"
    keywords = KwS(TextEditor)
示例#30
0
class xwe(_App, _X11App):
    name = "Xwe"
    comment = "X11 version of Xwpe text editor"
    keywords = KwS(TextEditor, Development)