예제 #1
0
    def unsubscribe_signals(self):
        """ unsubscribes current session's signals """
        self.session.config.unsubscribe(self._on_avatarsize_changed, "i_conv_avatar_size")
        self.session.config.unsubscribe(self._on_show_toolbar_changed, "b_show_toolbar")
        self.session.config.unsubscribe(self._on_show_header_changed, "b_show_header")
        self.session.config.unsubscribe(self._on_show_info_changed, "b_show_info")
        self.session.config.unsubscribe(self._on_show_avatar_onleft, "b_avatar_on_left")
        self.session.config.unsubscribe(self._on_icon_size_change, "b_toolbar_small")
        self.session.signals.picture_change_succeed.unsubscribe(self.on_picture_change_succeed)
        self.session.signals.contact_attr_changed.unsubscribe(self.on_contact_attr_changed_succeed)

        self.session.signals.filetransfer_invitation.unsubscribe(self.on_filetransfer_invitation)
        self.session.signals.filetransfer_accepted.unsubscribe(self.on_filetransfer_accepted)
        self.session.signals.filetransfer_progress.unsubscribe(self.on_filetransfer_progress)
        self.session.signals.filetransfer_completed.unsubscribe(self.on_filetransfer_completed)
        self.session.signals.filetransfer_rejected.unsubscribe(self.on_filetransfer_rejected)
        self.session.signals.filetransfer_canceled.unsubscribe(self.on_filetransfer_canceled)

        self.session.signals.call_invitation.unsubscribe(self.on_call_invitation)

        self.session.signals.contact_block_succeed.unsubscribe(self.on_contact_block_succeed)
        self.session.signals.contact_unblock_succeed.unsubscribe(self.on_contact_unblock_succeed)

        extension.unsubscribe(self.on_conversation_info_extension_changed, "conversation info")
        extension.unsubscribe(self.on_below_conversation_changed, "below conversation")
        if self.below_conversation:
            self.below_conversation = None
예제 #2
0
    def on_close(self):
        '''called when the conversation is closed'''
        self.unsubscribe_signals()
        extension.unsubscribe(self.on_below_conversation_changed, 'below conversation')
        extension.unsubscribe(self.on_conversation_info_extension_changed, 'conversation info')
        if self.below_conversation:
            self.below_conversation = None

        self.destroy()
        self.info.destroy()
        self.header.destroy()
예제 #3
0
    def unsubscribe_signals(self):
        ''' unsubscribes current session's signals '''
        self.session.config.unsubscribe(self._on_avatarsize_changed,
                                        'i_conv_avatar_size')
        self.session.config.unsubscribe(self._on_show_toolbar_changed,
                                        'b_show_toolbar')
        self.session.config.unsubscribe(self._on_show_header_changed,
                                        'b_show_header')
        self.session.config.unsubscribe(self._on_show_info_changed,
                                        'b_show_info')
        self.session.config.unsubscribe(self._on_show_avatar_onleft,
                                        'b_avatar_on_left')
        self.session.config.unsubscribe(self._on_icon_size_change,
                                        'b_toolbar_small')
        self.session.signals.picture_change_succeed.unsubscribe(
            self.on_picture_change_succeed)
        self.session.signals.contact_attr_changed.unsubscribe(
            self.on_contact_attr_changed_succeed)

        self.session.signals.filetransfer_invitation.unsubscribe(
            self.on_filetransfer_invitation)
        self.session.signals.filetransfer_accepted.unsubscribe(
            self.on_filetransfer_accepted)
        self.session.signals.filetransfer_progress.unsubscribe(
            self.on_filetransfer_progress)
        self.session.signals.filetransfer_completed.unsubscribe(
            self.on_filetransfer_completed)
        self.session.signals.filetransfer_rejected.unsubscribe(
            self.on_filetransfer_rejected)
        self.session.signals.filetransfer_canceled.unsubscribe(
            self.on_filetransfer_canceled)

        self.session.signals.call_invitation.unsubscribe(
            self.on_call_invitation)

        self.session.signals.contact_block_succeed.unsubscribe(
            self.on_contact_block_succeed)
        self.session.signals.contact_unblock_succeed.unsubscribe(
            self.on_contact_unblock_succeed)

        extension.unsubscribe(self.on_conversation_info_extension_changed,
                              'conversation info')
        extension.unsubscribe(self.on_below_conversation_changed,
                              'below conversation')
        if self.below_conversation:
            self.below_conversation = None
