I don't remember what I changed, mostly all over

This commit is contained in:
Nikos Kouremenos 2005-03-01 23:48:05 +00:00
parent 4cfea45b01
commit 844dc4ac4a
5 changed files with 201 additions and 136 deletions

View File

@ -33,13 +33,9 @@ class GajimThread(threading.Thread):
def run(self):
mod = compile("import plugins.%s" % self.getName(), \
self.getName(), "exec")
try:
res = eval(mod)
mod = compile("plugins.%s.%s.plugin(self.queueIn, self.queueOut)" % (self.getName(),self.getName()), self.getName(), "exec")
res = eval(mod)
except:
print _("plugin %s cannot be launched : ") % self.getName() + \
str(sys.exc_info()[1][0:])
self.getName(), "exec")
res = eval(mod)
mod = compile("plugins.%s.%s.plugin(self.queueIn, self.queueOut)" % (self.getName(),self.getName()), self.getName(), "exec")
res = eval(mod)
# END run
# END GajimThread

View File

@ -1325,40 +1325,3 @@ class agent_browser_window:
self.join_button.set_sensitive(False)
xml.signal_autoconnect(self)
self.browse()
class join_gc:
def delete_event(self, widget):
"""close window"""
del self.plugin.windows['join_gc']
def on_close(self, widget):
"""When Cancel button is clicked"""
widget.get_toplevel().destroy()
def on_join(self, widget):
"""When Join button is clicked"""
nick = self.xml.get_widget('entry_nick').get_text()
room = self.xml.get_widget('entry_room').get_text()
server = self.xml.get_widget('entry_server').get_text()
passw = self.xml.get_widget('entry_pass').get_text()
jid = '%s@%s' % (room, server)
self.plugin.windows[self.account]['gc'][jid] = gtkgui.gc(jid, nick, \
self.plugin, self.account)
#TODO: verify entries
self.plugin.send('GC_JOIN', self.account, (nick, room, server, passw))
widget.get_toplevel().destroy()
def __init__(self, plugin, account, server='', room = ''):
if not plugin.connected[account]:
warning_dialog(_("You must be connected to join a group chat on this serveur"))
return
self.plugin = plugin
self.account = account
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Join_gc', APP)
self.window = self.xml.get_widget('Join_gc')
self.xml.get_widget('entry_server').set_text(server)
self.xml.get_widget('entry_room').set_text(room)
self.xml.get_widget('entry_nick').set_text(self.plugin.nicks[self.account])
self.xml.signal_connect('gtk_widget_destroy', self.delete_event)
self.xml.signal_connect('on_cancel_clicked', self.on_close)
self.xml.signal_connect('on_join_clicked', self.on_join)

View File

