add ACE log_contact_status_changes and expose to UI in advanced tab in misc. this replaces the previous options and imo is good to expose to that place (used to have log-related stuff)
This commit is contained in:
parent
8c3a624a77
commit
359824bec1
|
@ -161,6 +161,7 @@ class Config:
|
|||
'show_avatars_in_roster': [opt_bool, True],
|
||||
'ask_avatars_on_startup': [opt_bool, True, _('If True, Gajim will ask for avatar each contact that did not have an avatar last time or has one cache that is too old.')],
|
||||
'print_status_in_chats': [opt_bool, True, _('If False, you will no longer see status line in chats when a contact changes his or her status and/or his status message.')],
|
||||
'log_contact_status_changes': [opt_bool, True],
|
||||
}
|
||||
|
||||
__options_per_key = {
|
||||
|
|
|
@ -469,7 +469,8 @@ class Connection:
|
|||
self.dispatch('ERROR_ANSWER', ('', jid_stripped,
|
||||
errmsg, errcode))
|
||||
if not ptype or ptype == 'unavailable':
|
||||
gajim.logger.write('gcstatus', who, status, show)
|
||||
if gajim.config.get('log_contact_status_changes'):
|
||||
gajim.logger.write('gcstatus', who, status, show)
|
||||
self.dispatch('GC_NOTIFY', (jid_stripped, show, status, resource,
|
||||
prs.getRole(), prs.getAffiliation(), prs.getJid(),
|
||||
prs.getReason(), prs.getActor(), prs.getStatusCode(),
|
||||
|
@ -517,7 +518,8 @@ class Connection:
|
|||
else:
|
||||
self.vcard_shas[jid_stripped] = avatar_sha
|
||||
if not ptype or ptype == 'unavailable':
|
||||
gajim.logger.write('status', jid_stripped, status, show)
|
||||
if gajim.config.get('log_contact_status_changes'):
|
||||
gajim.logger.write('status', jid_stripped, status, show)
|
||||
self.dispatch('NOTIFY', (jid_stripped, show, status, resource, prio,
|
||||
keyID))
|
||||
# END presenceCB
|
||||
|
|
|
@ -399,6 +399,10 @@ class PreferencesWindow:
|
|||
self.xml.get_widget('custom_file_manager_entry').set_text(
|
||||
gajim.config.get('custom_file_manager'))
|
||||
|
||||
# log status changes of contacts
|
||||
st = gajim.config.get('log_contact_status_changes')
|
||||
self.xml.get_widget('log_show_changes_checkbutton').set_active(st)
|
||||
|
||||
# send os info
|
||||
st = gajim.config.get('send_os_info')
|
||||
self.xml.get_widget('send_os_info_checkbutton').set_active(st)
|
||||
|
@ -892,13 +896,14 @@ class PreferencesWindow:
|
|||
gajim.config.set('custom_file_manager', widget.get_text().decode('utf-8'))
|
||||
gajim.interface.save_config()
|
||||
|
||||
def on_log_show_changes_checkbutton_toggled(self, widget):
|
||||
self.on_checkbutton_toggled(widget, 'log_contact_status_changes')
|
||||
|
||||
def on_send_os_info_checkbutton_toggled(self, widget):
|
||||
gajim.config.set('send_os_info', widget.get_active())
|
||||
gajim.interface.save_config()
|
||||
self.on_checkbutton_toggled(widget, 'send_os_info')
|
||||
|
||||
def on_check_for_new_version_checkbutton_toggled(self, widget):
|
||||
gajim.config.set('check_for_new_version', widget.get_active())
|
||||
gajim.interface.save_config()
|
||||
self.on_checkbutton_toggled(widget, 'check_for_new_version')
|
||||
|
||||
def fill_msg_treeview(self):
|
||||
self.xml.get_widget('delete_msg_button').set_sensitive(False)
|
||||
|
@ -960,10 +965,8 @@ class PreferencesWindow:
|
|||
model = self.sound_tree.get_model()
|
||||
model.clear()
|
||||
for sound in sounds:
|
||||
val = gajim.config.get_per('soundevents', sound,
|
||||
'enabled')
|
||||
path = gajim.config.get_per('soundevents', sound,
|
||||
'path')
|
||||
val = gajim.config.get_per('soundevents', sound, 'enabled')
|
||||
path = gajim.config.get_per('soundevents', sound, 'path')
|
||||
iter = model.append((sound, val, path))
|
||||
|
||||
def on_treeview_sounds_cursor_changed(self, widget, data = None):
|
||||
|
|
|
@ -6087,6 +6087,26 @@ Custom</property>
|
|||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">6</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="log_show_changes_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">_Log status changes of contacts</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_log_show_changes_checkbutton_toggled" last_modification_time="Wed, 23 Nov 2005 23:16:56 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="send_os_info_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
|
|
Loading…
Reference in New Issue