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)
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)
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")
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")
def hidden(self, w): InputOutputWindow.hidden(self, w) self.group.leave()