Ejemplo n.º 1
0
        override protected void PreInstallation(CStatusWindow sw)
        {
            //Herunterladen
            sw.Mainlabel = Catalog.GetString(CConfiguration.txtDownloadTheme);
            GetThemeFile(sw);
            sw.SetProgress("1/" + installationSteps);

            //Entpacken
            sw.Mainlabel = Catalog.GetString(CConfiguration.txtExtracting);
            System.Collections.ArrayList al = new System.Collections.ArrayList();
            al     = CUtility.UncompressFile(LocalThemeFile, Path.GetTempPath(), false, null, al);
            Folder = ((string)(al[0])).Split('/');
            //Console.WriteLine(Folder[0]);
            sw.SetProgress("2/" + installationSteps);

            //Convertieren
            sw.Mainlabel = Catalog.GetString(CConfiguration.txtConvertingIcons);
            sw.SetProgress("3/" + installationSteps);
            CIconThemeManager iconmanager = new CIconThemeManager();

            iconmanager.ThemeName    = Folder[0];
            iconmanager.StatusWindow = sw;
            iconmanager.ImportIcons(Path.GetTempPath() + Folder[0]);
            sw.SetProgress("4/" + installationSteps);
            iconmanager.SaveAllIcons(config.IconInstallPath + "/", true);

            //Sichern
            client        = new GConf.Client();
            sw.Mainlabel  = Catalog.GetString(CConfiguration.txtSavingForRestore);
            prevIconTheme = (string)client.Get(GConfIconThemeKey);
            sw.SetProgress("5/" + installationSteps);
        }
 private void onApplyClicked(object sender, EventArgs b)
 {
     try{
         string dfile = "/tmp/thumbs.tar.gz";
         FtaApplyButton.Sensitive = false;
         FtaCloseButton.Sensitive = false;
         new CFileDownloader(config).DownloadFile(CConfiguration.ThemeBulkUrl, dfile, FtaProgressBar);
         CUtility.UncompressFile(dfile, config.ProgramSettingsPath + config.DirectorySeperator, true, FtaProgressBar, new System.Collections.ArrayList());
         Close();
     }
     catch {
         FtaCloseButton.Sensitive = true;
         FtaApplyButton.Sensitive = false;
     }
 }