Exemple #1
0
        public GConfProxy()
        {
            gconf_client = new GConf.Client();
            gconf_client.AddNotify(PROXY, OnGConfNotify);
            gconf_client.AddNotify(HTTP_PROXY, OnGConfNotify);

            RefreshProxy();
        }
        public Session()
        {
            gconfClient = new GConf.Client ();
            gconfClient.AddNotify ("/apps/csboard",
                           new GConf.
                           NotifyEventHandler
                           (SessionChanged));

            string dir = "";
            string gnomedir = "";

              gnomedir =
                Path.Combine (Environment.
                          GetEnvironmentVariable ("HOME"),
                          ".gnome2");

            if (!Directory.Exists (gnomedir))
            {
                Directory.CreateDirectory (gnomedir);
            }

            dir = Path.Combine (gnomedir, "csboard");

            if (!Directory.Exists (dir))
            {
                Directory.CreateDirectory (dir);
            }

            Filename = Path.Combine (dir, "session.pgn");
        }
Exemple #3
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();
        }
 private void gConfInit()
 {
     if (gconf == null) {
         gconf = new GConf.Client ();
         gconf.AddNotify (getGConfPath (), gConfChanged);
     }
 }
        public SettingsPanel()
        {
            this.Build();

            client = new GConf.Client();
            client.AddNotify(GCONF_APP_PATH, new GConf.NotifyEventHandler(GConf_Changed));
            UpdateFromGConf();

            // General
            webDirectoryEntry.Changed += on_web_directory_activate;
            // Apache
            apachectlEntry.Changed += on_apachectl_path_activate;
        }
Exemple #6
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);
            }
        }
		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);
			}
		}
Exemple #8
0
 public GConfPreferencesService(string rootPath)
 {
     RootPath = rootPath;
     client   = new GConf.Client();
     client.AddNotify(RootPath, new GConf.NotifyEventHandler(HandleGConfChanged));
 }
        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();
        }
Exemple #10
0
		public GConfConfig(Config.Callback UpdateCallback)
		{
			this.UpdateCallback = UpdateCallback;

			c.AddNotify(path.TrimEnd(new char[] {'/'}), UpdateHandler);
		}
Exemple #11
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);
 }