comparison cagou/plugins/plugin_wid_chat.py @ 406:03554ad70846

common (jidSelector): replace implitict_update mechanism by real-time update: instead of having the possibility to (de)activate implicit update, real time update of items is now done. For now only the notifications and opened chat items are updated in real time.
author Goffi <goffi@goffi.org>
date Wed, 12 Feb 2020 20:02:58 +0100
parents f7476818f9fb
children 2caea63ae2ab
comparison
equal deleted inserted replaced
405:84ff5c917064 406:03554ad70846
432 def screenManagerInit(self, screen_manager): 432 def screenManagerInit(self, screen_manager):
433 screen_manager.transition = screenmanager.SlideTransition(direction='down') 433 screen_manager.transition = screenmanager.SlideTransition(direction='down')
434 sel_screen = Screen(name='chat_selector') 434 sel_screen = Screen(name='chat_selector')
435 chat_selector = ChatSelector(profile=self.profile) 435 chat_selector = ChatSelector(profile=self.profile)
436 sel_screen.add_widget(chat_selector) 436 sel_screen.add_widget(chat_selector)
437 sel_screen.bind(on_pre_enter=chat_selector.on_pre_enter)
438 screen_manager.add_widget(sel_screen) 437 screen_manager.add_widget(sel_screen)
439 if self.show_chat_selector: 438 if self.show_chat_selector:
440 transition = screen_manager.transition 439 transition = screen_manager.transition
441 screen_manager.transition = NoTransition() 440 screen_manager.transition = NoTransition()
442 screen_manager.current = 'chat_selector' 441 screen_manager.current = 'chat_selector'
914 jid_selector = properties.ObjectProperty() 913 jid_selector = properties.ObjectProperty()
915 profile = properties.StringProperty() 914 profile = properties.StringProperty()
916 plugin_info_class = Chat 915 plugin_info_class = Chat
917 use_header_input = True 916 use_header_input = True
918 917
919 def on_pre_enter(self, screen):
920 self.jid_selector.update()
921
922 def on_select(self, contact_button): 918 def on_select(self, contact_button):
923 contact_jid = jid.JID(contact_button.jid) 919 contact_jid = jid.JID(contact_button.jid)
924 plugin_info = G.host.getPluginInfo(main=Chat) 920 plugin_info = G.host.getPluginInfo(main=Chat)
925 factory = plugin_info['factory'] 921 factory = plugin_info['factory']
926 self.screen_manager.transition.direction = 'up' 922 self.screen_manager.transition.direction = 'up'