diff options
author | Federico Mena Quintero <federico@gnome.org> | 2011-06-28 18:55:37 -0500 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2011-06-28 18:55:37 -0500 |
commit | b33827ee8ab72c51aa5e913718be6a97fabcef1e (patch) | |
tree | f0355fb91b9e691936d3d78f341f4abd1e298cd9 | |
parent | 6c64af402c47537e8f69d04a77906cbb71b12202 (diff) | |
download | gtk+-b33827ee8ab72c51aa5e913718be6a97fabcef1e.tar.gz |
Turn a struct field into a local variable
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
-rw-r--r-- | gtk/gtkfilechooserdefault.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 56cdcb969e..5d1c1dd0a8 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -9041,7 +9041,6 @@ typedef struct { GtkFileChooserDefault *impl; GList *items; - gint n_items; guint needs_sorting : 1; } RecentLoadData; @@ -9120,13 +9119,14 @@ recent_idle_load (gpointer data) if (load_data->needs_sorting) { gint limit; + gint n_items; load_data->items = g_list_sort (load_data->items, recent_sort_mru); - load_data->n_items = g_list_length (load_data->items); + n_items = g_list_length (load_data->items); limit = get_recent_files_limit (GTK_WIDGET (impl)); - if (limit != -1 && (load_data->n_items > limit)) + if (limit != -1 && (n_items > limit)) { GList *clamp, *l; @@ -9138,8 +9138,6 @@ recent_idle_load (gpointer data) g_list_foreach (l, (GFunc) gtk_recent_info_unref, NULL); g_list_free (l); - - load_data->n_items = limit; } } @@ -9182,7 +9180,6 @@ recent_start_loading (GtkFileChooserDefault *impl) load_data = g_new (RecentLoadData, 1); load_data->impl = impl; load_data->items = NULL; - load_data->n_items = 0; load_data->needs_sorting = TRUE; /* begin lazy loading the recent files into the model */ |