From bb24964d2d9593e35ff5693129d8cb0a688be47b Mon Sep 17 00:00:00 2001 From: Nickolay V. Shmyrev Date: Thu, 07 Apr 2005 22:28:30 +0000 Subject: Update egg-recent from libegg. This should fix long delay on startup * cut-n-paste/recent-files/egg-recent-item.c: (egg_recent_item_set_uri), (make_valid_utf8), (egg_recent_item_set_mime_type), (egg_recent_item_get_mime_type): * cut-n-paste/recent-files/egg-recent-item.h: Update egg-recent from libegg. This should fix long delay on startup problem. For details see http://bugzilla.gnome.org/show_bug.cgi?id=160531 --- diff --git a/ChangeLog b/ChangeLog index 0c165b4..9191883 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-04-08 Nickolay V. Shmyrev + + * cut-n-paste/recent-files/egg-recent-item.c: + (egg_recent_item_set_uri), (make_valid_utf8), + (egg_recent_item_set_mime_type), (egg_recent_item_get_mime_type): + * cut-n-paste/recent-files/egg-recent-item.h: + + Update egg-recent from libegg. This should fix long + startup problem. For details see + http://bugzilla.gnome.org/show_bug.cgi?id=160531 + 2005-04-07 Nickolay V. Shmyrev * cut-n-paste/recent-files/Makefile.am: diff --git a/cut-n-paste/recent-files/egg-recent-item.c b/cut-n-paste/recent-files/egg-recent-item.c index c533205..535e222 100644 --- a/cut-n-paste/recent-files/egg-recent-item.c +++ b/cut-n-paste/recent-files/egg-recent-item.c @@ -128,6 +128,7 @@ egg_recent_item_copy (const EggRecentItem *item) newitem->uri = g_strdup (item->uri); if (item->mime_type) newitem->mime_type = g_strdup (item->mime_type); + newitem->mime_type_is_explicit = item->mime_type_is_explicit newitem->timestamp = item->timestamp; newitem->private_data = item->private_data; newitem->groups = egg_recent_item_copy_groups (item->groups); @@ -219,8 +220,6 @@ egg_recent_item_set_uri (EggRecentItem *item, const gchar *uri) g_free (utf8_uri); } - egg_recent_item_update_mime_type (item); - return TRUE; } @@ -261,7 +260,7 @@ make_valid_utf8 (const char *name) string = NULL; remainder = name; - remaining_bytes = strlen (name); + remaining_bytes = name ? strlen (name) : 0; while (remaining_bytes != 0) { if (g_utf8_validate (remainder, remaining_bytes, &invalid)) @@ -355,13 +354,14 @@ egg_recent_item_set_mime_type (EggRecentItem *item, const gchar *mime) item->mime_type = g_strdup (mime); } else { item->mime_type_is_explicit = FALSE; - egg_recent_item_update_mime_type (item); } } gchar * -egg_recent_item_get_mime_type (const EggRecentItem *item) +egg_recent_item_get_mime_type (EggRecentItem *item) { + egg_recent_item_update_mime_type (item); + return g_strdup (item->mime_type); } diff --git a/cut-n-paste/recent-files/egg-recent-item.h b/cut-n-paste/recent-files/egg-recent-item.h index 93091ae..00f8fb8 100644 --- a/cut-n-paste/recent-files/egg-recent-item.h +++ b/cut-n-paste/recent-files/egg-recent-item.h @@ -49,7 +49,7 @@ gchar * egg_recent_item_get_uri_for_display (const EggRecentItem *item); gchar * egg_recent_item_get_short_name (const EggRecentItem *item); void egg_recent_item_set_mime_type (EggRecentItem *item, const gchar *mime); -gchar * egg_recent_item_get_mime_type (const EggRecentItem *item); +gchar * egg_recent_item_get_mime_type (EggRecentItem *item); void egg_recent_item_set_timestamp (EggRecentItem *item, time_t timestamp); time_t egg_recent_item_get_timestamp (const EggRecentItem *item); -- cgit v0.9.1