On Sun, 2005-01-16 at 18:14, Andreas Volz wrote:
> Am Sun, 16 Jan 2005 17:54:57 +0800 schrieb Stafford Horne:
> 
> > This patch avoids a segv when we click open in the icon chooser
> > without selecting a file. 
> 
> No problem with your patch, but there isn't a segfault here. Which gtk
> version are you using?
> 
> Hm, now I noticed a bug I never seen before. If I save the menu it's
> saved into the current folder too. Should fix this before release... ;-)
> 
> regards
> Andreas

I am using gtk version 2.6.0.  filename is null when it returns. 

After looking at the source. I can confirm that it will return a null
pointer if the path is null. 

>>SNIP<<
gchar *
gtk_file_chooser_get_filename (GtkFileChooser *chooser)
{
  GtkFileSystem *file_system;
  GtkFilePath *path;
  gchar *result = NULL;
                                                                                
  g_return_val_if_fail (GTK_IS_FILE_CHOOSER (chooser), NULL);
                                                                                
  file_system = _gtk_file_chooser_get_file_system (chooser);
  path = gtk_file_chooser_get_path (chooser);
  if (path)
    {
      result = gtk_file_system_path_to_filename (file_system, path);
      gtk_file_path_free (path);
    }
                                                                                
  return result;
}

>>extra<<

GSList *
_gtk_file_chooser_get_paths (GtkFileChooser *chooser)
{
  g_return_val_if_fail (GTK_IS_FILE_CHOOSER (chooser), NULL);
                                                                                
  return GTK_FILE_CHOOSER_GET_IFACE (chooser)->get_paths (chooser);
}
                                                                            
static GtkFilePath *
gtk_file_chooser_get_path (GtkFileChooser *chooser)
{
  GSList *list;
  GtkFilePath *result = NULL;
                                                                                
  g_return_val_if_fail (GTK_IS_FILE_CHOOSER (chooser), NULL);
                                                                                
  list = _gtk_file_chooser_get_paths (chooser);
  if (list)
    {
      result = list->data;
      list = g_slist_delete_link (list, list);
      gtk_file_paths_free (list);
    }
                                                                                
  return result;
}
>>SNIP<<

This must be new if it is not crashing on your machine.

As for the second bug about the menus being saved in the local. I
noticed this also.  I just changed all my paths to absolute paths. I
guess all saves should be based in the same path as the root menu(i.e.
~/.enlighenment in most cases). 

Stafford



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to