def __init__(self, datadir, parent, to_add, to_rm):
     SimpleGtkbuilderApp.__init__(self, path=datadir+"/gnome-app-install.ui")
     self.add_store = gtk.ListStore(gobject.TYPE_STRING,
                                    gobject.TYPE_PYOBJECT,
                                    gobject.TYPE_INT)
     self.remove_store = gtk.ListStore(gobject.TYPE_STRING,
                                       gobject.TYPE_PYOBJECT,
                                       gobject.TYPE_INT)
     for elm in to_add:
         self.add_store.append([elm.name, elm, 0])
     for elm in to_rm:
         self.remove_store.append([elm.name, elm ,0])
     self.dialog_pending_changes.realize()
     self.dialog_pending_changes.set_transient_for(parent)
     self.button_confirm_changes.grab_default()
     self.dialog_pending_changes.window.set_functions(gtk.gdk.FUNC_MOVE)
     # Setup the app list viewers
     self.treeview_add = AppListView(style=1)
     self.treeview_remove = AppListView(style=1)
     self.scrolledwindow_add.add(self.treeview_add)
     self.scrolledwindow_remove.add(self.treeview_remove)
     self.treeview_add.set_headers_visible(False)
     self.treeview_remove.set_headers_visible(False)
     self.treeview_add.set_model(self.add_store)
     self.treeview_remove.set_model(self.remove_store)
     self.treeview_add.show()
     self.treeview_remove.show()
 def __init__(self, datadir, parent, multiple_items_list, name, remove):
     SimpleGtkbuilderApp.__init__(self,
                                  path=datadir + "/gnome-app-install.ui")
     self.store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_PYOBJECT,
                                gobject.TYPE_INT)
     for elm in multiple_items_list:
         self.store.append((elm.name, elm, 0))
     self.dialog_multiple_apps.set_transient_for(parent)
     # Setup the application list
     self.treeview_apps = AppListView(style=1)
     self.scrolledwindow_multiple_apps.add(self.treeview_apps)
     self.treeview_apps.set_headers_visible(False)
     self.treeview_apps.set_model(self.store)
     self.treeview_apps.show()
     # Create the dialog message text
     if remove == True:
         header = (_("Remove %s and bundled applications?") % name)
         msg = _("%s is part of a software collection. If you remove "
                 "%s, you will remove all bundled applications as well.") %\
               (name, name)
         label = _("_Remove All")
     else:
         header = (_("Install %s and bundled applications?") % name)
         msg = _("%s is part of a software collection. If you install "
                 "%s, you will install all bundled applications as well.") %\
               (name, name)
         label = _("_Install All")
     self.label_multiple.set_markup("<b><big>%s</big></b>\n\n%s" %\
                                    (header, msg))
     self.button_multiple_action.set_label(label)