Changeset 2384
- Timestamp:
- 07/04/07 17:36:17
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-device.sgml (modified) (1 diff)
- trunk/libtinymail-camel/tny-camel-send-queue.c (modified) (1 diff)
- trunk/libtinymail-camel/tny-session-camel.c (modified) (2 diffs)
- trunk/libtinymail-gnome-desktop/tny-gnome-device.c (modified) (1 diff)
- trunk/libtinymail-gpe/tny-gpe-device.c (modified) (1 diff)
- trunk/libtinymail-maemo/tny-maemo-device.c (modified) (2 diffs)
- trunk/libtinymail-olpc/tny-olpc-device.c (modified) (1 diff)
- trunk/libtinymail/tny-device.c (modified) (1 diff)
- trunk/tests/c-demo/tny-demoui-summary-view.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r2383 r2384 1 2007-07-04 Philip Van Hoof <pvanhoof@gnome.org> 2 3 * Dealing with the first connection status of the device instance 4 1 5 2007-07-04 Murray Cumming <murrayc@murrayc.com> 2 6 trunk/docs/devel/reference/tmpl/tny-device.sgml
r2332 r2384 21 21 <!-- ##### STRUCT TnyDevice ##### --> 22 22 <para> 23 24 23 </para> 25 24 trunk/libtinymail-camel/tny-camel-send-queue.c
r2370 r2384 686 686 tny_camel_send_queue_flush (TnyCamelSendQueue *self) 687 687 { 688 TnyCamelSendQueuePriv *priv;689 690 688 g_return_if_fail (TNY_IS_CAMEL_SEND_QUEUE(self)); 691 692 priv = TNY_CAMEL_SEND_QUEUE_GET_PRIVATE (self); 693 694 g_mutex_lock (priv->todo_lock); 695 { 696 TnyFolder *outbox; 697 TnyList *headers = tny_simple_list_new (); 698 699 outbox = tny_send_queue_get_outbox (TNY_SEND_QUEUE (self)); 700 if (outbox) 701 { 702 /* TODO handle and report errors here */ 703 tny_folder_get_headers (outbox, headers, TRUE, NULL); 704 priv->total = tny_list_get_length (headers); 705 g_object_unref (G_OBJECT (headers)); 706 707 if (priv->total >= 1) 708 create_worker (TNY_SEND_QUEUE (self)); 709 710 g_object_unref (G_OBJECT (outbox)); 711 } 712 } 713 g_mutex_unlock (priv->todo_lock); 689 create_worker (TNY_SEND_QUEUE (self)); 714 690 } 715 691 trunk/libtinymail-camel/tny-session-camel.c
r2374 r2384 596 596 */ 597 597 598 static gboolean 599 after_one_second (gpointer data) 600 { 601 TnySessionCamel *self = data; 602 TnySessionCamelPriv *priv = self->priv; 603 604 if (priv->device && TNY_IS_DEVICE (priv->device) && tny_device_is_online (priv->device)) 605 connection_changed (priv->device, TRUE, self); 606 607 camel_object_unref (self); 608 609 return FALSE; 610 } 611 598 612 /** 599 613 * tny_session_camel_set_device: … … 625 639 priv->prev_constat = TRUE; 626 640 connection_changed (device, FALSE, self); 627 628 } 641 } else { 642 priv->prev_constat = FALSE; 643 camel_object_ref (self); 644 g_timeout_add (1000, after_one_second, self); 645 } 646 629 647 return; 630 648 } trunk/libtinymail-gnome-desktop/tny-gnome-device.c
r2299 r2384 186 186 return; 187 187 } 188 188 189 189 190 trunk/libtinymail-gpe/tny-gpe-device.c
r2054 r2384 127 127 return; 128 128 } 129 130 129 131 130 trunk/libtinymail-maemo/tny-maemo-device.c
r2054 r2384 115 115 116 116 117 118 117 /** 119 118 * tny_maemo_device_new: … … 125 124 { 126 125 TnyMaemoDevice *self = g_object_new (TNY_TYPE_MAEMO_DEVICE, NULL); 126 127 127 128 128 return TNY_DEVICE (self); trunk/libtinymail-olpc/tny-olpc-device.c
r2044 r2384 129 129 return; 130 130 } 131 132 131 133 132 trunk/libtinymail/tny-device.c
r2335 r2384 192 192 * while the status is forced with tny_device_force_online() or 193 193 * tny_device_force_offline(). 194 * 195 * Implementors must make sure that the emissions of this signal always 196 * happen in the mainloop. 194 197 */ 195 198 tny_device_signals[TNY_DEVICE_CONNECTION_CHANGED] = trunk/tests/c-demo/tny-demoui-summary-view.c
r2301 r2384 193 193 194 194 195 static GtkWidget *rem_dialog = NULL; 196 195 197 typedef struct 196 198 { … … 220 222 221 223 gtk_widget_destroy (GTK_WIDGET (dialog)); 224 rem_dialog = NULL; 225 222 226 g_slice_free (OnResponseInfo, info); 223 227 } … … 231 235 err->message, tny_header_get_subject (header)); 232 236 OnResponseInfo *info = g_slice_new (OnResponseInfo); 233 GtkWidget *dialog = gtk_message_dialog_new (NULL, 0, 234 GTK_MESSAGE_ERROR, GTK_BUTTONS_YES_NO, str); 235 g_free (str); 236 info->self = g_object_ref (user_data); 237 info->header = g_object_ref (header); 238 g_signal_connect (G_OBJECT (dialog), "response", 239 G_CALLBACK (on_response), info); 240 gtk_widget_show_all (dialog); 237 238 if (!rem_dialog) 239 { 240 rem_dialog = gtk_message_dialog_new (NULL, 0, 241 GTK_MESSAGE_ERROR, GTK_BUTTONS_YES_NO, str); 242 g_free (str); 243 info->self = g_object_ref (user_data); 244 info->header = g_object_ref (header); 245 g_signal_connect (G_OBJECT (rem_dialog), "response", 246 G_CALLBACK (on_response), info); 247 gtk_widget_show_all (rem_dialog); 248 } 241 249 } 242 250 return;
