#include <gdk/gdkkeysyms.h>
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
#include <libgnomevfs/gnome-vfs.h>
#include <curl/multi.h>
#include <gconf/gconf-client.h>
#ifdef WITH_OSSO
osso_deinitialize(_osso);
#endif
+#ifdef WITH_HAL
+if (ctx)
+ libhal_ctx_shutdown(ctx, NULL);
+#endif
curl_global_cleanup();
}
}
static gboolean
-mapper_hal_init(DBusConnection *dbc)
+mapper_hal_init(DBusGConnection *gdbc)
{
DBusError error;
+DBusConnection *dbc=dbus_g_connection_get_connection(gdbc);
g_return_if_fail(dbc);
ctx=libhal_ctx_new();
g_return_if_fail(ctx);
-libhal_ctx_set_dbus_connection(ctx, dbc);
+if (!libhal_ctx_set_dbus_connection(ctx, dbc)) {
+ g_warning("HAL dbus connection failed");
+ return FALSE;
+}
if (!libhal_ctx_init(ctx, &error)) {
g_warning("HAL Init failed");
+ ctx=NULL;
return FALSE;
}
#ifdef WITH_HAL
mapper_hal_init(dbus_conn);
#endif
-
mis=MAPPER_INIT_UI;
p=0.9;
w="Misc";