Mercurial > pidgin
comparison pidgin/gtknotify.c @ 20253:6f4defb6f399
applied changes from c0104c111e903cfec5d0a95e0ae9dafb72f0dcbf
through 80e3a515775c28b61c4c155c4a524374ef3360ff
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 28 Sep 2007 16:58:14 +0000 |
parents | 6b8bc3309ab7 |
children | 008865326919 b1a42d258a14 |
comparison
equal
deleted
inserted
replaced
20252:9752389df732 | 20253:6f4defb6f399 |
---|---|
417 { | 417 { |
418 PidginNotifyMailData *data = NULL; | 418 PidginNotifyMailData *data = NULL; |
419 GtkTreeIter iter; | 419 GtkTreeIter iter; |
420 GdkPixbuf *icon; | 420 GdkPixbuf *icon; |
421 gboolean new_n = TRUE; | 421 gboolean new_n = TRUE; |
422 | |
423 icon = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); | |
424 | 422 |
425 if (count > 0 || clear) { | 423 if (count > 0 || clear) { |
426 /* Allow only one non-detailed email notification for each account */ | 424 /* Allow only one non-detailed email notification for each account */ |
427 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(treemodel), &iter)) { | 425 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(treemodel), &iter)) { |
428 gboolean advanced; | 426 gboolean advanced; |
446 } | 444 } |
447 } | 445 } |
448 } while (advanced || gtk_tree_model_iter_next(GTK_TREE_MODEL(treemodel), &iter)); | 446 } while (advanced || gtk_tree_model_iter_next(GTK_TREE_MODEL(treemodel), &iter)); |
449 } | 447 } |
450 } | 448 } |
449 | |
450 if (clear) | |
451 return NULL; | |
452 | |
453 icon = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); | |
451 | 454 |
452 if (new_n) { | 455 if (new_n) { |
453 data = g_new0(PidginNotifyMailData, 1); | 456 data = g_new0(PidginNotifyMailData, 1); |
454 gtk_tree_store_append(treemodel, &iter, NULL); | 457 gtk_tree_store_append(treemodel, &iter, NULL); |
455 } | 458 } |
548 | 551 |
549 if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(mail_dialog->treemodel), &iter)) { | 552 if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(mail_dialog->treemodel), &iter)) { |
550 /* There is no API to clear the headline specifically */ | 553 /* There is no API to clear the headline specifically */ |
551 /* This will trigger reset_mail_dialog() */ | 554 /* This will trigger reset_mail_dialog() */ |
552 pidgin_blist_set_headline(NULL, NULL, NULL, NULL, NULL); | 555 pidgin_blist_set_headline(NULL, NULL, NULL, NULL, NULL); |
556 return NULL; | |
553 } | 557 } |
554 | |
555 return NULL; | |
556 } | 558 } |
557 } | 559 } |
558 | 560 |
559 if (!GTK_WIDGET_VISIBLE(dialog)) { | 561 if (!GTK_WIDGET_VISIBLE(dialog)) { |
560 GdkPixbuf *pixbuf = gtk_widget_render_icon(dialog, PIDGIN_STOCK_DIALOG_MAIL, | 562 GdkPixbuf *pixbuf = gtk_widget_render_icon(dialog, PIDGIN_STOCK_DIALOG_MAIL, |