we now launch gajim.py instead of gtkgui.py

This commit is contained in:
Yann Leboulanger 2005-04-18 08:54:47 +00:00
parent 85217c33a9
commit 637f35b279

View file

@ -1,4 +1,8 @@
## gtkgui.py #!/bin/sh
''':'
exec python -OOtt "$0" ${1+"$@"}
' '''
## gajim.py
## ##
## Gajim Team: ## Gajim Team:
## - Yann Le Boulanger <asterix@lagaule.org> ## - Yann Le Boulanger <asterix@lagaule.org>
@ -313,28 +317,22 @@ class interface:
elif self.roster.contacts[account].has_key(ji): elif self.roster.contacts[account].has_key(ji):
#It isn't an agent #It isn't an agent
self.roster.chg_user_status(user1, array[1], array[2], account) self.roster.chg_user_status(user1, array[1], array[2], account)
#inform the user about new contact online #play sound
if old_show < 2 and new_show > 1: if old_show < 2 and new_show > 1 and gajim.config.get_per( \
if gajim.config.get_per('soundevents', 'contact_connected', \ 'soundevents', 'contact_connected', 'enabled'):
'enabled'):
self.play_sound('contact_connected') self.play_sound('contact_connected')
if not self.windows[account]['chats'].has_key(jid) and \ if not self.windows[account]['chats'].has_key(jid) and \
not self.queues[account].has_key(jid) and \ not self.queues[account].has_key(jid) and \
gajim.config.get('notify_on_online'): gajim.config.get('notify_on_online'):
#FIXME: check what is OUR STATUS and do the rest
if gajim.config.get('autopopupaway'):
instance = dialogs.Popup_window(self, 'Contact Online', jid, \ instance = dialogs.Popup_window(self, 'Contact Online', jid, \
account) account)
self.roster.popup_windows.append(instance) self.roster.popup_windows.append(instance)
elif old_show > 1 and new_show < 2: elif old_show > 1 and new_show < 2 and gajim.config.get_per( \
if gajim.config.get_per('soundevents', 'contact_disconnected', \ 'soundevents', 'contact_disconnected', 'enabled'):
'enabled'):
self.play_sound('contact_disconnected') self.play_sound('contact_disconnected')
if not self.windows[account]['chats'].has_key(jid) and \ if not self.windows[account]['chats'].has_key(jid) and \
not self.queues[account].has_key(jid) and \ not self.queues[account].has_key(jid) and \
gajim.config.get('notify_on_offline'): gajim.config.get('notify_on_offline'):
#FIXME: check what is OUR STATUS and do the rest
if gajim.config.get('autopopupaway'):
instance = dialogs.Popup_window(self, 'Contact Offline', jid, \ instance = dialogs.Popup_window(self, 'Contact Offline', jid, \
account) account)
self.roster.popup_windows.append(instance) self.roster.popup_windows.append(instance)
@ -359,8 +357,6 @@ class interface:
not self.queues[account].has_key(jid): not self.queues[account].has_key(jid):
first = True first = True
if gajim.config.get('notify_on_new_message'): if gajim.config.get('notify_on_new_message'):
#FIXME: check what is OUR STATUS (if we're online) and do the rest
if gajim.config.get('autopopupaway'):
instance = dialogs.Popup_window(self, 'New Message', jid, account) instance = dialogs.Popup_window(self, 'New Message', jid, account)
self.roster.popup_windows.append(instance) self.roster.popup_windows.append(instance)
self.roster.on_message(jid, array[1], array[2], account) self.roster.on_message(jid, array[1], array[2], account)
@ -748,7 +744,7 @@ class interface:
# get instances for windows/dialogs that will show_all()/hide() # get instances for windows/dialogs that will show_all()/hide()
self.windows['preferences'] = config.Preferences_window(self) self.windows['preferences'] = config.Preferences_window(self)
self.windows['add_remove_emoticons'] = \ self.windows['add_remove_emoticons_window'] = \
config.Add_remove_emoticons_window(self) config.Add_remove_emoticons_window(self)
self.windows['roster'] = self.roster self.windows['roster'] = self.roster