diff --git a/examples/examples/Automation/DBusExplorer/.settings b/examples/examples/Automation/DBusExplorer/.settings index 05dcc7237..7cd837042 100644 --- a/examples/examples/Automation/DBusExplorer/.settings +++ b/examples/examples/Automation/DBusExplorer/.settings @@ -101,8 +101,8 @@ SearchString=True [OpenFile] Active=1 -File[1]=".src/FVersiongbXML.form" -File[2]=".src/FVersiongbXML.class:154.0" +File[1]=".src/FVersiongbXML.class:88.0" +File[2]=".src/FVersiongbXML.form" Count=2 [Watches] diff --git a/examples/examples/Automation/DBusExplorer/.src/FVersiongbXML.class b/examples/examples/Automation/DBusExplorer/.src/FVersiongbXML.class index ae3260d61..32e2bd767 100644 --- a/examples/examples/Automation/DBusExplorer/.src/FVersiongbXML.class +++ b/examples/examples/Automation/DBusExplorer/.src/FVersiongbXML.class @@ -86,7 +86,7 @@ Public Sub ShowPathContent(sPath As String, sBus As String, sApplication As Stri Endif Next - For Each s In DBus[sApplication][sPath].Children + For Each s In DBus[sBus & sApplication][sPath].Children sAppPath = [sBus, sApplication, sPath].join("|") If tvDbus.Exist(sAppPath) Then @@ -100,7 +100,7 @@ Public Sub ShowPathContent(sPath As String, sBus As String, sApplication As Stri Next Catch - Print Error.Text + Print Error.Where; ": "; Error.Text End @@ -176,11 +176,13 @@ End Public Function MakeSignature(sKey As String) As String Dim ars As String[] - Dim ars2 As New String[] - Dim s, t, sOut As String + Dim aIn As New String[] + Dim s, t As String Dim aArg As String[] Dim sName, sType As String Dim iArg As Integer + Dim sOut As String + Dim aOut As New String[] ars = Split(skey, "|") If Not $cArgs.Exist(skey) Then @@ -195,39 +197,40 @@ Public Function MakeSignature(sKey As String) As String Inc iArg + sName = "Arg" & CStr(iArg) + For Each t In Split(s) + aArg = Scan(t, "*=*") + Select Case aArg[0] + Case "type" + sType = GetType(aArg[1]) + Case "name" + sName = aArg[1] + End Select + Next + If InStr(s, "=out") Then - For Each t In Split(s) - If Scan(t, "*=*")[0] = "type" Then - s = Scan(t, "*=*")[1] - sType = GetType(s) - Endif - Next - - If Not sOut Then - sOut = " As " & sType - Else - sOut = " As Variant[]" - Endif + aOut.Add(sName & " As " & sType) Else - sName = "Arg" & CStr(iArg) - For Each t In Split(s) - aArg = Scan(t, "*=*") - Select Case aArg[0] - Case "type" - sType = GetType(aArg[1]) - Case "name" - sName = aArg[1] - End Select - Next - ars2.Add(sName & " As " & sType) + + aIn.Add(sName & " As " & sType) Endif Next - Return ars[ars.Max] & "(" & ars2.Join(", ") & ")" & sOut + s = ars[ars.Max] & "(" & aIn.Join(", ") & ")" + If aOut.Count Then + s &= " As " + If aOut.Count = 1 Then + s &= Scan(aOut[0], "* As *")[1] + Else + s &= "[" & aOut.Join(", ") & "]" + Endif + Endif + + Return s End diff --git a/examples/examples/Automation/DBusExplorer/.src/FVersiongbXML.form b/examples/examples/Automation/DBusExplorer/.src/FVersiongbXML.form index cd4c25b6a..99acf7272 100644 --- a/examples/examples/Automation/DBusExplorer/.src/FVersiongbXML.form +++ b/examples/examples/Automation/DBusExplorer/.src/FVersiongbXML.form @@ -122,6 +122,7 @@ MoveScaled(5,49,34,3) Font = Font["Monospace,-2"] Padding = 4 + AutoResize = True } } } diff --git a/gb.dbus/src/gb.dbus/.settings b/gb.dbus/src/gb.dbus/.settings index f92ddbefa..f899c86bf 100644 --- a/gb.dbus/src/gb.dbus/.settings +++ b/gb.dbus/src/gb.dbus/.settings @@ -37,10 +37,10 @@ SearchString=True [OpenFile] Active=1 -File[1]=".src/MMain.module:34.28" -File[2]=".src/DBusApplication.class:76.2" +File[1]=".src/MMain.module:34.0" +File[2]=".src/DBusApplication.class:55.51" File[3]=".src/DBus.class:9.0" -File[4]=".src/DBusProxy.class:159.28" +File[4]=".src/DBusProxy.class:22.2" File[5]=".src/DBusObject.class:360.2" File[6]=".src/CTest.class:16.0" File[7]=".src/DBusSignal.class:18.3" diff --git a/gb.dbus/src/gb.dbus/.src/MMain.module b/gb.dbus/src/gb.dbus/.src/MMain.module index c8e17df53..b7a5e0443 100644 --- a/gb.dbus/src/gb.dbus/.src/MMain.module +++ b/gb.dbus/src/gb.dbus/.src/MMain.module @@ -31,7 +31,8 @@ Public Sub Main() 'DBus["org.kde.kmail"]["/kmail/kmail_mainwindow_1"].geometry = [0, 24, 1024, 768] 'Print DBus["org.gambas.gb.dbus"]["/Test"].Compute(5, 7) - aVal = DBus["org.freedesktop.Notifications"]["/org/freedesktop/Notifications"].GetServerInformation() - Print aVal[0];; aVal[1];; aVal[2] + 'aVal = DBus["org.freedesktop.Notifications"]["/org/freedesktop/Notifications"].GetServerInformation() + 'Print aVal[0];; aVal[1];; aVal[2] + Print DBus["system://org.freedesktop.UDisks"]["/"].Children End