Author: jim++
Date: 2007-03-31 15:40:23 +0200 (Sat, 31 Mar 2007)
New Revision: 8060
Modified:
trunk/data/glade/history_window.glade
trunk/data/glade/vcard_information_window.glade
trunk/src/history_window.py
trunk/src/vcard.py
Log:
Move log_for_this_contact checkbutton from vcard dialog to history dialog. So you can NOT
log some chatrooms. Fixes #2592.
Modified: trunk/data/glade/history_window.glade
===================================================================
--- trunk/data/glade/history_window.glade 2007-03-31 12:43:07 UTC (rev 8059)
+++ trunk/data/glade/history_window.glade 2007-03-31 13:40:23 UTC (rev 8060)
@@ -88,6 +88,25 @@
</child>
<child>
+ <widget class="GtkCheckButton" id="log_history_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Log conversation history</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">True</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkExpander" id="search_expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
Modified: trunk/data/glade/vcard_information_window.glade
===================================================================
--- trunk/data/glade/vcard_information_window.glade 2007-03-31 12:43:07 UTC (rev 8059)
+++ trunk/data/glade/vcard_information_window.glade 2007-03-31 13:40:23 UTC (rev 8060)
@@ -433,25 +433,6 @@
</child>
<child>
- <widget class="GtkCheckButton" id="log_history_checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Log conversation history</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
<widget class="GtkExpander" id="expander5">
<property name="visible">True</property>
<property name="can_focus">True</property>
Modified: trunk/src/history_window.py
===================================================================
--- trunk/src/history_window.py 2007-03-31 12:43:07 UTC (rev 8059)
+++ trunk/src/history_window.py 2007-03-31 13:40:23 UTC (rev 8060)
@@ -126,6 +126,14 @@
self.calendar.select_month(gtk_month, y)
self.calendar.select_day(d)
self.add_lines_for_date(y, m, d)
+
+ log = True
+ if self.jid in gajim.config.get_per('accounts', self.account,
+ 'no_log_for').split(' '):
+ log = False
+ checkbutton = xml.get_widget('log_history_checkbutton')
+ checkbutton.set_active(log)
+ checkbutton.connect('toggled', self.on_log_history_checkbutton_toggled)
self.window.show_all()
@@ -391,3 +399,20 @@
match_start_mark = self.history_buffer.create_mark('match_start',
match_start_iter, True)
self.history_textview.tv.scroll_to_mark(match_start_mark, 0, True)
+
+ def on_log_history_checkbutton_toggled(self, widget):
+ # log conversation history?
+ oldlog = True
+ no_log_for = gajim.config.get_per('accounts', self.account,
+ 'no_log_for').split()
+ if self.jid in no_log_for:
+ oldlog = False
+ log = widget.get_active()
+ if not log and not self.jid in no_log_for:
+ no_log_for.append(self.jid)
+ if log and self.jid in no_log_for:
+ no_log_for.remove(self.jid)
+ if oldlog != log:
+ gajim.config.set_per('accounts', self.account, 'no_log_for',
+ ' '.join(no_log_for))
+
Modified: trunk/src/vcard.py
===================================================================
--- trunk/src/vcard.py 2007-03-31 12:43:07 UTC (rev 8059)
+++ trunk/src/vcard.py 2007-03-31 13:40:23 UTC (rev 8060)
@@ -105,22 +105,6 @@
if event.keyval == gtk.keysyms.Escape:
self.window.destroy()
- def on_log_history_checkbutton_toggled(self, widget):
- #log conversation history?
- oldlog = True
- no_log_for = gajim.config.get_per('accounts', self.account,
- 'no_log_for').split()
- if self.contact.jid in no_log_for:
- oldlog = False
- log = widget.get_active()
- if not log and not self.contact.jid in no_log_for:
- no_log_for.append(self.contact.jid)
- if log and self.contact.jid in no_log_for:
- no_log_for.remove(self.contact.jid)
- if oldlog != log:
- gajim.config.set_per('accounts', self.account, 'no_log_for',
- ' '.join(no_log_for))
-
def on_PHOTO_eventbox_button_press_event(self, widget, event):
'''If right-clicked, show popup'''
if event.button == 3: # right click
@@ -298,14 +282,6 @@
tooltips.set_tip(eb,
_("You are waiting contact's answer about your subscription request"))
- log = True
- if self.contact.jid in gajim.config.get_per('accounts', self.account,
- 'no_log_for').split(' '):
- log = False
- checkbutton = self.xml.get_widget('log_history_checkbutton')
- checkbutton.set_active(log)
- checkbutton.connect('toggled', self.on_log_history_checkbutton_toggled)
-
resources = '%s (%s)' % (self.contact.resource, unicode(
self.contact.priority))
uf_resources = self.contact.resource + _(' resource with priority ')\
@@ -385,22 +361,6 @@
if event.keyval == gtk.keysyms.Escape:
self.window.destroy()
- def on_log_history_checkbutton_toggled(self, widget):
- #log conversation history?
- oldlog = True
- no_log_for = gajim.config.get_per('accounts', self.account,
- 'no_log_for').split()
- if self.contact.jid in no_log_for:
- oldlog = False
- log = widget.get_active()
- if not log and not self.contact.jid in no_log_for:
- no_log_for.append(self.contact.jid)
- if log and self.contact.jid in no_log_for:
- no_log_for.remove(self.contact.jid)
- if oldlog != log:
- gajim.config.set_per('accounts', self.account, 'no_log_for',
- ' '.join(no_log_for))
-
def on_PHOTO_eventbox_button_press_event(self, widget, event):
'''If right-clicked, show popup'''
if event.button == 3: # right click
@@ -469,14 +429,6 @@
'</span></b>')
self.xml.get_widget('local_jid_label').set_text(self.contact.jid)
- log = True
- if self.contact.jid in gajim.config.get_per('accounts', self.account,
- 'no_log_for').split(' '):
- log = False
- checkbutton = self.xml.get_widget('log_history_checkbutton')
- checkbutton.set_active(log)
- checkbutton.connect('toggled', self.on_log_history_checkbutton_toggled)
-
resources = '%s (%s)' % (self.contact.resource, unicode(
self.contact.priority))
uf_resources = self.contact.resource + _(' resource with priority ')\