Commit 82cda939 authored by Emmanuele Bassi's avatar Emmanuele Bassi Committed by Emmanuele Bassi

Remove the unneeded setting of the storage file inside the constructor.

2006-04-11  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	* gtk/gtkrecentmanager.c (gtk_recent_manager_init)
	(gtk_recent_manager_new): Remove the unneeded setting of the
	storage file inside the constructor. (Murray Cumming)
	(build_recent_items_list): Reset the dirty bit when done rebuilding
	the list from the storage file.
parent 4e2069f7
2006-04-11 Emmanuele Bassi <ebassi@cvs.gnome.org>
* gtk/gtkrecentmanager.c (gtk_recent_manager_init)
(gtk_recent_manager_new): Remove the unneeded setting of the
storage file inside the constructor. (Murray Cumming)
(build_recent_items_list): Reset the dirty bit when done rebuilding
the list from the storage file.
2006-04-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkscale.c (gtk_scale_get_layout_offsets): Silence
......
2006-04-11 Emmanuele Bassi <ebassi@cvs.gnome.org>
* gtk/gtkrecentmanager.c (gtk_recent_manager_init)
(gtk_recent_manager_new): Remove the unneeded setting of the
storage file inside the constructor. (Murray Cumming)
(build_recent_items_list): Reset the dirty bit when done rebuilding
the list from the storage file.
2006-04-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkscale.c (gtk_scale_get_layout_offsets): Silence
......
......@@ -272,6 +272,8 @@ gtk_recent_manager_init (GtkRecentManager *manager)
priv->read_in_progress = FALSE;
priv->screen = NULL;
build_recent_items_list (manager);
}
static void
......@@ -482,14 +484,17 @@ gtk_recent_manager_set_filename (GtkRecentManager *manager,
gtk_recent_manager_poll_timeout,
manager);
build_recent_items_list (manager);
/* mark us clean, so that we can re-read the list
* of recently used resources
*/
priv->is_dirty = FALSE;
build_recent_items_list (manager);
}
/* reads the recently used resources file and builds the items list.
* we keep the items list inside the parser object, and build the
* RecentInfo object only on user's demand to avoid useless replication.
* this function resets the dirty bit of the manager.
*/
static void
build_recent_items_list (GtkRecentManager *manager)
......@@ -564,6 +569,7 @@ build_recent_items_list (GtkRecentManager *manager)
}
priv->read_in_progress = FALSE;
priv->is_dirty = FALSE;
}
......@@ -591,20 +597,7 @@ build_recent_items_list (GtkRecentManager *manager)
GtkRecentManager *
gtk_recent_manager_new (void)
{
GtkRecentManager *retval;
gchar *filename;
filename = g_build_filename (g_get_home_dir (),
GTK_RECENTLY_USED_FILE,
NULL);
retval = g_object_new (GTK_TYPE_RECENT_MANAGER,
"filename", filename,
NULL);
g_free (filename);
return retval;
return g_object_new (GTK_TYPE_RECENT_MANAGER, NULL);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment