[gnome-pilot/dbus] Test with dbus method call
- From: Halton Huo <haltonhuo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-pilot/dbus] Test with dbus method call
- Date: Mon, 15 Mar 2010 11:21:38 +0000 (UTC)
commit ce56f41fe327f3ed0e1d9278d4964b4cd73ac5f7
Author: Halton Huo <halton huo sun com>
Date: Mon Mar 15 19:20:33 2010 +0800
Test with dbus method call
org.gnome.GnomePilot.Daemon.SetUserInfo
capplet/gnome-pilot-assistant.c | 14 +++++++++-----
gpilotd/gpilot-daemon.c | 7 +------
2 files changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/capplet/gnome-pilot-assistant.c b/capplet/gnome-pilot-assistant.c
index 661ed89..c26c38c 100644
--- a/capplet/gnome-pilot-assistant.c
+++ b/capplet/gnome-pilot-assistant.c
@@ -754,6 +754,10 @@ gpd_sync_page_prepare (GnomePilotAssistant *gpd)
GNOME_Pilot_IMMEDIATE,
0,
&priv->handle1);
+ if (priv->handle1 <= 0) {
+ error_dialog (GTK_WINDOW (priv->assistant), _("Failed sending request to gpilotd"));
+ return;
+ }
} else {
/* do get_from_pilot */
location = priv->device->type == PILOT_DEVICE_NETWORK ?
@@ -770,15 +774,15 @@ gpd_sync_page_prepare (GnomePilotAssistant *gpd)
gnome_pilot_client_get_user_info (priv->gpc, priv->device->name, GNOME_Pilot_IMMEDIATE, 0, &priv->handle1);
gnome_pilot_client_get_system_info (priv->gpc, priv->device->name, GNOME_Pilot_IMMEDIATE, 0, &priv->handle2);
+
+ if (priv->handle1 <= 0 || priv->handle2 <= 0) {
+ error_dialog (GTK_WINDOW (priv->assistant), _("Failed sending request to gpilotd"));
+ return;
+ }
}
gtk_label_set_text (GTK_LABEL (priv->sync_label), text);
g_free (text);
- if (priv->handle1 <= 0 || priv->handle2 <= 0) {
- error_dialog (GTK_WINDOW (priv->assistant), _("Failed sending request to gpilotd"));
- return;
- }
-
/* disable NEXT until we've synced */
gtk_assistant_set_page_complete (GTK_ASSISTANT(priv->assistant),
priv->page_sync, FALSE);
diff --git a/gpilotd/gpilot-daemon.c b/gpilotd/gpilot-daemon.c
index a680cf6..13daefd 100644
--- a/gpilotd/gpilot-daemon.c
+++ b/gpilotd/gpilot-daemon.c
@@ -2333,15 +2333,11 @@ gpilot_daemon_set_user_info (GpilotDaemon *daemon,
{
GpilotDaemonPrivate *priv;
GPilotRequest req;
- gchar *client_id;
gboolean ret;
ret = FALSE;
priv = daemon->priv;
- /* TODO
- GET_AND_CHECK_CLIENT_ID(client_id,cb,0);
- */
LOG (("set_user_info(cradle=%s,survival=%d,timeout=%d",
cradle,survival,timeout));
LOG ((" device = %s,", cradle));
@@ -2351,13 +2347,12 @@ gpilot_daemon_set_user_info (GpilotDaemon *daemon,
*handle = gpc_queue_store_set_userinfo_request (
survival==GNOME_Pilot_PERSISTENT?0:timeout,
cradle,
- client_id,
+ "",
username,
uid,
continue_sync);
ret = TRUE;
out:
- g_free(client_id);
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]