def new_message(self, conversation): if not settings.get_notify_on_messagerecieve() or self.skype.skype_presence == Skype4Py.cusDoNotDisturb: return #conversation.skypereturn.Chat.Type == Skype4Py.chatTypeMultiChat and if conversation.skypereturn.Chat.Topic: group_chat_title = unicode(conversation.skypereturn.Sender.FullName + " ► " + conversation.skypereturn.Chat.Topic) else: group_chat_title = unicode(conversation.display_name) icon = "" if settings.get_display_notification_avatars(): avatar = SkypeAvatar(conversation.skypereturn.Sender.Handle) if avatar.filename: icon = '-i "'+avatar.filename+'" ' else: icon = '-i "/usr/share/skype-wrapper/icons/skype-wrapper-48.svg" ' fullname = conversation.skypereturn.Sender.FullName if not fullname: fullname = username #doesn't work unitylauncher.urgent(True) os.system(u'notify-send '+icon+'"'+group_chat_title+'" "'+conversation.skypereturn.Body+'"');
def new_message(self, conversation): if not settings.get_notify_on_messagerecieve( ) or self.skype.skype_presence == Skype4Py.cusDoNotDisturb: return #conversation.skypereturn.Chat.Type == Skype4Py.chatTypeMultiChat and if conversation.skypereturn.Chat.Topic: group_chat_title = unicode( conversation.skypereturn.Sender.FullName + " ► " + conversation.skypereturn.Chat.Topic) else: group_chat_title = unicode(conversation.display_name) icon = "" if settings.get_display_notification_avatars(): avatar = SkypeAvatar(conversation.skypereturn.Sender.Handle) if avatar.filename: icon = '-i "' + avatar.filename + '" ' else: icon = '-i "/usr/share/skype-wrapper/icons/skype-wrapper-48.svg" ' if helpers.haveUnity(): unitylauncher.count( len(self.indicators) + self.skype.incomingfilecount) unitylauncher.createUnreadMessageQuickList( self.skype.unread_conversations, self.show_conversation_quicklist) unitylauncher.redrawQuicklist() unitylauncher.count( len(self.indicators) + self.skype.incomingfilecount) os.system(u'notify-send ' + icon + '"' + group_chat_title + '" "' + conversation.skypereturn.Body + '"')
def new_message(self, conversation): if not settings.get_notify_on_messagerecieve() or self.skype.skype_presence == Skype4Py.cusDoNotDisturb: return #conversation.skypereturn.Chat.Type == Skype4Py.chatTypeMultiChat and conversation.display_name = conversation.skypereturn.Chat.Topic or conversation.display_name name = conversation.skypereturn.Sender.DisplayName or conversation.skypereturn.Sender.FullName or conversation.skypereturn.Sender.Handle if len(conversation.skypereturn.Chat.Members) > 2: group_chat_title = unicode(name + " ► " + conversation.display_name) else: group_chat_title = unicode(conversation.display_name) icon = "" if settings.get_display_notification_avatars(): avatar = SkypeAvatar(conversation.skypereturn.Sender.Handle) if avatar.filename: icon = avatar.filename else: icon = "/usr/share/skype-wrapper/icons/skype-wrapper-48.svg" if helpers.haveUnity(): unitylauncher.count(len(self.indicators) + self.skype.incomingfilecount) unitylauncher.createUnreadMessageQuickList(self.skype.unread_conversations, self.show_conversation_quicklist) unitylauncher.redrawQuicklist() unitylauncher.count(len(self.indicators) + self.skype.incomingfilecount) helpers.notify(group_chat_title, conversation.skypereturn.Body, icon, group_chat_title, False, False, conversation.skypereturn.Chat.Topic)
def CallStatus(self, call, status): global active_player, player_paused, volume_level if status == "RINGING": if settings.get_control_music_player() and active_player == "unknown" and player_paused == False: controlMusicPlayer() if settings.get_restore_volume(): SaveRestore_Volume() self.call_ringing = self.call_ringing + 1 self.calls[call.PartnerHandle] = call else: self.call_ringing = self.call_ringing - 1 #if status == "INPROGRESS":LOCALHOLD if (status == "MISSED" or status == "FINISHED" or status == "REFUSED" or status == "CANCELLED") and call.PartnerHandle in self.calls: if settings.get_restore_volume(): SaveRestore_Volume() volume_level = "unknown" if settings.get_control_music_player(): controlMusicPlayer() active_player = "unknown" player_paused = False del self.calls[call.PartnerHandle] if helper.isUnityRunning(): unitylauncher.createCallsQuickList(self.calls, self.cb_call_action) unitylauncher.redrawQuicklist() # wiggle the launcher if self.call_ringing > 0 and not self.calls_ringing_started: if helpers.isUnityRunning(): unitylauncher.urgent() GObject.timeout_add(1000, self.calls_ringing) icon = "" if settings.get_display_notification_avatars(): avatar = SkypeAvatar(call.PartnerHandle) if avatar.filename: icon = avatar.filename else: icon = wrapperPath + "/icons/skype-wrapper-48.svg" partner = call.PartnerDisplayName or call.PartnerHandle notification = "" if status == "RINGING" and (call.Type == "INCOMING_P2P" or call.Type == "INCOMING_PSTN"): notification = "* Incoming call"; if status == "INPROGRESS": notification = "* Call started"; if status == "MISSED": notification = "* Missed call"; if status == "FINISHED": notification = "* Call ended"; if status == "REMOTEHOLD": notification = "* Call put on hold"; if notification: helpers.notify(partner, notification, icon, "call://"+call.PartnerHandle, True, True)
def CallStatus(self, call, status): global active_player, player_paused, volume_level if status == "RINGING": if settings.get_control_music_player() and active_player == "unknown" and player_paused == False: controlMusicPlayer() if settings.get_restore_volume(): SaveRestore_Volume() self.call_ringing = self.call_ringing + 1 self.calls[call.PartnerHandle] = call else: self.call_ringing = self.call_ringing - 1 #if status == "INPROGRESS":LOCALHOLD if (status == "MISSED" or status == "FINISHED" or status == "REFUSED" or status == "CANCELLED") and call.PartnerHandle in self.calls: if settings.get_restore_volume(): SaveRestore_Volume() volume_level = "unknown" if settings.get_control_music_player(): controlMusicPlayer() active_player = "unknown" player_paused = False del self.calls[call.PartnerHandle] unitylauncher.createCallsQuickList(self.calls, self.cb_call_action) unitylauncher.redrawQuicklist() # wiggle the launcher if self.call_ringing > 0 and not self.calls_ringing_started: unitylauncher.urgent() GObject.timeout_add(1000, self.calls_ringing) icon = "" if settings.get_display_notification_avatars(): avatar = SkypeAvatar(call.PartnerHandle) if avatar.filename: icon = avatar.filename else: icon = "/usr/share/skype-wrapper/icons/skype-wrapper-48.svg" partner = call.PartnerDisplayName or call.PartnerHandle notification = "" if status == "RINGING" and (call.Type == "INCOMING_P2P" or call.Type == "INCOMING_PSTN"): notification = "* Incoming call"; if status == "INPROGRESS": notification = "* Call started"; if status == "MISSED": notification = "* Missed call"; if status == "FINISHED": notification = "* Call ended"; if status == "REMOTEHOLD": notification = "* Call put on hold"; if notification: helpers.notify(partner, notification, icon, "call://"+call.PartnerHandle, True, True)
def user_online_status(self, user, online_text): name = user.DisplayName or user.FullName or user.Handle log("User "+name+" "+online_text, INFO) if not settings.get_notify_on_useronlinestatuschange() or self.skype.skype_presence == Skype4Py.cusDoNotDisturb or user.Handle == 'echo123': return icon = "" if settings.get_display_notification_avatars(): avatar = SkypeAvatar(user.Handle) if avatar.filename: icon = '-i "'+avatar.filename+'" ' else: icon = '-i "/usr/share/skype-wrapper/icons/skype-wrapper-48.svg" ' os.system('notify-send --urgency low '+icon+'"'+name+'" "'+online_text+'"');
def user_online_status(self, user, online_text): name = user.DisplayName or user.FullName or user.Handle log("User "+name+" "+online_text, INFO) if not settings.get_notify_on_useronlinestatuschange() or self.skype.skype_presence == Skype4Py.cusDoNotDisturb or user.Handle == 'echo123': return icon = "" if settings.get_display_notification_avatars(): avatar = SkypeAvatar(user.Handle) if avatar.filename: icon = avatar.filename else: icon = "/usr/share/skype-wrapper/icons/skype-wrapper-48.svg" helpers.notify(name, online_text, icon, "online://"+user.Handle, False, False)
def user_online_status(self, username, fullname, online_text): log("User "+username+" "+online_text, INFO) if not settings.get_notify_on_useronlinestatuschange() or self.skype.skype_presence == Skype4Py.cusDoNotDisturb or username == 'echo123': return icon = "" if settings.get_display_notification_avatars(): avatar = SkypeAvatar(username) if avatar.filename: icon = '-i "'+avatar.filename+'" ' else: icon = '-i "/usr/share/skype-wrapper/icons/skype-wrapper-48.svg" ' if not fullname: fullname = username os.system('notify-send '+icon+'"'+fullname+'" "'+online_text+'"');
def file_transfer_event(self, transfer, text): if self.skype.skype_presence == Skype4Py.cusDoNotDisturb: return if str(transfer.status) == 'INCOMING' and not settings.get_notify_on_incoming_filetransfer(): return if str(transfer.status) == 'OUTGOING' and not settings.get_notify_on_outgoing_filetransfer(): return icon = "" if settings.get_display_notification_avatars(): avatar = SkypeAvatar(transfer.partner_username) if avatar.filename: icon = '-i "'+avatar.filename+'" ' else: icon = '-i "/usr/share/skype-wrapper/icons/skype-wrapper-48.svg" ' os.system(u'notify-send --urgency critical '+icon+'"File Transfer" "'+text+'"')
def file_transfer_event(self, transfer, text): if self.skype.skype_presence == Skype4Py.cusDoNotDisturb: return if str(transfer.status) == 'INCOMING' and not settings.get_notify_on_incoming_filetransfer(): return if str(transfer.status) == 'OUTGOING' and not settings.get_notify_on_outgoing_filetransfer(): return icon = "" if settings.get_display_notification_avatars(): avatar = SkypeAvatar(transfer.partner_username) if avatar.filename: icon = avatar.filename else: icon = "/usr/share/skype-wrapper/icons/skype-wrapper-48.svg" helpers.notify("File Transfer", text, icon, "filetransfer"+transfer.partner_username, True, True)
def CallStatus(self, call, status): if status == "RINGING": self.call_ringing = self.call_ringing + 1 self.calls[call.PartnerHandle] = call else: self.call_ringing = self.call_ringing - 1 #if status == "INPROGRESS":LOCALHOLD if (status == "MISSED" or status == "FINISHED") and call.PartnerHandle in self.calls: del self.calls[call.PartnerHandle] unitylauncher.createCallsQuickList(self.calls, self.cb_call_action) unitylauncher.redrawQuicklist() # wiggle the launcher if self.call_ringing > 0 and not self.calls_ringing_started: unitylauncher.urgent() GObject.timeout_add(1000, self.calls_ringing) icon = "" if settings.get_display_notification_avatars(): avatar = SkypeAvatar(call.PartnerHandle) if avatar.filename: icon = avatar.filename else: icon = "/usr/share/skype-wrapper/icons/skype-wrapper-48.svg" partner = call.PartnerDisplayName or call.PartnerHandle notification = "" if status == "RINGING": notification = "* Incoming call"; if status == "INPROGRESS": notification = "* Call started"; if status == "MISSED": notification = "* Missed call"; if status == "FINISHED": notification = "* Call ended"; if status == "REMOTEHOLD": notification = "* Call put on hold"; if notification: helpers.notify(partner, notification, icon, "call://"+call.PartnerHandle, True, True)
def new_message(self, conversation): if not settings.get_notify_on_messagerecieve() or self.skype.skype_presence == Skype4Py.cusDoNotDisturb: return #conversation.skypereturn.Chat.Type == Skype4Py.chatTypeMultiChat and if conversation.skypereturn.Chat.Topic: group_chat_title = unicode(conversation.skypereturn.Sender.FullName + " ► " + conversation.skypereturn.Chat.Topic) else: group_chat_title = unicode(conversation.display_name) icon = "" if settings.get_display_notification_avatars(): avatar = SkypeAvatar(conversation.skypereturn.Sender.Handle) if avatar.filename: icon = '-i "'+avatar.filename+'" ' else: icon = '-i "/usr/share/skype-wrapper/icons/skype-wrapper-48.svg" ' if helpers.haveUnity(): unitylauncher.count(len(self.indicators) + self.skype.incomingfilecount) unitylauncher.createUnreadMessageQuickList(self.skype.unread_conversations, self.show_conversation_quicklist) unitylauncher.redrawQuicklist() unitylauncher.count(len(self.indicators) + self.skype.incomingfilecount) os.system(u'notify-send '+icon+'"'+group_chat_title+'" "'+conversation.skypereturn.Body+'"');