| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.
https://bugzilla.gnome.org/show_bug.cgi?id=710651
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main problem is that we were emitting the row-deleted signal for the model in the middle
of the process that actually deletes the row from the model (remove the row from the array,
update the model->file_lookup hash table, etc.). In the model's caller, one of the row-deleted
callbacks was requesting an iter, which caused the model to revalidate itself - but it did
this while it was in an inconsistent state. This led to an assertion failure later when the
model resorted itself.
The fix in remove_file() is like this:
* The filteredness/visibility of the deleted node is not updated. The
node will simply be gone; we don't need to update those values at
all.
* We invalidate just the node that is being deleted.
* The model->file_lookup hash table is not completely nuked; instead,
we carefully adjust its indices.
* The row-deleted signal is only emitted at the very end, when
deletion is complete and the model is consistent.
Many thanks to William Hua for doing the detective work on this bug!
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
|
|
|
|
|
|
| |
They were in the semi-public API of GtkFileSystemModel, but never actually used outside of it.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
|
|
|
|
|
|
| |
part of the internal API
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
|
|
|
|
|
|
|
|
|
| |
This is a function internal to the file system model; let's not pollute the gtk_tree_path namespace.
Also, make the 'i' variable into 'r' as it refers to a row index, not a file-array index (for
consistency with the docs and the rest of the code).
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
|
|
|
|
|
| |
Emit row-changed when the filteredness of a visible row
changes in GtkFileSystemModel.
|
|
|
|
|
|
|
|
| |
This way we remove paired function calls (compute/set pairs), and also make
it possible to avoid computing a filter twice, as setting the visibility
depends on filteredness.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
|
|
|
|
|
|
|
|
|
| |
It bothers me that we call gtk_file_filter_filter(), then negate the result,
and the return *that* from node_should_be_filtered(). So, rename 'filtered'
throughout GtkFileSystemModel to 'filtered_out' to mean things that didn't
pass the filter.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
|
|
|
|
|
|
|
|
| |
This was a copy-paste leftover from node_set_visible(). Filters are not
concerned with model freezes, so node_set_filtered() does not
need to handle freezes, either.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=679333
|
| |
|
| |
|
|
|
|
|
| |
Paths with depth > 1 should return FALSE instead of pretending the depth
is 1.
|
|
|
|
|
|
| |
Async callbacks are delivered in idles, so we need to make sure
we get the gdk lock before calling any gdk/gtk stuff. This was
missing in a few places.
|
|
|
|
|
|
|
|
|
| |
for new files
When a file was inserted during the period that the editable row was
active, the node IDs would not get updated correctly.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=623845
|
|
|
|
|
|
| |
This reverts commit eebb16eb1af11c5327dd06b23df82f7528566739.
Was an accidental commit.
|
|
|
|
|
|
| |
The old version wasn't introspectable as it didn't have a length
return parameter. Also, delete gtk_tree_path_get_indices_with_depth,
since it's no longer needed.
|
|
|
|
|
|
|
| |
The row values are 1-indexed not 0-indexed, this has to be taken into
account when producing the new_order array.
https://bugzilla.gnome.org/show_bug.cgi?id=621414
|
|
|
|
|
|
|
|
|
|
|
| |
The file removal code was not properly clearing the file=>array index
cache, so later lookups into that cache would return invalid array
indexes.
The easiest way to reproduce it is to create a directory with two files
and deleting both of them.
Reported-by: Javier Jardón <jjardon@gnome.org>
|
|
|
|
|
|
|
|
|
|
| |
We should not unref the model here, it might not even exist anymore.
Instead check if it exists and only use it if it does.
The unref was leftover from a previous fix in
ba9f53397ff0b86ad56166c7fc91b4d499f7aefc.
Spotted by Matthias Clasen in
https://bugzilla.gnome.org/show_bug.cgi?id=614099
|
|
|
|
|
|
|
|
| |
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API
https://bugzilla.gnome.org/show_bug.cgi?id=610474
|
|
|
|
|
|
|
|
| |
This allows disposing of the filesystemmodel while the file enumeration
is still happening.
As the filechooser does not disconnect its signals because it assumes it
is the only owner of the model, this also prevents a SEGV when emitting
the "load-finished" signal in that case.
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
|
|
| |
filter
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
|
|
| |
To comply with the i -> indexes; r -> rows convention.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
|
|
|
|
|
| |
There was some confusion between "index" as used for the model->files[] array,
and node->index as used for our 1-based row numbers. Now we use "index" only
for indices in the model->files[] array, and node->row for row numbers. Functions
and variables are renamed to clarify whether they refer to indexes or rows.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
|
|
| |
Let's have some documentation on the idea behind this beast...
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
|
|
|
| |
The non-standard "filechooser::mime-type" was a remnant of the recent-files code using
a hand-built GFileInfo; now we just query the file info ourselves.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
|
|
| |
This is to avoid temporary variables for the path/iter and to avoid duplicated code.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
|
|
|
|
| |
the new one
This prevents us from inadvertently losing the last ref to the info.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
|
|
| |
Otherwise that timeout may trigger after the model has died.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
|
|
| |
It was only used internally by the model.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
|
|
| |
It was only used internally by the model, anyway.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|
|
|
|
| |
Signed-off-by: Federico Mena Quintero <federico@novell.com>
|