All pastes #25422 Raw Edit

Someone

public text v1 · immutable
#25422 ·published 2005-10-13 20:59 UTC
rendered paste body
class SignallingHandler (Handler, gobject.GObject):

        __gsignals__ = {
                "query-ready" : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [gobject.TYPE_PYOBJECT])
        }

        def __init__ (self, iconfile=None):
                Handler.__init__ (self, iconfile)
                gobject.GObject.__init__ (self)
                self.__last_query = ""

        def query_async (self, qstring, max=5):
                self.__last_query = qstring
                self.query (qstring, max)

        def emit_query_ready (self, matches, qstring):
                self.__last_query = qstring
                if qstring == self.__last_query:
                        self.emit ("query-ready", matches)

        def is_async (self):
                return True