SF.net SVN: geany:[3699] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Tue Apr 7 22:09:23 UTC 2009
Revision: 3699
http://geany.svn.sourceforge.net/geany/?rev=3699&view=rev
Author: eht16
Date: 2009-04-07 22:09:23 +0000 (Tue, 07 Apr 2009)
Log Message:
-----------
Don't add opened project files to the GtkRecentManager.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/ui_utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-04-07 22:09:08 UTC (rev 3698)
+++ trunk/ChangeLog 2009-04-07 22:09:23 UTC (rev 3699)
@@ -10,6 +10,8 @@
Prevent showing an empty macro list.
Show only macros of the same filetype instead of all macros of all
loaded filetypes.
+ * src/ui_utils.c:
+ Don't add opened project files to the GtkRecentManager.
2009-04-07 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2009-04-07 22:09:08 UTC (rev 3698)
+++ trunk/src/ui_utils.c 2009-04-07 22:09:23 UTC (rev 3699)
@@ -71,8 +71,15 @@
}
widgets;
+enum
+{
+ RECENT_FILE_FILE,
+ RECENT_FILE_PROJECT
+};
+
typedef struct
{
+ gint type;
GQueue *recent_queue;
GtkWidget *menubar;
GtkWidget *toolbar;
@@ -926,7 +933,7 @@
static GeanyRecentFiles *recent_get_recent_files(void)
{
- static GeanyRecentFiles grf = { NULL, NULL, NULL, NULL };
+ static GeanyRecentFiles grf = { RECENT_FILE_FILE, NULL, NULL, NULL, NULL };
if (G_UNLIKELY(grf.recent_queue == NULL))
{
@@ -941,7 +948,7 @@
static GeanyRecentFiles *recent_get_recent_projects(void)
{
- static GeanyRecentFiles grf = { NULL, NULL, NULL, NULL };
+ static GeanyRecentFiles grf = { RECENT_FILE_PROJECT, NULL, NULL, NULL, NULL };
if (G_UNLIKELY(grf.recent_queue == NULL))
{
@@ -992,12 +999,15 @@
if (g_queue_find_custom(grf->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 (G_LIKELY(uri != NULL))
+ if (grf->type == RECENT_FILE_FILE)
{
- gtk_recent_manager_add_item(manager, uri);
- g_free(uri);
+ GtkRecentManager *manager = gtk_recent_manager_get_default();
+ gchar *uri = g_filename_to_uri(utf8_filename, NULL, NULL);
+ if (G_LIKELY(uri != NULL))
+ {
+ gtk_recent_manager_add_item(manager, uri);
+ g_free(uri);
+ }
}
#endif
g_queue_push_head(grf->recent_queue, g_strdup(utf8_filename));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list