diff --git a/data/gui/archiving_313_preferences_window.ui b/data/gui/archiving_313_preferences_window.ui index c59c442de..994a3a3f9 100644 --- a/data/gui/archiving_313_preferences_window.ui +++ b/data/gui/archiving_313_preferences_window.ui @@ -1,5 +1,5 @@ - + @@ -43,6 +43,7 @@ center 450 + True diff --git a/data/gui/features_window.ui b/data/gui/features_window.ui index 55ab9c91e..a09677ce4 100644 --- a/data/gui/features_window.ui +++ b/data/gui/features_window.ui @@ -1,5 +1,5 @@ - + @@ -10,6 +10,7 @@ 300 530 dialog + True @@ -22,9 +23,9 @@ True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 <b>List of possible features in Gajim:</b> True + 0 False @@ -98,9 +99,9 @@ True False 12 - 0 True True + 0 diff --git a/data/gui/manage_bookmarks_window.ui b/data/gui/manage_bookmarks_window.ui index f227a41a2..28efe7eb7 100644 --- a/data/gui/manage_bookmarks_window.ui +++ b/data/gui/manage_bookmarks_window.ui @@ -1,5 +1,5 @@ - + @@ -15,6 +15,7 @@ 550 300 dialog + True @@ -116,9 +117,9 @@ True False - 0 _Title: True + 0 0 @@ -129,9 +130,9 @@ True False - 0 _Nickname: True + 0 0 @@ -142,9 +143,9 @@ True False - 0 Roo_m: True + 0 0 @@ -155,9 +156,9 @@ True False - 0 _Server: True + 0 0 @@ -168,9 +169,9 @@ True False - 0 _Password: True + 0 0 @@ -231,9 +232,9 @@ True False - 0 Pr_int status: True + 0 0 diff --git a/data/gui/plugins_window.ui b/data/gui/plugins_window.ui index 2562cf9e6..c3ed73363 100644 --- a/data/gui/plugins_window.ui +++ b/data/gui/plugins_window.ui @@ -1,5 +1,5 @@ - + @@ -27,6 +27,7 @@ 500 dialog + True @@ -218,9 +219,9 @@ True True + False True none - False 0 diff --git a/data/gui/privacy_list_window.ui b/data/gui/privacy_list_window.ui index a0e7e3edc..58ba7a9b6 100644 --- a/data/gui/privacy_list_window.ui +++ b/data/gui/privacy_list_window.ui @@ -1,5 +1,5 @@ - + @@ -47,6 +47,7 @@ Privacy List dialog + True diff --git a/data/gui/privacy_lists_window.ui b/data/gui/privacy_lists_window.ui index 4c49957dd..b9c6a1367 100644 --- a/data/gui/privacy_lists_window.ui +++ b/data/gui/privacy_lists_window.ui @@ -1,5 +1,5 @@ - + @@ -15,6 +15,7 @@ window1 dialog + True @@ -30,8 +31,8 @@ True False - 0 Privacy Lists: + 0 False diff --git a/data/gui/service_discovery_window.ui b/data/gui/service_discovery_window.ui index 8d8c2974d..db01476f0 100644 --- a/data/gui/service_discovery_window.ui +++ b/data/gui/service_discovery_window.ui @@ -1,5 +1,5 @@ - + @@ -15,6 +15,7 @@ 420 dialog + True @@ -34,11 +35,11 @@ True diff --git a/data/gui/xml_console_window.ui b/data/gui/xml_console_window.ui index 2320d330c..1d92fe68a 100644 --- a/data/gui/xml_console_window.ui +++ b/data/gui/xml_console_window.ui @@ -1,5 +1,5 @@ - + @@ -13,6 +13,7 @@ 550 450 + True diff --git a/src/config.py b/src/config.py index 48abbf212..fcfeff885 100644 --- a/src/config.py +++ b/src/config.py @@ -3256,6 +3256,10 @@ class ManageBookmarksWindow: # select root iter self.selection.select_iter(self.treestore.get_iter_first()) + def on_key_press_event(self, widget, event): + if event.keyval == Gdk.KEY_Escape: + self.window.destroy() + def on_add_bookmark_button_clicked(self, widget): """ Add a new bookmark diff --git a/src/dialogs.py b/src/dialogs.py index 06a781146..2af26a88d 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -3397,6 +3397,10 @@ class XMLConsoleWindow: self.xml.connect_signals(self) + def on_key_press_event(self, widget, event): + if event.keyval == Gdk.KEY_Escape: + self.window.destroy() + def on_xml_console_window_destroy(self, widget): del gajim.interface.instances[self.account]['xml_console'] gajim.ged.remove_event_handler('stanza-received', ged.GUI1, @@ -4144,6 +4148,10 @@ class Archiving313PreferencesWindow: self.idle_id = GLib.timeout_add_seconds(3, self._nec_archiving_error) gajim.connections[self.account].request_archive_preferences() + def on_key_press_event(self, widget, event): + if event.keyval == Gdk.KEY_Escape: + self.window.destroy() + def set_widget_state(self, state): for widget in ('default_cb', 'save_button', 'add_button', 'remove_button'): @@ -4362,6 +4370,10 @@ class PrivacyListWindow: self.xml.connect_signals(self) + def on_key_press_event(self, widget, event): + if event.keyval == Gdk.KEY_Escape: + self.window.destroy() + def on_privacy_list_edit_window_destroy(self, widget): key_name = 'privacy_list_%s' % self.privacy_list_name if key_name in gajim.interface.instances[self.account]: @@ -4676,6 +4688,10 @@ class PrivacyListsWindow: self.xml.connect_signals(self) + def on_key_press_event(self, widget, event): + if event.keyval == Gdk.KEY_Escape: + self.window.destroy() + def on_privacy_lists_first_window_destroy(self, widget): if 'privacy_lists' in gajim.interface.instances[self.account]: del gajim.interface.instances[self.account]['privacy_lists'] diff --git a/src/disco.py b/src/disco.py index 3519a3af5..0228eb4c8 100644 --- a/src/disco.py +++ b/src/disco.py @@ -603,6 +603,10 @@ _('Without a connection, you can not browse available services')) if self.browser: self.browser.account = value + def on_key_press_event(self, widget, event): + if event.keyval == Gdk.KEY_Escape: + self.window.destroy() + def accel_group_func(self, accel_group, acceleratable, keyval, modifier): if (modifier & Gdk.ModifierType.CONTROL_MASK) and (keyval == Gdk.KEY_r): self.reload() diff --git a/src/features_window.py b/src/features_window.py index f28f5ab3c..d26eaade7 100644 --- a/src/features_window.py +++ b/src/features_window.py @@ -25,7 +25,7 @@ import os import gi -from gi.repository import Gtk +from gi.repository import Gtk, Gdk import gtkgui_helpers from common import gajim @@ -133,6 +133,10 @@ class FeaturesWindow: self.window.show_all() self.xml.get_object('close_button').grab_focus() + def on_key_press_event(self, widget, event): + if event.keyval == Gdk.KEY_Escape: + self.window.destroy() + def on_close_button_clicked(self, widget): self.window.destroy() diff --git a/src/plugins/gui.py b/src/plugins/gui.py index b9382f6f8..08e8074f9 100644 --- a/src/plugins/gui.py +++ b/src/plugins/gui.py @@ -29,7 +29,7 @@ __all__ = ['PluginsWindow'] from gi.repository import Pango from gi.repository import Gtk from gi.repository import GdkPixbuf -from gi.repository import GLib +from gi.repository import GLib, Gdk import os import gtkgui_helpers @@ -116,6 +116,9 @@ class PluginsWindow(object): self.window.show_all() gtkgui_helpers.possibly_move_window_in_current_desktop(self.window) + def on_key_press_event(self, widget, event): + if event.keyval == Gdk.KEY_Escape: + self.window.destroy() def on_plugins_notebook_switch_page(self, widget, page, page_num): GLib.idle_add(self.xml.get_object('close_button').grab_focus)