@ -343,8 +343,8 @@ class awayMsg_Window:
self.xml.signal_connect('on_comboboxentry_changed', self.on_entry_changed)
self.xml.signal_connect('on_key_press_event', self.on_key_pressed)
class addContact_Window:
"""Class for Add user window"""
class add_contact_window:
"""Class for add_contact_window"""
def on_cancel_button_clicked(self, widget):
"""When Cancel button is clicked"""
widget.get_toplevel().destroy()
@ -417,8 +417,8 @@ class addContact_Window:
return
self.plugin = plugin
self.account = account
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'add_window', APP)
self.window = self.xml.get_widget('add_window')
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'add_contact_window', APP)
self.window = self.xml.get_widget('add_contact_window')
self.old_uid_value = ''
liststore = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
liststore.append(['Jabber', ''])
@ -521,3 +521,80 @@ class subscription_request_Window:
_('Subscription request from %s') % self.jid)
xml.get_widget('message_textview').get_buffer().set_text(text)
xml.signal_autoconnect(self)
class join_gc:
def delete_event(self, widget):
"""close window"""
del self.plugin.windows['join_gc']
def on_close(self, widget):
"""When Cancel button is clicked"""
widget.get_toplevel().destroy()
def on_join(self, widget):
"""When Join button is clicked"""
nick = self.xml.get_widget('entry_nick').get_text()
room = self.xml.get_widget('entry_room').get_text()
server = self.xml.get_widget('entry_server').get_text()
passw = self.xml.get_widget('entry_pass').get_text()
jid = '%s@%s' % (room, server)
self.plugin.windows[self.account]['gc'][jid] = gtkgui.gc(jid, nick, \
self.plugin, self.account)
#TODO: verify entries
self.plugin.send('GC_JOIN', self.account, (nick, room, server, passw))
widget.get_toplevel().destroy()
def __init__(self, plugin, account, server='', room = ''):
if not plugin.connected[account]:
warning_dialog(_("You must be connected to join a group chat on this serveur"))
return
self.plugin = plugin
self.account = account
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Join_gc', APP)
self.window = self.xml.get_widget('Join_gc')
self.xml.get_widget('entry_server').set_text(server)
self.xml.get_widget('entry_room').set_text(room)
self.xml.get_widget('entry_nick').set_text(self.plugin.nicks[self.account])
self.xml.signal_connect('gtk_widget_destroy', self.delete_event)
self.xml.signal_connect('on_cancel_clicked', self.on_close)
self.xml.signal_connect('on_join_clicked', self.on_join)
class new_message_window: #FIXME: NOT READY
def delete_event(self, widget):
"""close window"""
del self.plugin.windows['join_gc']
def on_close(self, widget):
"""When Cancel button is clicked"""
widget.get_toplevel().destroy()
def on_join(self, widget):
"""When Join button is clicked"""
nick = self.xml.get_widget('entry_nick').get_text()
room = self.xml.get_widget('entry_room').get_text()
server = self.xml.get_widget('entry_server').get_text()
passw = self.xml.get_widget('entry_pass').get_text()
jid = '%s@%s' % (room, server)
self.plugin.windows[self.account]['gc'][jid] = gtkgui.gc(jid, nick, \
self.plugin, self.account)
#TODO: verify entries
self.plugin.send('GC_JOIN', self.account, (nick, room, server, passw))
widget.get_toplevel().destroy()
def __init__(self, plugin, account, server='', room = ''):
#FIXME:
return True
if not plugin.connected[account]:
warning_dialog(_("You must be connected to join a group chat on this serveur"))
return
self.plugin = plugin
self.account = account
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Join_gc', APP)
self.window = self.xml.get_widget('Join_gc')
self.xml.get_widget('entry_server').set_text(server)
self.xml.get_widget('entry_room').set_text(room)
self.xml.get_widget('entry_nick').set_text(self.plugin.nicks[self.account])
self.xml.signal_connect('gtk_widget_destroy', self.delete_event)
self.xml.signal_connect('on_cancel_clicked', self.on_close)
self.xml.signal_connect('on_join_clicked', self.on_join)

View File

