diff --git a/gb.dbus/src/gb.dbus/.icon.png b/gb.dbus/src/gb.dbus/.icon.png index 8748600ba..025c3393f 100644 Binary files a/gb.dbus/src/gb.dbus/.icon.png and b/gb.dbus/src/gb.dbus/.icon.png differ diff --git a/gb.dbus/src/gb.dbus/.project b/gb.dbus/src/gb.dbus/.project index c851eee6c..264ca9e08 100644 --- a/gb.dbus/src/gb.dbus/.project +++ b/gb.dbus/src/gb.dbus/.project @@ -6,4 +6,5 @@ Version=3.8.90 VersionFile=1 Component=gb.dbus TabSize=2 +Language=fr Packager=1 diff --git a/gb.dbus/src/gb.dbus/.src/DBusObject.class b/gb.dbus/src/gb.dbus/.src/DBusObject.class index 8358b3e63..02ff8b058 100644 --- a/gb.dbus/src/gb.dbus/.src/DBusObject.class +++ b/gb.dbus/src/gb.dbus/.src/DBusObject.class @@ -598,17 +598,9 @@ Public Sub DBusObserver_Message() If $aInterface And If sInterface <> $sInterface Then sMethod = Replace(sInterface, ".", "_") & "_" & sMethod Endif - - ' If InStr(sMethod, "XAyatana") Then - ' With $hObserver.Message.Arguments - ' Print sMethod - ' For I = 0 To .Max - ' Print "["; I; "] "; .[I] - ' Next - ' End With - ' Endif sType = Object.Class(Me)[sMethod].Type + If sType Then vVal = Object.Call(Me, sMethod, hObs.Message.Arguments) If TypeOf(vVal) = gb.Object And If vVal Is DBusValues Then diff --git a/gb.dbus/src/helper.c b/gb.dbus/src/helper.c index c64b6d6fe..cdf482d2a 100644 --- a/gb.dbus/src/helper.c +++ b/gb.dbus/src/helper.c @@ -98,6 +98,7 @@ aT ARRAY Array {TT} DICT_ENTRY Collection ***************************************************************************/ + typedef struct { const char *name; @@ -128,6 +129,10 @@ CONV_TYPE _conv_type[] = static const char *to_dbus_type(GB_VALUE *arg) { CONV_TYPE *p; + GB_TYPE type, atype; + int a; + const char *dtype; + char *result; switch(arg->type) { @@ -145,6 +150,8 @@ static const char *to_dbus_type(GB_VALUE *arg) if (arg->type >= GB_T_OBJECT) { + //fprintf(stderr, "%s\n", GB.GetClassName((void *)arg->type)); + for (p = _conv_type; p->name; p++) { if (GB.FindClass(p->name) == arg->type) @@ -152,7 +159,36 @@ static const char *to_dbus_type(GB_VALUE *arg) } if (GB.Is(arg->_object.value, GB.FindClass("Array"))) - return "av"; + { + type = arg->type; + a = 0; + + for(;;) + { + atype = GB.GetArrayType(type); + if (atype <= GB_T_OBJECT) + break; + type = atype; + a++; + } + + dtype = "v"; + for (p = _conv_type; p->name; p++) + { + if (GB.FindClass(p->name) == type) + { + dtype = p->dbus; + break; + } + } + + result = NULL; + while (a--) + result = GB.AddChar(result, 'a'); + result = GB.AddString(result, dtype, strlen(dtype)); + + return result; + } if (GB.Is(arg->_object.value, CLASS_DBusVariant)) return "v";