projects
/
geeqie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df8df1e
)
keep files with non-zero marks in memory
author
Vladimir Nadvornik
<nadvornik@suse.cz>
Sat, 16 Aug 2008 20:57:40 +0000
(20:57 +0000)
committer
Vladimir Nadvornik
<nadvornik@suse.cz>
Sat, 16 Aug 2008 20:57:40 +0000
(20:57 +0000)
src/filedata.c
patch
|
blob
|
history
diff --git
a/src/filedata.c
b/src/filedata.c
index
0e8b5f3
..
718857f
100644
(file)
--- a/
src/filedata.c
+++ b/
src/filedata.c
@@
-1061,9
+1061,20
@@
gboolean file_data_get_mark(FileData *fd, gint n)
void file_data_set_mark(FileData *fd, gint n, gboolean value)
{
+ guint old = fd->marks;
if (!value == !(fd->marks & (1 << n))) return;
fd->marks = fd->marks ^ (1 << n);
+
+ if (old && !fd->marks) /* keep files with non-zero marks in memory */
+ {
+ file_data_unref(fd);
+ }
+ else if (!old && fd->marks)
+ {
+ file_data_ref(fd);
+ }
+
file_data_increment_version(fd);
file_data_send_notification(fd, NOTIFY_TYPE_INTERNAL);
}