comparison pidgin/gtkplugin.c @ 31839:7281d151e492

merged from im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Thu, 17 Mar 2011 20:25:26 +0900
parents 917c597beb97
children
comparison
equal deleted inserted replaced
31648:fa88dc1dcabb 31839:7281d151e492
704 } 704 }
705 705
706 706
707 void pidgin_plugin_dialog_show() 707 void pidgin_plugin_dialog_show()
708 { 708 {
709 GtkWidget *sw;
710 GtkWidget *event_view; 709 GtkWidget *event_view;
711 GtkListStore *ls; 710 GtkListStore *ls;
712 GtkCellRenderer *rend, *rendt; 711 GtkCellRenderer *rend, *rendt;
713 GtkTreeViewColumn *col; 712 GtkTreeViewColumn *col;
714 GtkTreeSelection *sel; 713 GtkTreeSelection *sel;
726 _("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE); 725 _("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE);
727 gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), 726 gtk_dialog_add_button(GTK_DIALOG(plugin_dialog),
728 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); 727 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
729 gtk_widget_set_sensitive(pref_button, FALSE); 728 gtk_widget_set_sensitive(pref_button, FALSE);
730 gtk_window_set_role(GTK_WINDOW(plugin_dialog), "plugins"); 729 gtk_window_set_role(GTK_WINDOW(plugin_dialog), "plugins");
731
732 sw = gtk_scrolled_window_new(NULL,NULL);
733 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
734 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
735
736 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(plugin_dialog)->vbox), sw, TRUE, TRUE, 0);
737 730
738 ls = gtk_list_store_new(4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN); 731 ls = gtk_list_store_new(4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN);
739 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(ls), 732 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(ls),
740 1, GTK_SORT_ASCENDING); 733 1, GTK_SORT_ASCENDING);
741 734
777 gtk_tree_view_column_set_expand (col, TRUE); 770 gtk_tree_view_column_set_expand (col, TRUE);
778 g_object_set(rendt, "ellipsize", PANGO_ELLIPSIZE_END, NULL); 771 g_object_set(rendt, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
779 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); 772 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col);
780 gtk_tree_view_column_set_sort_column_id(col, 1); 773 gtk_tree_view_column_set_sort_column_id(col, 1);
781 g_object_unref(G_OBJECT(ls)); 774 g_object_unref(G_OBJECT(ls));
782 gtk_container_add(GTK_CONTAINER(sw), event_view); 775 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(plugin_dialog)->vbox),
776 pidgin_make_scrollable(event_view, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC, GTK_SHADOW_IN, -1, -1),
777 TRUE, TRUE, 0);
783 gtk_tree_view_set_search_column(GTK_TREE_VIEW(event_view), 1); 778 gtk_tree_view_set_search_column(GTK_TREE_VIEW(event_view), 1);
784 gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(event_view), 779 gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(event_view),
785 pidgin_tree_view_search_equal_func, NULL, NULL); 780 pidgin_tree_view_search_equal_func, NULL, NULL);
786 781
787 pidgin_tooltip_setup_for_treeview(event_view, event_view, 782 pidgin_tooltip_setup_for_treeview(event_view, event_view,