(Patch) Handle properly cancels from libconic in maemo implementation
- From: José Dapena Paz <jdapena igalia com>
- To: tinymail-devel-list <tinymail-devel-list gnome org>
- Subject: (Patch) Handle properly cancels from libconic in maemo implementation
- Date: Thu, 17 Apr 2008 18:56:05 +0200
Hi,
This patch fixes detection of cancelling the "choose wlan connection"
dialog in maemo. This way the connection attempt handler will get the
cancelled field properly filled.
The changelog entry:
* libtinymail-maemo/tny-maemo-conic-device.c: add a simple hack to
detect when we cancel the connection dialog (and then report this
properly).
--
José Dapena Paz <jdapena igalia com>
Igalia
Index: ChangeLog
===================================================================
--- ChangeLog (revision 3596)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2008-04-17 José Dapena Paz <jose gondomar wired citic igalia com>
+
+ * libtinymail-maemo/tny-maemo-conic-device.c: add a simple hack to
+ detect when we cancel the connection dialog (and then report this
+ properly).
+
2008-04-17 Philip Van Hoof <pvanhoof gnome org>
* Corrections to reference handling for TnyCamelSendQueue
Index: libtinymail-maemo/tny-maemo-conic-device.c
===================================================================
--- libtinymail-maemo/tny-maemo-conic-device.c (revision 3596)
+++ libtinymail-maemo/tny-maemo-conic-device.c (working copy)
@@ -264,6 +264,7 @@
gboolean emit = FALSE;
HandleConnInfo *iinfo;
int con_err, con_state;
+ const gchar *event_iap_id;
/* we don't need cnx in this function */
g_return_if_fail (user_data && TNY_IS_MAEMO_CONIC_DEVICE(user_data));
@@ -279,6 +280,7 @@
con_err = con_ic_connection_event_get_error (event);
con_state = con_ic_connection_event_get_status (event);
+ event_iap_id = con_ic_event_get_iap_id ((ConIcEvent *) event);
switch (con_err) {
case CON_IC_CONNECTION_ERROR_NONE:
@@ -299,7 +301,7 @@
switch (con_state) {
case CON_IC_STATUS_CONNECTED:
g_free (priv->iap);
- priv->iap = g_strdup (con_ic_event_get_iap_id ((ConIcEvent*)(event)));
+ priv->iap = g_strdup (event_iap_id);
if (!priv->is_online)
emit = TRUE;
is_online = TRUE;
@@ -312,6 +314,10 @@
priv->iap = NULL;
if (priv->is_online)
emit = TRUE;
+ /* if iap is "" then connection attempt has been canceled */
+ if ((con_err == CON_IC_CONNECTION_ERROR_NONE) &&
+ (!event_iap_id || (strlen (event_iap_id)== 0)))
+ con_err = CON_IC_CONNECTION_ERROR_USER_CANCELED;
is_online = FALSE;
/* Stop blocking tny_maemo_conic_device_connect(), if we are: */
stop_loop (device);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]