Exemplo n.º 1
0
		public override object Get (string key)
		{
			IntPtr raw_val;
			if (gconf_change_set_check_value (Raw, key, out raw_val) && raw_val != IntPtr.Zero) {
				Value val = new Value (raw_val);
				val.Managed = false;
				return val.Get ();
			} else {
				throw new NoSuchKeyException ();
			}
		}
		void NotifyCB (IntPtr client_ptr, uint id, IntPtr entry_ptr, IntPtr user_data)
		{
			Client client = new Client (client_ptr);
			_Entry entry = new _Entry (entry_ptr);
			if (entry.ValuePtr == IntPtr.Zero) {
				notify (client, new NotifyEventArgs (entry.Key, null));
				return;
			}
			Value val = new Value (entry.ValuePtr);
			val.Managed = false;
			notify (client, new NotifyEventArgs (entry.Key, val.Get ()));
		}
Exemplo n.º 3
0
		public override object Get (string key)
		{
			if (key == null)
				throw new ArgumentNullException ("key");

			IntPtr err;
			IntPtr raw = gconf_client_get (Raw, key, out err);
			if (err != IntPtr.Zero)
				throw new GLib.GException (err);
			
			if (raw == IntPtr.Zero)
				throw new NoSuchKeyException (key);

			Value val = new Value (raw);
			return val.Get ();
		}