diff frontends/src/quick_frontend/quick_chat.py @ 1224:f0c9b149ed99

bridge, memory: add "search" attribute to getHistory (filter the results with a unix globbing pattern)
author souliane <souliane@mailoo.org>
date Sat, 04 Oct 2014 10:25:32 +0200
parents 802b7e6bf098
children e3a9ea76de35
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_chat.py	Sat Oct 04 10:23:13 2014 +0200
+++ b/frontends/src/quick_frontend/quick_chat.py	Sat Oct 04 10:25:32 2014 +0200
@@ -100,9 +100,10 @@
         """Refresh or scroll down the focus after the history is printed"""
         pass
 
-    def historyPrint(self, size=C.HISTORY_LIMIT_DEFAULT, profile='@NONE@'):
+    def historyPrint(self, size=C.HISTORY_LIMIT_DEFAULT, search='', profile='@NONE@'):
         """Print the current history
         @param size (int): number of messages
+        @param search (str): pattern to filter the history results
         @param profile (str): %(doc_profile)s
         """
         log.debug(_("now we print the history (%d messages)") % size)
@@ -124,7 +125,7 @@
         else:
             target = self.target.bare
 
-        return self.host.bridge.getHistory(self.host.profiles[profile]['whoami'].bare, target, size, profile=profile, callback=onHistory, errback=onHistoryError)
+        return self.host.bridge.getHistory(self.host.profiles[profile]['whoami'].bare, target, size, search=search, profile=profile, callback=onHistory, errback=onHistoryError)
 
     def _get_nick(self, jid):
         """Return nick of this jid when possible"""