From d76f3be8f56365d1925a6f64ff58653ae125bfeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Fri, 21 Sep 2012 08:21:27 +0000 Subject: [PATCH] [GB.DBUS] * NEW: Add the DBus error message to the Gambas error message when registering or unregistering fails. git-svn-id: svn://localhost/gambas/trunk@5180 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.dbus/src/gb.dbus/.project | 4 ++-- gb.dbus/src/gb.dbus/.settings | 6 +++--- gb.dbus/src/gb.dbus/.src/MMain.module | 12 +++++++++++- gb.dbus/src/helper.c | 4 ++-- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/gb.dbus/src/gb.dbus/.project b/gb.dbus/src/gb.dbus/.project index cb0980f9e..3130dd899 100644 --- a/gb.dbus/src/gb.dbus/.project +++ b/gb.dbus/src/gb.dbus/.project @@ -1,8 +1,8 @@ # Gambas Project File 3.0 -# Compiled with Gambas 3.2.90 +# Compiled with Gambas 3.3.0 Title=gb.dbus Startup=MMain -Version=3.2.90 +Version=3.3.0 VersionFile=1 Component=gb.dbus TabSize=2 diff --git a/gb.dbus/src/gb.dbus/.settings b/gb.dbus/src/gb.dbus/.settings index a54ed4ea7..484a20cdf 100644 --- a/gb.dbus/src/gb.dbus/.settings +++ b/gb.dbus/src/gb.dbus/.settings @@ -48,12 +48,12 @@ SearchComment=False SearchString=True [OpenFile] -File[1]=".src/MMain.module:4.2" +Active=1 +File[1]=".src/MMain.module:4.0" File[2]=".src/DBusApplication.class:91.0" -File[3]=".src/DBus.class:10.0" +File[3]=".src/DBus.class:73.7" File[4]=".src/DBusProxy.class:168.0" File[5]=".src/DBusObject.class:451.0" -Active=6 File[6]=".src/CTest.class:60.0" File[7]=".src/DBusSignal.class:6.0" File[8]=".src/CTest2.class:9.0" diff --git a/gb.dbus/src/gb.dbus/.src/MMain.module b/gb.dbus/src/gb.dbus/.src/MMain.module index dc11e487f..07205ce5e 100644 --- a/gb.dbus/src/gb.dbus/.src/MMain.module +++ b/gb.dbus/src/gb.dbus/.src/MMain.module @@ -1,6 +1,6 @@ ' Gambas module file -Public Sub Main() +Public Sub Main2() Dim aVal As Variant[] Dim hSignal As DBusSignal @@ -89,3 +89,13 @@ Public Sub MySignal_Signal(Method As String, Arguments As Variant[]) Debug Method End + +Public Sub Main() + + ' Dim hobject As New MyObject + ' + ' DBus.Name = "org.gambas.somethingiswrong" + ' + ' DBus.System.Register(hobject, "/path/object") + +End diff --git a/gb.dbus/src/helper.c b/gb.dbus/src/helper.c index f9370ba28..5cba30d64 100644 --- a/gb.dbus/src/helper.c +++ b/gb.dbus/src/helper.c @@ -1069,7 +1069,7 @@ bool DBUS_register(DBusConnection *connection, const char *name, bool unique) if (dbus_error_is_set(&error)) { - GB.Error("Unable to register application name"); + GB.Error("Unable to register application name: &1", error.message); dbus_error_free(&error); return TRUE; } @@ -1090,7 +1090,7 @@ bool DBUS_unregister(DBusConnection *connection, const char *name) if (dbus_error_is_set(&error)) { - GB.Error("Unable to unregister application name"); + GB.Error("Unable to unregister application name: &1", error.message); dbus_error_free(&error); return TRUE; }