From 43fddfccc54684358065daae0871602ab58c66c5 Mon Sep 17 00:00:00 2001 From: Travis Shirk Date: Thu, 12 Jan 2006 02:49:41 +0000 Subject: [PATCH] Hide window until first tab is shown --- src/gtkgui.glade | 3 +++ src/message_window.py | 10 ++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gtkgui.glade b/src/gtkgui.glade index a7553c2e1..22375c7f1 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -17608,6 +17608,9 @@ Maybe I'll refactor later GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True + + + diff --git a/src/message_window.py b/src/message_window.py index 2f3b4070a..35778409b 100644 --- a/src/message_window.py +++ b/src/message_window.py @@ -46,7 +46,11 @@ class MessageWindow: self.widget_name = 'message_window' self.xml = gtk.glade.XML(GTKGUI_GLADE, self.widget_name, APP) + self.xml.signal_autoconnect(self) self.window = self.xml.get_widget(self.widget_name) + # I don't really understand, but get_property('visible') returns True at this point, + # which seems way early. Anyway, hide until first tab is shown + self.window.hide() # gtk+ doesn't make use of the motion notify on gtkwindow by default # so this line adds that self.window.add_events(gtk.gdk.POINTER_MOTION_MASK) @@ -82,12 +86,6 @@ class MessageWindow: self.notebook.set_show_tabs(False) self.notebook.set_show_border(gajim.config.get('tabs_border')) - # Connect event handling for this Window - #FIXME: add those in GLADE - self.window.connect('delete-event', self._on_window_delete) - self.window.connect('destroy', self._on_window_destroy) - self.window.connect('focus-in-event', self._on_window_focus) - def _on_window_focus(self, widget, event): # window received focus, so if we had urgency REMOVE IT # NOTE: we do not have to read the message (it maybe in a bg tab)