예제 #1
0
 def __init__(self, person):
     InputOutputWindow.__init__(self, "ConversationWidget", "ConversationMessageEntry", "ConversationOutput")
     self.person = person
     alloc_color = self.output.get_colormap().alloc
     self.personColor = alloc_color("#%s" % colorhash(person.name))
     self.myColor = alloc_color("#0000ff")
     print "allocated my color %s and person color %s" % (self.myColor, self.personColor)
예제 #2
0
 def __init__(self, person):
     InputOutputWindow.__init__(self,
                                "ConversationWidget",
                                "ConversationMessageEntry",
                                "ConversationOutput")
     self.person = person
     alloc_color = self.output.get_colormap().alloc
     self.personColor = alloc_color("#%s" % colorhash(person.name))
     self.myColor = alloc_color("#0000ff")
     print "allocated my color %s and person color %s" % (
         self.myColor, self.personColor)
예제 #3
0
 def __init__(self, group):
     InputOutputWindow.__init__(self, "GroupChatBox", "GroupInput", "GroupOutput")
     self.group = group
     self.members = []
     self.membersHidden = 0
     self._colorcache = {}
     alloc_color = self.output.get_colormap().alloc
     self.myColor = alloc_color("#0000ff")
     # TODO: we shouldn't be getting group conversations randomly without
     # names, but irc autojoin appears broken.
     self.xml.get_widget("NickLabel").set_text(getattr(self.group.account.client, "name", "(no name)"))
     participantList = self.xml.get_widget("ParticipantList")
     groupBox = self.xml.get_widget("GroupActionsBox")
     for method in group.getGroupCommands():
         b = gtk.GtkButton(method.__name__)
         b.connect("clicked", self._doGroupAction, method)
         groupBox.add(b)
     self.setTopic("No Topic Yet", "No Topic Author Yet")
예제 #4
0
 def __init__(self, group):
     InputOutputWindow.__init__(self,
                                "GroupChatBox",
                                "GroupInput",
                                "GroupOutput")
     self.group = group
     self.members = []
     self.membersHidden = 0
     self._colorcache = {}
     alloc_color = self.output.get_colormap().alloc
     self.myColor = alloc_color("#0000ff")
     # TODO: we shouldn't be getting group conversations randomly without
     # names, but irc autojoin appears broken.
     self.xml.get_widget("NickLabel").set_text(
         getattr(self.group.account.client,"name","(no name)"))
     participantList = self.xml.get_widget("ParticipantList")
     groupBox = self.xml.get_widget("GroupActionsBox")
     for method in group.getGroupCommands():
         b = gtk.GtkButton(method.__name__)
         b.connect("clicked", self._doGroupAction, method)
         groupBox.add(b)
     self.setTopic("No Topic Yet", "No Topic Author Yet")
예제 #5
0
 def hidden(self, w):
     InputOutputWindow.hidden(self, w)
     self.group.leave()
예제 #6
0
 def hidden(self, w):
     InputOutputWindow.hidden(self, w)
     self.group.leave()