Mail Archives: geda-user/2012/07/08/00:24:48
On Sat, Jul 07, 2012 at 03:26:38PM -0700, Eric Brombaugh wrote:
> Hello list,
>
> I'm a long-time user who's been off list for a while. I'm running
> the latest snapshot pcb-20110918. The tools have been "just working"
> for so long that I haven't needed any support. However, that changed
> recently when I updated my main linux machine to Fedora 17. F17 is
> GTK 3 based and it appears that the behavior of the file chooser
> dialog has changed in that it no longer defaults to the current
> directory when gtk_file_chooser_set_current_folder() isn't called to
> set it. Instead it presents you with a useless list of recently
> accessed files.
>
Yes, it's very, very irritating.
> On many apps this isn't a problem because they must always
> explicitly set the default, but the PCB gtk hid only calls the
> gtk_file_chooser_set_current_folder() function if there's a valid
> Settings.FilePath which usually isn't the case for me. That means
> every time I want to load a netlist or modified layout I have to
> navigate down to my working directory from the home directory.
>
> To fix this, I added the following code to src/hid/gtk/gui-dialog.c
> in the ghid_dialog_file_select_open() function:
>
Cool. Can you post a patch in proper diff format for us to apply?
> if (path && *path)
> gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog),
> *path);
> ++ else
> ++ {
> ++ gchar *default_path;
> ++ gchar *uri;
> ++ default_path = g_file_new_for_path (g_get_current_dir());
> ++ uri = g_file_get_uri (default_path);
> ++ gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER
> (dialog), uri);
> ++ g_free (uri);
> ++ }
>
> A similar fix is needed in the ghid_dialog_file_select_save() function.
>
> I've been out of touch so long that there may be a more current
> source repo than that listed on the pcb.geda-project.org downloads
> page and this problem may have already been addressed. If so sorry
> for the noise.
>
Nope, it's still a current problem. It hasn't been fixed because
it seemed like it would make pcb inconsistent with other Gtk+
applications (we just use vi here, we wouldn't know ;)...).
But I'd like to have a default directory again, and if everyone
else is doing it, I'm happy to.
--
Andrew Poelstra
Email: asp11 at sfu.ca OR apoelstra at wpsoftware.net
Web: http://www.wpsoftware.net/andrew
"You shouldn't trust every quote you read on the Internet." -- Socrates
- Raw text -