Merge branch 'master' of github.com:mono/at-spi-sharp

This commit is contained in:
Stephen Shaw 2010-09-01 13:14:33 -06:00
Родитель 7cf898aac8 f9e17a3b70
Коммит 74e2e37833
6 изменённых файлов: 66 добавлений и 7 удалений

7
NEWS
Просмотреть файл

@ -1,3 +1,10 @@
What's new in at-spi-sharp 1.1.1:
* Fixed some exceptions when querying defunct objects.
* If we receive a ChildrenChanged signal adding a child whose index is out of
range for the cached list, re-fetch children rather than throwing an exception.
What's new in at-spi-sharp 1.1.0:
* Notify the registry when adding/removing event listeners, as is now required

Просмотреть файл

@ -145,7 +145,7 @@ namespace Atspi
protected virtual void Dispose (bool disposing)
{
if (stateSet != null && stateSet.Contains (StateType.Defunct))
if (Defunct)
return;
if (parent != null) {
Desktop.RaiseChildRemoved (parent, this);
@ -187,8 +187,13 @@ namespace Atspi
}
else if (children is List<Accessible>) {
if (added) {
if (!(this is Desktop))
children.Insert (n, child);
if (!(this is Desktop)) {
try {
children.Insert (n, child);
} catch (Exception) {
RefreshChildren ();
}
}
}
else if (child != null)
children.Remove (child);
@ -201,6 +206,16 @@ namespace Atspi
Desktop.RaiseChildRemoved (this, child);
}
private void RefreshChildren ()
{
AccessiblePath [] childPaths = proxy.GetChildren ();
List<Accessible> newChildren = new List<Accessible> ();
foreach (AccessiblePath child in childPaths)
newChildren.Add (Registry.GetElement (child,
true));
children = newChildren;
}
private void OnPropertyChange (Accessible sender, string property, object value)
{
if (property == "accessible-name") {
@ -360,6 +375,8 @@ namespace Atspi
public Accessible Parent {
get {
if (Defunct)
return null;
if (parent == null && !(this is Desktop)) {
object o = properties.Get (IFACE, "Parent");
AccessiblePath path = (AccessiblePath) Convert.ChangeType (o, typeof (AccessiblePath));
@ -389,7 +406,15 @@ namespace Atspi
public Accessible GetChildAtIndexNoCache (int index)
{
AccessiblePath path = proxy.GetChildAtIndex (index);
AccessiblePath path;
if (Defunct)
return null;
try {
path = proxy.GetChildAtIndex (index);
} catch (System.Exception) {
Defunct = true;
return null;
}
return Registry.GetElement (path, true);
}
@ -481,10 +506,29 @@ namespace Atspi
}
}
public bool Defunct {
get {
return (stateSet != null &&
stateSet.Contains (StateType.Defunct));
}
set {
stateSet = new StateSet ();
stateSet.Add (StateType.Defunct);
}
}
internal Interfaces Interfaces {
get {
if (Defunct)
return Interfaces.Invalid;
if ((interfaces & Interfaces.Invalid) != 0) {
string [] ifaces = proxy.GetInterfaces ();
string [] ifaces;
try {
ifaces = proxy.GetInterfaces ();
} catch (System.Exception) {
Defunct = true;
return Interfaces.Invalid;
}
interfaces = 0;
foreach (string iface in ifaces)
AddInterface (iface);
@ -696,5 +740,6 @@ namespace Atspi
string [] GetInterfaces ();
uint GetRole ();
uint [] GetState ();
AccessiblePath GetApplication ();
}
}

Просмотреть файл

@ -97,6 +97,12 @@ namespace Atspi
}
}
internal string GetAlternateBusName ()
{
AccessiblePath app = proxy.GetApplication ();
return app.bus_name;
}
public static void Terminate ()
{
lock (sync) {

Просмотреть файл

@ -106,6 +106,7 @@ namespace Atspi
applications = new Dictionary<string, Application> ();
applications [name] = this;
desktop = new Desktop (this);
applications [desktop.GetAlternateBusName ()] = this;
accessibles [SPI_PATH_ROOT] = desktop;
busProxy = Bus.GetObject<IBus> ("org.freedesktop.DBus", new ObjectPath ("/org/freedesktop/DBus"));

Просмотреть файл

@ -85,7 +85,7 @@ if test -d $srcdir/ndesk-dbus-git; then
rm -rf $srcdir/ndesk-dbus-git
rm $srcdir/ndesk-dbus/*.cs
fi
git clone git://gitorious.org/dbus-sharp/dbus-sharp.git $srcdir/ndesk-dbus-git
git clone git://github.com/mono/dbus-sharp.git $srcdir/ndesk-dbus-git
(cd $srcdir/ndesk-dbus-git && git checkout -b mono-a11y origin/mono-a11y)
cp $srcdir/ndesk-dbus-git/src/*.cs $srcdir/ndesk-dbus/
#TODO: Only copy a specific list, use a .sources file

Просмотреть файл

@ -1,5 +1,5 @@
AC_PREREQ([2.54])
AC_INIT([at-spi-sharp], [1.1.0])
AC_INIT([at-spi-sharp], [1.1.1])
AM_INIT_AUTOMAKE([foreign])
# pkg-config