Exemplo n.º 1
0
        public CConfiguration(ArtType type)
        {
            GConfClient            = new GConf.Client();
            systemProxy            = new ProxyAttrStruct();
            gangProxy              = new ProxyAttrStruct();
            systemProxy.Ip         = "";   //TODO:Why is it important to initialize it...an error occurs otherwise.
            gangProxy.Ip           = "";   //TODO:Why is it important to initialize it...an error occurs otherwise.
            artType                = type;
            dirSep                 = Path.DirectorySeparatorChar.ToString();
            homePath               = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + dirSep;
            settingsPath           = Path.Combine(homePath, ".gnome2" + dirSep + "gnome-art-ng");
            splashInstallPath      = homePath + ".local/share/pixmaps/splash" + dirSep;
            applicationInstallPath = homePath + "." + themesDir + dirSep;
            decorationInstallPath  = homePath + "." + themesDir + dirSep;
            iconInstallPath        = homePath + iconDir + dirSep;
            tarIsAvailable         = CUtility.TestIfProgIsInstalled("tar", "--version", "gnu tar");
            grepIsAvailable        = CUtility.TestIfProgIsInstalled("grep", "--version", "gnu grep");
            sedIsAvailable         = CUtility.TestIfProgIsInstalled("sed", "--version", "gnu sed");
            setDistributionDependendSettings();
            CreateDownloadDirectories();

            //Create GConf listeners
            GConf.NotifyEventHandler changed_handler = new GConf.NotifyEventHandler(onSettingsChanged);
            GConfClient.AddNotify(sProxyGconfPath, changed_handler);
            //Load Configurations
            settingsLoadOk = LoadProgramSettings();
        }
Exemplo n.º 2
0
        static EvoUtils()
        {
            try {
                gc = new GConf.Client();

                changed_handler = new GConf.NotifyEventHandler(OnAccountsSettingChanged);
                gc.AddNotify("/apps/evolution/mail/accounts", changed_handler);

                source_url_to_uid = new Dictionary <Uri, string> ();
                SetupAccountUrlToUidMap();
            }
            catch (Exception e) {
                Logger.Error("Evolution: Error reading accounts: {0}", e);
            }
        }
Exemplo n.º 3
0
		static EvoUtils ()
		{
			try {
				gc = new GConf.Client ();

				changed_handler = new GConf.NotifyEventHandler (OnAccountsSettingChanged);
				gc.AddNotify ("/apps/evolution/mail/accounts", changed_handler);

				source_url_to_uid = new Dictionary<Uri, string> ();
				SetupAccountUrlToUidMap ();
			}
			catch (Exception e) {
				Logger.Error ("Evolution: Error reading accounts: {0}", e);
			}
		}
        public CConfiguration(ArtType type)
        {
            GConfClient = new GConf.Client();
            systemProxy = new ProxyAttrStruct();
            gangProxy = new ProxyAttrStruct();
            systemProxy.Ip = ""; //TODO:Why is it important to initialize it...an error occurs otherwise.
            gangProxy.Ip = ""; //TODO:Why is it important to initialize it...an error occurs otherwise.
            artType=type;
            dirSep=Path.DirectorySeparatorChar.ToString();
            homePath = Environment.GetFolderPath(Environment.SpecialFolder.Personal)+dirSep;
            settingsPath = Path.Combine(homePath,".gnome2"+dirSep+"gnome-art-ng");
            splashInstallPath = homePath+".local/share/pixmaps/splash"+dirSep;
            applicationInstallPath = homePath+"."+themesDir+dirSep;
            decorationInstallPath = homePath+"."+themesDir+dirSep;
            iconInstallPath = homePath+iconDir+dirSep;
            tarIsAvailable = CUtility.TestIfProgIsInstalled("tar","--version","gnu tar");
            grepIsAvailable = CUtility.TestIfProgIsInstalled("grep","--version","gnu grep");
            sedIsAvailable = CUtility.TestIfProgIsInstalled("sed","--version","gnu sed");
            setDistributionDependendSettings();
            CreateDownloadDirectories();

            //Create GConf listeners
            GConf.NotifyEventHandler changed_handler = new GConf.NotifyEventHandler(onSettingsChanged);
            GConfClient.AddNotify(sProxyGconfPath,changed_handler);
            //Load Configurations
            settingsLoadOk = LoadProgramSettings();
        }
Exemplo n.º 5
0
 // Methods :: Public :: AddNotify
 /// <summary>
 ///     Add a <see cref="GConf.NotifyEventHandler" /> to a key.
 /// </summary>
 /// <param name="key">
 ///	The key.
 /// </param>
 /// <param name="notify">
 ///	The <see cref="GConf.NotifyEventHandler" />.
 /// </param>
 public static void AddNotify
     (string key, GConf.NotifyEventHandler notify)
 {
     gconf_client.AddNotify(key, notify);
 }