Fixed totally broken trayicon_notification_on_new_messages behaviour, change name to
trayicon_notification_on_events and do what's expected
This commit is contained in:
parent
b50d3b86ba
commit
a8354e1132
|
@ -560,7 +560,7 @@ class ChatControlBase(MessageControl):
|
|||
gc_message = False
|
||||
if self.type_id == message_control.TYPE_GC:
|
||||
gc_message = True
|
||||
if self.notify_on_new_messages() or \
|
||||
if not gc_message or \
|
||||
(gc_message and other_tags_for_text == ['marked']):
|
||||
# we want to have save this message in events list
|
||||
# other_tags_for_text == ['marked'] --> highlighted gc message
|
||||
|
@ -580,11 +580,11 @@ class ChatControlBase(MessageControl):
|
|||
gajim.interface.roster.draw_contact(self.contact.jid,
|
||||
self.account)
|
||||
self.parent_win.redraw_tab(self)
|
||||
ctrl = gajim.interface.msg_win_mgr.get_control(full_jid, self.account)
|
||||
ctrl = gajim.interface.msg_win_mgr.get_control(full_jid, self.account)
|
||||
if not self.parent_win.is_active():
|
||||
self.parent_win.show_title(True, ctrl) # Enabled Urgent
|
||||
self.parent_win.show_title(True, ctrl) # Enabled Urgent hint
|
||||
else:
|
||||
self.parent_win.show_title(False, ctrl) # Disabled Urgent
|
||||
self.parent_win.show_title(False, ctrl) # Disabled Urgent hint
|
||||
|
||||
def toggle_emoticons(self):
|
||||
'''hide show emoticons_button and make sure emoticons_menu is always there
|
||||
|
@ -899,9 +899,6 @@ class ChatControl(ChatControlBase):
|
|||
# restore previous conversation
|
||||
self.restore_conversation()
|
||||
|
||||
def notify_on_new_messages(self):
|
||||
return gajim.config.get('trayicon_notification_on_new_messages')
|
||||
|
||||
def on_avatar_eventbox_enter_notify_event(self, widget, event):
|
||||
'''we enter the eventbox area so we under conditions add a timeout
|
||||
to show a bigger avatar after 0.5 sec'''
|
||||
|
|
|
@ -165,7 +165,7 @@ class Config:
|
|||
'roster_font': [opt_str, ''],
|
||||
'use_kib_mib': [opt_bool, False, _('IEC standard says KiB = 1024 bytes, KB = 1000 bytes.')],
|
||||
'notify_on_all_muc_messages': [opt_bool, False],
|
||||
'trayicon_notification_on_new_messages': [opt_bool, True],
|
||||
'trayicon_notification_on_events': [opt_bool, True, _('Notify of events in the system trayicon.')],
|
||||
'last_save_dir': [opt_str, ''],
|
||||
'last_send_dir': [opt_str, ''],
|
||||
'last_emoticons_dir': [opt_str, ''],
|
||||
|
|
|
@ -2,4 +2,4 @@ docdir = '../'
|
|||
|
||||
datadir = '../'
|
||||
|
||||
version = '0.10.1.6'
|
||||
version = '0.10.1.7'
|
||||
|
|
|
@ -151,6 +151,8 @@ class OptionsParser:
|
|||
self.update_config_to_01015()
|
||||
if old < [0, 10, 1, 6] and new >= [0, 10, 1, 6]:
|
||||
self.update_config_to_01016()
|
||||
if old < [0, 10, 1, 7] and new >= [0, 10, 1, 7]:
|
||||
self.update_config_to_01017()
|
||||
|
||||
gajim.logger.init_vars()
|
||||
gajim.config.set('version', new_version)
|
||||
|
@ -336,5 +338,12 @@ class OptionsParser:
|
|||
gajim.config.get_per('soundevents', 'muc_message_received', 'enabled'):
|
||||
gajim.config.set_per('soundevents',\
|
||||
'muc_message_received', 'enabled', False)
|
||||
|
||||
gajim.config.set('version', '0.10.1.6')
|
||||
|
||||
def update_config_to_01017(self):
|
||||
'''trayicon_notification_on_new_messages ->
|
||||
trayicon_notification_on_events '''
|
||||
if self.old_values.has_key('trayicon_notification_on_new_messages'):
|
||||
gajim.config.set('trayicon_notification_on_events',
|
||||
self.old_values['trayicon_notification_on_new_messages'])
|
||||
gajim.config.set('version', '0.10.1.7')
|
||||
|
|
|
@ -54,14 +54,14 @@ def get_show_in_roster(event, account, contact):
|
|||
return True
|
||||
|
||||
def get_show_in_systray(event, account, contact):
|
||||
'''Return True if this event must be shown in roster, else False'''
|
||||
'''Return True if this event must be shown in systray, else False'''
|
||||
num = get_advanced_notification(event, account, contact)
|
||||
if num != None:
|
||||
if gajim.config.get_per('notifications', str(num), 'systray') == 'yes':
|
||||
return True
|
||||
if gajim.config.get_per('notifications', str(num), 'systray') == 'no':
|
||||
return False
|
||||
return True
|
||||
return gajim.config.get('trayicon_notification_on_events')
|
||||
|
||||
def get_advanced_notification(event, account, contact):
|
||||
'''Returns the number of the first (top most)
|
||||
|
|
Loading…
Reference in New Issue