delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2012/07/07/18:50:44

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-CT-Class: Clean
X-CT-Score: 0.00
X-CT-RefID: str=0001.0A020209.4FF8B79F.0007,ss=1,re=0.000,fgs=0
X-CT-Spam: 0
X-Authority-Analysis: v=1.1 cv=3oNJKdbxD3BBECFLH2UCt3mK2DnxolAqcovcJSjLvU8=
c=1 sm=1 a=8iEie87WbnsA:10 a=G8Uczd0VNMoA:10 a=8nJEP1OIZ-IA:10
a=vIu8Bjv99zA89b1LPaaZoA==:17 a=j5nqAba_AAAA:8 a=vzTPRnRyCOaaGjpqJ18A:9
a=wPNLvfGTeEIA:10 a=vIu8Bjv99zA89b1LPaaZoA==:117
X-CM-Score: 0.00
Authentication-Results: cox.net; none
Message-ID: <4FF8B79E.6000503@cox.net>
Date: Sat, 07 Jul 2012 15:26:38 -0700
From: Eric Brombaugh <ebrombaugh1 AT cox DOT net>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: geda-user AT delorie DOT com
Subject: [geda-user] gtk hid file chooser problems
Reply-To: geda-user AT delorie DOT com

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.

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:

     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.

Thanks for a great tool,

Eric

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019