we now have "print_ichat_every_foo_minutes" in expert.

This commit is contained in:
Nikos Kouremenos 2005-07-24 20:29:32 +00:00
parent 26b5bee4d1
commit ec7fd8af99
3 changed files with 13 additions and 1 deletions

View File

@ -916,7 +916,10 @@ class Chat:
buffer.insert_with_tags_by_name(end_iter, tim_format + ' ',
*other_tags_for_time)
elif gajim.config.get('print_time') == 'sometimes':
if (time.time() - self.last_time_printout[jid]) > (5*60):
every_foo_seconds = 60 * gajim.config.get(
'print_ichat_every_foo_minutes')
seconds_passed = time.time() - self.last_time_printout[jid]
if seconds_passed > every_foo_seconds:
self.last_time_printout[jid] = time.time()
end_iter = buffer.get_end_iter()
tim = time.localtime()

View File

@ -118,6 +118,7 @@ class Config:
'always_english_wikipedia': [opt_bool, False],
'use_dbus': [opt_bool, True], # allow control via dbus service
'send_receive_chat_state_notifications': [opt_bool, True],
'print_ichat_every_foo_minutes': [opt_int, 5], # default is every 5 minutes
}
__options_per_key = {

View File

@ -192,6 +192,10 @@ class PreferencesWindow:
self.xml.get_widget('speller_checkbutton').set_sensitive(False)
#Print time
st = gajim.config.get('print_ichat_every_foo_minutes')
text = _('Every %s _minutes') % st
self.xml.get_widget('time_sometimes_radiobutton').set_label(text)
if gajim.config.get('print_time') == 'never':
self.xml.get_widget('time_never_radiobutton').set_active(True)
elif gajim.config.get('print_time') == 'sometimes':
@ -394,6 +398,10 @@ class PreferencesWindow:
def on_preferences_window_show(self, widget):
self.notebook.set_current_page(0)
st = gajim.config.get('print_ichat_every_foo_minutes')
text = _('Every %s _minutes') % st
self.xml.get_widget('time_sometimes_radiobutton').set_label(text)
def on_preferences_window_key_press_event(self, widget, event):
if event.keyval == gtk.keysyms.Escape: