browse agents only if connected
This commit is contained in:
parent
6b10f27450
commit
5c429db976
|
@ -340,6 +340,7 @@
|
|||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<signal name="destroy" handler="gtk_widget_destroy" last_modification_time="Sun, 12 Oct 2003 18:17:05 GMT"/>
|
||||
<signal name="check_resize" handler="on_check_resize" last_modification_time="Tue, 20 Jan 2004 16:57:47 GMT"/>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox2">
|
||||
|
@ -519,15 +520,15 @@
|
|||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.95</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
|
|
|
@ -751,8 +751,10 @@ class browser:
|
|||
xml.signal_connect('gtk_widget_destroy', self.delete_event)
|
||||
xml.signal_connect('on_refresh_clicked', self.on_refresh)
|
||||
xml.signal_connect('on_row_activated', self.on_row_activated)
|
||||
#TODO: Si connecte
|
||||
self.browse()
|
||||
if self.r.connected:
|
||||
self.browse()
|
||||
else:
|
||||
warning("You must be connected to view Agents")
|
||||
|
||||
class message:
|
||||
"""Class for chat window"""
|
||||
|
@ -822,10 +824,17 @@ class message:
|
|||
deb, end = buffer.get_bounds()
|
||||
buffer.delete(deb, end)
|
||||
|
||||
def on_test(self, widget):
|
||||
print self.window.get_size()
|
||||
print self.hbox.need_resize
|
||||
print self.hbox.resize_mode
|
||||
|
||||
def __init__(self, user, roster):
|
||||
self.user = user
|
||||
self.r = roster
|
||||
xml = gtk.glade.XML('plugins/gtkgui/gtkgui.glade', 'Chat')
|
||||
self.hbox = xml.get_widget('hbox1')
|
||||
self.hbox.set_property('resize-mode', 2)
|
||||
self.window = xml.get_widget('Chat')
|
||||
self.window.set_title('Chat with ' + user.name)
|
||||
self.img = xml.get_widget('image')
|
||||
|
@ -838,10 +847,10 @@ class message:
|
|||
buffer = self.conversation.get_buffer()
|
||||
end_iter = buffer.get_end_iter()
|
||||
buffer.create_mark('end', end_iter, 0)
|
||||
# self.window.show()
|
||||
xml.signal_connect('gtk_widget_destroy', self.delete_event)
|
||||
xml.signal_connect('on_clear_button_clicked', self.on_clear)
|
||||
xml.signal_connect('on_msg_key_press_event', self.on_msg_key_press_event)
|
||||
xml.signal_connect('on_check_resize', self.on_test)
|
||||
self.tagIn = buffer.create_tag("incoming")
|
||||
color = self.r.cfgParser.GtkGui_inmsgcolor
|
||||
if not color:
|
||||
|
@ -855,7 +864,7 @@ class message:
|
|||
self.tagStatus = buffer.create_tag("status")
|
||||
color = self.r.cfgParser.GtkGui_statusmsgcolor
|
||||
if not color:
|
||||
color = 'green'
|
||||
color = '#00ff00' #green
|
||||
self.tagStatus.set_property("foreground", color)
|
||||
|
||||
class roster:
|
||||
|
@ -1184,7 +1193,6 @@ class roster:
|
|||
pix = gtk.gdk.pixbuf_new_from_file(self.path + state + '.xpm')
|
||||
self.pixbufs[state] = pix
|
||||
else:
|
||||
#TODO: open an animated gif file
|
||||
pix = gtk.gdk.pixbufAnimation(self.path + state + '.gif')
|
||||
self.pixbufs[state] = pix
|
||||
|
||||
|
|
Loading…
Reference in New Issue