2006-09-28 [colin] 2.5.2cvs16
authorColin Leroy <colin@colino.net>
Thu, 28 Sep 2006 17:11:32 +0000 (17:11 +0000)
committerColin Leroy <colin@colino.net>
Thu, 28 Sep 2006 17:11:32 +0000 (17:11 +0000)
* src/folderview.c
* src/gtk/gtksctree.c
* src/gtk/gtksctree.h
Make expanding not recursive in folderview

ChangeLog
PATCHSETS
configure.ac
src/folderview.c
src/gtk/gtksctree.c
src/gtk/gtksctree.h

index d45846f..3825a47 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-28 [colin]     2.5.2cvs16
+
+       * src/folderview.c
+       * src/gtk/gtksctree.c
+       * src/gtk/gtksctree.h
+               Make expanding not recursive in folderview
+
 2006-09-28 [colin]     2.5.2cvs15
 
        * src/addressbook.c
index 332100e..c6455ba 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.8.2.19 -r 1.8.2.20 src/export.c;  cvs diff -u -r 1.94.2.106 -r 1.94.2.107 src/messageview.c;  cvs diff -u -r 1.83.2.90 -r 1.83.2.91 src/mimeview.c;  cvs diff -u -r 1.101.2.30 -r 1.101.2.31 src/news.c;  cvs diff -u -r 1.56.2.43 -r 1.56.2.44 src/pop.c;  cvs diff -u -r 1.3.2.43 -r 1.3.2.44 src/prefs_themes.c;  cvs diff -u -r 1.150.2.79 -r 1.150.2.80 src/procmsg.c;  cvs diff -u -r 1.17.2.33 -r 1.17.2.34 src/send_message.c;  cvs diff -u -r 1.395.2.255 -r 1.395.2.256 src/summaryview.c;  cvs diff -u -r 1.23.2.8 -r 1.23.2.9 src/common/session.c;  cvs diff -u -r 1.11.2.17 -r 1.11.2.18 src/common/smtp.c;  cvs diff -u -r 1.4.2.12 -r 1.4.2.13 src/common/ssl_certificate.c;  cvs diff -u -r 1.36.2.79 -r 1.36.2.80 src/common/utils.c;  ) > 2.5.2cvs13.patchset
 ( cvs diff -u -r 1.155.2.42 -r 1.155.2.43 src/Makefile.am;  ) > 2.5.2cvs14.patchset
 ( cvs diff -u -r 1.60.2.66 -r 1.60.2.67 src/addressbook.c;  ) > 2.5.2cvs15.patchset
+( cvs diff -u -r 1.207.2.123 -r 1.207.2.124 src/folderview.c;  cvs diff -u -r 1.1.4.32 -r 1.1.4.33 src/gtk/gtksctree.c;  cvs diff -u -r 1.1.4.8 -r 1.1.4.9 src/gtk/gtksctree.h;  ) > 2.5.2cvs16.patchset
index ed641eb..5d6fd73 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=15
+EXTRA_VERSION=16
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 33af330..d4117d6 100644 (file)
@@ -494,6 +494,7 @@ GtkWidget *folderview_ctree_create(FolderView *folderview)
        }
 
        gtk_sctree_set_stripes(GTK_SCTREE(ctree), prefs_common.use_stripes_in_summaries);
+       gtk_sctree_set_recursive_expand(GTK_SCTREE(ctree), FALSE);
 
        gtk_ctree_set_indent(GTK_CTREE(ctree), CTREE_INDENT);
        gtk_clist_set_compare_func(GTK_CLIST(ctree), folderview_clist_compare);
index a2b78e1..21f35b8 100644 (file)
@@ -1276,7 +1276,11 @@ gtk_sctree_change_focus_row_expansion (GtkCTree          *ctree,
   switch (action)
     {
     case GTK_CTREE_EXPANSION_EXPAND:
-      gtk_ctree_expand_recursive (ctree, node);
+      if (GTK_SCTREE(ctree)->always_expand_recursively)
+             gtk_ctree_expand_recursive (ctree, node);
+      else
+             gtk_ctree_expand (ctree, node);
+
       break;
     case GTK_CTREE_EXPANSION_EXPAND_RECURSIVE:
       gtk_ctree_expand_recursive (ctree, node);
@@ -1288,7 +1292,10 @@ gtk_sctree_change_focus_row_expansion (GtkCTree          *ctree,
       gtk_ctree_collapse_recursive (ctree, node);
       break;
     case GTK_CTREE_EXPANSION_TOGGLE:
-      gtk_ctree_toggle_expansion_recursive (ctree, node);
+      if (GTK_SCTREE(ctree)->always_expand_recursively)
+             gtk_ctree_toggle_expansion_recursive (ctree, node);
+      else
+             gtk_ctree_toggle_expansion (ctree, node);
       break;
     case GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE:
       gtk_ctree_toggle_expansion_recursive (ctree, node);
@@ -1538,8 +1545,10 @@ gtk_sctree_button_press (GtkWidget *widget, GdkEventButton *event)
                GtkCTreeNode *node = gtk_ctree_node_nth(GTK_CTREE(sctree), row);
                if (GTK_CTREE_ROW (node)->expanded)
                        gtk_ctree_collapse(GTK_CTREE(sctree), node);
+               else if (GTK_SCTREE(sctree)->always_expand_recursively)
+                       gtk_ctree_expand_recursive (GTK_CTREE(sctree), node);
                else
-                       gtk_ctree_expand_recursive(GTK_CTREE(sctree), node);
+                       gtk_ctree_expand(GTK_CTREE(sctree), node);
                return TRUE;
        }
 
@@ -1818,6 +1827,7 @@ GtkWidget *gtk_sctree_new_with_titles (gint columns, gint tree_column,
        }
 
        GTK_SCTREE(widget)->show_stripes = TRUE;
+       GTK_SCTREE(widget)->always_expand_recursively = TRUE;
 
        return widget;
 }
@@ -1868,6 +1878,11 @@ void gtk_sctree_set_stripes(GtkSCTree  *sctree, gboolean show_stripes)
        sctree->show_stripes = show_stripes;
 }
 
+void gtk_sctree_set_recursive_expand(GtkSCTree  *sctree, gboolean rec_exp)
+{
+       sctree->always_expand_recursively = rec_exp;
+}
+
 /***********************************************************
  *             Tree sorting functions                      *
  ***********************************************************/
index 9faed42..c27309f 100644 (file)
@@ -39,6 +39,7 @@ struct _GtkSCTree {
        /* (dis)allow fancy color stripes */
        gboolean show_stripes;
        GtkTooltips *tips;
+       gboolean always_expand_recursively;
 };
 
 struct _GtkSCTreeClass {
@@ -77,6 +78,7 @@ void gtk_sctree_remove_node           (GtkSCTree      *sctree,
                                         GtkCTreeNode   *node);
 
 void gtk_sctree_set_stripes(GtkSCTree  *sctree, gboolean show_stripes);
+void gtk_sctree_set_recursive_expand(GtkSCTree  *sctree, gboolean rec_exp);
 
 /***********************************************************
  *             Tree sorting functions                      *