summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2012-10-31 20:54:02 -0600
committerFederico Mena Quintero <federico@gnome.org>2012-10-31 20:54:02 -0600
commitf39f5749148e240ea9b72f4806c1b01e85e504d7 (patch)
treeff2fb52ba0c2b2564530c37afce87d87230142a2
parent281c592ea9485d5cb53ee7073b2a7588db33a8a2 (diff)
downloadgtk+-f39f5749148e240ea9b72f4806c1b01e85e504d7.tar.gz
Remove argument to _gtk_file_system_model_update_file() that should not be part of the internal API
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
-rw-r--r--gtk/gtkfilechooserdefault.c2
-rw-r--r--gtk/gtkfilesystemmodel.c18
-rw-r--r--gtk/gtkfilesystemmodel.h3
3 files changed, 13 insertions, 10 deletions
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index dab06c38ca..09d6303c82 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -6798,7 +6798,7 @@ file_system_model_got_thumbnail (GObject *object, GAsyncResult *res, gpointer da
copy_attribute (info, queried, G_FILE_ATTRIBUTE_THUMBNAILING_FAILED);
copy_attribute (info, queried, G_FILE_ATTRIBUTE_STANDARD_ICON);
- _gtk_file_system_model_update_file (model, file, info, FALSE);
+ _gtk_file_system_model_update_file (model, file, info);
g_object_unref (info);
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index 9f738b90f7..90a4db2d5c 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -184,6 +184,9 @@ struct _GtkFileSystemModelClass
void (*finished_loading) (GtkFileSystemModel *model, GError *error);
};
+static guint node_get_for_file (GtkFileSystemModel *model,
+ GFile *file);
+
static void add_file (GtkFileSystemModel *model,
GFile *file,
GFileInfo *info);
@@ -1189,13 +1192,19 @@ gtk_file_system_model_query_done (GObject * object,
GtkFileSystemModel *model = data; /* only a valid pointer if not cancelled */
GFile *file = G_FILE (object);
GFileInfo *info;
+ guint id;
info = g_file_query_info_finish (file, res, NULL);
if (info == NULL)
return;
gdk_threads_enter ();
- _gtk_file_system_model_update_file (model, file, info, TRUE);
+
+ _gtk_file_system_model_update_file (model, file, info);
+
+ id = node_get_for_file (model, file);
+ gtk_file_system_model_sort_node (model, id);
+
gdk_threads_leave ();
}
@@ -1852,7 +1861,6 @@ remove_file (GtkFileSystemModel *model,
* @model: the model
* @file: the file
* @info: the new file info
- * @requires_resort: FIXME: get rid of this argument
*
* Tells the file system model that the file changed and that the
* new @info should be used for it now. If the file is not part of
@@ -1861,8 +1869,7 @@ remove_file (GtkFileSystemModel *model,
void
_gtk_file_system_model_update_file (GtkFileSystemModel *model,
GFile *file,
- GFileInfo *info,
- gboolean requires_resort)
+ GFileInfo *info)
{
FileModelNode *node;
guint i, id;
@@ -1894,9 +1901,6 @@ _gtk_file_system_model_update_file (GtkFileSystemModel *model,
if (node->visible)
emit_row_changed_for_node (model, id);
-
- if (requires_resort)
- gtk_file_system_model_sort_node (model, id);
}
/**
diff --git a/gtk/gtkfilesystemmodel.h b/gtk/gtkfilesystemmodel.h
index 2264fcff51..8ccfa1b00e 100644
--- a/gtk/gtkfilesystemmodel.h
+++ b/gtk/gtkfilesystemmodel.h
@@ -71,8 +71,7 @@ void _gtk_file_system_model_add_and_query_file (GtkFileSystemMode
const char *attributes);
void _gtk_file_system_model_update_file (GtkFileSystemModel *model,
GFile *file,
- GFileInfo *info,
- gboolean requires_resort);
+ GFileInfo *info);
void _gtk_file_system_model_set_show_hidden (GtkFileSystemModel *model,
gboolean show_hidden);