From 0f7097b7e0bffd54aa0d6a4beda41ccd6c108d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Wed, 2 May 2018 22:31:29 +0200 Subject: [PATCH] Remove unused Dialog This was nonfunctional for a long time and nobody complained --- gajim/dialogs.py | 52 --------------------------------------- gajim/gui_menu_builder.py | 2 -- gajim/roster_window.py | 3 --- 3 files changed, 57 deletions(-) diff --git a/gajim/dialogs.py b/gajim/dialogs.py index c829c6ec9..0000c13fa 100644 --- a/gajim/dialogs.py +++ b/gajim/dialogs.py @@ -4948,58 +4948,6 @@ class ArchiveChooserDialog(FileChooserDialog): self.add_filter(filter_) self.set_filter(filter_) - -class AddSpecialNotificationDialog: - def __init__(self, jid): - """ - jid is the jid for which we want to add special notification (sound and - notification popups) - """ - self.xml = gtkgui_helpers.get_gtk_builder( - 'add_special_notification_window.ui') - self.window = self.xml.get_object('add_special_notification_window') - self.condition_combobox = self.xml.get_object('condition_combobox') - self.condition_combobox.set_active(0) - self.notification_popup_yes_no_combobox = self.xml.get_object( - 'notification_popup_yes_no_combobox') - self.notification_popup_yes_no_combobox.set_active(0) - self.listen_sound_combobox = self.xml.get_object('listen_sound_combobox') - self.listen_sound_combobox.set_active(0) - - self.jid = jid - self.xml.get_object('when_foo_becomes_label').set_text( - _('When %s becomes:') % self.jid) - - self.window.set_title(_('Adding Special Notification for %s') % jid) - self.window.show_all() - self.xml.connect_signals(self) - - def on_cancel_button_clicked(self, widget): - self.window.destroy() - - def on_add_special_notification_window_delete_event(self, widget, event): - self.window.destroy() - - def on_listen_sound_combobox_changed(self, widget): - active = widget.get_active() - if active == 1: # user selected 'choose sound' - def on_ok(widget, path_to_snd_file): - pass - - def on_cancel(widget): - widget.set_active(0) # go back to No Sound - - self.dialog = SoundChooserDialog(on_response_ok=on_ok, - on_response_cancel=on_cancel) - - def on_ok_button_clicked(self, widget): - conditions = ('online', 'chat', 'online_and_chat', - 'away', 'xa', 'away_and_xa', 'dnd', 'xa_and_dnd', 'offline') - active = self.condition_combobox.get_active() - - active_iter = self.listen_sound_combobox.get_active_iter() - listen_sound_model = self.listen_sound_combobox.get_model() - class TransformChatToMUC: # Keep a reference on windows so garbage collector don't restroy them instances = [] diff --git a/gajim/gui_menu_builder.py b/gajim/gui_menu_builder.py index 355d39d9d..5442a2713 100644 --- a/gajim/gui_menu_builder.py +++ b/gajim/gui_menu_builder.py @@ -424,8 +424,6 @@ control=None, gc_contact=None, is_anonymous=True): send_auth_menuitem.connect('activate', roster.authorize, jid, account) if contact.sub in ('to', 'both'): ask_auth_menuitem.set_sensitive(False) - add_special_notification_menuitem.connect('activate', - roster.on_add_special_notification_menuitem_activate, jid) else: ask_auth_menuitem.connect('activate', roster.req_sub, jid, _('I would like to add you to my roster'), account, diff --git a/gajim/roster_window.py b/gajim/roster_window.py index 1bf83f43c..dfdeec5cc 100644 --- a/gajim/roster_window.py +++ b/gajim/roster_window.py @@ -3039,9 +3039,6 @@ class RosterWindow: app.interface.instances['file_transfers'].show_file_send_request( account, contact) - def on_add_special_notification_menuitem_activate(self, widget, jid): - dialogs.AddSpecialNotificationDialog(jid) - def on_invite_to_new_room(self, widget, list_, resource=None): """ Resource parameter MUST NOT be used if more than one contact in list