Mercurial > pidgin
comparison pidgin/gtknotify.c @ 32696:763d65f3f758
explicit merge of '6ab9f5ff810acde3c06a2add7b8df2bd75cce6e3'
and '7a0bb807afc9c1c3f2aaa7143fc5d1e3dc7c6ee8'
to branch 'im.pidgin.cpw.qulogic.gtk3'
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 23 Dec 2011 06:58:52 +0000 |
parents | eb8f424876a5 3538e783b98c |
children | b8cbd52e26b1 |
comparison
equal
deleted
inserted
replaced
32418:466efc330d3d | 32696:763d65f3f758 |
---|---|
532 g_signal_connect(G_OBJECT(dialog), "response", | 532 g_signal_connect(G_OBJECT(dialog), "response", |
533 G_CALLBACK(message_response_cb), dialog); | 533 G_CALLBACK(message_response_cb), dialog); |
534 | 534 |
535 gtk_container_set_border_width(GTK_CONTAINER(dialog), PIDGIN_HIG_BORDER); | 535 gtk_container_set_border_width(GTK_CONTAINER(dialog), PIDGIN_HIG_BORDER); |
536 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); | 536 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); |
537 #if !GTK_CHECK_VERSION(2,22,0) | |
537 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); | 538 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); |
539 #endif | |
538 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), PIDGIN_HIG_BORDER); | 540 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), PIDGIN_HIG_BORDER); |
539 gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), PIDGIN_HIG_BOX_SPACE); | 541 gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), PIDGIN_HIG_BOX_SPACE); |
540 | 542 |
541 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BORDER); | 543 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BORDER); |
542 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); | 544 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); |
782 if ((gtk_tree_selection_count_selected_rows(sel) < 1) | 784 if ((gtk_tree_selection_count_selected_rows(sel) < 1) |
783 && gtk_tree_model_get_iter_first(GTK_TREE_MODEL(mail_dialog->treemodel), &iter)) { | 785 && gtk_tree_model_get_iter_first(GTK_TREE_MODEL(mail_dialog->treemodel), &iter)) { |
784 gtk_tree_selection_select_iter(sel, &iter); | 786 gtk_tree_selection_select_iter(sel, &iter); |
785 } | 787 } |
786 | 788 |
789 #if GTK_CHECK_VERSION(2,18,0) | |
790 if (!gtk_widget_get_visible(mail_dialog->dialog)) { | |
791 #else | |
787 if (!GTK_WIDGET_VISIBLE(mail_dialog->dialog)) { | 792 if (!GTK_WIDGET_VISIBLE(mail_dialog->dialog)) { |
793 #endif | |
788 GdkPixbuf *pixbuf = gtk_widget_render_icon(mail_dialog->dialog, PIDGIN_STOCK_DIALOG_MAIL, | 794 GdkPixbuf *pixbuf = gtk_widget_render_icon(mail_dialog->dialog, PIDGIN_STOCK_DIALOG_MAIL, |
789 gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL), NULL); | 795 gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL), NULL); |
790 char *label_text = g_strdup_printf(ngettext("<b>%d new email.</b>", | 796 char *label_text = g_strdup_printf(ngettext("<b>%d new email.</b>", |
791 "<b>%d new emails.</b>", | 797 "<b>%d new emails.</b>", |
792 mail_dialog->total_count), mail_dialog->total_count); | 798 mail_dialog->total_count), mail_dialog->total_count); |
798 (GDestroyNotify)reset_mail_dialog); | 804 (GDestroyNotify)reset_mail_dialog); |
799 mail_dialog->in_use = FALSE; | 805 mail_dialog->in_use = FALSE; |
800 g_free(label_text); | 806 g_free(label_text); |
801 if (pixbuf) | 807 if (pixbuf) |
802 g_object_unref(pixbuf); | 808 g_object_unref(pixbuf); |
809 #if GTK_CHECK_VERSION(2,18,0) | |
810 } else if (!gtk_widget_has_focus(mail_dialog->dialog)) | |
811 #else | |
803 } else if (!GTK_WIDGET_HAS_FOCUS(mail_dialog->dialog)) | 812 } else if (!GTK_WIDGET_HAS_FOCUS(mail_dialog->dialog)) |
813 #endif | |
804 pidgin_set_urgent(GTK_WINDOW(mail_dialog->dialog), TRUE); | 814 pidgin_set_urgent(GTK_WINDOW(mail_dialog->dialog), TRUE); |
805 | 815 |
806 return data; | 816 return data; |
807 } | 817 } |
808 | 818 |
1501 dialog = gtk_dialog_new(); | 1511 dialog = gtk_dialog_new(); |
1502 | 1512 |
1503 /* Setup the dialog */ | 1513 /* Setup the dialog */ |
1504 gtk_container_set_border_width(GTK_CONTAINER(dialog), PIDGIN_HIG_BOX_SPACE); | 1514 gtk_container_set_border_width(GTK_CONTAINER(dialog), PIDGIN_HIG_BOX_SPACE); |
1505 gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), PIDGIN_HIG_BOX_SPACE); | 1515 gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), PIDGIN_HIG_BOX_SPACE); |
1516 #if !GTK_CHECK_VERSION(2,22,0) | |
1506 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); | 1517 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); |
1518 #endif | |
1507 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), PIDGIN_HIG_BORDER); | 1519 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), PIDGIN_HIG_BORDER); |
1508 | 1520 |
1509 /* Vertical box */ | 1521 /* Vertical box */ |
1510 vbox = GTK_DIALOG(dialog)->vbox; | 1522 vbox = GTK_DIALOG(dialog)->vbox; |
1511 | 1523 |