fuss-launcher-0.5/0000755000175000017500000000000011462526236013464 5ustar enricoenricofuss-launcher-0.5/fuss-launcher.10000644000175000017500000000204011401773554016321 0ustar enricoenrico.TH FUSS-LAUNCHER 1 "15 Apr 2010" Version 0.4.0 .SH NAME fuss-launcher - simplified access to applications .SH SYNOPSIS .B fuss-launcher [options] .SH DESCRIPTION .PP \fIfuss-launcher\fP is a simple application launcher which aim to improve usability for teachers and students. It use a desktop panel notification area. .SH OPTIONS .PP \fB --version\fP show program's version number and exit .PP \fB-h, --help\fP show this help message and exit .PP \fB-q, --quiet\fP quiet mode: only output fatal errors .PP \fB-v, --verbose\fP verbose mode .PP \fB-d, --debug\fP debug mode .SH COPYRIGHT Copyright \(co 2008-2010 The Fuss Project .SH AUTHORS Enrico Zini Christopher R. Gabriel .SH LICENSE Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. fuss-launcher-0.5/fuss-launcher.desktop0000644000175000017500000000027711374043635017643 0ustar enricoenrico[Desktop Entry] Type=Application Encoding=UTF-8 Exec=fuss-launcher Name=Fuss Application Launcher Terminal=false X-KDE-autostart-phase=2 X-KDE-autostart-after=panel X-KDE-StartupNotify=false fuss-launcher-0.5/fl-query0000755000175000017500000001005411374044205015147 0ustar enricoenrico#!/usr/bin/env python # -*- coding: utf-8 -*- # # fuss-launcher command line testing tool # # Copyright (C) 2010 Enrico Zini # Copyright (C) 2010 Christopher R. Gabriel # Copyright (C) 2010 The Fuss Project # # Authors: Christopher R. Gabriel # Enrico Zini # # Sponsored by the Fuss Project: http://www.fuss.bz.it/ # # 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 3 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, see . import os, os.path import sys import fusslauncher import fusslauncher.conf as conf import fusslauncher.appinfo as appinfo import readline import gettext _ = gettext.gettext class Completer(object): def __init__(self, engine): self.engine = engine self.completions = [] def __call__(self, text, state): if state == 0: query = readline.get_line_buffer() pfxlen = len(query) - len(text) self.engine.set_query(query) self.completions = [x[pfxlen:] for x in self.engine.completions()] if state > len(self.completions): return None return self.completions[state] class Cmdline(object): def __init__(self, opts): self.engine = fusslauncher.Engine() self.engine.set_install_only(not opts.uninstalled) self.app_cache = appinfo.AppInfoCache() def print_query_results(self, query): print "Results for %s:" % repr(query) self.engine.set_query(query, []) for res in self.engine.documents(): app = self.app_cache[res[1]] print " %02d%% %s (%sinstalled)" % (res[0], app.name, "not " if not app.inst else "") print " D: %s" % app.dpath print " I: %s" % app.ipath def print_completion_results(self, query): print "Completions for %s:" % repr(query) self.engine.set_query(query, []) for res in self.engine.completions(): print " ", res def do_interactive_console(self): # I would like to use cmd. But I cannot use cmd because it *always* strips # entered lines, and our queries instead change depending on trailing spaces. readline.parse_and_bind("tab: complete") readline.set_completer(Completer(self.engine)) print "Welcome to the fuss-launcher test interface version %s." % conf.VERSION print print "Please type your queries, end with ^D." print while True: try: query = raw_input("> ") except EOFError: print print "Bye." break self.print_query_results(query) from fusslauncher import cmdline parser = cmdline.Parser(usage="usage: %prog [options]", description="Fuss application launcher debug tool") parser.add_option("-q", "--quiet", action="store_true", help="quiet mode: only output fatal errors") parser.add_option("-v", "--verbose", action="store_true", help="verbose mode") parser.add_option("-d", "--debug", action="store_true", help="debug mode") parser.add_option("-u", "--uninstalled", action="store_true", help="debug mode") (opts, args) = parser.parse_args() gettext.bindtextdomain(conf.GETTEXT_PACKAGE) gettext.textdomain(conf.GETTEXT_PACKAGE) if opts.debug: import fusslauncher.engine fusslauncher.engine.debug = True cmd = Cmdline(opts) if args: qstring = " ".join(args) cmd.print_query_results(qstring) cmd.print_completion_results(qstring) else: cmd.do_interactive_console() sys.exit(0) fuss-launcher-0.5/setup.py0000644000175000017500000000235711374041550015176 0ustar enricoenrico#!/usr/bin/env python import sys import os.path import glob from distutils.core import setup from DistUtilsExtra.command import * for line in open(os.path.join(os.path.dirname(sys.argv[0]), 'fusslauncher/conf.py')): if line.startswith('VERSION='): version = eval(line.split('=')[-1]) setup(name='fuss-launcher', version=version, description='FUSS application launcher', # long_description='' author=['Enrico Zini', 'Christopher R. Gabriel'], author_email=['enrico@truelite.it', 'cgabriel@truelite.it'], url='https://devel.fuss.bz.it/wiki/FussLauncher', # install_requires = [ # "axi", "xdg", "xapian", # ], # data_files=[ # ('share/software-properties/designer', # glob.glob("data/designer/*.ui") # ), # ('share/software-properties/glade', # glob.glob("data/glade/*.glade") # ), # ], license='GPL', platforms='any', packages=['fusslauncher'], scripts=['fuss-launcher'], cmdclass = { "build" : build_extra.build_extra, "build_i18n" : build_i18n.build_i18n, "build_help" : build_help.build_help, "build_icons" : build_icons.build_icons } ) fuss-launcher-0.5/MANIFEST.in0000644000175000017500000000034311402007036015204 0ustar enricoenricoinclude icons/24x24/apps/* include icons/48x48/apps/* include po/* include AUTHORS include COPYING include MANIFEST.in include fl-query include fuss-launcher.1 include fuss-launcher.desktop include menu-dump include .gitignore fuss-launcher-0.5/fuss-launcher0000755000175000017500000000264411373241465016176 0ustar enricoenrico#!/usr/bin/env python # -*- python -*- # Copyright (C) 2010 The Fuss Project - http://www.fuss.bz.it/ # # Authors: Christopher R. Gabriel # # Xapian Indexing code by Enrico Zini # # This file may be distributed and/or modified under the terms of # the GNU General Public License version 2 as published by # the Free Software Foundation. # # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. # See "COPYING" in the source distribution for more information. # import os, os.path import sys import gettext _ = gettext.gettext if __name__ == "__main__": from fusslauncher import cmdline import fusslauncher.conf as conf parser = cmdline.Parser(usage="usage: %prog [options]", description="Fuss application launcher applet") parser.add_option("-q", "--quiet", action="store_true", help="quiet mode: only output fatal errors") parser.add_option("-v", "--verbose", action="store_true", help="verbose mode") parser.add_option("-d", "--debug", action="store_true", help="debug mode") (opts, args) = parser.parse_args() gettext.bindtextdomain(conf.GETTEXT_PACKAGE) gettext.textdomain(conf.GETTEXT_PACKAGE) if opts.debug: import fusslauncher.engine fusslauncher.engine.debug = True from fusslauncher import ui ui.run_launcher(opts) fuss-launcher-0.5/menu-dump0000755000175000017500000000450511376442552015327 0ustar enricoenrico#!/usr/bin/env python # -*- coding: utf-8 -*- # # fuss-launcher command line testing tool # # Copyright (C) 2010 Enrico Zini # Copyright (C) 2010 Christopher R. Gabriel # Copyright (C) 2010 The Fuss Project # # Authors: Christopher R. Gabriel # Enrico Zini # # Sponsored by the Fuss Project: http://www.fuss.bz.it/ # # 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 3 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, see . from fusslauncher import cmdline from fusslauncher import conf parser = cmdline.Parser(usage="usage: %prog [options] menufile", description="Dump merged menu structures") #parser.add_option("-q", "--quiet", action="store_true", help="quiet mode: only output fatal errors") parser.add_option("-v", "--verbose", action="store_true", help="verbose mode") parser.add_option("-d", "--debug", action="store_true", help="debug mode") #parser.add_option("-u", "--uninstalled", action="store_true", help="debug mode") (opts, args) = parser.parse_args() import sys import xdg.Menu import gettext _ = gettext.gettext def count_entries(menu): res = 0 for x in menu.getEntries(): if hasattr(x, "DesktopEntry"): res += 1 return res def dump(menu, prefix=""): print "%s%s: %d leaf entries" % (prefix, menu.getName(), count_entries(menu)) for e in menu.getEntries(): if hasattr(e, "getEntries"): dump(e, prefix + " ") gettext.bindtextdomain(conf.GETTEXT_PACKAGE) gettext.textdomain(conf.GETTEXT_PACKAGE) if not args: print >>sys.stderr, "Please specify one menu file" sys.exit(1) if len(args) > 1: print >>sys.stderr, "Please specify only one menu file" sys.exit(1) menu = xdg.Menu.parse(args[0]) dump(menu) sys.exit(0) fuss-launcher-0.5/README0000644000175000017500000000001711374043441014334 0ustar enricoenricoFuss Launcher fuss-launcher-0.5/po/0000755000175000017500000000000011462526236014102 5ustar enricoenricofuss-launcher-0.5/po/it.po0000644000175000017500000000302511374043441015050 0ustar enricoenrico# Italian translation for the fuss-menu # Copyright (C) 2019 The Fuss Project # This file is distributed under the same license as the fuss-menu package. # Christopher R. Gabriel , 2007 # msgid "" msgstr "" "Project-Id-Version: fuss-menu 0.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-05-16 20:15+0100\n" "PO-Revision-Date: 2010-05-16 20:17+0100\n" "Last-Translator: Enrico Zini \n" "Language-Team: italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../fusslauncher/appinfo.py:66 msgid "Starting application - please wait" msgstr "Avvio applicazione - attendere prego" #: ../fusslauncher/appinfo.py:66 #, python-format msgid "Executing: %s" msgstr "Eseguo: %s" #: ../fusslauncher/appinfo.py:66 #, python-format msgid "Executed command: %s" msgstr "Comando eseguito: %s" #: ../fusslauncher/ui.py:306 msgid "Fuss application launcher" msgstr "" #: ../fusslauncher/ui.py:343 msgid "Applications" msgstr "Applicazioni" #: ../fusslauncher/ui.py:357 msgid "Favourites" msgstr "Preferiti" #: ../fusslauncher/ui.py:384 msgid "Search:" msgstr "Cerca:" #: ../fusslauncher/ui.py:428 msgid "Fuss launcher" msgstr "" #: ../fusslauncher/ui.py:449 msgid "Fuss Launcher" msgstr "" #: ../fusslauncher/ui.py:450 msgid "Copyright (C) 2010 The Fuss Project" msgstr "Copyright (C) 2010 Il progetto Fuss" #: ../fusslauncher/ui.py:452 msgid "A simplified launcher for applications" msgstr "Un sistema semplice per lanciare applicazioni" fuss-launcher-0.5/po/fuss-launcher.pot0000644000175000017500000000253411376440111017400 0ustar enricoenrico# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-05-16 22:30+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: ../fusslauncher/appinfo.py:66 msgid "Starting application - please wait" msgstr "" #: ../fusslauncher/appinfo.py:66 #, python-format msgid "Executing: %s" msgstr "" #: ../fusslauncher/appinfo.py:66 #, python-format msgid "Executed command: %s" msgstr "" #: ../fusslauncher/ui.py:306 msgid "Fuss application launcher" msgstr "" #: ../fusslauncher/ui.py:343 msgid "Applications" msgstr "" #: ../fusslauncher/ui.py:357 msgid "Favourites" msgstr "" #: ../fusslauncher/ui.py:384 msgid "Search:" msgstr "" #: ../fusslauncher/ui.py:428 msgid "Fuss launcher" msgstr "" #: ../fusslauncher/ui.py:449 msgid "Fuss Launcher" msgstr "" #: ../fusslauncher/ui.py:450 msgid "Copyright (C) 2010 The Fuss Project" msgstr "" #: ../fusslauncher/ui.py:453 msgid "A simplified launcher for applications" msgstr "" fuss-launcher-0.5/po/POTFILES.skip0000644000175000017500000000000011374043441016177 0ustar enricoenricofuss-launcher-0.5/po/POTFILES.in0000644000175000017500000000041711374042370015653 0ustar enricoenrico[encoding: UTF-8] # List of source files containing translatable strings. # Please keep this file sorted alphabetically. fuss-launcher fusslauncher/__init__.py fusslauncher/appinfo.py fusslauncher/cmdline.py fusslauncher/conf.py fusslauncher/engine.py fusslauncher/ui.py fuss-launcher-0.5/po/ChangeLog0000644000175000017500000000000011370767267015653 0ustar enricoenricofuss-launcher-0.5/AUTHORS0000644000175000017500000000011611374043441014524 0ustar enricoenricoChristopher R. Gabriel Enrico Zini fuss-launcher-0.5/fusslauncher/0000755000175000017500000000000011462526236016166 5ustar enricoenricofuss-launcher-0.5/fusslauncher/conf.py0000644000175000017500000000006011462524103017450 0ustar enricoenricoVERSION="0.5" GETTEXT_PACKAGE = "fuss-launcher" fuss-launcher-0.5/fusslauncher/ui.py0000644000175000017500000006001111376440111017142 0ustar enricoenrico# -*- python -*- # # fuss-launcher user interface # # Copyright (C) 2010 Enrico Zini # Copyright (C) 2010 Christopher R. Gabriel # Copyright (C) 2010 The Fuss Project # # Authors: Christopher R. Gabriel # Enrico Zini # # Sponsored by the Fuss Project: http://www.fuss.bz.it/ # # 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 3 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, see . import os import pygtk pygtk.require('2.0') import gtk import gobject import gconf try: import dbus HAS_DBUS=True except ImportError: HAS_DBUS=False import fusslauncher import fusslauncher.appinfo as appinfo import gettext _ = gettext.gettext class AppView(gtk.IconView): __gsignals__ = { "activated": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (object, object)), } def __init__(self): super(AppView, self).__init__() self.app_cache = appinfo.AppInfoCache() self.model = gtk.ListStore(gobject.TYPE_STRING, gtk.gdk.Pixbuf, gobject.TYPE_STRING) self.set_model(self.model) self.set_text_column(0) self.set_pixbuf_column(1) self.set_item_width(100) self.enable_model_drag_source(gtk.gdk.BUTTON1_MASK, [ ("text/uri-list", 0, 0), ], gtk.gdk.ACTION_DEFAULT|gtk.gdk.ACTION_COPY) self.enable_model_drag_dest([ ("text/uri-list", 0, 0), ], gtk.gdk.ACTION_DEFAULT) self.views = ["drag", "group", "search"] self.desktops = dict([(x, []) for x in self.views]) self.drag_uris = None self.last_drag_item = None self.last_drag_uris = None self.connect("drag-leave", self.on_drag_leave) self.connect("drag-data-get", self.on_drag_data_get) self.connect("drag-data-received", self.on_drag_data_received) self.connect("drag-motion", self.on_drag_motion) self.connect('drag-drop', self.on_drag_drop) self.connect('item-activated', self.on_item_activated) def on_drag_data_get(self, widget, drag_context, selection_data, info, timestamp): print "DDG", widget, drag_context, selection_data, info, timestamp cur = widget.get_cursor() if not cur: return False path, renderer = cur i = self.model.get_iter(path) d = self.model.get_value(i, 2) app = self.app_cache[d] uri = "file://" + app.dpath print "URI", uri selection_data.set_uris((uri,)) def on_drag_motion(self, widget, drag_context, x, y, timestamp): if drag_context.get_source_widget() is not None: return False #print "MOTION", drag_context, x, y, timestamp #print "TARGETS", drag_context.targets if self.drag_uris is None: widget.drag_get_data(drag_context, "text/uri-list", 0) item = self.get_dest_item_at_pos(x, y) if item is not None: path, pos = item #self.set_drag_dest_item(path, gtk.ICON_VIEW_DROP_INTO) i = self.model.get_iter(path) app = self.model.get_value(i, 2) self.last_drag_item = app else: self.last_drag_item = None return False def on_drag_leave(self, widget, drag_context, timestamp): print "LEAVE", widget, drag_context, timestamp if drag_context.get_source_widget() is not None: return False self.drag_uris = None self.set_desktops("drag", []) return False def on_drag_drop(self, widget, drag_context, x, y, timestamp): #print "DROP", widget, drag_context, x, y, timestamp if self.last_drag_item is not None: app = self.app_cache[self.last_drag_item] self.emit('activated', app, self.last_drag_uris) drag_context.finish(True, False, timestamp) else: drag_context.finish(False, False, timestamp) return False def on_drag_data_received(self, widget, drag_context, x, y, selection_data, info, timestamp): #print "DATARECEIVED", widget, drag_context, x, y, selection_data, info, timestamp self.set_drag_uris(selection_data.get_uris()) return False def on_item_activated(self, view, path): i = self.model.get_iter(path) app = self.model.get_value(i, 2) self.reset_app_cache() app = self.app_cache[app] self.emit('activated', app, None) def set_drag_uris(self, uris): self.drag_uris = uris if uris is not None: self.last_drag_uris = uris desktops = appinfo.mime_db.lookup_uris(uris) self.set_desktops("drag", desktops) def set_desktops(self, view, desktops): self.desktops[view] = desktops # Reset 'drag' view when anything else happens if view != "drag": self.desktops["drag"] = [] self.model.clear() for v in self.views: if not self.desktops[v]: continue for d in self.desktops[v]: app = self.app_cache[d] iter = self.model.append(None) self.model.set(iter, 0, app.name) self.model.set(iter, 1, app.icon) self.model.set(iter, 2, d) break def reset_app_cache(self): self.app_cache.reset() gobject.type_register(AppView) class Preferred(gtk.IconView): __gsignals__ = { "activated": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (object, object)), } def __init__(self): super(Preferred, self).__init__() self.app_cache = appinfo.AppInfoCache() self.model = gtk.ListStore(gobject.TYPE_STRING, gtk.gdk.Pixbuf, gobject.TYPE_STRING) self.set_model(self.model) self.set_columns(1) self.set_text_column(0) self.set_pixbuf_column(1) self.set_item_width(100) self.refresh() self.drag_pos = None self.enable_model_drag_dest([ ("text/uri-list", 0, 0), ], gtk.gdk.ACTION_DEFAULT | gtk.gdk.ACTION_PRIVATE) self.add_events(gtk.gdk.KEY_RELEASE_MASK) self.connect("key-release-event", self.on_key_released) self.connect("drag-motion", self.on_drag_motion) self.connect("drag-data-received", self.on_drag_data_received) self.connect('drag-drop', self.on_drag_drop) self.connect('item-activated', self.on_item_activated) def on_key_released(self, widget, event): if event.keyval not in [gtk.keysyms.Delete, gtk.keysyms.BackSpace]: return False cur = self.get_cursor() if cur is None: return False path, renderer = cur i = self.model.get_iter(path) app = self.model.get_value(i, 2) print "DEL", app if appinfo.favourites.remove(app): self.refresh() def on_drag_motion(self, widget, drag_context, x, y, timestamp): #print "MOTION", drag_context, x, y, timestamp #print "TARGETS", drag_context.targets res = self.get_drag_dest_item() if res is None: self.drag_pos = None return False path, pos = res if pos != gtk.ICON_VIEW_DROP_INTO: self.drag_pos = None return False i = self.model.get_iter(path) self.drag_pos = self.model.get_value(i, 2) return False def on_drag_drop(self, widget, drag_context, x, y, timestamp): print "DROP", widget, drag_context, x, y, timestamp widget.drag_get_data(drag_context, "text/uri-list", 0) return False def on_drag_data_received(self, widget, drag_context, x, y, selection_data, info, timestamp): print "DATARECEIVED", widget, drag_context, x, y, selection_data, info, timestamp print "URIS", selection_data.get_uris() if self.drag_pos: # If we are dropping inside an icon, run it app = self.app_cache[self.drag_pos] self.emit('activated', app, selection_data.get_uris()) else: #print "DROP", widget, drag_context, x, y, timestamp def is_desktop(uri): return uri.startswith("file://") and uri.endswith(".desktop") uris = [x for x in selection_data.get_uris() if is_desktop(x)] if not uris: drag_context.finish(False, False, timestamp) else: for u in uris: self.add_desktop(u[7:]) drag_context.finish(True, False, timestamp) return False def on_item_activated(self, view, path): print "OIA" m = self.model i = m.get_iter(path) app = m.get_value(i, 2) self.reset_app_cache() app = self.app_cache[app] self.emit('activated', app, None) def add_desktop(self, desktop): print "ADD", desktop if appinfo.favourites.add(desktop): self.refresh() def refresh(self): self.model.clear() for p in appinfo.favourites.get(): app = self.app_cache[p] iter = self.model.append(None) self.model.set(iter, 0, app.name) self.model.set(iter, 1, app.icon) self.model.set(iter, 2, p) def reset_app_cache(self): self.app_cache.reset() gobject.type_register(Preferred) class Groups(gtk.VButtonBox): __gsignals__ = { "activated": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (object,)), } def __init__(self): super(Groups, self).__init__() def update(self, groups): for c in self.get_children(): self.remove(c) for g in sorted(groups, key=lambda x:x.getName()): name = g.getName() #icon = appinfo.icon_theme.load_icon(g.getIcon(), 24, 0) b = gtk.Button(label=name) b.set_relief(gtk.RELIEF_NONE) b.set_image(gtk.image_new_from_icon_name(g.getIcon(), gtk.ICON_SIZE_MENU)) b.connect("clicked", self.on_clicked, g) b.show() self.pack_start(b) def on_clicked(self, button, group): self.emit('activated', group) class Links(gtk.VButtonBox): def __init__(self): super(Links, self).__init__() def update(self, links): for c in self.get_children(): self.remove(c) for l in sorted(links, key=lambda x:x.getName()): name = l.getName() url = l.getURL() b = gtk.LinkButton(url, label=name) #b.set_relief(gtk.RELIEF_NONE) b.show() self.pack_start(b) class Launcher(gtk.Window): __gsignals__ = { "cancelled": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ()), } def __init__(self): super(Launcher, self).__init__(gtk.WINDOW_TOPLEVEL) # Do not use WINDOW_POPUP: it makes it show on top of the panel #super(Launcher, self).__init__(gtk.WINDOW_POPUP) self.set_keep_above(True) self.engine = fusslauncher.Engine() self.engine.set_install_only(True) self.show_preferred = True self.show_extras = True self.groups = [] self.links = [] self.extras = appinfo.Extras() #self.set_resizable(False) self.set_decorated(False) self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG) self.set_title(_("Fuss application launcher")) self.set_position(gtk.WIN_POS_MOUSE); self.set_skip_taskbar_hint(True); self.set_skip_pager_hint(True); self.stick() self.set_border_width(5); # win.show_all(); # win.show(); def hide(*args, **kw): self.appView.reset_app_cache() self.hide() return False self.connect("destroy", hide) self.connect("delete_event", hide) # TODO: Listen to the "window-state-event" (GObject's signal) to detect # when minimizing and, instead of doing that, hide the window (ie, # "minimize to the tray"). # Current layout settings self.layout_left = None self.layout_top = None # Build UI components # Search field self.entry_frame = self.make_entry_field() # Applications frame sw = gtk.ScrolledWindow() sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.appView = AppView() self.appView.set_size_request(300,200) def on_activated(*args, **kw): self.hide() self.appView.connect("activated", on_activated) sw.add(self.appView) self.app_frame = gtk.Frame(label=_("Applications")) self.app_frame.add(sw) # Preferred frame sw = gtk.ScrolledWindow() sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) self.preferred = Preferred() self.preferred.connect("activated", on_activated) #self.preferred.set_size_request(400,300) #def on_activated(*args, **kw): # self.hide() sw.add(self.preferred) self.preferred_frame = gtk.Frame(label=_("Favourites")) self.preferred_frame.add(sw) # Groups frame self.groups = Groups() self.groups_frame = gtk.Frame(label=_("Groups")) self.groups_frame.add(self.groups) def on_activated(groups, group): desktops = appinfo.flatten_menu(group) self.appView.set_desktops("group", desktops) self.groups.connect("activated", on_activated) # Links frame self.links = Links() self.links_frame = gtk.Frame(label=_("Links")) self.links_frame.add(self.links) # Extras frame self.extras_frame = gtk.VBox() self.extras_frame.pack_start(self.groups_frame, False, False) self.extras_frame.pack_start(self.links_frame, False, False) # Button bar aboutbutton = gtk.Button(stock="gtk-about") aboutbutton.set_relief(gtk.RELIEF_NONE) def do_about(*args, **kw): run_about() aboutbutton.connect("clicked", do_about) self.favbutton = gtk.ToggleButton(label=_("Favourites")) self.favbutton.set_relief(gtk.RELIEF_NONE) self.favbutton.set_active(True) self.extrasbutton = gtk.ToggleButton(label=_("Extras")) self.extrasbutton.set_relief(gtk.RELIEF_NONE) self.extrasbutton.set_active(True) self.message_button = gtk.Button(label=_("Ask help")) self.message_button.set_relief(gtk.RELIEF_NONE) self.message_button.connect("clicked", self.do_admin_message) quitbutton = gtk.Button(stock="gtk-close") quitbutton.set_relief(gtk.RELIEF_NONE) def do_cancel(*args, **kw): self.appView.reset_app_cache() self.hide() self.emit('cancelled') quitbutton.connect("clicked", do_cancel) self.buttonbar = gtk.HButtonBox() self.buttonbar.set_layout(gtk.BUTTONBOX_SPREAD) self.buttonbar.pack_start(aboutbutton) self.buttonbar.pack_start(self.favbutton) self.buttonbar.pack_start(self.extrasbutton) self.buttonbar.pack_start(self.message_button) self.buttonbar.pack_start(quitbutton) def layout(self, left, top): if self.layout_left == left and self.layout_top == top: return # Empty the window c = self.get_child(); if c: self.remove(c) # Unparent if needed def unparent(x): p = x.get_parent() if p: p.remove(x) unparent(self.app_frame) unparent(self.preferred_frame) unparent(self.entry_frame) unparent(self.extras_frame) unparent(self.buttonbar) h = gtk.HBox() if left: h.pack_start(self.extras_frame, False, False) h.pack_start(self.app_frame, True, True) h.pack_start(self.preferred_frame, False, False) else: h.pack_start(self.preferred_frame, False, False) h.pack_start(self.app_frame, True, True) h.pack_start(self.extras_frame, False, False) v = gtk.VBox() #v.set_border_width(15) if top: v.pack_start(self.entry_frame, False, False) v.pack_start(h, True, True) v.pack_start(self.buttonbar, False, False) else: v.pack_start(self.buttonbar, False, False) v.pack_start(h, True, True) v.pack_start(self.entry_frame, False, False) v.show_all() self.preferred_frame.set_visible(self.show_preferred) self.extras_frame.set_visible(self.show_extras) self.add(v) self.set_size_request(600, 400); self.layout_left = left self.layout_top = top def make_entry_field(self): h = gtk.HBox() l = gtk.Label("%s " % _("Search:")) l.set_use_markup(True) l.set_justify(gtk.JUSTIFY_RIGHT) h.pack_start(l, False, False) self.entryFilter = gtk.Entry() self.entryCompletion = gtk.EntryCompletion() self.entryCompletion.set_inline_completion(True) self.entryCompletion.set_text_column(0) self.entryFilter.set_completion(self.entryCompletion) self.entryFilter.connect("changed", self.update_filter) h.pack_start(self.entryFilter, True, True) return h def set_preferred_visible(self, val): self.preferred_frame.set_visible(val) self.favbutton.set_active(val) self.show_preferred = val def set_extras_visible(self, val): self.extras_frame.set_visible(val) self.extrasbutton.set_active(val) self.show_extras = val def update_filter(self, entry=None): if entry is None: entry = self.entryFilter self.appView.set_desktops("group", []) query = entry.get_text() if not query: desktops = appinfo.run_stats.get()[:10] completions = [] else: self.engine.set_query(entry.get_text(), []) desktops = [x[1] for x in self.engine.documents()] completions = self.engine.completions() completion_model = gtk.ListStore(gobject.TYPE_STRING) for x in completions: iter = completion_model.append(None) completion_model.set(iter, 0, x) self.entryCompletion.set_model(completion_model) self.appView.set_desktops("search", desktops) def can_do_admin_message(self): if not HAS_DBUS: return False bus = dbus.SystemBus() return bus.name_has_owner("org.octofuss.OctofussClient") def do_admin_message(self, b): dialog = gtk.Dialog(_("Send a message to administrator"), None, gtk.DIALOG_MODAL, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK)) h = gtk.HBox(False, 8) dialog.vbox.pack_start(h) stock = gtk.image_new_from_stock( gtk.STOCK_DIALOG_QUESTION, gtk.ICON_SIZE_DIALOG) h.pack_start(stock, False, False, 0) v = gtk.VBox() h.pack_start(v, False, False) v.pack_start(gtk.Label(_("Message"))) message_entry = gtk.Entry() v.pack_start(message_entry, False, False) dialog.show_all() response = dialog.run() if response == gtk.RESPONSE_OK: message = message_entry.get_text() if message: user = os.environ['USERNAME'] workstation = os.popen("hostname --fqdn").read().strip() self.send_admin_message(user, workstation, message) dialog.destroy() def send_admin_message(self, user, workstation,message): try: bus = dbus.SystemBus() remote_obj = bus.get_object("org.octofuss.OctofussClient","/") s = dbus.Interface(remote_obj, 'org.octofuss.Interface') result = s.user_question(user, workstation, message) except: pass def toggle(self): if self.get_property("visible"): self.set_visible(False) else: # Check where the mouse has been clicked, which is near to where we # are, and infer orientation disp = self.get_display() scr, x, y, mod = disp.get_pointer() left = x < scr.get_width() / 2 top = y < scr.get_height() / 2 self.layout(left, top) # Reread groups and links if needed if self.extras.refresh(): if self.extras.groups: self.groups.update(self.extras.groups) self.groups_frame.set_visible(True) else: self.groups_frame.set_visible(False) if self.extras.links: self.links.update(self.extras.links) self.links_frame.set_visible(True) else: self.links_frame.set_visible(False) self.message_button.set_visible(self.can_do_admin_message()) self.set_visible(True) self.entryFilter.set_text("") self.entryFilter.grab_focus() self.update_filter() def install_tray_icon(launcher): icon = gtk.status_icon_new_from_icon_name("fuss-launcher") icon.set_tooltip(_("Fuss launcher")) # XPERIM #icon.enable_model_drag_dest([ # ("text/uri-list", 0, 0), #], gtk.gdk.ACTION_DEFAULT | gtk.gdk.ACTION_PRIVATE) #def callback2(widget, drag_context, x, y, timestamp): # print "MOTION", drag_context, x, y, timestamp # return False #icon.connect("drag-motion", callback2) def on_clicked(*args, **kw): launcher.toggle() icon.connect("activate", on_clicked) # icon.connect("popup-menu", ...) icon.set_visible(True) def run_about(): icon_theme = gtk.icon_theme_get_default() about = gtk.AboutDialog() about.set_name(_("Fuss Launcher")) about.set_copyright(_("Copyright (C) 2010 The Fuss Project")) about.set_authors(["Christopher R. Gabriel ", "Enrico Zini "]) about.set_comments(_("A simplified launcher for applications")) about.set_logo(icon_theme.load_icon("fuss-launcher", 48, 0)) about.connect("destroy", about.hide) about.run() about.hide() def run_launcher(opts): launcher = Launcher() gclient = gconf.client_get_default() gclient.add_dir('/apps/fuss-launcher', gconf.CLIENT_PRELOAD_NONE) def on_fav_changed(client, *args, **kwargs): val = client.get_bool("/apps/fuss-launcher/display-favourites") launcher.set_preferred_visible(val) gclient.notify_add('/apps/fuss-launcher/display-favourites', on_fav_changed) def on_extras_changed(client, *args, **kwargs): val = client.get_bool("/apps/fuss-launcher/display-extras") launcher.set_extras_visible(val) gclient.notify_add('/apps/fuss-launcher/display-extras', on_extras_changed) on_fav_changed(gclient) on_extras_changed(gclient) def on_fav_toggled(button): val = button.get_active() gclient.set_bool("/apps/fuss-launcher/display-favourites", val) launcher.favbutton.connect("toggled", on_fav_toggled) def on_extras_toggled(button): val = button.get_active() gclient.set_bool("/apps/fuss-launcher/display-extras", val) launcher.extrasbutton.connect("toggled", on_extras_toggled) def on_activated(obj, app, args): #print "APP", app #print "ARG", args app.run(args) launcher.appView.connect("activated", on_activated) launcher.preferred.connect("activated", on_activated) install_tray_icon(launcher) gtk.main() fuss-launcher-0.5/fusslauncher/__init__.py0000644000175000017500000000003211373223553020267 0ustar enricoenricofrom engine import Engine fuss-launcher-0.5/fusslauncher/cmdline.py0000644000175000017500000000275211373237647020167 0ustar enricoenrico# -*- python -*- # # fuss-launcher command line interface functions # # Copyright (C) 2010 Enrico Zini # Copyright (C) 2010 Christopher R. Gabriel # Copyright (C) 2010 The Fuss Project # # Authors: Christopher R. Gabriel # Enrico Zini # # Sponsored by the Fuss Project: http://www.fuss.bz.it/ # # 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 3 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, see . import fusslauncher.conf as conf import os, os.path from optparse import OptionParser import sys import gettext _ = gettext.gettext class Parser(OptionParser): def __init__(self, *args, **kwargs): kwargs["version"] = "%prog " + conf.VERSION, OptionParser.__init__(self, *args, **kwargs) def error(self, msg): sys.stderr.write("%s: error: %s\n\n" % (self.get_prog_name(), msg)) self.print_help(sys.stderr) sys.exit(2) fuss-launcher-0.5/fusslauncher/appinfo.py0000644000175000017500000003207411374767070020207 0ustar enricoenrico# -*- python -*- # # fuss-launcher application information cache # # Copyright (C) 2010 Enrico Zini # Copyright (C) 2010 Christopher R. Gabriel # Copyright (C) 2010 The Fuss Project # # Authors: Christopher R. Gabriel # Enrico Zini # # Sponsored by the Fuss Project: http://www.fuss.bz.it/ # # 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 3 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, see . import os, os.path import sys import errno import shlex import pygtk pygtk.require('2.0') import gtk import gio import fusslauncher import fusslauncher.conf as conf import pipes import gettext _ = gettext.gettext from xdg.DesktopEntry import DesktopEntry import xdg.Menu # TODO: get the location from: # FreeDesktop menu spec # FreeDesktop basedir spec APPDIR="/usr/share/applications/" APPINSTDIR="/usr/share/app-install/desktop/" APPINSTICONDIR="/usr/share/app-install/icons/" ICONDIRS=("/usr/share/pixmaps/", APPINSTICONDIR) class Notifier(object): def __init__(self): self.reopen() def reopen(self): try: import dbus sesbus = dbus.SessionBus() notify_obj = sesbus.get_object('org.freedesktop.Notifications', '/org/freedesktop/Notifications') self.notify_if = dbus.Interface(notify_obj, 'org.freedesktop.Notifications') except: self.notify_if = None def _notify(self, operation, command): if self.notify_if: self.notify_if.Notify(_('Starting application - please wait'),0,'',_("Executing: %s") % operation,_("Executed command: %s") % command,[],{},-1) else: print "Executing %s (%s)" % (operation, command) def notify(self, operation, command): if not self.notify_if: self.reopen() try: self._notify(operation, command) except: self.reopen() self._notify(operation, command) notifier = Notifier() icon_theme = gtk.icon_theme_get_default() class RunStats(object): def __init__(self): self.load() def load(self): "Load saved statistics" self.stats = {} fname = os.path.expanduser("~/.fuss-launcher/runstats") if os.path.exists(fname): for line in open(fname): row = line.split() self.stats[row[0]] = int(row[1]) self.dirty = False def save(self): "Atomically save stats" # Do not save if nothing has changed if not self.dirty: return homedir = os.path.expanduser("~/.fuss-launcher") if not os.path.isdir(homedir): os.mkdir(homedir) fname = os.path.join(homedir, "runstats") tmpfname = fname + ".tmp" out = open(tmpfname, "w") for k, v in self.stats.iteritems(): print >>out, k, v out.close() os.rename(tmpfname, fname) self.dirty = False def notify_run(self, name): "Notify that a given app has been run" old = self.stats.get(name, 0) self.stats[name] = old + 1 self.dirty = True self.save() def get(self): "Return the .desktop files sorted by decreasing run frequency" res = self.stats.keys() res.sort(key=lambda x:self.stats[x], reverse=True) return res run_stats = RunStats() class Favourites(object): def __init__(self): self.load() def load(self): "Load favourites" self.favourites = set() fname = os.path.expanduser("~/.fuss-launcher/favourites") if os.path.exists(fname): for line in open(fname): line = line.strip() if not line: continue self.favourites.add(line) self.dirty = False def save(self): "Atomically save stats" # Do not save if nothing has changed if not self.dirty: return homedir = os.path.expanduser("~/.fuss-launcher") if not os.path.isdir(homedir): os.mkdir(homedir) fname = os.path.join(homedir, "favourites") tmpfname = fname + ".tmp" out = open(tmpfname, "w") for line in self.favourites: print >>out, line out.close() os.rename(tmpfname, fname) self.dirty = False def add(self, name): "Add an entry to favourites" if name.startswith(APPDIR): name = os.path.basename(name) if name in self.favourites: return False self.favourites.add(name) self.dirty = True self.save() return True def remove(self, name): "Remove an entry from favourites" if name.startswith(APPDIR): name = os.path.basename(name) if name not in self.favourites: return False self.favourites.remove(name) self.dirty = True self.save() return True def get(self): "Return the .desktop files sorted by decreasing run frequency" return self.favourites favourites = Favourites() class MimeDB(object): def __init__(self): self.mimemap = {} for f in os.listdir(APPDIR): if f[0] == '.' or not f.endswith(".desktop"): continue fname = os.path.join(APPDIR, f) de = DesktopEntry(fname) for mt in de.getMimeTypes(): self.mimemap.setdefault(mt, []).append(f) def lookup(self, mt): return self.mimemap.get(mt, []) def lookup_uris(self, uris): desktops = set() for u in uris: f = gio.File(uri=u) info = f.query_info("standard::content-type", gio.FILE_QUERY_INFO_NONE) content_type = info.get_content_type() mt = gio.content_type_get_mime_type(content_type) res = self.lookup(mt) if not res and mt.startswith("text/"): res = self.lookup("text/plain") desktops.update(res) return desktops mime_db = MimeDB() class AppInfo(object): MISSING_ICON = icon_theme.load_icon("fuss-launcher-missing", 48, 0) def __init__(self, basename): if not basename.startswith("/"): dfname = os.path.join(APPDIR, basename) else: dfname = basename if not os.path.exists(dfname): self.inst = False dfname = os.path.join(APPINSTDIR, basename) if not os.path.exists(dfname): self.name = basename self.icon = self.MISSING_ICON self.ipath = None self.command = None return else: self.inst = True # Desktop file name self.dpath = dfname # Get info from .desktop file item = DesktopEntry(dfname) self.name = item.getName() self.command = item.getExec() # Load icon info = icon_theme.lookup_icon(item.getIcon(), 48, 0) if info is not None: self.icon = info.load_icon() self.ipath = info.get_filename() if self.ipath is None and info.get_builtin_pixbuf() is not None: self.ipath = "(builtin)" else: ifname = self._lookup_icon(item.getIcon()) try: icon = gtk.gdk.pixbuf_new_from_file(ifname) if icon.get_width() > 48: icon = icon.scale_simple(48, 48, gtk.gdk.INTERP_BILINEAR) self.ipath = ifname except Exception, e: print >>sys.stderr, "%s: Cannot load icon %s: %s" % (basename, ifname, str(e)) icon = icon_theme.load_icon("fuss-launcher-missing", 48, 0) self.ipath = None self.icon = icon def _lookup_icon(self, fname): "Aggressively look for icons" if fname.startswith("/"): return fname if self.inst: # Try all places where we know there are icons for d in ICONDIRS: ifname = os.path.join(d, fname) if os.path.exists(ifname): break return ifname else: # Package not installed, only look in app-install-data icon dir return os.path.join(APPINSTICONDIR, fname) def deurl(self, arg): arg = arg.replace("%20", " ") if arg.startswith("file://"): return arg[7:] else: return arg def expand_arg(self, arg, parms): if arg == "%f": if not parms: return [] return [self.deurl(parms[0])] elif arg == "%F": if not parms: return [] return map(self.deurl, parms) elif arg == "%u": if not parms: return [] return [parms[0]] elif arg == "%U": if not parms: return [] return list(parms) elif arg == "%i": return ["--icon", self.ipath] elif arg == "%c": return [self.name] elif arg == "%k": return [self.dpath] else: return [arg] def run(self, parms=()): global run_stats cmd = self.command print "CMD", cmd args = shlex.split(cmd) print "ARGS", repr(args) print "PARMS", parms args = sum([self.expand_arg(x, parms) for x in args], []) print "XARGS", repr(args) cmdline = " ".join(map(pipes.quote, args)) print "CMDLINE", cmdline run_stats.notify_run(os.path.basename(self.dpath)) notifier.notify(self.name, cmdline) #subprocess.check_call(args + ["&"], shell=True) #os.system("%s&" % cmd) os.system(cmdline + " &") class AppInfoCache(object): def __init__(self): self.cache = {} def reset(self): self.cache = {} def __getitem__(self, name): val = self.cache.get(name, None) if val is not None: return val val = AppInfo(name) self.cache[name] = val return val class ResourceDir(object): """ Directory (or set of directories) where we find resources """ # Base directory for our resource directories ROOTS = [ "/etc/fuss-launcher/", "/usr/local/etc/fuss-launcher/", os.path.expanduser("~/.fuss-launcher/") ] def __init__(self, name): # Resource directory named 'name' under any of our roots self.roots = [os.path.join(x, name) for x in self.ROOTS] self.last_ts = 0 def timestamp(self): """ Return the maximum timestamp of all our directories """ res = [self.last_ts] for r in self.roots: try: ts = os.path.getmtime(r) res.append(ts) except OSError, e: if e.errno == errno.ENOENT: continue return max(res) def list(self): """ List the contents of all our directories. Contents are unique by basename, which means that a file in our second directory can override the same file in our first one. """ res = dict() for r in self.roots: if not os.path.exists(r): continue for f in os.listdir(r): if f.startswith("."): continue res[f] = os.path.join(r, f) return res.itervalues() def flatten_menu(menu): """ Returns the DesktopEntry items contained in the menu """ def xtract_desktops(m, res): for e in m.getEntries(): de = getattr(e, "DesktopEntry", None) if de is not None: res[e.Filename] = de elif hasattr(e, "getEntries"): xtract_desktops(e, res) res = dict() xtract_desktops(menu, res) return res.keys() class Extras(ResourceDir): def __init__(self): super(Extras, self).__init__("extras") self.groups = [] self.links = [] def refresh(self): """" Refresh if needed, and return a bool telling if the results changed since last time """ ts = self.timestamp() if ts <= self.last_ts: return False self.groups = [] self.links = [] for fname in self.list(): # Ignore empty files, so they can be used to suppress things in # other dirs if os.path.getsize(fname) == 0: continue if fname.endswith(".menu"): self.groups.append(xdg.Menu.parse(fname)) elif fname.endswith(".desktop"): de = DesktopEntry(fname) if de.getType() == "Link": self.links.append(de) self.last_ts = ts return True fuss-launcher-0.5/fusslauncher/engine.py0000644000175000017500000003243611462523321020005 0ustar enricoenrico# -*- python -*- # # fuss-launcher backend # # Copyright (C) 2010 Enrico Zini # Copyright (C) 2010 Christopher R. Gabriel # Copyright (C) 2010 The Fuss Project # # Authors: Christopher R. Gabriel # Enrico Zini # # Sponsored by the Fuss Project: http://www.fuss.bz.it/ # # 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 3 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, see . import os, os.path import sys from xdg.DesktopEntry import DesktopEntry from xdg import Locale import xapian from subprocess import Popen, PIPE import math import axi import gettext _ = gettext.gettext debug = False verbose = False # Yes, apt, thanks, I know, the api isn't stable, thank you so very much #warnings.simplefilter('ignore', FutureWarning) #import warnings #warnings.filterwarnings("ignore","apt API not stable yet") #import apt #warnings.resetwarnings() HOMEDIR=os.path.join(os.environ['HOME'], ".fuss-launcher") class CompletionFilter(xapian.ExpandDecider): "Basic xapian term filter" def __init__(self, stemmer=None, exclude=None, prefix=None): super(CompletionFilter, self).__init__() self.stem = stemmer if stemmer else lambda x:x self.exclude = set([self.stem(x) for x in exclude]) if exclude else set() self.prefix = prefix def __call__(self, term): if len(term) < 4: return False # Don't complete with special things if not term[0].islower(): return False if self.prefix is not None: if not term.startswith(self.prefix): return False if self.stem(term) in self.exclude: return False return True class TagFilter(xapian.ExpandDecider): "Xapian term filter that only keeps tags" def __call__(self, term): return term[:2] == "XT" class InstalledFilter(xapian.MatchDecider): "Xapian document filter that only keeps installed packages" def __call__(self, doc): return os.path.exists(os.path.join("/var/lib/dpkg/info/%s.list" % doc.get_data())) class Database(object): BOOLWORDS = set(["and", "or", "not"]) def __init__(self, path, filter=None): # Index self.db = xapian.Database(path) # Stemmer based on current locale self.stem = None for lang in Locale.langs: try: lang = lang.split("_")[0] self.stem = xapian.Stem(lang) break except InvalidArgumentError: continue # Global query filter self.filter = filter # Global match decider self.matchdecider = None # Build query parsers def make_qp(): qp = xapian.QueryParser() qp.set_default_op(xapian.Query.OP_AND) qp.set_database(self.db) if self.stem: qp.set_stemmer(self.stem) qp.set_stemming_strategy(xapian.QueryParser.STEM_SOME) qp.add_prefix("pkg", "XP") qp.add_boolean_prefix("tag", "XT") qp.add_boolean_prefix("sec", "XS") qp.add_boolean_prefix("cat", "XDT") return qp # Quer parser for main queries self.qp = make_qp() # Enquire engine self.enquire = xapian.Enquire(self.db) # Identical query parser and enquire to use for tab completion # queries self.compl_qp = make_qp() self.compl_enquire = xapian.Enquire(self.db) # Start with an empty query self.set_query("") def unprefix(self, term): "Convert DB prefixes to user prefixes" if term.startswith("XT"): return "tag:" + term[2:] elif term.startswith("XS"): return "sec:" + term[2:] elif term.startswith("XP"): return "pkg:" + term[2:] return term def set_query(self, query, qtags=[], extra=None): """ Set query string and optional tag filter """ query = query.encode("UTF-8") self.query_string = query self.query_tags = qtags query_kw = self.qp.parse_query(query, xapian.QueryParser.FLAG_BOOLEAN | xapian.QueryParser.FLAG_LOVEHATE | xapian.QueryParser.FLAG_BOOLEAN_ANY_CASE | xapian.QueryParser.FLAG_WILDCARD | xapian.QueryParser.FLAG_PURE_NOT | xapian.QueryParser.FLAG_SPELLING_CORRECTION | xapian.QueryParser.FLAG_AUTO_SYNONYMS | (xapian.QueryParser.FLAG_PARTIAL if len(query) > 2 else 0) ) query = query_kw if qtags: self.query_tags = xapian.Query(xapian.Query.OP_AND, ["XT"+t for t in qtags]) query = xapian.Query(xapian.Query.OP_AND, query, query_tags) else: self.query_tags = None if extra: self.query_extra = extra query = xapian.Query(xapian.Query.OP_OR, query, extra) else: self.query_extra = None if self.filter: query = xapian.Query(xapian.Query.OP_AND, query, self.filter) if debug: print >>sys.stderr, "engine: setting query", query self.enquire.set_query(query) def spellcheck(self): """ Get spelling suggestions on the last query string passed to set_query """ return self.qp.get_corrected_query_string() def documents(self, first=0, count=20, mdecider=None): """ Get packages matching the last query set with set_query, sorted by decreasing relevance """ if mdecider is None: mdecider = self.matchdecider documents = [] for m in self.enquire.get_mset(first, count, None, mdecider): score = m.percent doc = m.document documents.append((score, doc)) return documents def completion_prepare(self, qstring, has_extras=False): """ Scan a query string extracting the useful parts for tag completion expansion. @param qstring the query string @param has_extras True if there is something else, other than the query string, that will be part of the final xapian query @returns prefix, lead, query, blacklist - prefix is used to filter completion results, only keeping the one that start with the given prefix. It is None if there is no partially typed word and we should be suggesting new words. - lead is a string to prepend to the completion results to obtain a completed query string; - query is the string to use to build a query to generate completion results. Can be none if there is no context available to build a query from. - blacklist is a set of terms not to use for completion """ # Tokenize the query string args = qstring.split() # Remove the trailing term in case it is partially typed if qstring and not qstring[-1].isspace(): prefix = args.pop(-1) else: prefix = None # Remove the trailing boolean terms in order to build a reasonable # query string while args and args[-1].lower() in self.BOOLWORDS: args.pop(-1) # Check if we have no context at all for which to do expnsion if not has_extras and not args: return prefix, "", None, set() else: # Compute blacklist blacklist = set([x for x in args if x.lower() not in self.BOOLWORDS]) # Compute lead if prefix: lead = qstring[:-len(prefix)] else: lead = qstring return prefix, lead, " ".join(args), blacklist def completions(self): """ Compute completions for the current query string """ # Compute the strategy to use for completion prefix, lead, query, blacklist = self.completion_prepare(self.query_string, self.filter is not None) if not query and not prefix: # Show a preset list of tags return [] elif not query: # Simple prefix search res = set((str(x) for x in self.db.synonym_keys(prefix) if x not in blacklist)) res.update((term.term for term in self.db.allterms(prefix) if term not in blacklist)) return [lead + x for x in sorted(res)] else: # Query for completion terms query = self.compl_qp.parse_query(query, xapian.QueryParser.FLAG_BOOLEAN | xapian.QueryParser.FLAG_LOVEHATE | xapian.QueryParser.FLAG_BOOLEAN_ANY_CASE | xapian.QueryParser.FLAG_WILDCARD | xapian.QueryParser.FLAG_PURE_NOT | xapian.QueryParser.FLAG_AUTO_SYNONYMS | xapian.QueryParser.FLAG_SPELLING_CORRECTION) if self.query_tags: query = xapian.Query(xapian.Query.OP_AND, query, self.query_tags) if self.query_extra: query = xapian.Query(xapian.Query.OP_OR, query, self.query_extra) if self.filter: query = xapian.Query(xapian.Query.OP_AND, query, self.filter) self.compl_enquire.set_query(query) # Build an rset with the top 10 results rset = xapian.RSet() for m in self.compl_enquire.get_mset(0, 10, None, self.matchdecider): rset.add_document(m.docid) # Compute tab completions cfilter = CompletionFilter(stemmer=self.stem, exclude=blacklist, prefix=prefix) completions = [] for r in self.compl_enquire.get_eset(15, rset, cfilter): completions.append(self.unprefix(r.term)) # TODO: if partial, add synonims (it seems it cannot be done) return [lead + c for c in completions] def tagcloud(self): """ Compute a context-sensitive tag cloud based on the last query set via set_query. """ if not self.query_string and not self.query_tags: # Generate an initial tag cloud tags = [(x.term[2:], math.log(self.db.get_collection_freq(x.term))) for x in self.db.allterms("XT")] tags.sort(key=lambda x:x[1], reverse=True) tags = tags[:15] # Normalise the scores in the interval [0, 1] minscore = float(min([x[1] for x in tags]))/2 maxscore = float(max([x[1] for x in tags])) - minscore tags = [(x[0], float(x[1]-minscore) / maxscore) for x in tags] tags.sort(key=lambda x:x[0]) # TODO: return some precomputed set of keywords/tags for # completions, like the toplevel facets in axi-cache return tags # Build an rset with the top 10 results rset = xapian.RSet() for m in self.enquire.get_mset(0, 10, None, self.matchdecider): rset.add_document(m.docid) # Compute tag cloud tags = [] maxscore = None for res in self.enquire.get_eset(15, rset, TagFilter()): # Normalise the score in the interval [0, 1] weight = math.log(res.weight) if maxscore == None: maxscore = weight tag = res.term[2:] tags.append( (tag, float(weight) / maxscore) ) tags.sort(key=lambda x:x[0]) return tags class Engine(object): def __init__(self): if not os.path.exists(axi.XAPIANINDEX): self.create_main_index() # Only query packages that have .desktop files self.db = Database(axi.XAPIANINDEX, filter=xapian.Query("XD")) def set_install_only(self, val): if debug: print >>sys.stderr, "engine: set install_only", val if val: self.db.matchdecider = InstalledFilter() else: self.db.matchdecider = None def set_query(self, query, qtags=[]): self.db.set_query(query, qtags) def spellcheck(self): return self.db.spellcheck() def documents(self, first=0, count=20): res = [] for score, doc in self.db.documents(first, count): # Here we get packages, we need to look for XDFname to get .desktop files for term in doc.termlist(): if term.term.startswith("XDF"): res.append((score, term.term[3:])) return res def completions(self): #if self.axi: # return self.axi.completions() #else: return self.db.completions() def tagcloud(self): if self.axi: return self.axi.tagcloud() else: return self.db.tagcloud() def create_main_index(self): # Create the database directory if missing # TODO: rebuild using the DBUS interface raise RuntimeError, "please run update-apt-xapian-index as root" fuss-launcher-0.5/setup.cfg0000644000175000017500000000037211374044172015303 0ustar enricoenrico[build] icons=True help=False [build_i18n] domain=fuss-launcher #desktop_files=[("share/applications", ("data/update-manager.desktop.in",))] #schemas_files=[("share/gconf/schemas", ("data/update-manager.schemas.in",))] [build_icons] icon-dir=icons fuss-launcher-0.5/icons/0000755000175000017500000000000011462526236014577 5ustar enricoenricofuss-launcher-0.5/icons/24x24/0000755000175000017500000000000011462526236015362 5ustar enricoenricofuss-launcher-0.5/icons/24x24/apps/0000755000175000017500000000000011462526236016325 5ustar enricoenricofuss-launcher-0.5/icons/24x24/apps/fuss-launcher.png0000644000175000017500000000137211373223553021612 0ustar enricoenricoPNG  IHDRw=bKGD pHYs  tIME"}IDATHKhQLf&&V R VD Quƅtm}AmE"h1b#J%mR)&ͣ3޹3n X0~~sXgɅfAZHdVM cxlb=k&-&^h0&tUmN+oR#Lgt_,T!w9hTn0jzuֆ_-w$ IENDB`fuss-launcher-0.5/icons/48x48/0000755000175000017500000000000011462526236015376 5ustar enricoenricofuss-launcher-0.5/icons/48x48/apps/0000755000175000017500000000000011462526236016341 5ustar enricoenricofuss-launcher-0.5/icons/48x48/apps/fuss-launcher.png0000644000175000017500000000317211373223553021626 0ustar enricoenricoPNG  IHDR00WbKGD pHYs  tIMEIDATh[lUǿٹ}˺m% ($*b$ ."xIT 44- (Ab/` vvs?sf|.{ͷ{~sdllllllll+L ٜ&7$% IX󝦅ט(Xz=hrsS$p8ly~'˲ Ãl6z]b_9G?ѕseS2ly_3."[B3<20i_eY"BqY$I>֕+U˜<WxzlJ -yTwj^ GBDs:DQ11: ,5E5<_7ܷpPRi.ivvrrfa_Uum(F InUUWɲ̪ Ƙ8Aqi`1fF$I8v׹Pwر/4B4x+]uZjHR(),,EQr| nH$ҾkE! Ul5?s94M{(͖bkVi0/8htYWSS~]NMOOϴ\.Wi#OA ees,ˮ|bܨ(VEQJ4!tEQ@媪Rk6!RUI! 8ni4\z5C$I( xZQE #ȇ`p](£Z t:{$IZF’a66666666 ݝeNiIENDB`fuss-launcher-0.5/icons/48x48/apps/fuss-launcher-missing.png0000644000175000017500000000317211373223553023275 0ustar enricoenricoPNG  IHDR00WbKGD pHYs  tIMEIDATh[lUǿٹ}˺m% ($*b$ ."xIT 44- (Ab/` vvs?sf|.{ͷ{~sdllllllll+L ٜ&7$% IX󝦅ט(Xz=hrsS$p8ly~'˲ Ãl6z]b_9G?ѕseS2ly_3."[B3<20i_eY"BqY$I>֕+U˜<WxzlJ -yTwj^ GBDs:DQ11: ,5E5<_7ܷpPRi.ivvrrfa_Uum(F InUUWɲ̪ Ƙ8Aqi`1fF$I8v׹Pwر/4B4x+]uZjHR(),,EQr| nH$ҾkE! Ul5?s94M{(͖bkVi0/8htYWSS~]NMOOϴ\.Wi#OA ees,ˮ|bܨ(VEQJ4!tEQ@媪Rk6!RUI! 8ni4\z5C$I( xZQE #ȇ`p](£Z t:{$IZF’a66666666 ݝeNiIENDB`fuss-launcher-0.5/PKG-INFO0000644000175000017500000000045711462526236014567 0ustar enricoenricoMetadata-Version: 1.0 Name: fuss-launcher Version: 0.5 Summary: FUSS application launcher Home-page: https://devel.fuss.bz.it/wiki/FussLauncher Author: ['Enrico Zini', 'Christopher R. Gabriel'] Author-email: ['enrico@truelite.it', 'cgabriel@truelite.it'] License: GPL Description: UNKNOWN Platform: any fuss-launcher-0.5/COPYING0000644000175000017500000004311011370767267014527 0ustar enricoenrico GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. fuss-launcher-0.5/.gitignore0000644000175000017500000000002611373223553015447 0ustar enricoenrico*.pyc *.swp po/it.gmo