def cb_call_action(self, widget, data = None): log("Quicklist showing conversation", INFO) id = widget.property_get("id") action = widget.property_get("action") if not id in self.calls: return if action == 'HOLD': self.calls[id].Hold() if action == 'FINISH': self.calls[id].Finish() if action == 'ANSWER': self.calls[id].Answer() if action == 'RESUME': self.calls[id].Resume() if action == 'VIDEOOUT': self.calls[id].StartVideoSend() if action == 'VIDEOIN': self.calls[id].StartVideoReceive() if action == 'ENDVIDEOOUT': self.calls[id].StopVideoSend() if action == 'ENDVIDEOIN': self.calls[id].StopVideoReceive() if action == 'MUTE': self.skype._SetMute(True) if action == 'UNMUTE': self.skype._SetMute(False) unitylauncher.createCallsQuickList(self.calls, self.cb_call_action) unitylauncher.redrawQuicklist()
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 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)