Skip to content

Commit

Permalink
nemo-file-info.h: Don't use G_DECLARE_INTERFACE - it doesn't allow
Browse files Browse the repository at this point in the history
us to properly use NemoFile for its vtable - it works but throws a
ton of build warnings and isn't safe.
  • Loading branch information
mtwebster committed Jul 21, 2018
1 parent c47c26d commit 2b9da65
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions libnemo-extension/nemo-file-info.h
Expand Up @@ -31,11 +31,10 @@

G_BEGIN_DECLS

#define NEMO_TYPE_FILE_INFO (nemo_file_info_get_type ())

G_DECLARE_INTERFACE (NemoFileInfo, nemo_file_info,
NEMO, FILE_INFO,
GObject)
#define NEMO_TYPE_FILE_INFO (nemo_file_info_get_type ())
#define NEMO_FILE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NEMO_TYPE_FILE_INFO, NemoFileInfo))
#define NEMO_IS_FILE_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NEMO_TYPE_FILE_INFO))
#define NEMO_FILE_INFO_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NEMO_TYPE_FILE_INFO, NemoFileInfoInterface))

#ifndef NEMO_FILE_DEFINED
#define NEMO_FILE_DEFINED
Expand All @@ -44,6 +43,9 @@ G_DECLARE_INTERFACE (NemoFileInfo, nemo_file_info,
typedef struct NemoFile NemoFile;
#endif

typedef NemoFile NemoFileInfo;
typedef struct _NemoFileInfoInterface NemoFileInfoInterface;

struct _NemoFileInfoInterface
{
GTypeInterface g_iface;
Expand Down Expand Up @@ -82,6 +84,7 @@ struct _NemoFileInfoInterface

GList *nemo_file_info_list_copy (GList *files);
void nemo_file_info_list_free (GList *files);
GType nemo_file_info_get_type (void);

/* Return true if the file has been deleted */
gboolean nemo_file_info_is_gone (NemoFileInfo *file);
Expand Down

0 comments on commit 2b9da65

Please sign in to comment.