[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: [Patches] GTK Recent-file-manager



Am 02.01.2011 16:03, schrieb kai-martin knaak:
Just gave it a test run.
The source compiles fine and "recent files" appears in the menu :-)
A minor complaint: Currently, the list is only populated when I use
the load action from the file menu. IMHO, it should be appended to
by files on the command line and by the save-as action.
You are right, this were fine! I usually don't use the command line input, so I didn't think about it. Have just have a look into the code and I see no chance to put files loaded by the command line to the recent file list if no file-select-window is used (e.g. action: 'SaveTo()' or 'Save(Layout)', but 'Save(LayoutAs)' is no problem). To append files used by the 'save-as'-Dialog is no problem, I appended a patch to this mail and will also push it to SF and my github-branch. Perhaps someone else has an idea to fix the issue with the command-line and the recent list? I will think about it, too.
Some kind of README with a list of changes would be nice. So I know
what great features to look for.

---<)kaimartin(>---
Good idea. Have just added a file 'README.fruoff' which lists the new features/changes. But you can also have a look at the commit-messages of the patches.

Kind regards,
Felix
From aca0a21a61fc2265b06d444c0f37a5a89f866756 Mon Sep 17 00:00:00 2001
From: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
Date: Sun, 2 Jan 2011 18:47:08 +0100
Subject: [PATCH] Add files to recent-list on saving

Adds files to the recent-file-list on saving, but only, if the file-save-dialog
is used.
---
 src/hid/gtk/gtkhid-main.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 2ec7737..1558f3a 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -1329,6 +1329,7 @@ Save (int argc, char **argv, int x, int y)
 	  else
 	    hid_actionl ("SaveTo", function, name, NULL);
 	}
+      gtk_recent_manager_add_item (ghidgui->recent_manager, g_filename_to_uri(name, NULL, NULL));
       g_free (name);
     }
   else
-- 
1.7.1


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user