Exemple #1
0
 def __init__(self):
     self.buffer = ui.TextBuffer({"buffer_name": "Archive importer"},
                                 command_table="buffer")
     self.settings = None
     self.file_logger_settings = None
     self.archive = None
     self.older_than = None
Exemple #2
0
 def __init__(self, plugin):
     self.buffer = ui.TextBuffer({}, "message.composer_descr")
     self.plugin = plugin
     self.tmpfile_name = None
     self.recipient = None
     self.subject = None
     self.body = None
     self.editor_encoding = None
Exemple #3
0
 def __init__(self, plugin, recipient):
     self.buffer = ui.TextBuffer({}, "jogger.composer_descr")
     self.plugin = plugin
     self.recipient = recipient
     self.tmpfile_name = None
     self.subject = None
     self.level = None
     self.body = None
     self.editor_encoding = None
Exemple #4
0
 def cmd_xmlconsole(self, args):
     args.finish()
     if self.buffer:
         cjc_globals.screen.display_buffer(self.buffer)
         return
     self.buffer = ui.TextBuffer({}, "xmlconsole.descr",
                                 "xmlconsole buffer", self)
     self.buffer.user_input = self.user_input
     self.buffer.update()
     self.data_in_handler.setLevel(logging.DEBUG)
     self.data_out_handler.setLevel(logging.DEBUG)
     cjc_globals.screen.display_buffer(self.buffer)
Exemple #5
0
 def __init__(self, plugin, jid, node):
     self.plugin = plugin
     self.fparams = {
         "jid": jid,
         "node": node,
     }
     self.jid = jid
     self.node = node
     self.items = None
     self.history = []
     self.buffer = ui.TextBuffer(self.fparams, "disco.descr",
                                 "disco buffer", self)
     self.buffer.preference = plugin.settings["buffer_preference"]
     cjc_globals.screen.display_buffer(self.buffer)
Exemple #6
0
    def presence_subscribe(self, stanza):
        fr = stanza.get_from()
        if fr.bare() == self.cjc.stream.me.bare():
            self.debug("Ignoring own presence subscription request")
            return
        reason = stanza.get_status()
        buf = ui.TextBuffer({"user": fr}, "presence.subscribe_buffer")
        buf.preference = self.settings["buffer_preference"]
        buf.append_themed("presence.subscribe", {"user": fr, "reason": reason})
        stanza_copy = stanza.copy()

        def callback(response):
            return self.subscribe_decision(response, stanza_copy, buf)

        buf.ask_question("Accept?", "boolean", None, callback, None, None, 1)
        if self.settings.get("auto_popup"):
            cjc_globals.screen.display_buffer(buf)
Exemple #7
0
 def __init__(self, plugin, room, me):
     muc.MucRoomHandler.__init__(self)
     self.plugin = plugin
     self.room = room
     self.me = me
     self.fparams = {
         "room": self.room,
         "me": self.me,
     }
     self.buffer = ui.TextBuffer(self.fparams, "muc.descr", "muc buffer",
                                 self)
     self.buffer.preference = plugin.settings["buffer_preference"]
     self.buffer.user_input = self.user_input
     self.buffer.get_completion_words = self.get_completion_words
     self.buffer.append_themed("muc.joining", self.fparams)
     self.buffer._muc_room = self
     self.buffer.update()
Exemple #8
0
 def __init__(self, plugin, name):
     threading.Thread.__init__(self, name=name)
     self.plugin = plugin
     self.buffer = ui.TextBuffer(name)
     ui.activate_cmdtable("test buffer", self)
     self.stop_it = 0