def new_profile(self, origin): new = conf.Profile("New Profile") new.path = context.get_conf().get_free_profile() ProfileBox(new,self.superior) self.superior.profile=ProfileBox(new,self.superior) tab2=gtk.Label(self.superior.get_title()+" > "+new.name) self.superior.append_tab(self.superior.profile,tab2) return new
def duplicate_profile(self, origin): model, iterator = self.view.get_selection().get_selected() if type(iterator) is not gtk.TreeIter: return profile = model.get_value(iterator, 0) new_profile = conf.Profile(profile.name + " copy", context.get_conf().get_free_profile()) for track in profile.tracks: new_profile.add_track(track) context.get_conf().add_profile(new_profile) self.refresh()