2005-10-25 [wwp] 1.9.15cvs102
[claws.git] / src / grouplistdialog.c
index 1f002eeda608ec1b0ef189e7df602caa1dfae70b..2aeccc2f1f3c8968a89df1d33f0a97eacf542db1 100644 (file)
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -39,6 +39,7 @@
 #include <gtk/gtkscrolledwindow.h>
 #include <gtk/gtkbutton.h>
 #include <gtk/gtkhbbox.h>
+#include <gtk/gtksctree.h>
 #include <gtk/gtkstock.h>
 #include <string.h>
 
@@ -208,8 +209,8 @@ static void grouplist_dialog_create(void)
        scrolledwin = gtk_scrolled_window_new(NULL, NULL);
        gtk_box_pack_start(GTK_BOX (vbox), scrolledwin, TRUE, TRUE, 0);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (scrolledwin),
-                                      GTK_POLICY_AUTOMATIC,
-                                      GTK_POLICY_AUTOMATIC);
+                                      GTK_POLICY_ALWAYS,
+                                      GTK_POLICY_ALWAYS);
 
        titles[0] = _("Newsgroup name");
        titles[1] = _("Messages");
@@ -218,6 +219,7 @@ static void grouplist_dialog_create(void)
        gtk_container_add(GTK_CONTAINER(scrolledwin), ctree);
        gtk_clist_set_column_width
                (GTK_CLIST(ctree), 0, GROUPLIST_COL_NAME_WIDTH);
+       gtk_clist_set_column_auto_resize(GTK_CLIST(ctree), 0, TRUE);
        gtk_clist_set_selection_mode(GTK_CLIST(ctree), GTK_SELECTION_MULTIPLE);
        gtk_ctree_set_line_style(GTK_CTREE(ctree), GTK_CTREE_LINES_DOTTED);
        gtk_ctree_set_expander_style(GTK_CTREE(ctree),
@@ -306,7 +308,7 @@ static GtkCTreeNode *grouplist_create_parent(const gchar *name,
 
        node = parent ? GTK_CTREE_ROW(parent)->children
                : GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
-       node = gtk_ctree_insert_node(GTK_CTREE(ctree), parent, node,
+       node = gtk_sctree_insert_node(GTK_CTREE(ctree), parent, node,
                                     cols, 0, NULL, NULL, NULL, NULL,
                                     FALSE, FALSE);
        if (parent && g_pattern_match_simple(pattern, parent_name) == FALSE)
@@ -351,14 +353,14 @@ static GtkCTreeNode *grouplist_create_branch(NewsGroupInfo *ginfo,
        parent = grouplist_create_parent(parent_name, pattern);
        node = grouplist_hash_get_branch_node(name);
        if (node) {
-               gtk_ctree_set_node_info(GTK_CTREE(ctree), node, cols[0], 0,
+               gtk_sctree_set_node_info(GTK_CTREE(ctree), node, cols[0], 0,
                                        NULL, NULL, NULL, NULL, FALSE, FALSE);
                gtk_ctree_node_set_text(GTK_CTREE(ctree), node, 1, cols[1]);
                gtk_ctree_node_set_text(GTK_CTREE(ctree), node, 2, cols[2]);
        } else {
                node = parent ? GTK_CTREE_ROW(parent)->children
                        : GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
-               node = gtk_ctree_insert_node(GTK_CTREE(ctree), parent, node,
+               node = gtk_sctree_insert_node(GTK_CTREE(ctree), parent, node,
                                             cols, 0, NULL, NULL, NULL, NULL,
                                             TRUE, FALSE);
                if (parent &&
@@ -428,7 +430,7 @@ static void grouplist_dialog_set_list(const gchar *pattern, gboolean refresh)
                if (g_pattern_match_string(pspec, ginfo->name)) {
                        node = grouplist_create_branch(ginfo, pattern);
                        if (g_slist_find_custom(subscribed, ginfo->name,
-                                               (GCompareFunc)g_strcasecmp)
+                                               (GCompareFunc)g_ascii_strcasecmp)
                            != NULL)
                                gtk_ctree_select(GTK_CTREE(ctree), node);
                }