[Commits] [SCM] claws branch, gtk3tree, updated. 3.99.0-105-g3faabb051

thorsten at claws-mail.org thorsten at claws-mail.org
Fri Apr 9 19:42:25 CEST 2021


The branch, gtk3tree has been updated
       via  3faabb051792752d4ccce839cc33769d01284b58 (commit)
       via  749f23fada9c6db3b3a2eedcbf40deb0968e55fd (commit)
       via  833e4361ef3a1b42ea98fcc04c9426f62cdf3e81 (commit)
      from  3ae5e505da497e64c3f9cfe7faae7f77fe608155 (commit)

Summary of changes:
 TODO             | 12 +-----------
 src/folderview.c | 51 +++++++++++++++++++++++++--------------------------
 src/folderview.h |  1 -
 3 files changed, 26 insertions(+), 38 deletions(-)


- Log -----------------------------------------------------------------
commit 3faabb051792752d4ccce839cc33769d01284b58
Author: Thorsten Maerz <info at netztorte.de>
Date:   Fri Apr 9 19:40:02 2021 +0200

    Update TODO

diff --git a/TODO b/TODO
index 295fd469e..141af1223 100644
--- a/TODO
+++ b/TODO
@@ -23,14 +23,6 @@ GtkTreeView based folderview
 
 * File-not-found messages after moving folders (drag&drop)
 
-* The "row-activated" signal is not emitted on single-clicks, even though
-  gtk_tree_view_set_activate_on_single_click() was called.
-  (worked around by a direct call in button_press_cb())
-
-* gtk_tree_view_set_cursor() doesn't open the summaryview
-  workaround: call row_activated_cb() (in folderview_select_next_with_flag())
-  Maybe same effect as missing "row-activated" signal
-
 * Resizing the column headers needs to be detected (to updated
   prefs_common.folder_col_size).
   (The "resize_column" signal doesn't exist any longer)
@@ -38,6 +30,4 @@ GtkTreeView based folderview
 * The column headers will always steal the focus. Once they are set clickable,
   gtk_widget_set_can_focus() has no effect.
 
-* Sort-order in summaryview sometimes flips (folderview_select_next_with_flag()
-  might be a cause)
-
+* Folder colors shown wrong

commit 749f23fada9c6db3b3a2eedcbf40deb0968e55fd
Author: Thorsten Maerz <info at netztorte.de>
Date:   Fri Apr 9 19:38:44 2021 +0200

    Fix sort order for summaryview
    
    Save old settings in folderview_unselect()
    (before sort_order/sort_type gets updated in row_activated_cb())

diff --git a/src/folderview.c b/src/folderview.c
index acb15e79e..671fe8608 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -494,7 +494,7 @@ static void row_activated_cb(GtkTreeView *treeview, GtkTreePath *path,
 	FolderView *folderview = (FolderView *)user_data;
 	GtkTreeIter iter;
 	GtkTreeModel *model = gtk_tree_view_get_model(treeview);
-	FolderItem *item, *olditem;
+	FolderItem *item;
 
 	debug_print("row-activated\n");
 
@@ -505,28 +505,9 @@ static void row_activated_cb(GtkTreeView *treeview, GtkTreePath *path,
 	gtk_tree_model_get(model, &iter,
 			F_COL_FOLDERITEM, &item, -1);
 
-	olditem = folderview->open_item;
 	folderview_open(folderview, item);
 	folderview_update_row(folderview, item);
 
-	/* Save cache for old folder */
-	/* We don't want to lose all caches if sylpheed crashed */
-	if (olditem && olditem != item) {
-		gchar *buf;
-		buf = g_strdup_printf(_("Closing Folder %s..."),
-			olditem->path ? olditem->path:olditem->name);
-		/* will be null if we just moved the previously opened folder */
-		STATUSBAR_PUSH(folderview->mainwin, buf);
-		main_window_cursor_wait(folderview->mainwin);
-		g_free(buf);
-		summary_save_prefs_to_folderitem(folderview->summaryview, olditem);
-		folder_item_close(olditem);
-		main_window_cursor_normal(folderview->mainwin);
-		STATUSBAR_POP(folderview->mainwin);
-	}
-	/* show closed folder icon */
-	folderview_update_row(folderview, folderview->open_item_prev);
-
 	/* CLAWS: set compose button type: news folder items
 	 * always have a news folder as parent */
 	if (item->folder)
@@ -1285,8 +1266,29 @@ void folderview_select(FolderView *folderview, FolderItem *item)
 void folderview_unselect(FolderView *folderview)
 {
 	debug_print("folderview_unselect\n");
-	folderview->open_item_prev = folderview->open_item;
+	FolderItem *olditem = folderview->open_item;
+
+	/* Save cache for old folder */
+	/* We don't want to lose all caches if sylpheed crashed */
+	if (olditem) {
+		gchar *buf;
+		buf = g_strdup_printf(_("Closing Folder %s..."),
+			olditem->path ? olditem->path : olditem->name);
+		/* will be null if we just moved the previously opened folder */
+		STATUSBAR_PUSH(folderview->mainwin, buf);
+		main_window_cursor_wait(folderview->mainwin);
+		g_free(buf);
+		summary_save_prefs_to_folderitem(folderview->summaryview,
+						 olditem);
+		folder_item_close(olditem);
+		main_window_cursor_normal(folderview->mainwin);
+		STATUSBAR_POP(folderview->mainwin);
+	}
+
 	folderview->open_item = NULL;
+
+	/* show closed folder icon */
+	folderview_update_row(folderview, olditem);
 }
 
 static GtkTreePath *folderview_find_next_with_flag(GtkTreeView *treeview,
diff --git a/src/folderview.h b/src/folderview.h
index b2793194a..c5ffbee59 100644
--- a/src/folderview.h
+++ b/src/folderview.h
@@ -59,7 +59,6 @@ struct _FolderView
 	FolderItem *open_item; /* Pointer to currently open item */
 	FolderItem *menu_item; /* Pointer to item the popup menu is open for */
 	GtkTreePath *open_path; /* Pointer to currently open item */
-	FolderItem *open_item_prev; /* Pointer to previously open item */
 
 	GHashTable *popups;
 

commit 833e4361ef3a1b42ea98fcc04c9426f62cdf3e81
Author: Thorsten Maerz <info at netztorte.de>
Date:   Fri Apr 9 19:24:59 2021 +0200

    Don't update GUI in folderview_open()

diff --git a/src/folderview.c b/src/folderview.c
index effd1d1e9..acb15e79e 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -507,6 +507,7 @@ static void row_activated_cb(GtkTreeView *treeview, GtkTreePath *path,
 
 	olditem = folderview->open_item;
 	folderview_open(folderview, item);
+	folderview_update_row(folderview, item);
 
 	/* Save cache for old folder */
 	/* We don't want to lose all caches if sylpheed crashed */
@@ -1145,12 +1146,8 @@ static gboolean folderview_open(FolderView *folderview, FolderItem *item)
 	STATUSBAR_POP(folderview->mainwin);
 	END_TIMING();
 
-	/* TM:TODO: there shouldn't be UI updates here */
-	if (summary_opened) {
+	if (summary_opened)
 		folderview->open_item = item;
-		folderview_update_row(folderview, item);
-		summary_grab_focus(folderview->summaryview);
-	}
 
 	return summary_opened;
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list