def __init_view(self, items): main_box = gtk.VBox() main_box_align = gtk.Alignment(1, 1, 1, 1) main_box_align.set_padding(10, 10, 10, 10) main_box_align.add(main_box) header_box = gtk.HBox() title_image = gtk.Image() title_image.set_from_pixbuf(self.title_pixbuf) title_label = Label(_("Unread Messages"), text_size=FONT_SIZE) title_switch = SwitchButton(not preference.disable_bubble) title_switch.set_tooltip_text(_("Turn Off Global Notifications")) title_switch.connect("toggled", self.on_title_switch_toggled) header_box.pack_end(title_switch, False, False, 5) header_box.pack_start(title_image, False, False, 5) header_box.pack_start(title_label, False, False) self.body_box = gtk.VBox() self.listview_factory = ListviewFactory(items, "brief") if len(items) else None if self.listview_factory: self.body_align = gtk.Alignment(0.5, 0.5, 1, 1) self.body_align.set_padding(2, 2, 5, 5) self.body_align.add(self.listview_factory.listview) else: self.body_align = gtk.Alignment(0.5, 0.5, 0, 0) self.body_align.add(Label(_("(Empty)"))) self.body_box.pack_start(self.body_align, True, True) footer_box = gtk.HBox() button_more = SelectButton(_("More Advanced Options... ")) button_more.connect("clicked", self.on_more_button_clicked) footer_box.pack_start(button_more, True, True) main_box.pack_start(header_box, False, False, 5) main_box.pack_start(HSeparator(), False, False, 5) main_box.pack_start(self.body_box, True, True) main_box.pack_end(footer_box, False, False, 5) main_box.pack_end(HSeparator(), False, False, 5) self.add(main_box_align)