home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.4)
-
- import gtk
- import gobject
-
- class DeskbarUI(gobject.GObject):
- '''
- \tThis class represents an abstraction of a deskbar user interface.
- \tThe constructor of any class deriving from it should take a gnomeapplet.Applet
- \tas single argument, if it is to be instantiated from a DeskbarApplet instance
- \t(which most will).
- \t
- \tSignals:
- \t\t"match-selected" (text, Match):
- \t\t\tA match has been selected by the user. Passes the selected match along.
- \t\t\t
- \t\t"request-history-show" (gtk.Widget, gnomeapplet.ORIENT_*)
- \t\t\tThe user has performed and action such that the history should be popped up.
- \t\t\tThe widget is the widget to align the popup to, the ORIENT_* is the alignment
- \t\t\tthe popup should have relative to the widget.
- \t\t\t
- \t\t"request-history-hide" ():
- \t\t\tRequest that the history window will be hidden.
- \t\t
- \t\t"start-query" (query_string):
- \t\t\tRequest a query on the given string.
- \t\t\t
- \t\t"stop-query" ():
- \t\t\tSignal that we no longer will handle returned queries. Fx. when the user hits
- \t\t\tEsc, or the result list have become hidden.
- \t\t\t
- \t\t"request-keybinding" (Match, key_binding):
- \t\t\tThe user has performed an action which should attach a keybinding to the given match.
- \t\t
- \t\t"keyboard-shortcut" (string, keyval):
- \t\t\tTe user has triggered a keyboard shortcut, the query and keyval are passed (from gdk event)
- \t\t\t
- \t'''
- __gsignals__ = {
- 'match-selected': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [
- gobject.TYPE_STRING,
- gobject.TYPE_PYOBJECT]),
- 'start-query': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [
- gobject.TYPE_STRING]),
- 'stop-query': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, []),
- 'request-keybinding': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [
- gobject.TYPE_PYOBJECT,
- gobject.TYPE_PYOBJECT]),
- 'keyboard-shortcut': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [
- gobject.TYPE_STRING,
- gobject.TYPE_UINT]) }
-
- def __init__(self, applet, prefs):
- gobject.GObject.__init__(self)
- self.applet = applet
- self.prefs = prefs
-
-
- def on_change_orient(self, applet):
- '''
- \t\tConnected to the applets "change-orient" signal.
- \t\t'''
- pass
-
-
- def on_change_size(self, applet):
- '''
- \t\tConnected to the applets "change-size" signal.
- \t\t'''
- pass
-
-
- def receive_focus(self, time):
- '''
- \t\tCalled when the applet receives focus. Use fx. to pop up a text entry with focus.
- \t\ttime is the event time.
- \t\t'''
- pass
-
-
- def middle_click(self):
- '''
- \t\tCalled when the applet receives a middle click. Must return True if the middle click event is handled
- \t\t'''
- return False
-
-
- def set_sensitive(self, active):
- '''
- \t\tCalled when the UI should be in/active because modules are loading
- \t\t'''
- pass
-
-
- def append_matches(self, matches):
- '''
- \t\tCalled in response to sending a "start-query" signal.
- \t\t
- \t\tThis method should take both a single (non-list) match and a list
- \t\tof matches.
- \t\t
- \t\tThe list of matches is a list of tuples (text, match), text is the query
- \t\tstring and match is a Match instance
- \t\t'''
- raise NotImplementedError
-
-
- def get_view(self):
- '''
- \t\tReturn the widget to be displayed for this UI.
- \t\t'''
- raise NotImplementedError
-
-
- def get_entry(self):
- '''
- \t\tReturn the widget to type the text into.
-
- \t\tUsually, this is a gtk.Entry
- \t\t'''
- raise NotImplementedError
-
-
- def close_view(self):
- '''
- \t\tCloses every popup or window owned by the UI, because the ui is going to change
- \t\t'''
- pass
-
-
- if gtk.pygtk_version < (2, 8, 0):
- gobject.type_register(DeskbarUI)
-
-