Changeset 8561 for branches/jingle
- Timestamp:
- 08/24/07 16:36:53 (16 months ago)
- Location:
- branches/jingle/src
- Files:
-
- 2 modified
-
common/events.py (modified) (2 diffs)
-
gajim.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/jingle/src/common/events.py
r8275 r8561 29 29 ''' type_ in chat, normal, file-request, file-error, file-completed, 30 30 file-request-error, file-send-error, file-stopped, gc_msg, pm, 31 printed_chat, printed_gc_msg, printed_marked_gc_msg, printed_pm 31 printed_chat, printed_gc_msg, printed_marked_gc_msg, printed_pm, 32 jingle-incoming 32 33 parameters is (per type_): 33 34 chat, normal: [message, subject, kind, time, encrypted, resource, … … 37 38 gc_msg: None 38 39 printed_*: None 39 messages that are already printed in chat, but not read''' 40 messages that are already printed in chat, but not read 41 jingle-*: (fulljid, sessionid) ''' 40 42 self.type_ = type_ 41 43 self.time_ = time_ -
branches/jingle/src/gajim.py
r8558 r8561 1489 1489 # We add it to the gajim.events queue 1490 1490 # Do we have a queue? 1491 jid = gajim.get_jid_without_resource(jid)1492 no_queue = len(gajim.events.get_events(account, jid)) == 01491 barejid = gajim.get_jid_without_resource(jid) 1492 no_queue = len(gajim.events.get_events(account, barejid)) == 0 1493 1493 event_type = None 1494 1494 # type_ can be gc-invitation file-send-error file-error file-request-error 1495 # file-request file-completed file-stopped 1495 # file-request file-completed file-stopped voip-incoming 1496 1496 # event_type can be in advancedNotificationWindow.events_list 1497 1497 event_types = {'file-request': 'ft_request', … … 1499 1499 if type_ in event_types: 1500 1500 event_type = event_types[type_] 1501 show_in_roster = notify.get_show_in_roster(event_type, account, jid)1502 show_in_systray = notify.get_show_in_systray(event_type, account, jid)1501 show_in_roster = notify.get_show_in_roster(event_type, account, barejid) 1502 show_in_systray = notify.get_show_in_systray(event_type, account, barejid) 1503 1503 event = gajim.events.create_event(type_, event_args, 1504 1504 show_in_roster = show_in_roster, 1505 1505 show_in_systray = show_in_systray) 1506 gajim.events.add_event(account, jid, event)1506 gajim.events.add_event(account, barejid, event) 1507 1507 1508 1508 self.roster.show_title() 1509 1509 if no_queue: # We didn't have a queue: we change icons 1510 if not gajim.contacts.get_contact_with_highest_priority(account, jid):1510 if not gajim.contacts.get_contact_with_highest_priority(account, barejid): 1511 1511 # add contact to roster ("Not In The Roster") if he is not 1512 self.roster.add_to_not_in_the_roster(account, jid)1513 self.roster.draw_contact( jid, account)1512 self.roster.add_to_not_in_the_roster(account, barejid) 1513 self.roster.draw_contact(barejid, account) 1514 1514 1515 1515 # Show contact in roster (if he is invisible for example) and select line 1516 path = self.roster.get_path( jid, account)1517 self.roster.show_and_select_path(path, jid, account)1516 path = self.roster.get_path(barejid, account) 1517 self.roster.show_and_select_path(path, barejid, account) 1518 1518 1519 1519 def remove_first_event(self, account, jid, type_ = None): … … 1886 1886 dialogs.VoIPCallReceivedDialog(account, peerjid, sid) 1887 1887 1888 # TODO: not checked1889 self.add_event(account, peerjid, 'jingle-session', (sid, contents)) 1890 1888 self.add_event(account, peerjid, 'voip-incoming', (peerjid, sid,)) 1889 1890 # TODO: check this too 1891 1891 if helpers.allow_showing_notification(account): 1892 1892 # TODO: we should use another pixmap ;-) … … 1894 1894 'ft_request.png') 1895 1895 txt = _('%s wants to start a jingle session.') % gajim.get_name_from_jid( 1896 account, jid)1896 account, peerjid) 1897 1897 path = gtkgui_helpers.get_path_to_generic_or_avatar(img) 1898 1898 event_type = _('Jingle Session Request') 1899 notify.popup(event_type, jid, account, 'jingle-request',1899 notify.popup(event_type, peerjid, account, 'jingle-request', 1900 1900 path_to_image = path, title = event_type, text = txt) 1901 1901 … … 2324 2324 gajim.events.remove_events(account, jid, event) 2325 2325 self.roster.draw_contact(jid, account) 2326 elif type_ == 'voip-incoming': 2327 event = gajim.events.get_first_event(account, jid, type_) 2328 peerjid, sid = event.parameters 2329 dialogs.VoIPCallReceivedDialog(account, peerjid, sid) 2330 gajim.events.remove_events(account, jid, event) 2326 2331 if w: 2327 2332 w.set_active_tab(fjid, account)
