def __init__(self): super(Blink, self).__init__(sys.argv) self.setAttribute(Qt.AA_DontShowIconsInMenus, False) self.sip_application = SIPApplication() self.first_run = False self.setOrganizationDomain("ag-projects.com") self.setOrganizationName("AG Projects") self.setApplicationName("Blink") self.setApplicationVersion(__version__) self.main_window = MainWindow() self.chat_window = ChatWindow() self.main_window.__closed__ = True self.chat_window.__closed__ = True self.main_window.installEventFilter(self) self.chat_window.installEventFilter(self) self.main_window.addAction(self.chat_window.control_button.actions.main_window) self.chat_window.addAction(self.main_window.quit_action) self.chat_window.addAction(self.main_window.help_action) self.chat_window.addAction(self.main_window.redial_action) self.chat_window.addAction(self.main_window.join_conference_action) self.chat_window.addAction(self.main_window.mute_action) self.chat_window.addAction(self.main_window.silent_action) self.chat_window.addAction(self.main_window.preferences_action) self.chat_window.addAction(self.main_window.transfers_window_action) self.chat_window.addAction(self.main_window.logs_window_action) self.chat_window.addAction(self.main_window.received_files_window_action) self.chat_window.addAction(self.main_window.screenshots_window_action) self.ip_address_monitor = IPAddressMonitor() self.log_manager = LogManager() self.presence_manager = PresenceManager() self.session_manager = SessionManager() self.update_manager = UpdateManager() # Prevent application from exiting after last window is closed if system tray was initialized if self.main_window.system_tray_icon: self.setQuitOnLastWindowClosed(False) self.main_window.check_for_updates_action.triggered.connect(self.update_manager.check_for_updates) self.main_window.check_for_updates_action.setVisible(self.update_manager != Null) if getattr(sys, "frozen", False): XMLDocument.schema_path = Resources.get("xml-schemas") Account.register_extension(AccountExtension) BonjourAccount.register_extension(BonjourAccountExtension) Contact.register_extension(ContactExtension) Group.register_extension(GroupExtension) SIPSimpleSettings.register_extension(SIPSimpleSettingsExtension) notification_center = NotificationCenter() notification_center.add_observer(self, sender=self.sip_application) branding.setup(self)
def __init__(self): super(Blink, self).__init__(sys.argv) self.setAttribute(Qt.AA_DontShowIconsInMenus, False) self.sip_application = SIPApplication() self.first_run = False self.setOrganizationDomain("ag-projects.com") self.setOrganizationName("AG Projects") self.setApplicationName("Blink") self.setApplicationVersion(__version__) self.main_window = MainWindow() self.chat_window = ChatWindow() self.main_window.__closed__ = True self.chat_window.__closed__ = True self.main_window.installEventFilter(self) self.chat_window.installEventFilter(self) self.main_window.addAction(self.chat_window.control_button.actions.main_window) self.chat_window.addAction(self.main_window.quit_action) self.chat_window.addAction(self.main_window.help_action) self.chat_window.addAction(self.main_window.redial_action) self.chat_window.addAction(self.main_window.join_conference_action) self.chat_window.addAction(self.main_window.mute_action) self.chat_window.addAction(self.main_window.silent_action) self.chat_window.addAction(self.main_window.preferences_action) self.chat_window.addAction(self.main_window.transfers_window_action) self.chat_window.addAction(self.main_window.logs_window_action) self.chat_window.addAction(self.main_window.received_files_window_action) self.chat_window.addAction(self.main_window.screenshots_window_action) self.ip_address_monitor = IPAddressMonitor() self.log_manager = LogManager() self.presence_manager = PresenceManager() self.session_manager = SessionManager() self.update_manager = UpdateManager() # Prevent application from exiting after last window is closed if system tray was initialized if self.main_window.system_tray_icon: self.setQuitOnLastWindowClosed(False) self.main_window.check_for_updates_action.triggered.connect(self.update_manager.check_for_updates) self.main_window.check_for_updates_action.setVisible(self.update_manager != Null) if getattr(sys, 'frozen', False): XMLDocument.schema_path = Resources.get('xml-schemas') Account.register_extension(AccountExtension) BonjourAccount.register_extension(BonjourAccountExtension) Contact.register_extension(ContactExtension) Group.register_extension(GroupExtension) SIPSimpleSettings.register_extension(SIPSimpleSettingsExtension) notification_center = NotificationCenter() notification_center.add_observer(self, sender=self.sip_application) branding.setup(self)