Emit the ::changed signal at the end of the asynchronous MIME type query.

2008-04-15  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkrecentmanager.c:
	(gtk_recent_manager_add_item_query_info),
	(gtk_recent_manager_add_item): Emit the ::changed signal
	at the end of the asynchronous MIME type query.

svn path=/trunk/; revision=20005
This commit is contained in:
Emmanuele Bassi 2008-04-15 22:31:01 +00:00 committed by Emmanuele Bassi
parent afdb3f5a39
commit c31e252030
2 changed files with 36 additions and 26 deletions

View File

@ -1,3 +1,10 @@
2008-04-15 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentmanager.c:
(gtk_recent_manager_add_item_query_info),
(gtk_recent_manager_add_item): Emit the ::changed signal
at the end of the asynchronous MIME type query.
2008-04-15 Emmanuele Bassi <ebassi@gnome.org>
Bug 487375 gtkrecent apps poll ~/.recently-used.xbel

View File

@ -115,28 +115,28 @@ enum
PROP_SIZE
};
static void gtk_recent_manager_dispose (GObject *object);
static void gtk_recent_manager_finalize (GObject *object);
static void gtk_recent_manager_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_recent_manager_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_recent_manager_add_item_query_info_cb (GObject *source_object,
GAsyncResult *res,
gpointer user_data);
static void gtk_recent_manager_monitor_changed (GFileMonitor *monitor,
GFile *file,
GFile *other_file,
GFileMonitorEvent event_type,
gpointer user_data);
static void gtk_recent_manager_changed (GtkRecentManager *manager);
static void gtk_recent_manager_real_changed (GtkRecentManager *manager);
static void gtk_recent_manager_set_filename (GtkRecentManager *manager,
const gchar *filename);
static void gtk_recent_manager_dispose (GObject *object);
static void gtk_recent_manager_finalize (GObject *object);
static void gtk_recent_manager_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_recent_manager_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_recent_manager_add_item_query_info (GObject *source_object,
GAsyncResult *res,
gpointer user_data);
static void gtk_recent_manager_monitor_changed (GFileMonitor *monitor,
GFile *file,
GFile *other_file,
GFileMonitorEvent event_type,
gpointer user_data);
static void gtk_recent_manager_changed (GtkRecentManager *manager);
static void gtk_recent_manager_real_changed (GtkRecentManager *manager);
static void gtk_recent_manager_set_filename (GtkRecentManager *manager,
const gchar *filename);
static void build_recent_items_list (GtkRecentManager *manager);
static void purge_recent_items_list (GtkRecentManager *manager,
@ -701,9 +701,9 @@ gtk_recent_manager_get_limit (GtkRecentManager *manager)
}
static void
gtk_recent_manager_add_item_query_info_cb (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
gtk_recent_manager_add_item_query_info (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
GFile *file = G_FILE (source_object);
GtkRecentManager *manager = user_data;
@ -745,6 +745,9 @@ gtk_recent_manager_add_item_query_info_cb (GObject *source_object,
* fields are set */
gtk_recent_manager_add_full (manager, uri, &recent_data);
manager->priv->is_dirty = TRUE;
gtk_recent_manager_changed (manager);
g_free (recent_data.mime_type);
g_free (recent_data.app_name);
g_free (recent_data.app_exec);
@ -790,7 +793,7 @@ gtk_recent_manager_add_item (GtkRecentManager *manager,
G_PRIORITY_DEFAULT,
G_FILE_QUERY_INFO_NONE,
NULL,
gtk_recent_manager_add_item_query_info_cb,
gtk_recent_manager_add_item_query_info,
g_object_ref (manager));
g_object_unref (file);