Mercurial > pidgin
comparison pidgin/gtknotify.c @ 32672:3828a61c44da
A boring and large patch so I can merge heads.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 23 Dec 2011 08:21:58 +0000 |
parents | e2a1510da13d |
children |
comparison
equal
deleted
inserted
replaced
32671:0e69949b3e61 | 32672:3828a61c44da |
---|---|
34 #include "prefs.h" | 34 #include "prefs.h" |
35 #include "pidginstock.h" | 35 #include "pidginstock.h" |
36 #include "util.h" | 36 #include "util.h" |
37 | 37 |
38 #include "gtkblist.h" | 38 #include "gtkblist.h" |
39 #include "gtkimhtml.h" | |
40 #include "gtknotify.h" | 39 #include "gtknotify.h" |
41 #include "gtkpounce.h" | 40 #include "gtkpounce.h" |
42 #include "gtkutils.h" | 41 #include "gtkutils.h" |
42 #include "gtkwebview.h" | |
43 | 43 |
44 typedef struct | 44 typedef struct |
45 { | 45 { |
46 GtkWidget *window; | 46 GtkWidget *window; |
47 int count; | 47 int count; |
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 /* TODO: not sure if there is a way to do this in gtk+ 3, or | 537 #if !GTK_CHECK_VERSION(2,22,0) |
538 if we want to... */ | |
539 #if 0 | |
540 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); | 538 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); |
541 #endif | 539 #endif |
542 gtk_box_set_spacing(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), | 540 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), PIDGIN_HIG_BORDER); |
543 PIDGIN_HIG_BORDER); | 541 gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), PIDGIN_HIG_BOX_SPACE); |
544 gtk_container_set_border_width(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), | |
545 PIDGIN_HIG_BOX_SPACE); | |
546 | 542 |
547 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BORDER); | 543 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BORDER); |
548 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), | 544 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); |
549 hbox); | |
550 | 545 |
551 if (img != NULL) | 546 if (img != NULL) |
552 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); | 547 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); |
553 | 548 |
554 primary_esc = g_markup_escape_text(primary, -1); | 549 primary_esc = g_markup_escape_text(primary, -1); |
694 { | 689 { |
695 char *notification; | 690 char *notification; |
696 PurpleAccount *account; | 691 PurpleAccount *account; |
697 PidginNotifyMailData *data = NULL, *data2; | 692 PidginNotifyMailData *data = NULL, *data2; |
698 gboolean new_data = FALSE; | 693 gboolean new_data = FALSE; |
694 GtkTreeSelection *sel; | |
695 GtkTreeIter iter; | |
699 | 696 |
700 /* Don't bother updating if there aren't new emails and we don't have any displayed currently */ | 697 /* Don't bother updating if there aren't new emails and we don't have any displayed currently */ |
701 if (count == 0 && mail_dialog == NULL) | 698 if (count == 0 && mail_dialog == NULL) |
702 return NULL; | 699 return NULL; |
703 | 700 |
780 return NULL; | 777 return NULL; |
781 } | 778 } |
782 } | 779 } |
783 } | 780 } |
784 | 781 |
782 /* Select first item if nothing selected */ | |
783 sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(mail_dialog->treeview)); | |
784 if ((gtk_tree_selection_count_selected_rows(sel) < 1) | |
785 && gtk_tree_model_get_iter_first(GTK_TREE_MODEL(mail_dialog->treemodel), &iter)) { | |
786 gtk_tree_selection_select_iter(sel, &iter); | |
787 } | |
788 | |
789 #if GTK_CHECK_VERSION(2,18,0) | |
785 if (!gtk_widget_get_visible(mail_dialog->dialog)) { | 790 if (!gtk_widget_get_visible(mail_dialog->dialog)) { |
791 #else | |
792 if (!GTK_WIDGET_VISIBLE(mail_dialog->dialog)) { | |
793 #endif | |
786 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, |
787 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); |
788 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>", |
789 "<b>%d new emails.</b>", | 797 "<b>%d new emails.</b>", |
790 mail_dialog->total_count), mail_dialog->total_count); | 798 mail_dialog->total_count), mail_dialog->total_count); |
796 (GDestroyNotify)reset_mail_dialog); | 804 (GDestroyNotify)reset_mail_dialog); |
797 mail_dialog->in_use = FALSE; | 805 mail_dialog->in_use = FALSE; |
798 g_free(label_text); | 806 g_free(label_text); |
799 if (pixbuf) | 807 if (pixbuf) |
800 g_object_unref(pixbuf); | 808 g_object_unref(pixbuf); |
809 #if GTK_CHECK_VERSION(2,18,0) | |
801 } else if (!gtk_widget_has_focus(mail_dialog->dialog)) | 810 } else if (!gtk_widget_has_focus(mail_dialog->dialog)) |
811 #else | |
812 } else if (!GTK_WIDGET_HAS_FOCUS(mail_dialog->dialog)) | |
813 #endif | |
802 pidgin_set_urgent(GTK_WINDOW(mail_dialog->dialog), TRUE); | 814 pidgin_set_urgent(GTK_WINDOW(mail_dialog->dialog), TRUE); |
803 | 815 |
804 return data; | 816 return data; |
805 } | 817 } |
806 | 818 |
807 static gboolean | 819 static gboolean |
808 formatted_input_cb(GtkWidget *win, GdkEventKey *event, gpointer data) | 820 formatted_input_cb(GtkWidget *win, GdkEventKey *event, gpointer data) |
809 { | 821 { |
810 if (event->keyval == GDK_KEY_Escape) | 822 if (event->keyval == GDK_Escape) |
811 { | 823 { |
812 purple_notify_close(PURPLE_NOTIFY_FORMATTED, win); | 824 purple_notify_close(PURPLE_NOTIFY_FORMATTED, win); |
813 | 825 |
814 return TRUE; | 826 return TRUE; |
815 } | 827 } |
816 | 828 |
817 return FALSE; | 829 return FALSE; |
818 } | |
819 | |
820 static GtkIMHtmlOptions | |
821 notify_imhtml_options(void) | |
822 { | |
823 GtkIMHtmlOptions options = 0; | |
824 | |
825 if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting")) | |
826 options |= GTK_IMHTML_NO_COLOURS | GTK_IMHTML_NO_FONTS | GTK_IMHTML_NO_SIZES; | |
827 | |
828 options |= GTK_IMHTML_NO_COMMENTS; | |
829 options |= GTK_IMHTML_NO_TITLE; | |
830 options |= GTK_IMHTML_NO_NEWLINE; | |
831 options |= GTK_IMHTML_NO_SCROLL; | |
832 return options; | |
833 } | 830 } |
834 | 831 |
835 static void * | 832 static void * |
836 pidgin_notify_formatted(const char *title, const char *primary, | 833 pidgin_notify_formatted(const char *title, const char *primary, |
837 const char *secondary, const char *text) | 834 const char *secondary, const char *text) |
838 { | 835 { |
839 GtkWidget *window; | 836 GtkWidget *window; |
840 GtkWidget *vbox; | 837 GtkWidget *vbox; |
841 GtkWidget *label; | 838 GtkWidget *label; |
842 GtkWidget *button; | 839 GtkWidget *button; |
843 GtkWidget *imhtml; | 840 GtkWidget *web_view; |
844 GtkWidget *frame; | 841 GtkWidget *frame; |
845 char label_text[2048]; | 842 char label_text[2048]; |
846 char *linked_text, *primary_esc, *secondary_esc; | 843 char *linked_text, *primary_esc, *secondary_esc; |
847 | 844 |
848 window = gtk_dialog_new(); | 845 window = gtk_dialog_new(); |
852 | 849 |
853 g_signal_connect(G_OBJECT(window), "delete_event", | 850 g_signal_connect(G_OBJECT(window), "delete_event", |
854 G_CALLBACK(formatted_close_cb), NULL); | 851 G_CALLBACK(formatted_close_cb), NULL); |
855 | 852 |
856 /* Setup the main vbox */ | 853 /* Setup the main vbox */ |
857 vbox = gtk_dialog_get_content_area(GTK_DIALOG(window)); | 854 vbox = GTK_DIALOG(window)->vbox; |
858 | 855 |
859 /* Setup the descriptive label */ | 856 /* Setup the descriptive label */ |
860 primary_esc = g_markup_escape_text(primary, -1); | 857 primary_esc = g_markup_escape_text(primary, -1); |
861 secondary_esc = (secondary != NULL) ? g_markup_escape_text(secondary, -1) : NULL; | 858 secondary_esc = (secondary != NULL) ? g_markup_escape_text(secondary, -1) : NULL; |
862 g_snprintf(label_text, sizeof(label_text), | 859 g_snprintf(label_text, sizeof(label_text), |
874 gtk_label_set_selectable(GTK_LABEL(label), TRUE); | 871 gtk_label_set_selectable(GTK_LABEL(label), TRUE); |
875 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 872 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
876 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); | 873 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); |
877 gtk_widget_show(label); | 874 gtk_widget_show(label); |
878 | 875 |
879 /* Add the imhtml */ | 876 /* Add the webview */ |
880 frame = pidgin_create_imhtml(FALSE, &imhtml, NULL, NULL); | 877 frame = pidgin_create_webview(FALSE, &web_view, NULL, NULL); |
881 gtk_widget_set_name(imhtml, "pidgin_notify_imhtml"); | 878 gtk_widget_set_name(web_view, "pidgin_notify_webview"); |
882 gtk_imhtml_set_format_functions(GTK_IMHTML(imhtml), | 879 gtk_widget_set_size_request(web_view, 300, 250); |
883 gtk_imhtml_get_format_functions(GTK_IMHTML(imhtml)) | GTK_IMHTML_IMAGE); | |
884 gtk_widget_set_size_request(imhtml, 300, 250); | |
885 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); | 880 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
886 gtk_widget_show(frame); | 881 gtk_widget_show(frame); |
887 | 882 |
888 /* Add the Close button. */ | 883 /* Add the Close button. */ |
889 button = gtk_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); | 884 button = gtk_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); |
894 g_signal_connect(G_OBJECT(window), "key_press_event", | 889 g_signal_connect(G_OBJECT(window), "key_press_event", |
895 G_CALLBACK(formatted_input_cb), NULL); | 890 G_CALLBACK(formatted_input_cb), NULL); |
896 | 891 |
897 /* Make sure URLs are clickable */ | 892 /* Make sure URLs are clickable */ |
898 linked_text = purple_markup_linkify(text); | 893 linked_text = purple_markup_linkify(text); |
899 gtk_imhtml_append_text(GTK_IMHTML(imhtml), linked_text, notify_imhtml_options()); | 894 webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(web_view), linked_text, ""); |
900 g_free(linked_text); | 895 g_free(linked_text); |
901 | 896 |
902 g_object_set_data(G_OBJECT(window), "info-widget", imhtml); | 897 g_object_set_data(G_OBJECT(window), "webview-widget", web_view); |
903 | 898 |
904 /* Show the window */ | 899 /* Show the window */ |
905 pidgin_auto_parent_window(window); | 900 pidgin_auto_parent_window(window); |
906 | 901 |
907 gtk_widget_show(window); | 902 gtk_widget_show(window); |
982 | 977 |
983 g_signal_connect_swapped(G_OBJECT(window), "delete_event", | 978 g_signal_connect_swapped(G_OBJECT(window), "delete_event", |
984 G_CALLBACK(searchresults_close_cb), data); | 979 G_CALLBACK(searchresults_close_cb), data); |
985 | 980 |
986 /* Setup the main vbox */ | 981 /* Setup the main vbox */ |
987 vbox = gtk_dialog_get_content_area(GTK_DIALOG(window)); | 982 vbox = GTK_DIALOG(window)->vbox; |
988 | 983 |
989 /* Setup the descriptive label */ | 984 /* Setup the descriptive label */ |
990 primary_esc = (primary != NULL) ? g_markup_escape_text(primary, -1) : NULL; | 985 primary_esc = (primary != NULL) ? g_markup_escape_text(primary, -1) : NULL; |
991 secondary_esc = (secondary != NULL) ? g_markup_escape_text(secondary, -1) : NULL; | 986 secondary_esc = (secondary != NULL) ? g_markup_escape_text(secondary, -1) : NULL; |
992 label_text = g_strdup_printf( | 987 label_text = g_strdup_printf( |
1039 for (columniter = results->columns; columniter != NULL; columniter = columniter->next) { | 1034 for (columniter = results->columns; columniter != NULL; columniter = columniter->next) { |
1040 PurpleNotifySearchColumn *column = columniter->data; | 1035 PurpleNotifySearchColumn *column = columniter->data; |
1041 renderer = gtk_cell_renderer_text_new(); | 1036 renderer = gtk_cell_renderer_text_new(); |
1042 | 1037 |
1043 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(treeview), -1, | 1038 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(treeview), -1, |
1044 column->title, renderer, "text", i, NULL); | 1039 purple_notify_searchresult_column_get_title(column), renderer, "text", i, NULL); |
1045 | 1040 |
1046 if (!purple_notify_searchresult_column_is_visible(column)) | 1041 if (!purple_notify_searchresult_column_is_visible(column)) |
1047 gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(treeview), i), FALSE); | 1042 gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(treeview), i), FALSE); |
1048 | 1043 |
1049 i++; | 1044 i++; |
1053 PurpleNotifySearchButton *b = l->data; | 1048 PurpleNotifySearchButton *b = l->data; |
1054 GtkWidget *button = NULL; | 1049 GtkWidget *button = NULL; |
1055 switch (b->type) { | 1050 switch (b->type) { |
1056 case PURPLE_NOTIFY_BUTTON_LABELED: | 1051 case PURPLE_NOTIFY_BUTTON_LABELED: |
1057 if(b->label) { | 1052 if(b->label) { |
1058 button = gtk_button_new_with_label(b->label); | 1053 button = gtk_dialog_add_button(GTK_DIALOG(window), b->label, GTK_RESPONSE_NONE); |
1059 } else { | 1054 } else { |
1060 purple_debug_warning("gtknotify", "Missing button label\n"); | 1055 purple_debug_warning("gtknotify", "Missing button label\n"); |
1061 } | 1056 } |
1062 break; | 1057 break; |
1063 case PURPLE_NOTIFY_BUTTON_CONTINUE: | 1058 case PURPLE_NOTIFY_BUTTON_CONTINUE: |
1098 close_button = gtk_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); | 1093 close_button = gtk_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); |
1099 | 1094 |
1100 g_signal_connect_swapped(G_OBJECT(close_button), "clicked", | 1095 g_signal_connect_swapped(G_OBJECT(close_button), "clicked", |
1101 G_CALLBACK(searchresults_close_cb), data); | 1096 G_CALLBACK(searchresults_close_cb), data); |
1102 | 1097 |
1103 data->account = gc->account; | 1098 data->account = purple_connection_get_account(gc); |
1104 data->model = model; | 1099 data->model = model; |
1105 data->treeview = treeview; | 1100 data->treeview = treeview; |
1106 data->window = window; | 1101 data->window = window; |
1107 | 1102 |
1108 /* Insert rows. */ | 1103 /* Insert rows. */ |
1152 } | 1147 } |
1153 | 1148 |
1154 info = purple_notify_user_info_get_text_with_newline(user_info, "<br />"); | 1149 info = purple_notify_user_info_get_text_with_newline(user_info, "<br />"); |
1155 pinfo = g_hash_table_lookup(userinfo, key); | 1150 pinfo = g_hash_table_lookup(userinfo, key); |
1156 if (pinfo != NULL) { | 1151 if (pinfo != NULL) { |
1157 GtkIMHtml *imhtml = g_object_get_data(G_OBJECT(pinfo->window), "info-widget"); | 1152 GtkWidget *webview = g_object_get_data(G_OBJECT(pinfo->window), "webview-widget"); |
1158 char *linked_text = purple_markup_linkify(info); | 1153 char *linked_text = purple_markup_linkify(info); |
1159 gtk_imhtml_clear(imhtml); | 1154 gtk_webview_load_html_string_with_imgstore(GTK_WEBVIEW(webview), linked_text); |
1160 gtk_imhtml_append_text(imhtml, linked_text, notify_imhtml_options()); | |
1161 g_free(linked_text); | 1155 g_free(linked_text); |
1162 g_free(key); | 1156 g_free(key); |
1163 ui_handle = pinfo->window; | 1157 ui_handle = pinfo->window; |
1164 pinfo->count++; | 1158 pinfo->count++; |
1165 } else { | 1159 } else { |
1516 | 1510 |
1517 dialog = gtk_dialog_new(); | 1511 dialog = gtk_dialog_new(); |
1518 | 1512 |
1519 /* Setup the dialog */ | 1513 /* Setup the dialog */ |
1520 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); |
1521 gtk_container_set_border_width(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), | 1515 gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), PIDGIN_HIG_BOX_SPACE); |
1522 PIDGIN_HIG_BOX_SPACE); | 1516 #if !GTK_CHECK_VERSION(2,22,0) |
1523 /* TODO: not sure if this is possible (or necessary) in gtk+ 3 */ | |
1524 #if 0 | |
1525 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); | 1517 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); |
1526 #endif | 1518 #endif |
1527 gtk_box_set_spacing(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), | 1519 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), PIDGIN_HIG_BORDER); |
1528 PIDGIN_HIG_BORDER); | |
1529 | 1520 |
1530 /* Vertical box */ | 1521 /* Vertical box */ |
1531 vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); | 1522 vbox = GTK_DIALOG(dialog)->vbox; |
1532 | 1523 |
1533 /* Golden ratio it up! */ | 1524 /* Golden ratio it up! */ |
1534 gtk_widget_set_size_request(dialog, 550, 400); | 1525 gtk_widget_set_size_request(dialog, 550, 400); |
1535 | 1526 |
1536 spec_dialog = g_new0(PidginNotifyDialog, 1); | 1527 spec_dialog = g_new0(PidginNotifyDialog, 1); |
1558 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(spec_dialog->treeview), FALSE); | 1549 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(spec_dialog->treeview), FALSE); |
1559 | 1550 |
1560 gtk_tree_view_set_search_column(GTK_TREE_VIEW(spec_dialog->treeview), PIDGIN_MAIL_TEXT); | 1551 gtk_tree_view_set_search_column(GTK_TREE_VIEW(spec_dialog->treeview), PIDGIN_MAIL_TEXT); |
1561 gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(spec_dialog->treeview), | 1552 gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(spec_dialog->treeview), |
1562 pidgin_tree_view_search_equal_func, NULL, NULL); | 1553 pidgin_tree_view_search_equal_func, NULL, NULL); |
1554 sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(spec_dialog->treeview)); | |
1555 gtk_tree_selection_set_mode(sel, GTK_SELECTION_BROWSE); | |
1563 | 1556 |
1564 g_signal_connect(G_OBJECT(dialog), "response", | 1557 g_signal_connect(G_OBJECT(dialog), "response", |
1565 G_CALLBACK(email_response_cb), spec_dialog); | 1558 G_CALLBACK(email_response_cb), spec_dialog); |
1566 g_signal_connect(G_OBJECT(gtk_tree_view_get_selection(GTK_TREE_VIEW(spec_dialog->treeview))), | 1559 g_signal_connect(G_OBJECT(sel), "changed", |
1567 "changed", G_CALLBACK(selection_changed_cb), spec_dialog); | 1560 G_CALLBACK(selection_changed_cb), spec_dialog); |
1568 g_signal_connect(G_OBJECT(spec_dialog->treeview), "row-activated", G_CALLBACK(email_row_activated_cb), NULL); | 1561 g_signal_connect(G_OBJECT(spec_dialog->treeview), "row-activated", G_CALLBACK(email_row_activated_cb), NULL); |
1569 | 1562 |
1570 column = gtk_tree_view_column_new(); | 1563 column = gtk_tree_view_column_new(); |
1571 gtk_tree_view_column_set_resizable(column, TRUE); | 1564 gtk_tree_view_column_set_resizable(column, TRUE); |
1572 rend = gtk_cell_renderer_pixbuf_new(); | 1565 rend = gtk_cell_renderer_pixbuf_new(); |
1660 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); | 1653 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); |
1661 | 1654 |
1662 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | 1655 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
1663 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 1656 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
1664 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); | 1657 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); |
1665 gtk_box_pack_start(GTK_BOX(vbox), | 1658 gtk_box_pack_start(GTK_BOX(vbox), |
1666 pidgin_make_scrollable(spec_dialog->treeview, GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS, GTK_SHADOW_IN, -1, -1), | 1659 pidgin_make_scrollable(spec_dialog->treeview, GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS, GTK_SHADOW_IN, -1, -1), |
1667 TRUE, TRUE, 2); | 1660 TRUE, TRUE, 2); |
1668 | 1661 |
1669 return spec_dialog; | 1662 return spec_dialog; |
1670 } | 1663 } |