Exemple #1
0
  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 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 reset_indicators(self) :
   del self.indicators
   self.indicators = {}
   for _id in self.skype.unread_conversations:
       self.show_indicator(self.skype.unread_conversations[int(_id)])
   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)
Exemple #4
0
 def reset_indicators(self) :
   del self.indicators
   self.indicators = {}
   for _id in self.skype.unread_conversations:
       self.show_indicator(self.skype.unread_conversations[int(_id)])
   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)
 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+'"');