Mercurial > pidgin
comparison src/gtkprefs.c @ 7939:451d2946423e
[gaim-migrate @ 8610]
That alphabetized gtk_list_store thing really is a good idea. I made
the smiley page and the away message page the same way.
The away message page... the messages are stored in a g_list
alphabetically, but if you rename one it doesn't resort it. And this
way the core won't have to store them alphabetically. IMO that's
kind of silly anyway
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 27 Dec 2003 06:33:38 +0000 |
parents | 049443a8c76b |
children | 83df8ad35446 |
comparison
equal
deleted
inserted
replaced
7938:160547821ea2 | 7939:451d2946423e |
---|---|
566 | 566 |
567 gtk_box_pack_start(GTK_BOX(ret), label, FALSE, TRUE, 0); | 567 gtk_box_pack_start(GTK_BOX(ret), label, FALSE, TRUE, 0); |
568 gtk_widget_show(label); | 568 gtk_widget_show(label); |
569 | 569 |
570 sw = gtk_scrolled_window_new(NULL,NULL); | 570 sw = gtk_scrolled_window_new(NULL,NULL); |
571 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | 571 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); |
572 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | 572 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
573 | 573 |
574 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); | 574 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); |
575 smiley_theme_store = gtk_list_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING); | 575 smiley_theme_store = gtk_list_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING); |
576 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(smiley_theme_store), | |
577 1, GTK_SORT_ASCENDING); | |
576 | 578 |
577 path = theme_refresh_theme_list(); | 579 path = theme_refresh_theme_list(); |
578 | 580 |
579 view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(smiley_theme_store)); | 581 view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(smiley_theme_store)); |
580 | 582 |
1732 gtk_list_store_set(ls, &iter, | 1734 gtk_list_store_set(ls, &iter, |
1733 0, gaim_plugin_is_loaded(plug), | 1735 0, gaim_plugin_is_loaded(plug), |
1734 1, plug->info->name ? _(plug->info->name) : plug->path, | 1736 1, plug->info->name ? _(plug->info->name) : plug->path, |
1735 2, plug, -1); | 1737 2, plug, -1); |
1736 } | 1738 } |
1737 | |
1738 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(ls), | |
1739 1, GTK_SORT_ASCENDING); | |
1740 } | 1739 } |
1741 | 1740 |
1742 static GtkWidget *plugin_page () | 1741 static GtkWidget *plugin_page () |
1743 { | 1742 { |
1744 GtkWidget *ret; | 1743 GtkWidget *ret; |
1759 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | 1758 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
1760 | 1759 |
1761 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); | 1760 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); |
1762 | 1761 |
1763 ls = gtk_list_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER); | 1762 ls = gtk_list_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER); |
1763 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(ls), | |
1764 1, GTK_SORT_ASCENDING); | |
1764 | 1765 |
1765 update_plugin_list(ls); | 1766 update_plugin_list(ls); |
1766 | 1767 |
1767 event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(ls)); | 1768 event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(ls)); |
1768 | 1769 |
2174 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | 2175 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
2175 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); | 2176 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); |
2176 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); | 2177 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); |
2177 | 2178 |
2178 prefs_away_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); | 2179 prefs_away_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); |
2180 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(prefs_away_store), | |
2181 0, GTK_SORT_ASCENDING); | |
2179 while (awy) { | 2182 while (awy) { |
2180 a = (struct away_message *)awy->data; | 2183 a = (struct away_message *)awy->data; |
2181 gtk_list_store_append (prefs_away_store, &iter); | 2184 gtk_list_store_append (prefs_away_store, &iter); |
2182 gtk_list_store_set(prefs_away_store, &iter, | 2185 gtk_list_store_set(prefs_away_store, &iter, |
2183 0, a->name, | 2186 0, a->name, |
2184 1, a, -1); | 2187 1, a, -1); |
2185 awy = awy->next; | 2188 awy = awy->next; |
2186 } | 2189 } |
2187 event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(prefs_away_store)); | 2190 event_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(prefs_away_store)); |
2188 | 2191 |
2189 rend = gtk_cell_renderer_text_new(); | 2192 rend = gtk_cell_renderer_text_new(); |
2190 col = gtk_tree_view_column_new_with_attributes ("NULL", | 2193 col = gtk_tree_view_column_new_with_attributes ("NULL", |
2191 rend, | 2194 rend, |
2192 "text", 0, | 2195 "text", 0, |