From 6b587efb8ba7e3e126da76200aa75e4869e325c0 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Wed, 5 Feb 2014 12:46:48 +0100 Subject: [PATCH] don't allow to do ctrl+r when roster is hidden. See #7315 --- data/gui/roster_window.ui | 1 + src/message_window.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/data/gui/roster_window.ui b/data/gui/roster_window.ui index 50f1c26130..844d9558c7 100644 --- a/data/gui/roster_window.ui +++ b/data/gui/roster_window.ui @@ -210,6 +210,7 @@ <child> <object class="GtkCheckMenuItem" id="show_roster_menuitem"> <property name="visible">True</property> + <property name="sensitive">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="label" translatable="yes">Show _Roster</property> <property name="use_underline">True</property> diff --git a/src/message_window.py b/src/message_window.py index 509df2b923..b696762a20 100644 --- a/src/message_window.py +++ b/src/message_window.py @@ -84,6 +84,8 @@ class MessageWindow(object): self.parent_paned = parent_paned self.notebook.reparent(self.parent_paned) self.parent_paned.pack2(self.notebook, resize=True, shrink=True) + gajim.interface.roster.xml.get_object('show_roster_menuitem').\ + set_sensitive(True) orig_window.destroy() del orig_window @@ -613,6 +615,8 @@ class MessageWindow(object): # Don't close parent window, just remove the child child = self.parent_paned.get_child2() self.parent_paned.remove(child) + gajim.interface.roster.xml.get_object('show_roster_menuitem').\ + set_sensitive(False) else: self.window.destroy() return # don't show_title, we are dead @@ -1254,6 +1258,8 @@ class MessageWindowMgr(gobject.GObject): # Don't close parent window, just remove the child child = w.parent_paned.get_child2() w.parent_paned.remove(child) + gajim.interface.roster.xml.get_object('show_roster_menuitem').\ + set_sensitive(False) gtkgui_helpers.resize_window(w.window, gajim.config.get('roster_width'), gajim.config.get('roster_height')) -- GitLab