[easytag] Fix Ctrl-clicking to toggle file selection
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Fix Ctrl-clicking to toggle file selection
- Date: Fri, 26 Dec 2014 22:57:21 +0000 (UTC)
commit fad2eca29ba532fc386bb5a421169e31dbb9eff2
Author: David King <amigadave amigadave com>
Date: Fri Dec 26 22:36:39 2014 +0000
Fix Ctrl-clicking to toggle file selection
In the selection changed handler, only change the current file shown in
the file and tag areas if it is selected. When unselecting, do not
update the current file.
https://bugzilla.gnome.org/show_bug.cgi?id=741980
src/browser.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/browser.c b/src/browser.c
index 045f6d0..27268a4 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -1187,6 +1187,7 @@ Browser_List_Row_Selected (EtBrowser *self, GtkTreeSelection *selection)
*/
if (n_selected == 0)
{
+ /* TODO: Clear the tag area and file area. */
return;
}
@@ -1201,11 +1202,16 @@ Browser_List_Row_Selected (EtBrowser *self, GtkTreeSelection *selection)
if (gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->file_model),
&cursor_iter, cursor_path))
{
- gtk_tree_model_get (GTK_TREE_MODEL (priv->file_model),
- &cursor_iter, LIST_FILE_POINTER,
- &cursor_et_file, -1);
- et_application_window_select_file_by_et_file (ET_APPLICATION_WINDOW (MainWindow),
- cursor_et_file);
+ if (gtk_tree_selection_iter_is_selected (selection, &cursor_iter))
+ {
+ gtk_tree_model_get (GTK_TREE_MODEL (priv->file_model),
+ &cursor_iter, LIST_FILE_POINTER,
+ &cursor_et_file, -1);
+ et_application_window_select_file_by_et_file (ET_APPLICATION_WINDOW (MainWindow),
+ cursor_et_file);
+ }
+ /* TODO: Clear the tag/file area if the cursor row was unselected, such
+ * as by inverting the selection or Ctrl-clicking. */
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]