
New version just commited with some minor GUI changes.
And also user settings to change text for usernames in UserList in Lobby. See screenshot above.
Also fixed up some minor GUI update bugs in CLIENTSTATUS.
Moderator: Moderators
Code: Select all
channel_list = self.userlist[o].listChannels()
...
index = self.lobby_channel_names.index(channel_list[p])
Code: Select all
if __name__ == "__main__":
if (gtk_version >= (2, 10, 0) and pygtk_version >= (2, 10, 0)):
(main stuff)
else:
print "error: UnityLobby requires at least GTK 2.10.0 and PyGTK 2.10.0, your versions of GTK and PyGTK are", gtk_version, " and ", pygtk_version
Code: Select all
import gtk
import time
def processEvent(widget, event):
lastActiveTime = time.clock()
win = gtk.Window()
win.add_events(gtk.gdk.KEY_PRESS_MASK | gtk.gdk.POINTER_MOTION_MASK | gtk.gdk.BUTTON_PRESS_MASK | gtk.gdk.SCROLL_MASK)
win.connect("motion-notify-event", processEvent)
win.connect("key-press-event", processEvent)
win.connect("button-press-event", processEvent)
win.connect("scroll-event", processEvent)
win.show()
gtk.main()
Code: Select all
def RemoveChannelChatBuffer(self, channel_name):
try:
for o in range(0, len(self.userlist)):
if (self.userlist[o].name == self.username):
self.userlist[o].leaveChannel(channel_name)
for i in range(0, len(self.lobby_channel_names)):
if (self.lobby_channel_names[i] == channel_name):
self.lobby_channel_names.pop(i) ## remove i-th channel name
self.lobby_channel_buffers.pop(i) ## remove i-th textbuffer
self.lobby_channel_textview.pop(i) ## remove i-th textview
self.lobby_channel_users_columns.pop(i) ## should always be idx of channel!
self.lobby_channel_users_cells.pop(i) ## should always be idx of channel!
self.lobby_channel_users.pop(i) ## remove i-th liststore
for notebookPageNum in range(0, self.lobby_notebook.get_n_pages()):
vPane = self.lobby_channel_vpanes[i]
notebookPage = self.lobby_notebook.get_nth_page(notebookPageNum)
if (vPane == notebookPage):
self.lobby_notebook.remove_page(notebookPageNum)
self.lobby_channel_vpanes.pop(i)
return
except Exception, inst:
print 'RemoveChannelChatBuffer failure'
...
Code: Select all
cell.set_property('pixbuf', pixbuf)
Code: Select all
cell.set_property('foreground-gdk', color)
Code: Select all
for o in range(0, len(self.userlist)):
self.userlist[o].leaveChannel(channel_name)
Code: Select all
for o in range(0, len(self.userlist)):
if (self.userlist[o].name == self.username):
self.userlist[o].leaveChannel(channel_name)