From a898cf45445e85cafd8876ee105f059452be75c5 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard <jim@lapin.org> Date: Tue, 9 May 2006 17:59:24 +0000 Subject: [PATCH] #1005 : -Added events about FT, event status change -Merge events first/next message reveived and add a condition about chat actually open with that contact for all events -Added action about roster notification (animated icon for contact) -Added glade file to translatable ones --- .../glade/advanced_notifications_window.glade | 163 +++++++++++++++++- po/POTFILES.in | 1 + src/dialogs.py | 26 ++- 3 files changed, 182 insertions(+), 8 deletions(-) diff --git a/data/glade/advanced_notifications_window.glade b/data/glade/advanced_notifications_window.glade index f526dbcf71..f37f02bb85 100644 --- a/data/glade/advanced_notifications_window.glade +++ b/data/glade/advanced_notifications_window.glade @@ -368,12 +368,15 @@ <child> <widget class="GtkComboBox" id="combobox5"> <property name="visible">True</property> - <property name="items" translatable="yes">First Message Received -Next Message Received + <property name="items" translatable="yes">Receive a Message Contact Connected Contact Disconnected +Contact Change Status Group Chat Message Highlight -Group Chat Message Received</property> +Group Chat Message Received +File Transfert Resquest +File Transfert Started +File Transfert Finished</property> </widget> <packing> <property name="padding">0</property> @@ -419,8 +422,8 @@ Group Chat Message Received</property> <child> <widget class="GtkComboBox" id="recipient_type_combobox"> <property name="visible">True</property> - <property name="items" translatable="yes">contact -group + <property name="items" translatable="yes">contact(s) +group(s) everybody</property> <signal name="changed" handler="on_recipient_type_combobox_changed" last_modification_time="Mon, 08 May 2006 20:54:22 GMT"/> </widget> @@ -638,6 +641,101 @@ everybody</property> <property name="fill">True</property> </packing> </child> + + <child> + <widget class="GtkHBox" id="hbox3053"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkLabel" id="label408"> + <property name="visible">True</property> + <property name="label" translatable="yes">And I </property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="tab_opened_cb"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Have </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_tab_opened_cb_toggled" last_modification_time="Tue, 09 May 2006 17:13:20 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="not_tab_opened_cb"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Don't have </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_not_tab_opened_cb_toggled" last_modification_time="Tue, 09 May 2006 17:13:02 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label409"> + <property name="visible">True</property> + <property name="label" translatable="yes"> a window/tab opened with that contact </property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> @@ -1098,11 +1196,64 @@ everybody</property> </packing> </child> + <child> + <widget class="GtkHBox" id="hbox3052"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkCheckButton" id="use_roster_cb"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Show event in roster</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_use_roster_cb_toggled" last_modification_time="Tue, 09 May 2006 17:08:45 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="disable_roster_cb"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Disable showing event in roster</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_disable_roster_cb_toggled" last_modification_time="Tue, 09 May 2006 17:08:29 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + <child> <widget class="GtkCheckButton" id="checkbutton14"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">_Activate Windows manager UrgencyHint to make taskbar to flash</property> + <property name="label" translatable="yes">_Activate Windows manager UrgencyHint to make chat taskbar to flash</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> diff --git a/po/POTFILES.in b/po/POTFILES.in index a0833cc189..6ff3e66680 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -11,6 +11,7 @@ data/glade/accounts_window.glade data/glade/add_new_contact_window.glade data/glade/advanced_configuration_window.glade data/glade/advanced_menuitem_menu.glade +data/glade/advanced_notifications_window.glade data/glade/change_password_dialog.glade data/glade/change_status_message_dialog.glade data/glade/chat_context_menu.glade diff --git a/src/dialogs.py b/src/dialogs.py index 80f9b1d03b..71cd4f0f1a 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -1752,6 +1752,11 @@ class AdvancedNotificationsWindow: self.disable_auto_open_cb = self.xml.get_widget('disable_auto_open_cb') self.use_systray_cb = self.xml.get_widget('use_systray_cb') self.disable_systray_cb = self.xml.get_widget('disable_systray_cb') + self.use_roster_cb = self.xml.get_widget('use_roster_cb') + self.disable_roster_cb = self.xml.get_widget('disable_roster_cb') + + self.tab_opened_cb = self.xml.get_widget('tab_opened_cb') + self.not_tab_opened_cb = self.xml.get_widget('not_tab_opened_cb') model = gtk.ListStore(str) model.clear() @@ -1782,7 +1787,10 @@ class AdvancedNotificationsWindow: # Deal with status line self.all_status_rb.set_active(True) self.on_status_radiobutton_toggled(self.all_status_rb) - self.recipient_type_combobox.set_active(0) + + self.recipient_type_combobox.set_active(0) # 'Contact(s)' + self.not_tab_opened_cb.set_active(True) + self.tab_opened_cb.set_active(True) def on_status_radiobutton_toggled(self, widget): if self.all_status_rb.get_active(): @@ -1814,8 +1822,16 @@ class AdvancedNotificationsWindow: self.recipient_list.hide() else: self.recipient_list.show() + + # tab_opened OR (not xor) not_tab_opened must be active + def on_tab_opened_cb_toggled(self, widget): + if not self.tab_opened_cb.get_active() and not self.not_tab_opened_cb.get_active(): + self.not_tab_opened_cb.set_active(True) + def on_not_tab_opened_cb_toggled(self, widget): + if not self.tab_opened_cb.get_active() and not self.not_tab_opened_cb.get_active(): + self.tab_opened_cb.set_active(True) - # 8 next functions : Forbid two incompatible actions to be checked together + # 10 next functions : Forbid two incompatible actions to be checked together def on_use_sound_cb_toggled(self, widget): if self.use_sound_cb.get_active() and self.disable_sound_cb.get_active(): self.disable_sound_cb.set_active(False) @@ -1842,6 +1858,12 @@ class AdvancedNotificationsWindow: def on_disable_systray_cb_toggled(self, widget): if self.use_systray_cb.get_active() and self.disable_systray_cb.get_active(): self.use_systray_cb.set_active(False) + def on_use_roster_cb_toggled(self, widget): + if self.use_roster_cb.get_active() and self.disable_roster_cb.get_active(): + self.disable_roster_cb.set_active(False) + def on_disable_roster_cb_toggled(self, widget): + if self.use_roster_cb.get_active() and self.disable_roster_cb.get_active(): + self.use_roster_cb.set_active(False) def on_close_window(self, widget): self.window.destroy() -- GitLab