Commit a5b86941 authored by Vyas Giridharan's avatar Vyas Giridharan Committed by Ernestas Kulik

list-model: port to G_DECLARE_* macros

Porting type declarations to use GLib macros will reduce a good amount
of boilerplate code.

https://bugzilla.gnome.org/show_bug.cgi?id=786866
parent f72fe029
This diff is collapsed.
......@@ -30,16 +30,7 @@
#define NAUTILUS_LIST_MODEL_H
#define NAUTILUS_TYPE_LIST_MODEL nautilus_list_model_get_type()
#define NAUTILUS_LIST_MODEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_LIST_MODEL, NautilusListModel))
#define NAUTILUS_LIST_MODEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_LIST_MODEL, NautilusListModelClass))
#define NAUTILUS_IS_LIST_MODEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_LIST_MODEL))
#define NAUTILUS_IS_LIST_MODEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_LIST_MODEL))
#define NAUTILUS_LIST_MODEL_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), NAUTILUS_TYPE_LIST_MODEL, NautilusListModelClass))
G_DECLARE_DERIVABLE_TYPE (NautilusListModel, nautilus_list_model, NAUTILUS, LIST_MODEL, GObject);
enum {
NAUTILUS_LIST_MODEL_FILE_COLUMN,
......@@ -52,21 +43,14 @@ enum {
NAUTILUS_LIST_MODEL_NUM_COLUMNS
};
typedef struct NautilusListModelDetails NautilusListModelDetails;
typedef struct NautilusListModel {
GObject parent_instance;
NautilusListModelDetails *details;
} NautilusListModel;
typedef struct {
struct _NautilusListModelClass
{
GObjectClass parent_class;
void (* subdirectory_unloaded)(NautilusListModel *model,
NautilusDirectory *subdirectory);
} NautilusListModelClass;
};
GType nautilus_list_model_get_type (void);
gboolean nautilus_list_model_add_file (NautilusListModel *model,
NautilusFile *file,
NautilusDirectory *directory);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment