add code back and try to please everybody

This commit is contained in:
Nikos Kouremenos 2005-09-05 00:24:26 +00:00
parent c268a9f223
commit de0ee5c703
2 changed files with 11 additions and 2 deletions

View File

@ -126,6 +126,7 @@ class Config:
'always_english_wiktionary': [opt_bool, False],
'use_dbus': [opt_bool, True, _('Allow controlling Gajim via D-Bus service.')],
'chat_state_notifications': [opt_str, 'all'], # 'all', 'composing_only', 'disabled'
'chat_state_send_inactive_on_focus_out': [opt_str, True, _('Should Gajim send inactive ("is doing something else") on just focus out of window or when we switch to another tab')],
'autodetect_browser_mailer': [opt_bool, True],
'print_ichat_every_foo_minutes': [opt_int, 5],
'confirm_close_muc': [opt_bool, True, _('Ask before closing a group chat tab/window.')],
@ -146,7 +147,7 @@ class Config:
'tabs_close_button': [opt_bool, True, _('Show close button in tab?')],
'avatar_width': [opt_int, 52],
'avatar_height': [opt_int, 52],
'quit_on_roster_x_button': [opt_bool, False, _('If True, quits Gajim when X button of Window Manager is clicked. This option make sense only if trayicon is used.')],
'quit_on_roster_x_button': [opt_bool, False, _('If True, quits Gajim when X button of Window Manager is clicked. This option make sense only if trayicon is used.')],
}
__options_per_key = {

View File

@ -298,11 +298,19 @@ timestamp, contact):
def on_tabbed_chat_window_focus_out_event(self, widget, event):
'''catch focus out and minimized and send inactive chatstate;
minimize action also focuses out first so it's catched here'''
chat.Chat.on_chat_window_focus_out_event(self, widget, event)
window_state = widget.window.get_state()
if window_state is None:
return
# focus-out is also emitted by showing context menu
# so check to see if we're really not paying attention to window/tab
# NOTE: if the user changes tab, switch-tab sends inactive to the tab
# we are leaving so we just send to active tab here
if self.popup_is_shown is False and gajim.config.get('chat_state_send_inactive_on_focus_out'):
# we are outside of the window
# so no context menu, so send 'inactive' to active tab
self.send_chatstate('inactive')
def on_chat_notebook_key_press_event(self, widget, event):
chat.Chat.on_chat_notebook_key_press_event(self, widget, event)