Couple of fixes from Markku Vire.

2006-03-14  Kristian Rietveld  <kris@imendio.com>

	Couple of fixes from Markku Vire.

	* gtk/gtkfilesystem.c (gtk_file_info_copy): also strdup icon_name
	and display_key.

	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder):
	initialize error to NULL,
	(gtk_file_folder_unix_list_children): return an empty list for now if
	we couldn't read the directory.
This commit is contained in:
Kristian Rietveld
2006-03-14 14:20:14 +00:00
committed by Kristian Rietveld
parent 2b419300fd
commit 914b750cbf
4 changed files with 31 additions and 2 deletions

View File

@@ -1,3 +1,15 @@
2006-03-14 Kristian Rietveld <kris@imendio.com>
Couple of fixes from Markku Vire.
* gtk/gtkfilesystem.c (gtk_file_info_copy): also strdup icon_name
and display_key.
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder):
initialize error to NULL,
(gtk_file_folder_unix_list_children): return an empty list for now if
we couldn't read the directory.
2005-12-23 Kristian Rietveld <kris@imendio.com>
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb),

View File

@@ -1,3 +1,15 @@
2006-03-14 Kristian Rietveld <kris@imendio.com>
Couple of fixes from Markku Vire.
* gtk/gtkfilesystem.c (gtk_file_info_copy): also strdup icon_name
and display_key.
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder):
initialize error to NULL,
(gtk_file_folder_unix_list_children): return an empty list for now if
we couldn't read the directory.
2005-12-23 Kristian Rietveld <kris@imendio.com>
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb),

View File

@@ -91,6 +91,10 @@ gtk_file_info_copy (GtkFileInfo *info)
new_info->display_name = g_strdup (new_info->display_name);
if (new_info->mime_type)
new_info->mime_type = g_strdup (new_info->mime_type);
if (new_info->icon_name)
new_info->icon_name = g_strdup (new_info->icon_name);
if (new_info->display_key)
new_info->display_key = g_strdup (new_info->display_key);
return new_info;
}

View File

@@ -939,7 +939,7 @@ gtk_file_system_unix_create_folder (GtkFileSystem *file_syst
GtkFileSystemCreateFolderCallback callback,
gpointer data)
{
GError *error;
GError *error = NULL;
GtkFileSystemUnix *system_unix;
GtkFileSystemHandle *handle;
const char *filename;
@@ -2501,7 +2501,8 @@ gtk_file_folder_unix_list_children (GtkFileFolder *folder,
*children = NULL;
/* Get the list of basenames. */
g_hash_table_foreach (folder_unix->stat_info, cb_list_children, children);
if (folder_unix->stat_info)
g_hash_table_foreach (folder_unix->stat_info, cb_list_children, children);
/* Turn basenames into GFilePaths. */
for (l = *children; l; l = l->next)