Hide window until first tab is shown

This commit is contained in:
Travis Shirk 2006-01-12 02:49:41 +00:00
parent c79768cd28
commit 43fddfccc5
2 changed files with 7 additions and 6 deletions

View File

@ -17608,6 +17608,9 @@ Maybe I'll refactor later</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<signal name="delete_event" handler="_on_window_delete" last_modification_time="Thu, 12 Jan 2006 02:55:53 GMT"/>
<signal name="destroy" handler="_on_window_destroy" last_modification_time="Thu, 12 Jan 2006 02:56:25 GMT"/>
<signal name="focus_in_event" handler="_on_window_focus" last_modification_time="Thu, 12 Jan 2006 02:56:55 GMT"/>
<child>
<widget class="GtkAlignment" id="alignment99">

View File

@ -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)