def on_metacity_delbtn_clicked(self,widget): confirm = yesno((_("Remove metacity theme")),(_("Are you sure you want to delete the metacity Theme \n%s ?") % self.metacity_thname)) if confirm == "No": return self.metacity_dict.del_item(self.metacity_thname) self.model.remove(self.iter) self.statbar.push(1,(_("metacity theme %s removed successfully") % self.metacity_thname))
def action_del(self,widget): confirm = yesno((_("Remove cubemodels themes")),\ (_("Are you sure you want to delete the cubemodels Theme \n %s ?") % self.item_name)) if confirm == "No": return self.cubemodels_dict.del_item(self.item_name) self.statbar.push(1,_("Cubemodel theme %s successfully removed" % self.item_name)) self.model.remove(self.iter)
def on_emerald_delbtn_clicked(self,widget): confirm = yesno((_("Remove emerald theme")),(_("Are you sure you want to delete the Emerald Theme \n%s ?") % self.emerald_thname)) if confirm == "No": return print self.emerald_dict.del_item(self.emerald_thname) self.model.remove(self.iter) self.statbar.push(1,(_("Emerald theme %s removed successfully") % self.emerald_thname))
def action_del(self,widget): confirm = yesno((_("Remove mouse themes")),\ _("Are you sure you want to delete the mouse Theme \n %s ?") % self.item_name) if confirm == "No": return ## remove the theme self.mouse_dict.del_item(self.item_dirname) self.model.remove(self.iter) self.statbar.push(1,_("Mouse theme %s removed successfully") % self.item_name)
def action_del(self, widget): confirm = yesno((_("Remove fullpack themes")),\ (_("Are you sure you want to delete the fullpack Theme \n %s ?") % self.item_name)) if confirm == "No": return self.fullpack_dict.del_item(self.item_name) self.statbar.push( 1, _("Fullpack theme %s successfully removed" % self.item_name)) self.model.remove(self.iter)
def action_delete(self,widget): confirm = yesno((_("Remove Gtk themes")),\ (_("Are you sure you want to delete the gtk Theme \n %s ?") % self.item.dirname)) if confirm == "No": return ## remove the theme self.gtk_dict.action_delete(self.item.dirname) model = self.gtkThemes_selector.get_model() model.clear() self.list_gtk_themes() self.statbar.push(1,(_("Gtk theme %s removed successfully") % self.item.name))
def on_metacity_delbtn_clicked(self, widget): confirm = yesno( (_("Remove metacity theme")), (_("Are you sure you want to delete the metacity Theme \n%s ?") % self.metacity_thname)) if confirm == "No": return self.metacity_dict.del_item(self.metacity_thname) self.model.remove(self.iter) self.statbar.push(1, (_("metacity theme %s removed successfully") % self.metacity_thname))
def action_delete(self, widget): confirm = yesno((_("Remove Gtk themes")),\ (_("Are you sure you want to delete the gtk Theme \n %s ?") % self.item.dirname)) if confirm == "No": return ## remove the theme self.gtk_dict.action_delete(self.item.dirname) model = self.gtkThemes_selector.get_model() model.clear() self.list_gtk_themes() self.statbar.push( 1, (_("Gtk theme %s removed successfully") % self.item.name))
def on_emerald_delbtn_clicked(self, widget): confirm = yesno( (_("Remove emerald theme")), (_("Are you sure you want to delete the Emerald Theme \n%s ?") % self.emerald_thname)) if confirm == "No": return print self.emerald_dict.del_item(self.emerald_thname) self.model.remove(self.iter) self.statbar.push( 1, (_("Emerald theme %s removed successfully") % self.emerald_thname))
def action_save(self, widget=None): name = self.fpack_name_entry.get_text() if name == "": error_dialog(_("Please enter a name for your theme")) return False self.new_theme = False licence = self.fpack_licence_entry.get_text() author = self.fpack_author_entry.get_text() link = self.fpack_website_entry.get_text() img = self.fpack_create_imgpath.get_text() ## check pack dir fpack_srcdir = os.path.join(fullpack_home_srcdir, name) if self.fpack_dic.has_key('packname'): if self.fpack_dic['packname'] != name: ret = yesno( "Save fullpack", "The fullpack's name was changed, a new fullpack will be created" ) if ret == "No": return False self.new_theme = True else: self.fpack_dic['packname'] = name if not os.path.exists(fpack_srcdir): self.new_theme = True if img == "": error_dialog(_("Please select a preview image for your theme")) return False self.fpack_dic_copy['packname'] = name self.fpack_dic_copy['link'] = link self.fpack_dic_copy['licence'] = licence self.fpack_dic_copy['author'] = author self.fpack_dic_copy['img'] = img item = self.fullpack_dict.gen_xml(self.fpack_dic_copy, self.new_theme) if self.new_theme: if item: self.add_model(item) self.statbar.push( 1, (_("fullpack %s successfully created") % item.name)) self.statbar.push(1, (_("fullpack %s successfully saved") % name)) self.fpack_dic = {} for (key, value) in self.fpack_dic_copy.iteritems(): self.fpack_dic[key] = value self.fullpack_save_btn.set_sensitive(0) return True