Kaydet (Commit) db17d897 authored tarafından Enrico Tröger's avatar Enrico Tröger

Add recent files also to GTK's recent files buffer.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1943 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 16147c48
......@@ -6,6 +6,7 @@
Add option to display full path name in the open files list.
* src/callbacks.c, src/ui_utils.c:
Add menu accelerators to the custom date menu items.
* src/ui_utils.c: Add recent files also to GTK's recent files buffer.
2007-10-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
......
......@@ -850,6 +850,15 @@ void ui_add_recent_file(const gchar *utf8_filename)
{
if (g_queue_find_custom(ui_prefs.recent_queue, utf8_filename, (GCompareFunc) strcmp) == NULL)
{
#if GTK_CHECK_VERSION(2, 10, 0)
GtkRecentManager *manager = gtk_recent_manager_get_default();
gchar *uri = g_filename_to_uri(utf8_filename, NULL, NULL);
if (uri != NULL)
{
gtk_recent_manager_add_item(manager, uri);
g_free(uri);
}
#endif
g_queue_push_head(ui_prefs.recent_queue, g_strdup(utf8_filename));
if (g_queue_get_length(ui_prefs.recent_queue) > prefs.mru_length)
{
......
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