@ -31,24 +31,23 @@
<property name="visible">True</property>
<child>
<widget class="GtkMenuItem" id="gajim_menu">
<widget class="GtkMenuItem" id="chat_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">_Chat</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkMenu" id="gajim_menu_menu">
<widget class="GtkMenu" id="chat_menu_menu">
<child>
<widget class="GtkImageMenuItem" id="new_message_mni">
<widget class="GtkImageMenuItem" id="new_message_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_New Message</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_new_message_mni_activate" last_modification_time="Mon, 28 Feb 2005 00:31:12 GMT"/>
<accelerator key="N" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image311">
<widget class="GtkImage" id="image398">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon_size">1</property>
@ -62,11 +61,22 @@
</child>
<child>
<widget class="GtkMenuItem" id="join_gc">
<widget class="GtkImageMenuItem" id="join_gc_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Join Groupchat</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_join_gc_activate" last_modification_time="Tue, 03 Aug 2004 22:15:03 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image399">
<property name="visible">True</property>
<property name="stock">gtk-connect</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
@ -77,13 +87,13 @@
</child>
<child>
<widget class="GtkImageMenuItem" id="add">
<widget class="GtkImageMenuItem" id="add_contact_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Add Contact</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image312">
<widget class="GtkImage" id="image400">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
@ -97,12 +107,12 @@
</child>
<child>
<widget class="GtkCheckMenuItem" id="show_offline">
<widget class="GtkCheckMenuItem" id="show_offline_contacts_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Show Offline Contacts</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<signal name="activate" handler="on_show_offline_contacts_activate" last_modification_time="Mon, 28 Feb 2005 15:56:24 GMT"/>
<signal name="activate" handler="on_show_offline_contacts_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 23:29:52 GMT"/>
<accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
@ -114,15 +124,15 @@
</child>
<child>
<widget class="GtkImageMenuItem" id="quit">
<widget class="GtkImageMenuItem" id="quit_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Quit</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_quit_activate" last_modification_time="Fri, 03 Oct 2003 12:49:50 GMT"/>
<signal name="activate" handler="on_quit_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 23:37:49 GMT"/>
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image313">
<widget class="GtkImage" id="image401">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="icon_size">1</property>
@ -140,24 +150,24 @@
</child>
<child>
<widget class="GtkMenuItem" id="edit">
<widget class="GtkMenuItem" id="edit_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">_Edit</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkMenu" id="edit_menu">
<widget class="GtkMenu" id="edit_menu_menu">
<child>
<widget class="GtkImageMenuItem" id="accounts">
<widget class="GtkImageMenuItem" id="accounts_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">A_ccounts</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_accounts_activate" last_modification_time="Wed, 22 Oct 2003 21:18:21 GMT"/>
<signal name="activate" handler="on_accounts_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 23:23:19 GMT"/>
<accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image314">
<widget class="GtkImage" id="image402">
<property name="visible">True</property>
<property name="stock">gtk-select-color</property>
<property name="icon_size">1</property>
@ -171,14 +181,13 @@
</child>
<child>
<widget class="GtkImageMenuItem" id="browse_agents">
<widget class="GtkImageMenuItem" id="browse_agents_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Browse Agents</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_browse_agents_activate" last_modification_time="Wed, 12 Nov 2003 10:50:33 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image315">
<widget class="GtkImage" id="image403">
<property name="visible">True</property>
<property name="stock">gtk-find</property>
<property name="icon_size">1</property>
@ -198,15 +207,15 @@
</child>
<child>
<widget class="GtkImageMenuItem" id="preferences">
<widget class="GtkImageMenuItem" id="preferences_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Preferences</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_preferences_activate" last_modification_time="Wed, 22 Oct 2003 21:18:29 GMT"/>
<signal name="activate" handler="on_preferences_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 22:58:18 GMT"/>
<accelerator key="P" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image316">
<widget class="GtkImage" id="image404">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">1</property>
@ -224,23 +233,23 @@
</child>
<child>
<widget class="GtkMenuItem" id="help">
<widget class="GtkMenuItem" id="help_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">_Help</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkMenu" id="help_menu">
<widget class="GtkMenu" id="help_menu_menu">
<child>
<widget class="GtkImageMenuItem" id="about">
<widget class="GtkImageMenuItem" id="about_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_About</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_about_activate" last_modification_time="Fri, 03 Oct 2003 12:49:50 GMT"/>
<signal name="activate" handler="on_about_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 22:56:45 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image317">
<widget class="GtkImage" id="image405">
<property name="visible">True</property>
<property name="stock">gtk-about</property>
<property name="icon_size">1</property>
@ -761,7 +770,7 @@
<signal name="clicked" handler="on_modify_button_clicked" last_modification_time="Tue, 01 Mar 2005 18:20:53 GMT"/>
<child>
<widget class="GtkAlignment" id="alignment30">
<widget class="GtkAlignment" id="alignment44">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
@ -773,15 +782,15 @@
<property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="hbox45">
<widget class="GtkHBox" id="hbox2919">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image172">
<widget class="GtkImage" id="image334">
<property name="visible">True</property>
<property name="stock">gtk-refresh</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
@ -796,7 +805,7 @@
</child>
<child>
<widget class="GtkLabel" id="label167">
<widget class="GtkLabel" id="label201">
<property name="visible">True</property>
<property name="label" translatable="yes">_Modify</property>
<property name="use_underline">True</property>
@ -1084,7 +1093,7 @@ Nikos Kouremenos (nkour@jabber.org)</property>
<child>
<widget class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="label" translatable="yes">Ressource: </property>
<property name="label" translatable="yes">Resource: </property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@ -2163,7 +2172,7 @@ on the server as a vCard</property>
</child>
</widget>
<widget class="GtkWindow" id="add_window">
<widget class="GtkWindow" id="add_contact_window">
<property name="border_width">5</property>
<property name="width_request">400</property>
<property name="height_request">334</property>
@ -8233,7 +8242,7 @@ Custom</property>
<widget class="GtkLabel" id="label194">
<property name="visible">True</property>
<property name="label" translatable="yes">Enter the user ID of the contact you would like to
send a chat messate to.</property>
send a chat messate to</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@ -8259,7 +8268,7 @@ send a chat messate to.</property>
</child>
<child>
<widget class="GtkComboBoxEntry" id="comboboxentry1">
<widget class="GtkComboBoxEntry" id="userID_comboboxentry">
<property name="visible">True</property>
</widget>
<packing>