예제 #4
0
 def remove_subscriptions(self):
     if self.session:
         self.session.signals.conv_message.unsubscribe(self._on_message)
         self.session.signals.user_typing.unsubscribe(self._on_user_typing)
         self.session.signals.contact_attr_changed.unsubscribe(
             self._on_contact_attr_changed)
         self.session.signals.mail_received.unsubscribe(
             self._on_mail_received)
         self.session.signals.filetransfer_completed.unsubscribe(
             self._on_filetransfer_completed)
         self.session.signals.filetransfer_canceled.unsubscribe(
             self._on_filetransfer_canceled)
         self.session.signals.filetransfer_invitation.unsubscribe(
             self._on_filetransfer_invitation)
     extension.unsubscribe(self._on_notification_gui_changed,
                           'notificationGUI')
     extension.unsubscribe(self._on_notification_image_changed,
                           'notificationImage')
예제 #5
0
 def remove_subscriptions(self):
     if self.session:
         self.session.signals.conv_message.unsubscribe(
             self._on_message)
         self.session.signals.user_typing.unsubscribe(
             self._on_user_typing)
         self.session.signals.contact_attr_changed.unsubscribe(
             self._on_contact_attr_changed)
         self.session.signals.mail_received.unsubscribe(
             self._on_mail_received)
         self.session.signals.filetransfer_completed.unsubscribe(
             self._on_filetransfer_completed)
         self.session.signals.filetransfer_canceled.unsubscribe(
             self._on_filetransfer_canceled)
         self.session.signals.filetransfer_invitation.unsubscribe(
             self._on_filetransfer_invitation)
     extension.unsubscribe(self._on_notification_gui_changed, 'notificationGUI')
     extension.unsubscribe(self._on_notification_image_changed, 'notificationImage')
예제 #6
0
 def _remove_subscriptions(self):
     '''remove the subscriptions to signals'''
     if self.session is not None:
         signals = self.session.signals
         signals.close.unsubscribe(self.on_close)
         signals.login_succeed.unsubscribe(self.on_login_succeed)
         signals.login_failed.unsubscribe(self.on_login_failed)
         signals.contact_list_ready.unsubscribe(self.on_contact_list_ready)
         signals.conv_first_action.unsubscribe(self.on_new_conversation)
         signals.disconnected.unsubscribe(self.on_disconnected)
         signals.picture_change_succeed.unsubscribe(
                 self.on_picture_change_succeed)
         if self.unity_launcher is not None:
             self.unity_launcher.remove_session()
         # unsubscribe notifications signals
         if self.notification:
             self.notification.remove_subscriptions()
             self.notification = None
         extension.unsubscribe(self._on_tray_icon_changed, 'tray icon')
예제 #7
0
    def remove_subscriptions(self):
        '''unsubscribe all signals'''
        self.session.signals.message_change_succeed.unsubscribe(
            self.on_message_change_succeed)
        self.session.signals.media_change_succeed.unsubscribe(
            self.on_media_change_succeed)
        if self.session.session_has_service(e3.Session.SERVICE_STATUS):
            self.session.signals.status_change_succeed.unsubscribe(
                self.on_status_change_succeed)
        self.session.signals.contact_list_ready.unsubscribe(
            self.on_contact_list_ready)
        self.session.signals.picture_change_succeed.unsubscribe(
            self.on_picture_change_succeed)
        self.session.signals.profile_get_succeed.unsubscribe(
            self.on_profile_update_succeed)
        self.session.signals.profile_set_succeed.unsubscribe(
            self.on_profile_update_succeed)

        extension.unsubscribe(self._on_userpanel_button_changed,
                              "userpanel button")
예제 #8
0
    def remove_subscriptions(self):
        '''unsubscribe all signals'''
        self.session.signals.message_change_succeed.unsubscribe(
            self.on_message_change_succeed)
        self.session.signals.media_change_succeed.unsubscribe(
            self.on_media_change_succeed)
        if self.session.session_has_service(e3.Session.SERVICE_STATUS):
            self.session.signals.status_change_succeed.unsubscribe(
                self.on_status_change_succeed)
        self.session.signals.contact_list_ready.unsubscribe(
            self.on_contact_list_ready)
        self.session.signals.picture_change_succeed.unsubscribe(
            self.on_picture_change_succeed)
        self.session.signals.profile_get_succeed.unsubscribe(
            self.on_profile_update_succeed)
        self.session.signals.profile_set_succeed.unsubscribe(
            self.on_profile_update_succeed)

        extension.unsubscribe(
            self._on_userpanel_button_changed, "userpanel button")
예제 #9
0
    def unsubscribe_signals(self):
        '''callback called when the disconnect option is selected'''
        self.session.signals.mail_count_changed.unsubscribe(
            self._on_mail_count_changed)
        self.session.signals.broken_profile.unsubscribe(
            self._on_broken_profile)
        self.session.signals.social_request.unsubscribe(
            self._on_social_request)

        #extension changes
        extension.unsubscribe(self._on_below_userlist_changed,
                              "below userlist")
        extension.unsubscribe(self._on_below_menu_changed, "below menu")
        extension.unsubscribe(self._on_below_panel_changed, "below panel")

        if self.below_userlist:
            self.below_userlist = None

        if self.below_menu:
            self.below_menu = None

        if self.below_panel:
            self.below_panel = None

        self.session.config.unsubscribe(self._on_show_userpanel_changed,
                                        'b_show_userpanel')
