diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2008-07-21 13:37:15 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@src.gnome.org> | 2008-07-21 13:37:15 +0000 |
commit | 1db019204296a7eee28dab2b23a0e0397af6dd38 (patch) | |
tree | e0e7ee9824577c169f837cf6e28b4df0ad15f895 /gtk/gtkrecentmanager.c | |
parent | fd4a8411f0721890f9d8f47fc29ac8b2e48a4000 (diff) | |
download | gtk+-1db019204296a7eee28dab2b23a0e0397af6dd38.tar.gz |
Use GSlice to allocate the application data for recently used resources;
2008-07-21 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentmanager.c:
(recent_app_info_new), (recent_app_info_free): Use GSlice to
allocate the application data for recently used resources;
do not call time() to initialize the timestamp, as it will
be overwritten anyway later. (#535223, Michael Meeks)
svn path=/trunk/; revision=20884
Diffstat (limited to 'gtk/gtkrecentmanager.c')
-rw-r--r-- | gtk/gtkrecentmanager.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c index fea41ad658..c7ee3b3280 100644 --- a/gtk/gtkrecentmanager.c +++ b/gtk/gtkrecentmanager.c @@ -1690,11 +1690,11 @@ recent_app_info_new (const gchar *app_name) g_assert (app_name != NULL); - app_info = g_new0 (RecentAppInfo, 1); + app_info = g_slice_new0 (RecentAppInfo); app_info->name = g_strdup (app_name); app_info->exec = NULL; app_info->count = 1; - app_info->stamp = time (NULL); + app_info->stamp = 0; return app_info; } @@ -1706,10 +1706,9 @@ recent_app_info_free (RecentAppInfo *app_info) return; g_free (app_info->name); - g_free (app_info->exec); - g_free (app_info); + g_slice_free (RecentAppInfo, app_info); } /** |