View File

@ -163,7 +163,7 @@ gobject.type_register(ImageCellRenderer)
class user:
"""Informations concerning each users"""
"""Information concerning each users"""
def __init__(self, *args):
if len(args) == 0:
self.jid = ''
@ -1270,8 +1270,8 @@ class log_Window:
tagStatus.set_property('foreground', color)
self.plugin.send('LOG_NB_LINE', None, jid)
class roster_Window:
"""Class for main gtk window"""
class roster_window:
"""Class for main window of gtkgui plugin"""
def get_account_iter(self, name):
if self.regroup:
@ -1425,59 +1425,70 @@ class roster_Window:
model.set_value(iter, 0, img)
model.set_value(iter, 1, name)
def mkmenu(self):
"""create the browse agents, add and join groupchat sub menus"""
def makemenu(self):
"""create the browse agents, add contact & join groupchat sub menus"""
if len(self.plugin.accounts.keys()) > 0:
self.xml.get_widget('add').set_sensitive(True)
self.xml.get_widget('browse_agents').set_sensitive(True)
self.xml.get_widget('join_gc').set_sensitive(True)
self.xml.get_widget('new_message_menuitem').set_sensitive(True)
self.xml.get_widget('join_gc_menuitem').set_sensitive(True)
self.xml.get_widget('add_contact_menuitem').set_sensitive(True)
self.xml.get_widget('browse_agents_menuitem').set_sensitive(True)
else:
self.xml.get_widget('add').set_sensitive(False)
self.xml.get_widget('browse_agents').set_sensitive(False)
self.xml.get_widget('join_gc').set_sensitive(False)
if len(self.plugin.accounts.keys()) > 1:
self.xml.get_widget('new_message_menuitem').set_sensitive(False)
self.xml.get_widget('join_gc_menuitem').set_sensitive(False)
self.xml.get_widget('add_contact_menuitem').set_sensitive(False)
self.xml.get_widget('browse_agents_menuitem').set_sensitive(False)
if len(self.plugin.accounts.keys()) > 1: # 2 or more accounts? make submenus
#add
menu_sub = gtk.Menu()
self.xml.get_widget('add').set_submenu(menu_sub)
self.xml.get_widget('add_contact_menuitem').set_submenu(menu_sub)
for a in self.plugin.accounts.keys():
item = gtk.MenuItem(a)
menu_sub.append(item)
item.connect("activate", self.on_add, a)
item.connect("activate", self.on_add_contact, a)
menu_sub.show_all()
#agents
menu_sub = gtk.Menu()
self.xml.get_widget('browse_agents').set_submenu(menu_sub)
self.xml.get_widget('browse_agents_menuitem').set_submenu(menu_sub)
for a in self.plugin.accounts.keys():
item = gtk.MenuItem(a)
menu_sub.append(item)
item.connect("activate", self.on_browse, a)
item.connect("activate", self.on_browse_agents, a)
menu_sub.show_all()
#join gc
menu_sub = gtk.Menu()
self.xml.get_widget('join_gc').set_submenu(menu_sub)
self.xml.get_widget('join_gc_menuitem').set_submenu(menu_sub)
for a in self.plugin.accounts.keys():
item = gtk.MenuItem(a)
menu_sub.append(item)
item.connect("activate", self.on_join_gc, a)
menu_sub.show_all()
#new message
menu_sub = gtk.Menu()
self.xml.get_widget('new_message_menuitem').set_submenu(menu_sub)
for a in self.plugin.accounts.keys():
item = gtk.MenuItem(a)
menu_sub.append(item)
item.connect("activate", self.on_new_message_menuitem_activate, a)
menu_sub.show_all()
elif len(self.plugin.accounts.keys()) == 1:
#add
if not self.add_handler_id :
self.add_handler_id = self.xml.get_widget('add').connect(
"activate", self.on_add, self.plugin.accounts.keys()[0])
if not self.add_contact_handler_id :
self.add_contact_handler_id = self.xml.get_widget('add_contact_menuitem').connect(
"activate", self.on_add_contact, self.plugin.accounts.keys()[0])
#agents
if not self.browse_handler_id :
self.browse_handler_id = self.xml.get_widget(
'browse_agents').connect("activate", self.on_browse,
if not self.browse_agents_handler_id :
self.browse_agents_handler_id = self.xml.get_widget(
'browse_agents_menuitem').connect("activate", self.on_browse_agents,
self.plugin.accounts.keys()[0])
#join_gc
if not self.join_handler_id :
self.join_handler_id = self.xml.get_widget('join_gc').connect(
if not self.join_gc_handler_id :
self.join_gc_handler_id = self.xml.get_widget('join_gc_menuitem').connect(
"activate", self.on_join_gc, self.plugin.accounts.keys()[0])
def draw_roster(self):
"""Clear and draw roster"""
self.mkmenu()
self.makemenu()
self.tree.get_model().clear()
for acct in self.contacts.keys():
self.add_account_to_roster(acct)
@ -1740,10 +1751,13 @@ class roster_Window:
item.connect("activate", self.on_edit_account, account)
item = gtk.MenuItem(_("_Browse agents"))
menu.append(item)
item.connect("activate", self.on_browse, account)
item.connect("activate", self.on_browse_agents, account)
item = gtk.MenuItem(_("_Add contact"))
menu.append(item)
item.connect("activate", self.on_add, account)
item.connect("activate", self.on_add_contact, account)
item = gtk.MenuItem(_('_New Message'))
menu.append(item)
item.connect("activate", self.on_new_message_menuitem_activate, account)
if not self.plugin.connected[account]:
item.set_sensitive(False)
@ -2002,16 +2016,16 @@ class roster_Window:
get_property('is-active'):
self.plugin.systray.add_jid(jid, account)
def on_preferences_activate(self, widget):
def on_preferences_menuitem_activate(self, widget):
"""When preferences is selected :
call the preference_Window class"""
call the preferences_window class"""
if not self.plugin.windows.has_key('preferences'):
self.plugin.windows['preferences'] = preferences_window(self.plugin)
def on_add(self, widget, account):
def on_add_contact(self, widget, account):
"""When add user is selected :
call the add class"""
addContact_Window(self.plugin, account)
call the add_contact_window class"""
add_contact_window(self.plugin, account)
def on_join_gc(self, widget, account):
"""When Join Groupchat is selected :
@ -2019,13 +2033,19 @@ class roster_Window:
if not self.plugin.windows.has_key('join_gc'):
self.plugin.windows['join_gc'] = join_gc(self.plugin, account)
def on_about_activate(self, widget):
def on_new_message_menuitem_activate(self, widget, account):
"""When New Message is activated:
call the new_message_window class"""
if not self.plugin.windows.has_key('new_message'):
self.plugin.windows['new_message'] = new_message_window(self.plugin, account)
def on_about_menuitem_activate(self, widget):
"""When about is selected :
call the about class"""
if not self.plugin.windows.has_key('about'):
self.plugin.windows['about'] = about_Window(self.plugin)
def on_accounts_activate(self, widget):
def on_accounts_menuitem_activate(self, widget):
"""When accounts is seleted :
call the accounts class to modify accounts"""
if not self.plugin.windows.has_key('accounts'):
@ -2044,10 +2064,10 @@ class roster_Window:
if self.plugin.systray_visible:
self.window.iconify()
else:
self.on_quit()
self.quit_gtkui_plugin()
return 1
def on_quit(self):
def quit_gtkui_plugin(self):
"""When we quit the gtk plugin :
tell that to the core and exit gtk"""
if self.plugin.config.has_key('saveposition'):
@ -2065,8 +2085,8 @@ class roster_Window:
self.plugin.hide_systray()
gtk.main_quit()
def on_quit_activate(self, widget):
self.on_quit()
def on_quit_menuitem_activate(self, widget):
self.quit_gtkui_plugin()
def on_roster_treeview_row_activated(self, widget, path, col=0):
"""When an iter is dubble clicked :
@ -2151,7 +2171,7 @@ class roster_Window:
model.set_value(iter, 5, False)
self.redraw_jid(jid, account)
def on_browse(self, widget, account):
def on_browse_agents(self, widget, account):
"""When browse agent is selected :
Call browse class"""
if not self.plugin.windows[account].has_key('browser'):
@ -2218,8 +2238,8 @@ class roster_Window:
return 0
return 1
def on_show_offline_contacts_activate(self, widget):
"""when show offline option is changed :
def on_show_offline_contacts_menuitem_activate(self, widget):
"""when show offline option is changed:
redraw the treeview"""
self.plugin.config['showoffline'] = 1 - self.plugin.config['showoffline']
self.plugin.send('CONFIG', None, ('GtkGui', self.plugin.config, 'GtkGui'))
@ -2350,9 +2370,9 @@ class roster_Window:
self.tree = self.xml.get_widget('roster_treeview')
self.plugin = plugin
self.nb_unread = 0
self.add_handler_id = 0
self.browse_handler_id = 0
self.join_handler_id = 0
self.add_contact_handler_id = 0
self.browse_agents_handler_id = 0
self.join_gc_handler_id = 0
self.regroup = 0
if self.plugin.config.has_key('mergeaccounts'):
self.regroup = self.plugin.config['mergeaccounts']
@ -2398,7 +2418,7 @@ class roster_Window:
self.cb.set_active(5)
showOffline = self.plugin.config['showoffline']
self.xml.get_widget('show_offline').set_active(showOffline)
self.xml.get_widget('show_offline_contacts_menuitem').set_active(showOffline)
#columns
col = gtk.TreeViewColumn()
@ -2555,7 +2575,7 @@ class systray:
item = gtk.MenuItem(_("Quit"))
menu.append(item)
item.connect("activate", self.plugin.roster.on_quit_activate)
item.connect("activate", self.plugin.roster.on_quit_menuitem_activate)
menu.popup(None, None, None, event.button, event.time)
menu.show_all()
@ -3136,7 +3156,7 @@ class plugin:
if self.config['usetabbedchat']:
global USE_TABBED_CHAT
USE_TABBED_CHAT = 1
self.roster = roster_Window(self)
self.roster = roster_window(self)
gtk.timeout_add(100, self.read_queue)
gtk.timeout_add(100, self.read_sleepy)
self.sleeper = common.sleepy.Sleepy( \