Changeset 1107
- Timestamp:
- 11/09/06 01:01:07
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/libtinymail-camel/tny-camel-account.c (modified) (3 diffs)
- trunk/libtinymail-camel/tny-camel-folder.c (modified) (6 diffs)
- trunk/libtinymail-camel/tny-camel-header.c (modified) (1 diff)
- trunk/libtinymail-camel/tny-camel-mime-part.c (modified) (6 diffs)
- trunk/libtinymail-camel/tny-camel-msg-remove-strategy.c (modified) (2 diffs)
- trunk/libtinymail-camel/tny-camel-msg.c (modified) (8 diffs)
- trunk/libtinymail-camel/tny-camel-store-account.c (modified) (14 diffs)
- trunk/libtinymail-camel/tny-camel-transport-account.c (modified) (1 diff)
- trunk/libtinymail-gnome-desktop/tny-gnome-account-store.c (modified) (2 diffs)
- trunk/libtinymail-gnomevfs/tny-vfs-stream.c (modified) (2 diffs)
- trunk/libtinymail-gpe/tny-gpe-account-store.c (modified) (2 diffs)
- trunk/libtinymail-maemo/tny-maemo-account-store.c (modified) (2 diffs)
- trunk/libtinymail-olpc/tny-olpc-account-store.c (modified) (1 diff)
- trunk/libtinymailui-gtk/tny-gtk-header-view.c (modified) (1 diff)
- trunk/libtinymailui-gtk/tny-gtk-mime-part-save-strategy.c (modified) (1 diff)
- trunk/libtinymailui-gtk/tny-gtk-msg-view.c (modified) (2 diffs)
- trunk/libtinymailui-gtk/tny-gtk-msg-window.c (modified) (1 diff)
- trunk/libtinymailui-gtk/tny-gtk-text-buffer-stream.c (modified) (1 diff)
- trunk/libtinymailui-gtk/tny-gtk-text-mime-part-view.c (modified) (1 diff)
- trunk/libtinymailui-mozembed/tny-moz-embed-msg-view.c (modified) (2 diffs)
- trunk/libtinymailui-mozembed/tny-moz-embed-stream.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r1106 r1107 2 2 3 3 * Introduction of the new TnySendQueue interface 4 * Added a lot assertions to check for type safety 4 5 5 6 * This was a major API change trunk/libtinymail-camel/tny-camel-account.c
r1079 r1107 160 160 161 161 /* I know this isn't polite. But it works ;-) */ 162 163 162 /* camel_operation_cancel (NULL); */ 164 thread = g_thread_create (camel_cancel_hack_thread, NULL, TRUE, NULL);163 thread = g_thread_create (camel_cancel_hack_thread, NULL, TRUE, NULL); 165 164 g_thread_join (thread); 166 165 … … 177 176 178 177 while (priv->inuse_spin); 179 178 180 179 priv->inuse_spin = TRUE; 181 180 … … 228 227 229 228 g_static_rec_mutex_lock (priv->service_lock); 230 231 229 priv->session = session; 232 233 230 TNY_CAMEL_ACCOUNT_GET_CLASS (self)->reconnect_func (self); 234 235 231 _tny_session_camel_add_account (session, self); 236 237 232 g_static_rec_mutex_unlock (priv->service_lock); 238 233 trunk/libtinymail-camel/tny-camel-folder.c
r1105 r1107 240 240 TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self); 241 241 242 g_assert (TNY_IS_HEADER (header)); 243 242 244 if (!priv->remove_strat) 243 245 return; … … 411 413 { 412 414 TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self); 415 416 g_assert (TNY_IS_CAMEL_STORE_ACCOUNT (account)); 417 413 418 priv->account = TNY_STORE_ACCOUNT (account); 414 419 … … 589 594 if (!load_folder_no_lock (priv)) 590 595 { 591 tny_camel_folder_refresh_async_destroyer (info); 596 tny_camel_folder_refresh_async_destroyer (info); 592 597 camel_exception_free (ex); 593 g_mutex_unlock (priv->folder_lock); 598 g_mutex_unlock (priv->folder_lock); 594 599 g_thread_exit (NULL); 595 600 return NULL; … … 696 701 if (G_LIKELY (priv->folder) && CAMEL_IS_FOLDER (priv->folder) && G_LIKELY (priv->has_summary_cap)) 697 702 priv->unread_length = (guint)camel_folder_get_unread_message_count (priv->folder); 698 camel_exception_free (ex); 703 camel_exception_free (ex); 699 704 700 705 g_mutex_unlock (priv->folder_lock); … … 717 722 CamelException ex; 718 723 FldAndPriv *ptr = NULL; 724 725 g_assert (TNY_IS_LIST (headers)); 719 726 720 727 g_mutex_lock (priv->folder_lock); … … 773 780 const gchar *id; 774 781 CamelException *ex = camel_exception_new (); 782 783 g_assert (TNY_IS_HEADER (header)); 775 784 776 785 g_mutex_lock (priv->folder_lock); trunk/libtinymail-camel/tny-camel-header.c
r1104 r1107 46 46 destroy_write (TnyCamelHeader *self) 47 47 { 48 /* Also check out tny-msg.c: tny_msg_finalize (read the stupid hack) */48 /* Also check out tny-msg.c: tny_msg_finalize (read the stupid hack) */ 49 49 if (((WriteInfo*)self->info)->msg) 50 50 camel_object_unref (CAMEL_OBJECT (((WriteInfo*)self->info)->msg)); trunk/libtinymail-camel/tny-camel-mime-part.c
r1103 r1107 93 93 CamelDataWrapper *wrapper; 94 94 CamelMedium *medium; 95 CamelStream *cstream = tny_stream_camel_new (stream); 95 CamelStream *cstream; 96 97 g_assert (TNY_IS_STREAM (stream)); 98 99 cstream = tny_stream_camel_new (stream); 96 100 97 101 g_mutex_lock (priv->part_lock); … … 130 134 camel_stream_format_text (CamelDataWrapper *dw, CamelStream *stream) 131 135 { 132 /* Stolen from evolution, evil evil me!! moehahah */133 136 /* Stolen from evolution, evil evil me!! moehahah */ 137 134 138 CamelStreamFilter *filter_stream; 135 139 CamelMimeFilterCharset *filter; 136 140 const char *charset = "UTF-8"; /* I default to UTF-8, like it or not */ 137 141 CamelMimeFilterWindows *windows = NULL; 138 142 139 143 if (dw->mime_type && (charset = camel_content_type_param 140 144 (dw->mime_type, "charset")) && … … 195 199 CamelDataWrapper *wrapper; 196 200 CamelMedium *medium; 197 CamelStream *cstream = tny_stream_camel_new (stream); 201 CamelStream *cstream; 202 203 g_assert (TNY_IS_STREAM (stream)); 204 205 cstream = tny_stream_camel_new (stream); 198 206 199 207 g_mutex_lock (priv->part_lock); … … 237 245 tny_camel_mime_part_construct_from_stream_default (TnyMimePart *self, TnyStream *stream, const gchar *type) 238 246 { 239 240 247 TnyCamelMimePartPriv *priv = TNY_CAMEL_MIME_PART_GET_PRIVATE (self); 241 248 CamelDataWrapper *wrapper; 242 249 gint retval = -1; 243 250 CamelMedium *medium; 244 CamelStream *cstream = tny_stream_camel_new (stream); 245 251 CamelStream *cstream; 252 253 g_assert (TNY_IS_STREAM (stream)); 254 255 cstream = tny_stream_camel_new (stream); 256 246 257 g_mutex_lock (priv->part_lock); 247 258 medium = CAMEL_MEDIUM (priv->part); … … 281 292 CamelMedium *medium; 282 293 CamelStream *stream = camel_stream_mem_new (); 283 294 284 295 g_mutex_lock (priv->part_lock); 285 296 medium = CAMEL_MEDIUM (priv->part); … … 637 648 { 638 649 TnyCamelMimePart *self = g_object_new (TNY_TYPE_CAMEL_MIME_PART, NULL); 639 650 640 651 tny_camel_mime_part_set_part (self, part); 641 652 trunk/libtinymail-camel/tny-camel-msg-remove-strategy.c
r1095 r1107 39 39 40 40 41 42 41 static void 43 42 tny_camel_msg_remove_strategy_remove (TnyMsgRemoveStrategy *self, TnyFolder *folder, TnyHeader *header) 44 43 { 45 TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (folder);44 TnyCamelFolderPriv *priv; 46 45 const gchar *id; 47 46 47 g_assert (TNY_IS_CAMEL_FOLDER (folder)); 48 49 priv = TNY_CAMEL_FOLDER_GET_PRIVATE (folder); 48 50 id = tny_header_get_uid (TNY_HEADER (header)); 49 51 camel_folder_delete_message (priv->folder, id); … … 138 140 g_type_add_interface_static (type, TNY_TYPE_MSG_REMOVE_STRATEGY, 139 141 &tny_camel_msg_remove_strategy_info); 140 141 142 } 142 143 trunk/libtinymail-camel/tny-camel-msg.c
r1102 r1107 74 74 if (part) 75 75 { 76 /* http://bugzilla.gnome.org/show_bug.cgi?id=34368377 and tny-mime-part.c:515 ! */78 76 /* http://bugzilla.gnome.org/show_bug.cgi?id=343683 77 and tny-mime-part.c:515 ! */ 78 79 79 go = message_foreach_part_rec (msg, part, callback, data); 80 80 } else go = FALSE; … … 98 98 if (!part) 99 99 return FALSE; 100 100 101 101 /* http://bugzilla.gnome.org/show_bug.cgi?id=343683 102 102 and tny-mime-part.c:515 ! */ … … 168 168 TnyCamelMsgPriv *priv = TNY_CAMEL_MSG_GET_PRIVATE (self); 169 169 170 g_assert (TNY_IS_CAMEL_FOLDER (folder)); 171 170 172 g_mutex_lock (priv->folder_lock); 171 173 priv->folder = (TnyFolder*)folder; … … 187 189 TnyCamelMsgPriv *priv = TNY_CAMEL_MSG_GET_PRIVATE (self); 188 190 TnyCamelMimePartPriv *ppriv = TNY_CAMEL_MIME_PART_GET_PRIVATE (self); 191 192 g_assert (TNY_IS_LIST (list)); 189 193 190 194 g_mutex_lock (priv->parts_lock); … … 234 238 CamelDataWrapper *containee; 235 239 gint curl = 0, retval = 0; 240 241 /* Yes, indeed (I don't yet support non TnyCamelMimePart mime part 242 instances, and I know I should. Feel free to implement the copying 243 if you really need it) */ 244 245 g_assert (TNY_IS_CAMEL_MIME_PART (part)); 236 246 237 247 g_mutex_lock (priv->message_lock); … … 255 265 } 256 266 257 /* TODO: coupling mistake. This makes it obligated to use a specific258 implementation of MsgMimePart (the camel one). */259 260 267 g_mutex_lock (priv->parts_lock); 261 268 … … 284 291 285 292 static void 286 tny_camel_msg_del_part_default (TnyMsg *self, TnyMimePart *part)293 tny_camel_msg_del_part_default (TnyMsg *self, TnyMimePart *part) 287 294 { 288 295 TnyCamelMsgPriv *priv = TNY_CAMEL_MSG_GET_PRIVATE (self); 289 296 TnyCamelMimePartPriv *ppriv = TNY_CAMEL_MIME_PART_GET_PRIVATE (self); 290 297 CamelDataWrapper *containee; 298 299 300 /* Yes, indeed (I don't yet support non TnyCamelMimePart mime part 301 instances, and I know I should. Feel free to implement the copying 302 if you really need it) */ 303 304 g_assert (TNY_IS_CAMEL_MIME_PART (part)); 291 305 292 306 g_mutex_lock (priv->message_lock); … … 331 345 CamelMimeMessage *msg; 332 346 TnyCamelMsgPriv *priv = TNY_CAMEL_MSG_GET_PRIVATE (self); 347 348 g_assert (TNY_IS_CAMEL_HEADER (header)); 333 349 334 350 g_mutex_lock (priv->header_lock); trunk/libtinymail-camel/tny-camel-store-account.c
r1038 r1107 173 173 CamelStore *store; 174 174 175 g_assert (TNY_IS_CAMEL_FOLDER (folder)); 176 175 177 g_static_rec_mutex_lock (apriv->service_lock); 176 178 store = camel_session_get_store ((CamelSession*) apriv->session, … … 195 197 CamelStore *store; 196 198 199 g_assert (TNY_IS_CAMEL_FOLDER (folder)); 200 197 201 g_static_rec_mutex_lock (apriv->service_lock); 198 202 store = camel_session_get_store ((CamelSession*) apriv->session, … … 206 210 207 211 camel_object_unref (CAMEL_OBJECT (store)); 208 212 209 213 return; 210 214 } … … 236 240 apriv->account_type = TNY_ACCOUNT_TYPE_STORE; 237 241 priv->managed_folders = NULL; 238 242 239 243 return; 240 244 } … … 250 254 TNY_CAMEL_FOLDER_GET_PRIVATE (folder)->iter_parented = FALSE; 251 255 } 252 256 253 257 return; 254 258 } … … 257 261 tny_camel_store_account_finalize (GObject *object) 258 262 { 259 TnyCamelStoreAccount *self = (TnyCamelStoreAccount *)object; 263 TnyCamelStoreAccount *self = (TnyCamelStoreAccount *)object; 260 264 TnyCamelStoreAccountPriv *priv = TNY_CAMEL_STORE_ACCOUNT_GET_PRIVATE (self); 261 265 262 g_list_foreach (priv->managed_folders, foreach_managed_folder, self);266 g_list_foreach (priv->managed_folders, foreach_managed_folder, self); 263 267 g_list_free (priv->managed_folders); 264 priv->managed_folders = NULL;265 266 if (priv->iter_store && CAMEL_IS_STORE (priv->iter_store))268 priv->managed_folders = NULL; 269 270 if (priv->iter_store && CAMEL_IS_STORE (priv->iter_store)) 267 271 { 268 272 camel_store_free_folder_info (priv->iter_store, priv->iter); 269 273 camel_object_unref (CAMEL_OBJECT (priv->iter_store)); 270 274 } 271 275 272 276 (*parent_class->finalize) (object); 273 277 … … 285 289 { 286 290 TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self); 287 CamelException ex = CAMEL_EXCEPTION_INITIALISER; 288 CamelStore *store = camel_session_get_store ((CamelSession*) apriv->session, 289 apriv->url_string, &ex); 291 CamelException ex = CAMEL_EXCEPTION_INITIALISER; 290 292 TnyCamelFolder *cfol = TNY_CAMEL_FOLDER (folder); 291 293 TnyCamelFolderPriv *cpriv = TNY_CAMEL_FOLDER_GET_PRIVATE (cfol); 292 293 if (cpriv->folder_name) 294 { 295 camel_store_delete_folder (store, cpriv->folder_name, &ex); 296 g_free (cpriv->folder_name); cpriv->folder_name = NULL; 297 } 298 294 CamelStore *store; 295 296 g_assert (TNY_IS_CAMEL_FOLDER (folder)); 297 298 store = camel_session_get_store ((CamelSession*) apriv->session, 299 apriv->url_string, &ex); 300 301 if (store) 302 { 303 if (cpriv->folder_name) 304 { 305 camel_store_delete_folder (store, cpriv->folder_name, &ex); 306 if (camel_exception_is_set (&ex)) 307 g_critical ("Could not delete folder %s (%s)\n", 308 cpriv->folder_name, camel_exception_get_description (&ex)); 309 g_free (cpriv->folder_name); cpriv->folder_name = NULL; 310 } 311 312 camel_object_unref (CAMEL_OBJECT (store)); 313 } else 314 g_critical ("Store not available for %s (%s)\n", 315 apriv->url_string, camel_exception_get_description (&ex)); 316 299 317 /* TODO: error handling using 'ex' */ 300 318 … … 314 332 TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self); 315 333 CamelException ex = CAMEL_EXCEPTION_INITIALISER; 316 CamelStore *store = camel_session_get_store ((CamelSession*) apriv->session,317 apriv->url_string, &ex);318 334 TnyFolder *folder = tny_camel_folder_new (); 319 335 CamelFolderInfo *info; 320 321 info = camel_store_create_folder (store, "/", name, &ex); 322 323 _tny_camel_folder_set_id (TNY_CAMEL_FOLDER (folder), info->full_name); 324 camel_store_free_folder_info (store, info); 336 CamelStore *store; 337 338 store = camel_session_get_store ((CamelSession*) apriv->session, 339 apriv->url_string, &ex); 340 341 if (store) 342 { 343 info = camel_store_create_folder (store, "/", name, &ex); 344 if (info) 345 { 346 _tny_camel_folder_set_id (TNY_CAMEL_FOLDER (folder), info->full_name); 347 camel_store_free_folder_info (store, info); 348 } else 349 g_critical ("Failed to create folder %s (%s)\n", name, 350 camel_exception_get_description (&ex)); 351 352 camel_object_unref (CAMEL_OBJECT (store)); 353 } else 354 g_critical ("Store not available for %s (%s)\n", 355 apriv->url_string, camel_exception_get_description (&ex)); 325 356 326 357 /* TODO: Error handling using 'ex' */ … … 344 375 CamelFolderInfo *iter; 345 376 guint32 flags; 346 CamelStore *store = camel_session_get_store ((CamelSession*) apriv->session, 377 CamelStore *store; 378 379 g_assert (TNY_IS_LIST (list)); 380 if (query) 381 g_assert (TNY_IS_FOLDER_STORE_QUERY (query)); 382 383 store = camel_session_get_store ((CamelSession*) apriv->session, 347 384 apriv->url_string, &ex); 348 385 349 386 if (!store) 387 { 388 g_critical ("Store not available for %s (%s)\n", 389 apriv->url_string, camel_exception_get_description (&ex)); 390 350 391 return; 392 } 351 393 352 394 flags = CAMEL_STORE_FOLDER_INFO_FAST | CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL | … … 381 423 _tny_camel_folder_set_account (folder, TNY_STORE_ACCOUNT (self)); 382 424 383 tny_list_prepend (list, G_OBJECT (folder)); 425 tny_list_prepend (list, G_OBJECT (folder)); 384 426 } 385 427 iter = iter->next; … … 404 446 { 405 447 GetFoldersInfo *info = thr_user_data; 406 448 407 449 /* gidle reference */ 408 450 g_object_unref (G_OBJECT (info->self)); 409 451 g_object_unref (G_OBJECT (info->list)); 410 452 411 g_ free (info);453 g_slice_free (GetFoldersInfo, info); 412 454 413 455 return; … … 429 471 { 430 472 GetFoldersInfo *info = (GetFoldersInfo*) thr_user_data; 431 473 432 474 tny_folder_store_get_folders (TNY_FOLDER_STORE (info->self), 433 475 info->list, info->query); 434 435 if (info->query)476 477 if (info->query) 436 478 g_object_unref (G_OBJECT (info->query)); 437 479 438 /* thread reference */480 /* thread reference */ 439 481 g_object_unref (G_OBJECT (info->self)); 440 482 g_object_unref (G_OBJECT (info->list)); 441 483 442 484 if (info->callback) 443 485 { … … 457 499 } 458 500 459 460 501 g_thread_exit (NULL); 461 502 462 503 return NULL; 463 504 } … … 472 513 tny_camel_store_account_get_folders_async_default (TnyFolderStore *self, TnyList *list, TnyGetFoldersCallback callback, TnyFolderStoreQuery *query, gpointer user_data) 473 514 { 474 GetFoldersInfo *info = g_new0 (GetFoldersInfo, 1);515 GetFoldersInfo *info; 475 516 GThread *thread; 476 517 518 g_assert (TNY_IS_LIST (list)); 519 520 info = g_slice_new0 (GetFoldersInfo); 521 477 522 info->self = self; 478 info->list = list;523 info->list = list; 479 524 info->callback = callback; 480 525 info->user_data = user_data; 481 526 info->query = query; 482 527 info->depth = g_main_depth (); 483 528 484 529 /* thread reference */ 485 530 g_object_ref (G_OBJECT (info->self)); 486 531 g_object_ref (G_OBJECT (info->list)); 487 if (info->query)532 if (info->query) 488 533 g_object_ref (G_OBJECT (info->query)); 489 534 trunk/libtinymail-camel/tny-camel-transport-account.c
r1103 r1107 94 94 { 95 95 TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self); 96 TnyHeader *header = (TnyHeader *)tny_msg_get_header (msg); 97 CamelMimeMessage *message = _tny_camel_msg_get_camel_mime_message (TNY_CAMEL_MSG (msg)); 96 TnyHeader *header; CamelMimeMessage *message; 98 97 CamelException ex = CAMEL_EXCEPTION_INITIALISER; 99 98 CamelTransport *transport; 99 100 g_assert (TNY_IS_CAMEL_MSG (msg)); 101 102 header = tny_msg_get_header (msg); 103 message = _tny_camel_msg_get_camel_mime_message (TNY_CAMEL_MSG (msg)); 100 104 101 105 transport = camel_session_get_transport ((CamelSession*) apriv->session, trunk/libtinymail-gnome-desktop/tny-gnome-account-store.c
r1047 r1107 344 344 TnyGnomeAccountStorePriv *priv = TNY_GNOME_ACCOUNT_STORE_GET_PRIVATE (self); 345 345 gint i=0, count; 346 347 g_assert (TNY_IS_LIST (list)); 346 348 347 349 count = gconf_client_get_int (priv->client, … … 527 529 gint count = gconf_client_get_int (priv->client, "/apps/tinymail/accounts/count", NULL); 528 530 531 g_assert (TNY_IS_ACCOUNT (account)); 532 529 533 key = g_strdup_printf ("/apps/tinymail/accounts/%d/hostname", count); 530 534 gconf_client_set_string (priv->client, (const gchar*) key, trunk/libtinymail-gnomevfs/tny-vfs-stream.c
r966 r1107 59 59 }; 60 60 61 #define TNY_VFS_STREAM_GET_PRIVATE(o) \61 #define TNY_VFS_STREAM_GET_PRIVATE(o) \ 62 62 (G_TYPE_INSTANCE_GET_PRIVATE ((o), TNY_TYPE_VFS_STREAM, TnyVfsStreamPriv)) 63 63 … … 160 160 gssize nb_read; 161 161 gssize nb_written; 162 162 163 g_assert (TNY_IS_STREAM (output)); 164 163 165 while (G_UNLIKELY (!tny_stream_is_eos (self))) { 164 166 nb_read = tny_stream_read (self, tmp_buf, sizeof (tmp_buf)); trunk/libtinymail-gpe/tny-gpe-account-store.c
r971 r1107 229 229 TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 230 230 gint i=0, count; 231 232 g_assert (TNY_IS_LIST (list)); 231 233 232 234 count = gconf_client_get_int (priv->client, … … 413 415 gint count = gconf_client_get_int (priv->client, "/apps/tinymail/accounts/count", NULL); 414 416 417 g_assert (TNY_IS_ACCOUNT (account)); 418 415 419 count++; 416 420 trunk/libtinymail-maemo/tny-maemo-account-store.c
r971 r1107 230 230 TnyMaemoAccountStorePriv *priv = TNY_MAEMO_ACCOUNT_STORE_GET_PRIVATE (self); 231 231 gint i=0, count; 232 233 g_assert (TNY_IS_LIST (list)); 232 234 233 235 count = gconf_client_get_int (priv->client, … … 415 417 gint count = gconf_client_get_int (priv->client, "/apps/tinymail/accounts/count", NULL); 416 418 419 g_assert (TNY_IS_ACCOUNT (account)); 420 417 421 count++; 418 422 trunk/libtinymail-olpc/tny-olpc-account-store.c
r971 r1107 187 187 GDir *dir ; 188 188 189 g_assert (TNY_IS_LIST (list)); 190 189 191 configd = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir(), 190 192 ".tinymail", "accounts", NULL); trunk/libtinymailui-gtk/tny-gtk-header-view.c
r1097 r1107 69 69 { 70 70 TnyGtkHeaderViewPriv *priv = TNY_GTK_HEADER_VIEW_GET_PRIVATE (self); 71 72 if (header) 73 g_assert (TNY_IS_HEADER (header)); 71 74 72 75 if (G_LIKELY (priv->header)) trunk/libtinymailui-gtk/tny-gtk-mime-part-save-strategy.c
r1097 r1107 106 106 GtkFileChooserDialog *dialog; 107 107 gboolean destr=FALSE; 108 109 g_assert (TNY_IS_MIME_PART (part)); 108 110 109 111 dialog = GTK_FILE_CHOOSER_DIALOG trunk/libtinymailui-gtk/tny-gtk-msg-view.c
r1097 r1107 83 83 TnyMimePartView *retval = NULL; 84 84 85 g_assert (TNY_IS_MIME_PART (part)); 86 85 87 if (tny_mime_part_content_type_is (part, "text/*")) 86 88 { … … 198 200 if (msg) 199 201 { 202 g_assert (TNY_IS_MSG (msg)); 203 200 204 g_object_ref (G_OBJECT (msg)); 201 205 priv->msg = msg; trunk/libtinymailui-gtk/tny-gtk-msg-window.c
r1097 r1107 75 75 { 76 76 TnyGtkMsgWindowPriv *priv = TNY_GTK_MSG_WINDOW_GET_PRIVATE (self); 77 TnyHeader *header = TNY_HEADER (tny_msg_get_header (msg)); 78 77 TnyHeader *header; 78 79 if (msg) 80 { 81 g_assert (TNY_IS_MSG (msg)); 82 83 header = TNY_HEADER (tny_msg_get_header (msg)); 84 gtk_window_set_title (GTK_WINDOW (self), 85 tny_header_get_subject (header)); 86 g_object_unref (G_OBJECT (header)); 87 } 79 88 tny_msg_view_set_msg (priv->msg_view, msg); 80 81 gtk_window_set_title (GTK_WINDOW (self), tny_header_get_subject (header));82 83 g_object_unref (G_OBJECT (header));84 89 85 90 return; trunk/libtinymailui-gtk/tny-gtk-text-buffer-stream.c
r1097 r1107 55 55 gssize nb_read; 56 56 gssize nb_written; 57 57 58 g_assert (TNY_IS_STREAM (output)); 59 58 60 while (G_LIKELY (!tny_stream_is_eos (self))) 59 61 { trunk/libtinymailui-gtk/tny-gtk-text-mime-part-view.c
r1098 r1107 81 81 { 82 82 TnyGtkTextMimePartViewPriv *priv = TNY_GTK_TEXT_MIME_PART_VIEW_GET_PRIVATE (self); 83 84 g_assert (TNY_IS_MIME_PART (part)); 83 85 84 86 if (G_LIKELY (priv->part)) trunk/libtinymailui-mozembed/tny-moz-embed-msg-view.c
r994 r1107 60 60 TnyMimePartView *retval = NULL; 61 61 62 g_assert (TNY_IS_MIME_PART (part)); 63 62 64 if (tny_mime_part_content_type_is (part, "text/html")) 63 65 { … … 69 71 if (!retval) 70 72 retval = TNY_MOZ_EMBED_MSG_VIEW_GET_CLASS (self)->create_mime_part_view_for_orig_func (self, part); 71 73 72 74 return retval; 73 75 } trunk/libtinymailui-mozembed/tny-moz-embed-stream.c
r984 r1107 41 41 }; 42 42 43 #define TNY_MOZ_EMBED_STREAM_GET_PRIVATE(o) \43 #define TNY_MOZ_EMBED_STREAM_GET_PRIVATE(o) \ 44 44 (G_TYPE_INSTANCE_GET_PRIVATE ((o), TNY_TYPE_MOZ_EMBED_STREAM, TnyMozEmbedStreamPriv)) 45 45 … … 53 53 ssize_t nb_read; 54 54 ssize_t nb_written; 55 55 56 g_assert (TNY_IS_STREAM (output)); 57 56 58 while (G_LIKELY (!tny_stream_is_eos (self))) 57 59 {
