on_tabbed_chat_window_motion_notify_event never gets called. I commit so everyone can have a look why

This commit is contained in:
Nikos Kouremenos 2005-07-21 22:38:22 +00:00
parent 532d93f527
commit f63545c757
3 changed files with 9 additions and 4 deletions

View File

@ -528,9 +528,6 @@ class Chat:
def on_conversation_textview_motion_notify_event(self, widget, event):
'''change the cursor to a hand when we are over a mail or an url'''
jid = self.get_active_jid()
if self.widget_name == 'tabbed_chat_window':
self.mouse_over_in_last_5_secs = True
self.mouse_over_in_last_30_secs = True
x, y, spam = widget.window.get_pointer()
x, y = widget.window_to_buffer_coords(gtk.TEXT_WINDOW_TEXT, x, y)
tags = widget.get_iter_at_location(x, y).get_tags()

View File

@ -9929,9 +9929,9 @@ Custom</property>
<signal name="focus_in_event" handler="on_tabbed_chat_window_focus_in_event" last_modification_time="Wed, 02 Mar 2005 17:57:33 GMT"/>
<signal name="delete_event" handler="on_tabbed_chat_window_delete_event" last_modification_time="Mon, 07 Mar 2005 11:06:00 GMT"/>
<signal name="destroy" handler="on_tabbed_chat_window_destroy" last_modification_time="Mon, 07 Mar 2005 16:35:25 GMT"/>
<signal name="event" handler="on_tabbed_chat_window_event"/>
<signal name="button_press_event" handler="on_tabbed_chat_window_button_press_event" last_modification_time="Fri, 24 Jun 2005 23:54:20 GMT"/>
<signal name="focus_out_event" handler="on_tabbed_chat_window_focus_out_event" last_modification_time="Mon, 18 Jul 2005 22:07:30 GMT"/>
<signal name="motion_notify_event" handler="on_tabbed_chat_window_motion_notify_event" last_modification_time="Thu, 21 Jul 2005 22:24:26 GMT"/>
<child>
<widget class="GtkNotebook" id="chat_notebook">

View File

@ -66,6 +66,8 @@ class TabbedChatWindow(chat.Chat):
self.on_chat_notebook_key_press_event)
self.xml.signal_connect('on_chat_notebook_switch_page',
self.on_chat_notebook_switch_page)
self.xml.signal_connect('on_tabbed_chat_window_motion_notify_event',
self.on_tabbed_chat_window_motion_notify_event)
if gajim.config.get('saveposition'):
# get window position and size from config
@ -88,6 +90,12 @@ class TabbedChatWindow(chat.Chat):
self.xmls[jid].get_widget('gpg_togglebutton').set_active(
var['gpg_enabled'])
def on_tabbed_chat_window_motion_notify_event(self, widget, event):
print widget, widget.is_focus()
if widget.is_focus(): # change chatstate only if window has focus
self.mouse_over_in_last_5_secs = True
self.mouse_over_in_last_30_secs = True
def draw_widgets(self, contact):
"""draw the widgets in a tab (status_image, contact_button ...)
according to the the information in the contact variable"""