예제 #10
0
    def unsubscribe_signals(self, close=None):
        """callback called when the disconnect option is selected"""
        gui.MainWindowBase.unsubscribe_signals(self)

        # extension changes
        extension.unsubscribe(self._on_below_userlist_changed, "below userlist")
        extension.unsubscribe(self._on_below_menu_changed, "below menu")
        extension.unsubscribe(self._on_below_panel_changed, "below panel")

        if self.below_userlist:
            self.below_userlist = None

        if self.below_menu:
            self.below_menu = None

        if self.below_panel:
            self.below_panel = None

        self.menu.remove_subscriptions()

        self.contact_list.contact_selected.unsubscribe(self._on_contact_selected)
        self.contact_list.group_selected.unsubscribe(self._on_group_selected)
        self.contact_list.contact_menu_selected.unsubscribe(self._on_contact_menu_selected)

        if self.session.session_has_service(e3.Session.SERVICE_GROUP_MANAGING):
            self.contact_list.group_menu_selected.unsubscribe(self._on_group_menu_selected)
        self.contact_list.remove_subscriptions()
        self.session.config.unsubscribe(self._on_show_userpanel_changed, "b_show_userpanel")
        # self.session.signals.contact_attr_changed.unsubscribe(
        #    self._on_contact_attr_changed)
        self.panel.remove_subscriptions()
        self.panel = None
예제 #11
0
    def on_disconnect(self, close=None):
        '''callback called when the disconnect option is selected'''
        gui.MainWindowBase.on_disconnect(self)

        #extension changes
        extension.unsubscribe(self._on_below_userlist_changed,
                              "below userlist")
        extension.unsubscribe(self._on_below_menu_changed, "below menu")
        extension.unsubscribe(self._on_below_panel_changed, "below panel")

        if self.below_userlist:
            self.below_userlist = None

        if self.below_menu:
            self.below_v = None

        if self.below_panel:
            self.below_panel = None

        self.contact_list.contact_selected.unsubscribe(
            self._on_contact_selected)
        self.contact_list.group_selected.unsubscribe(self._on_group_selected)
        self.contact_list.contact_menu_selected.unsubscribe(
            self._on_contact_menu_selected)

        if self.session.session_has_service(e3.Session.SERVICE_GROUP_MANAGING):
            self.contact_list.group_menu_selected.unsubscribe(
                self._on_group_menu_selected)
        self.contact_list.remove_subscriptions()
        self.session.config.unsubscribe(self._on_show_userpanel_changed,
                                        'b_show_userpanel')
        self.session.config.unsubscribe(self._on_show_mail_inbox_changed,
                                        'b_show_mail_inbox')
        self.session.signals.contact_attr_changed.unsubscribe(
            self._on_contact_attr_changed)
        self.panel.remove_subscriptions()
        self.panel = None
        self.session.signals.close.unsubscribe(self.on_disconnect)
예제 #12
0
    def unsubscribe_signals(self):
        '''callback called when the disconnect option is selected'''
        self.session.signals.mail_count_changed.unsubscribe(
            self._on_mail_count_changed)
        self.session.signals.broken_profile.unsubscribe(self._on_broken_profile)
        self.session.signals.social_request.unsubscribe(self._on_social_request)

        #extension changes
        extension.unsubscribe(self._on_below_userlist_changed, "below userlist")
        extension.unsubscribe(self._on_below_menu_changed, "below menu")
        extension.unsubscribe(self._on_below_panel_changed, "below panel")

        if self.below_userlist:
            self.below_userlist = None

        if self.below_menu:
            self.below_menu = None

        if self.below_panel:
            self.below_panel = None

        self.session.config.unsubscribe(self._on_show_userpanel_changed,
            'b_show_userpanel')
예제 #13
0
 def __del__(self):
     if hasattr(extension, "unsubscribe"):
         extension.unsubscribe(self._on_extension_changed,'listening to')
     if self.music:
         self.music.stop()
예제 #14
0
 def __del__(self):
     extension.unsubscribe(self._on_nick_renderer_changed, 'nick renderer')
예제 #15
0
 def __del__(self):
     extension.unsubscribe(self._on_nick_renderer_changed, 'nick renderer')
예제 #16
0
 def remove_subscriptions(self):
     gui.ContactList.remove_subscriptions(self)
     extension.unsubscribe(self.on_nick_renderer_changed, 'nick renderer')
예제 #17
0
 def remove_subscriptions(self):
     gui.ContactList.remove_subscriptions(self)
     extension.unsubscribe(self.on_nick_renderer_changed, 'nick renderer')