gtk+ r20884 - in trunk: . gtk
- From: ebassi svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r20884 - in trunk: . gtk
- Date: Mon, 21 Jul 2008 13:37:15 +0000 (UTC)
Author: ebassi
Date: Mon Jul 21 13:37:15 2008
New Revision: 20884
URL: http://svn.gnome.org/viewvc/gtk+?rev=20884&view=rev
Log:
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)
Modified:
trunk/ChangeLog
trunk/gtk/gtkrecentmanager.c
Modified: trunk/gtk/gtkrecentmanager.c
==============================================================================
--- trunk/gtk/gtkrecentmanager.c (original)
+++ trunk/gtk/gtkrecentmanager.c Mon Jul 21 13:37:15 2008
@@ -1690,11 +1690,11 @@
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 @@
return;
g_free (app_info->name);
-
g_free (app_info->exec);
- g_free (app_info);
+ g_slice_free (RecentAppInfo, app_info);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]