Add the actual GtkApplicationWindow to the GtkApplication.

This commit is contained in:
Emmanuel Gil Peyrot 2017-01-07 13:14:43 +00:00
parent fd16797421
commit 553fd8f7b1
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
<interface>
<requires lib="gtk+" version="3.12"/>
<object class="GtkAccelGroup" id="accelgroup1"/>
<object class="GtkWindow" id="roster_window">
<object class="GtkApplicationWindow" id="roster_window">
<property name="width_request">85</property>
<property name="height_request">200</property>
<property name="can_focus">False</property>

View File

@ -94,7 +94,7 @@ empty_pixbuf = GdkPixbuf.Pixbuf.new(GdkPixbuf.Colorspace.RGB, True, 8, 1, 1)
empty_pixbuf.fill(0xffffff00)
class RosterWindow(Gtk.ApplicationWindow):
class RosterWindow:
"""
Class for main window of the GTK+ interface
"""
@ -6178,7 +6178,7 @@ class RosterWindow(Gtk.ApplicationWindow):
###
################################################################################
def __init__(self, app):
def __init__(self, app: Gtk.Application):
self.application = app
self.filtering = False
self.starting = False
@ -6195,8 +6195,8 @@ class RosterWindow(Gtk.ApplicationWindow):
GdkPixbuf.Pixbuf, GdkPixbuf.Pixbuf]
self.xml = gtkgui_helpers.get_gtk_builder('roster_window.ui')
self.window = self.xml.get_object('roster_window')
app.add_window(self.window)
self.hpaned = self.xml.get_object('roster_hpaned')
self.window.set_application(app)
gajim.interface.msg_win_mgr = MessageWindowMgr(self.window, self.hpaned)
gajim.interface.msg_win_mgr.connect('window-delete',
self.on_message_window_delete)