Mercurial > pidgin
comparison src/gtkprefs.c @ 7929:94a90bf90f32
[gaim-migrate @ 8600]
Fix some more graying/ungraying of stuff, I think. The add/remove
buttons show up for chats now. And instead of getting deleted and
then recreated when something is added or removed from the buddy
list, they just get hidden or shown.
Also show the add/remove buttons for chats.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 26 Dec 2003 19:07:19 +0000 |
parents | 48dc9f358a91 |
children | 2a781d4178ba |
comparison
equal
deleted
inserted
replaced
7928:dca50d465b7d | 7929:94a90bf90f32 |
---|---|
2159 GtkCellRenderer *rend; | 2159 GtkCellRenderer *rend; |
2160 GtkTreeViewColumn *col; | 2160 GtkTreeViewColumn *col; |
2161 GtkTreeSelection *sel; | 2161 GtkTreeSelection *sel; |
2162 GSList *awy = away_messages; | 2162 GSList *awy = away_messages; |
2163 struct away_message *a; | 2163 struct away_message *a; |
2164 GtkWidget *sw2; | |
2165 GtkSizeGroup *sg; | 2164 GtkSizeGroup *sg; |
2166 | 2165 |
2167 ret = gtk_vbox_new(FALSE, 18); | 2166 ret = gtk_vbox_new(FALSE, 18); |
2168 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | 2167 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
2169 | 2168 |
2170 sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); | 2169 sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); |
2171 | 2170 |
2172 sw = gtk_scrolled_window_new(NULL,NULL); | 2171 sw = gtk_scrolled_window_new(NULL,NULL); |
2173 away_text = gtk_imhtml_new(NULL, NULL); | 2172 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); |
2174 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
2175 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); | 2173 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); |
2176 | 2174 |
2177 prefs_away_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); | 2175 prefs_away_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); |
2178 while (awy) { | 2176 while (awy) { |
2179 a = (struct away_message *)awy->data; | 2177 a = (struct away_message *)awy->data; |
2182 0, a->name, | 2180 0, a->name, |
2183 1, a, -1); | 2181 1, a, -1); |
2184 awy = awy->next; | 2182 awy = awy->next; |
2185 } | 2183 } |
2186 event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(prefs_away_store)); | 2184 event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(prefs_away_store)); |
2187 | |
2188 | 2185 |
2189 rend = gtk_cell_renderer_text_new(); | 2186 rend = gtk_cell_renderer_text_new(); |
2190 col = gtk_tree_view_column_new_with_attributes ("NULL", | 2187 col = gtk_tree_view_column_new_with_attributes ("NULL", |
2191 rend, | 2188 rend, |
2192 "text", 0, | 2189 "text", 0, |
2194 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | 2191 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); |
2195 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(event_view), FALSE); | 2192 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(event_view), FALSE); |
2196 gtk_widget_show(event_view); | 2193 gtk_widget_show(event_view); |
2197 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), event_view); | 2194 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), event_view); |
2198 | 2195 |
2199 sw2 = gtk_scrolled_window_new(NULL, NULL); | 2196 sw = gtk_scrolled_window_new(NULL, NULL); |
2200 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2), | 2197 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), |
2201 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); | 2198 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); |
2202 gtk_box_pack_start(GTK_BOX(ret), sw2, TRUE, TRUE, 0); | 2199 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); |
2203 | 2200 |
2204 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw2), away_text); | 2201 away_text = gtk_imhtml_new(NULL, NULL); |
2202 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), away_text); | |
2205 gaim_setup_imhtml(away_text); | 2203 gaim_setup_imhtml(away_text); |
2206 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view)); | 2204 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view)); |
2207 g_signal_connect(G_OBJECT(sel), "changed", | 2205 g_signal_connect(G_OBJECT(sel), "changed", |
2208 G_CALLBACK(away_message_sel_cb), NULL); | 2206 G_CALLBACK(away_message_sel_cb), NULL); |
2209 g_signal_connect(G_OBJECT(event_view), "button-press-event", | 2207 g_signal_connect(G_OBJECT(event_view), "button-press-event", |