def removesys(self,Button,Treeview): (SysString, CoreString) = Treeview.get_selected_strings() if not SysString: dialog = ConfirmationDialog("Remove Core", "Remove this core?") dialog.connect("response",self.ConfirmationReturn,Treeview) dialog.set_transient_for(self) dialog.show_all() else: dialog = ConfirmationDialog("Remove System", "Remove this system and all it's cores?") dialog.connect("response",self.ConfirmationReturn,Treeview) dialog.set_transient_for(self) dialog.show_all()
def removegame(self,Button,Treeview): (_, pathlist) = Treeview.get_selection().get_selected_rows() depth = pathlist[0].get_depth() if depth == 3: dialog = ConfirmationDialog("Remove Patch", "Remove this patch and all its data?") dialog.connect("response",self.ConfirmationReturn,Treeview) dialog.set_transient_for(self) dialog.show_all() elif depth == 2: dialog = ConfirmationDialog("Remove Game", "Remove this game and all its data?") dialog.connect("response",self.ConfirmationReturn,Treeview) dialog.set_transient_for(self) dialog.show_all()
def cleargamedata(self, Button, Treeview): (_, pathlist) = Treeview.get_selection().get_selected_rows() dialog = ConfirmationDialog("Clear Data", "Remove all of this game's data?") dialog.connect("response",self.ClearDataReturn,Treeview) dialog.set_transient_for(self) dialog.show_all()