mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-09-12 20:41:34 +00:00
A couple of quick fixes to get "make check" working.
This commit is contained in:
parent
b3fe018443
commit
fd8bad007c
|
@ -1,3 +1,20 @@
|
|||
2000-01-04 Darin Adler <darin@eazel.com>
|
||||
|
||||
A couple of quick fixes to make "make check" work again.
|
||||
|
||||
* src/file-manager/fm-directory.c (fm_directory_initialize):
|
||||
src/file-manager/fm-vfs-directory.c (fm_vfs_directory_initialize):
|
||||
Use g_new0 instead of g_new for details structure to better
|
||||
mimic what gtk_object_new does.
|
||||
|
||||
* src/file-manager/fm-directory.c (fm_directory_get):
|
||||
Added an assert to check that the hash table key is set up
|
||||
correctly. This was failing when John did a "make check".
|
||||
|
||||
* src/file-manager/fm-vfs-directory.c (fm_vfs_directory_new):
|
||||
Set up the hash table key when creating the object. This
|
||||
was causing a failure in "make check".
|
||||
|
||||
2000-01-04 John Sullivan <sullivan@eazel.com>
|
||||
|
||||
* src/nautilus-bookmarks-window.c (create_bookmarks_window):
|
||||
|
|
|
@ -58,7 +58,7 @@ fm_directory_initialize (gpointer object, gpointer klass)
|
|||
|
||||
directory = FM_DIRECTORY(object);
|
||||
|
||||
directory->details = g_new (FMDirectoryDetails, 1);
|
||||
directory->details = g_new0 (FMDirectoryDetails, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -117,6 +117,7 @@ FMDirectory *fm_directory_get(const char *uri)
|
|||
} else {
|
||||
/* Create a new directory object instead. */
|
||||
directory = FM_DIRECTORY(fm_vfs_directory_new(uri));
|
||||
g_assert(strcmp(directory->details->hash_table_key, uri) == 0);
|
||||
|
||||
/* Put it in the hash table. */
|
||||
gtk_object_ref(GTK_OBJECT(directory));
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "fm-vfs-directory.h"
|
||||
|
||||
#include "fm-directory-protected.h"
|
||||
#include <libnautilus/nautilus-gtk-macros.h>
|
||||
|
||||
struct _FMVFSDirectoryDetails {
|
||||
|
@ -60,7 +61,7 @@ fm_vfs_directory_initialize (gpointer object, gpointer klass)
|
|||
|
||||
directory = FM_VFS_DIRECTORY(object);
|
||||
|
||||
directory->details = g_new (FMVFSDirectoryDetails, 1);
|
||||
directory->details = g_new0 (FMVFSDirectoryDetails, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -85,5 +86,11 @@ NAUTILUS_DEFINE_GET_TYPE_FUNCTION(FMVFSDirectory, fm_vfs_directory, FM_TYPE_DIRE
|
|||
FMVFSDirectory *
|
||||
fm_vfs_directory_new (const char* uri)
|
||||
{
|
||||
return gtk_type_new (FM_TYPE_VFS_DIRECTORY);
|
||||
FMVFSDirectory *directory;
|
||||
|
||||
directory = gtk_type_new (FM_TYPE_VFS_DIRECTORY);
|
||||
|
||||
FM_DIRECTORY(directory)->details->hash_table_key = g_strdup(uri);
|
||||
|
||||
return directory;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue