1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
From 01c1de235d7bdf702f8d1dfc99645b57afe3deec Mon Sep 17 00:00:00 2001
From: Andriy Grytsenko <andrej@rep.kiev.ua>
Date: Sat, 24 Nov 2012 19:34:44 +0200
Subject: [PATCH 21/22] Fix over previous commit: it leaded to crash.
The last fix was incorrect since it updated selection after the
model was actually unset in FmStandardView but still in ExoIconView
therefore it crashed in raised callbacks.
The commit does it simpler by unselecting them all. That will
still send a signal about reset selection but will not conflict.
---
src/gtk/fm-folder-view.c | 3 +++
src/gtk/fm-standard-view.c | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gtk/fm-folder-view.c b/src/gtk/fm-folder-view.c
index d7fa53e..240f0e3 100644
--- a/src/gtk/fm-folder-view.c
+++ b/src/gtk/fm-folder-view.c
@@ -624,6 +624,9 @@ void fm_folder_view_set_model(FmFolderView* fv, FmFolderModel* model)
{
fm_folder_model_get_sort(old_model, &by, &mode);
unset_model(fv, old_model);
+ /* https://bugs.launchpad.net/ubuntu/+source/pcmanfm/+bug/1071231:
+ after changing the folder selection isn't reset */
+ iface->unselect_all(fv);
}
/* FIXME: which setting to apply if this is first model? */
iface->set_model(fv, model);
diff --git a/src/gtk/fm-standard-view.c b/src/gtk/fm-standard-view.c
index 1ff55ae..175cced 100644
--- a/src/gtk/fm-standard-view.c
+++ b/src/gtk/fm-standard-view.c
@@ -275,9 +275,6 @@ static void unset_model(FmStandardView* fv)
/* g_debug("unset_model: %p, n_ref = %d", model, G_OBJECT(model)->ref_count); */
g_object_unref(model);
fv->model = NULL;
- /* https://bugs.launchpad.net/ubuntu/+source/pcmanfm/+bug/1071231:
- after changing the folder selection isn't reset */
- on_sel_changed(NULL, fv);
}
}
--
1.8.0.1
|