Changeset 3385
- Timestamp:
- 02/09/08 12:20:34
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/libtinymail-camel/bs/bodystruct.c (modified) (1 diff)
- trunk/libtinymail-camel/camel-lite/camel/camel-provider.c (modified) (1 diff)
- trunk/libtinymail-camel/camel-lite/summary/summary.c (modified) (1 diff)
- trunk/libtinymail-maemo/tny-maemo-account-store.c (modified) (1 diff)
- trunk/libtinymailui-gtk/tny-gtk-folder-store-tree-model.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r3373 r3385 1 2008-02-09 Philip Van Hoof <pvanhoof@gnome.org> 2 3 * Crash when the IMAP server doesn't support namespaces 4 * GLib Signal leakage in TnyGtkFolderStoreTreeModel 5 * Various smaller fixes and code improvements 6 1 7 2008-02-05 Philip Van Hoof <pvanhoof@gnome.org> 2 8 trunk/libtinymail-camel/bs/bodystruct.c
r3287 r3385 193 193 inptr++; /* My '(' */ 194 194 195 if (!first) {195 if (!first) 196 196 g_string_append (str, ", "); 197 first = FALSE; 198 } 197 first = FALSE; 199 198 200 199 name = decode_qstring (&inptr, inend, err); trunk/libtinymail-camel/camel-lite/camel/camel-provider.c
r2950 r3385 140 140 141 141 p = strrchr (name, '.'); 142 strcpy (p, "." G_MODULE_SUFFIX); 142 if (p) 143 strcpy (p, "." G_MODULE_SUFFIX); 143 144 144 145 m = g_malloc0(sizeof(*m)); trunk/libtinymail-camel/camel-lite/summary/summary.c
r3300 r3385 677 677 flags = fopen (flags_filename_n, "w"); 678 678 679 if (!flags) { 680 g_free (flags_filename); 681 g_free (flags_filename_n); 682 g_list_free (items); 683 /* TODO: Error reporting */ 684 g_static_rec_mutex_unlock (b->lock); 685 return; 686 } 687 679 688 while (items) { 680 689 SummaryItem *item = (SummaryItem *) items->data; trunk/libtinymail-maemo/tny-maemo-account-store.c
r3304 r3385 154 154 TnyMaemoAccountStorePriv *priv = TNY_MAEMO_ACCOUNT_STORE_GET_PRIVATE (self); 155 155 156 gchar *key = g_strdup (entry->key); 157 gchar *ptr = strrchr (key, '/'); ptr++; 156 gchar *key = entry->key ? g_strdup (entry->key) : g_strdup (""); 157 gchar *ptr = strrchr (key, '/'); 158 159 if (ptr) 160 ptr++; 158 161 159 162 if (!strcmp (ptr, "count")) trunk/libtinymailui-gtk/tny-gtk-folder-store-tree-model.c
r3304 r3385 391 391 typedef struct 392 392 { 393 GObject *instance; 394 guint handler_id; 395 } SignalSlot; 396 397 typedef struct 398 { 393 399 TnyGtkFolderStoreTreeModel *self; 394 400 TnyAccount *account; … … 403 409 if (tny_account_is_ready (info->account)) 404 410 { 405 g_signal_connect (info->account, "connection-status-changed", 411 SignalSlot *slot; 412 413 slot = g_slice_new (SignalSlot); 414 slot->instance = g_object_ref (info->account); 415 slot->handler_id = g_signal_connect (info->account, "connection-status-changed", 406 416 G_CALLBACK (tny_gtk_folder_store_tree_model_on_constatus_changed), info->self); 407 408 g_signal_connect (info->account, "changed", 417 g_ptr_array_add (info->self->signals, slot); 418 419 slot = g_slice_new (SignalSlot); 420 slot->instance = g_object_ref (info->account); 421 slot->handler_id = g_signal_connect (info->account, "changed", 409 422 G_CALLBACK (tny_gtk_folder_store_tree_model_on_changed), info->self); 423 g_ptr_array_add (info->self->signals, slot); 410 424 411 425 tny_gtk_folder_store_tree_model_on_constatus_changed (info->account, … … 467 481 468 482 } else { 469 g_signal_connect (folder_store, "connection-status-changed", 483 SignalSlot *slot; 484 485 slot = g_slice_new (SignalSlot); 486 slot->instance = g_object_ref (folder_store); 487 slot->handler_id = g_signal_connect (folder_store, "connection-status-changed", 470 488 G_CALLBACK (tny_gtk_folder_store_tree_model_on_constatus_changed), self); 471 g_signal_connect (folder_store, "changed", 489 g_ptr_array_add (self->signals, slot); 490 491 slot = g_slice_new (SignalSlot); 492 slot->instance = g_object_ref (folder_store); 493 slot->handler_id = g_signal_connect (folder_store, "changed", 472 494 G_CALLBACK (tny_gtk_folder_store_tree_model_on_changed), self); 495 g_ptr_array_add (self->signals, slot); 473 496 } 474 497 } … … 524 547 { 525 548 TnyGtkFolderStoreTreeModel *me = (TnyGtkFolderStoreTreeModel*) object; 526 /* 527 if (me->signal1 != -1) 528 g_signal_handler_disconnect (me, me->signal1); 529 530 if (me->signal2 != -1) 531 g_signal_handler_disconnect (me, me->signal2); 532 */ 549 int i = 0; 550 551 for (i = 0; i < me->signals->len; i++) { 552 SignalSlot *slot = (SignalSlot *) me->signals->pdata [i]; 553 g_signal_handler_disconnect (slot->instance, slot->handler_id); 554 g_object_unref (slot->instance); 555 g_slice_free (SignalSlot, slot); 556 } 557 558 g_ptr_array_free (me->signals, TRUE); 559 me->signals = NULL; 533 560 534 561 /* Experimentally removed this. With weak referencing this ain't needed ... … … 594 621 static GType types[] = { G_TYPE_STRING, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_INT, G_TYPE_OBJECT }; 595 622 623 me->signals = g_ptr_array_new (); 596 624 me->fol_obs = NULL; 597 625 me->store_obs = NULL;
