Esempio n. 1
0
 def on_emerald_addbtn_clicked(self,widget):
     dialog = create_filechooser_open((_("Choose a .emerald file")),["*.emerald"])
     result = dialog.run()
     if result != gtk.RESPONSE_OK:
         dialog.destroy()
         return
     ## if ok
     archive =  dialog.get_filename()
     dialog.destroy()
     if not os.path.exists(archive):
         print "Emerald theme not exist or corrupted \n"
         return
     return self.get_theme_list(archive)
Esempio n. 2
0
 def action_chooseimg(self, widget):
     dialog = create_filechooser_open(_("Choose a thumbnail file"),
                                      ["*.png"])
     result = dialog.run()
     if result != gtk.RESPONSE_OK:
         dialog.destroy()
         return
     ## if ok
     img = dialog.get_filename()
     dialog.destroy()
     if not os.path.exists(img):
         print "thumbnail image do not exist %s \n" % img
         return
     self.fpack_create_imgpath.set_text(img)
Esempio n. 3
0
 def action_add(self, widget):
     filterlist = ["*.tar.lzma"]
     dialog = create_filechooser_open((_("Choose a fullpack archive file")),
                                      filterlist)
     result = dialog.run()
     if result != gtk.RESPONSE_OK:
         dialog.destroy()
         return
     ## if ok
     archive = dialog.get_filename()
     dialog.destroy()
     if not os.path.exists(archive):
         print "Fullpack theme non-existent or corrupted \n"
     return self.get_theme_list(archive)
Esempio n. 4
0
    def action_chooseimg(self,widget):
        dialog = create_filechooser_open((_("Choose a thumbnail file")),["*.png","*.jpeg","*.jpg"])
        result = dialog.run()
        if result != gtk.RESPONSE_OK:
            dialog.destroy()
            return
        ## if ok
        img =  dialog.get_filename()
        dialog.destroy()
        if not os.path.exists(img):
            print "thumbnail image do not exist %s \n" % img
            return

        self.cubemodel_create_imgpath.set_text(img)
Esempio n. 5
0
 def action_add(self,widget):
     filterlist = ["*.tar.lzma"]
     dialog = create_filechooser_open((_("Choose a tar.lzma file")),filterlist)
     result = dialog.run()
     if result != gtk.RESPONSE_OK:
         dialog.destroy()
         return
     ## if ok
     archive =  dialog.get_filename()
     dialog.destroy()
     if not os.path.exists(archive):
         print "cubemodel theme non-existent or corrupt \n"
         return
     return self.get_theme_list(archive)
Esempio n. 6
0
 def on_emerald_addbtn_clicked(self, widget):
     dialog = create_filechooser_open((_("Choose a .emerald file")),
                                      ["*.emerald"])
     result = dialog.run()
     if result != gtk.RESPONSE_OK:
         dialog.destroy()
         return
     ## if ok
     archive = dialog.get_filename()
     dialog.destroy()
     if not os.path.exists(archive):
         print "Emerald theme not exist or corrupted \n"
         return
     return self.get_theme_list(archive)
Esempio n. 7
0
 def on_metacity_addbtn_clicked(self,widget):
     dialog = create_filechooser_open((_("Choose a tar/bz2/gz file")),["*.gz","*.bz2","*.tar","*.zip","*.rar"])
     result = dialog.run()
     if result != gtk.RESPONSE_OK:
         dialog.destroy()
         return
     ## if ok
     self.metacity_archive =  dialog.get_filename()
     dialog.destroy()
     if not os.path.exists(self.metacity_archive):
         print "metacity theme not exist or corrupted \n"
         return
     theme_list = self.metacity_dict.add_item_archive(self.metacity_archive)
     if theme_list:
         return self.action_add_todic(theme_list)
Esempio n. 8
0
 def action_add(self,widget):
     filterlist = ["*.gz","*.bz2","*.tar","*.zip","*.rar"]
     dialog = create_filechooser_open(_("Choose a gz/bz2/tar file"),filterlist)
     result = dialog.run()
     if result != gtk.RESPONSE_OK:
         dialog.destroy()
         return
     ## if ok
     archive = dialog.get_filename()
     dialog.destroy()
     if not os.path.exists(archive):
         print "Mouse theme do not exist or corrupted \n"
         return
     theme_list = self.mouse_dict.add_item_archive(archive)
     if theme_list:
         return self.action_add_todic(theme_list)
Esempio n. 9
0
 def add_panel_icon(self,widget):
     filterlist = ["*.png","*.svg"]
     dialog = create_filechooser_open((_("Choose an icon image")),filterlist)
     result = dialog.run()
     if result != gtk.RESPONSE_OK:
         dialog.destroy()
         return
     ## if ok
     icon = dialog.get_filename()
     dialog.destroy()
     if icon:
         self.icon_dict.add_panelicon_todic(icon)
         name = os.path.basename(os.path.splitext(icon)[0])
         self.add_panel_model(name,icon)
         self.panel_icon_combo.setIndexFromString(name)
         self.apply_panel_icon()
Esempio n. 10
0
    def action_add(self,widget):
        filterlist = ["*.gz","*.bz2","*.tar","*.zip","*.rar"]
        dialog = create_filechooser_open((_("Choose a tar/bz2 file")),filterlist)
        result = dialog.run()
        if result != gtk.RESPONSE_OK:
            dialog.destroy()
            return
        ## if ok
        self.gtk_archive =  dialog.get_filename()
        dialog.destroy()

        if not os.path.exists(self.gtk_archive):
            print "Gtk theme archive non-existent or corrupted \n"
            return
        theme_list = self.gtk_dict.add_item_archive(self.gtk_archive)
        if theme_list:
            return self.action_add_todic(theme_list)
Esempio n. 11
0
 def on_metacity_addbtn_clicked(self, widget):
     dialog = create_filechooser_open(
         (_("Choose a tar/bz2/gz file")),
         ["*.gz", "*.bz2", "*.tar", "*.zip", "*.rar"])
     result = dialog.run()
     if result != gtk.RESPONSE_OK:
         dialog.destroy()
         return
     ## if ok
     self.metacity_archive = dialog.get_filename()
     dialog.destroy()
     if not os.path.exists(self.metacity_archive):
         print "metacity theme not exist or corrupted \n"
         return
     theme_list = self.metacity_dict.add_item_archive(self.metacity_archive)
     if theme_list:
         return self.action_add_todic(theme_list)
Esempio n. 12
0
    def action_add(self, widget):
        filterlist = ["*.gz", "*.bz2", "*.tar", "*.zip", "*.rar"]
        dialog = create_filechooser_open((_("Choose a tar/bz2 file")),
                                         filterlist)
        result = dialog.run()
        if result != gtk.RESPONSE_OK:
            dialog.destroy()
            return
        ## if ok
        self.gtk_archive = dialog.get_filename()
        dialog.destroy()

        if not os.path.exists(self.gtk_archive):
            print "Gtk theme archive non-existent or corrupted \n"
            return
        theme_list = self.gtk_dict.add_item_archive(self.gtk_archive)
        if theme_list:
            return self.action_add_todic(theme_list)
Esempio n. 13
0
 def action_add(self,widget):
     filterlist = ["*.gz","*.bz2","*.tar","*.zip","*.rar"]
     dialog = create_filechooser_open((_("Choose a tar.gz/bz2 file")),filterlist)
     result = dialog.run()
     if result != gtk.RESPONSE_OK:
         dialog.destroy()
         return
     ## if ok
     icons_archive = dialog.get_filename()
     dirname = ""
     dialog.destroy()
     if not os.path.exists(icons_archive):
         print "Icon theme non-existent or corrupt \n"
         return
     theme_list = self.icon_dict.add_item_archive(icons_archive)
     if theme_list and theme_list.has_key('icons'):
         return self.action_add_todic(theme_list)
     else:
         print "no icons themes in this file... %s " % icons_archive
         return