summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Lopez <kevin@kevlopez.com>2017-03-19 19:54:29 +0100
committerErnestas Kulik <ernestask@gnome.org>2017-04-18 11:15:34 +0300
commit7821ab02bacf9b99d6b6c2dd24ea3345dccd4913 (patch)
treeb0d728073fea76d36847c4598c649f42f4818129
parent0dd41ead0aa75b54162a44deb1f2d253f2a0772f (diff)
downloadnautilus-7821ab02bacf9b99d6b6c2dd24ea3345dccd4913.tar.gz
progress-info: port away from manual decls
This patch reduces the number of macros used to define the type, by means of the macro G_DECLARE*, and improves the readability of code. https://bugzilla.gnome.org/show_bug.cgi?id=778139
-rw-r--r--src/nautilus-progress-info.c5
-rw-r--r--src/nautilus-progress-info.h12
2 files changed, 2 insertions, 15 deletions
diff --git a/src/nautilus-progress-info.c b/src/nautilus-progress-info.c
index d642d9a4b..57d50f79f 100644
--- a/src/nautilus-progress-info.c
+++ b/src/nautilus-progress-info.c
@@ -74,11 +74,6 @@ struct _NautilusProgressInfo
GFile *destination;
};
-struct _NautilusProgressInfoClass
-{
- GObjectClass parent_class;
-};
-
G_LOCK_DEFINE_STATIC (progress_info);
G_DEFINE_TYPE (NautilusProgressInfo, nautilus_progress_info, G_TYPE_OBJECT)
diff --git a/src/nautilus-progress-info.h b/src/nautilus-progress-info.h
index 522dc18ba..c42b6c85b 100644
--- a/src/nautilus-progress-info.h
+++ b/src/nautilus-progress-info.h
@@ -25,17 +25,9 @@
#include <glib-object.h>
#include <gio/gio.h>
-#define NAUTILUS_TYPE_PROGRESS_INFO (nautilus_progress_info_get_type ())
-#define NAUTILUS_PROGRESS_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NAUTILUS_TYPE_PROGRESS_INFO, NautilusProgressInfo))
-#define NAUTILUS_PROGRESS_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NAUTILUS_TYPE_PROGRESS_INFO, NautilusProgressInfoClass))
-#define NAUTILUS_IS_PROGRESS_INFO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NAUTILUS_TYPE_PROGRESS_INFO))
-#define NAUTILUS_IS_PROGRESS_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NAUTILUS_TYPE_PROGRESS_INFO))
-#define NAUTILUS_PROGRESS_INFO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NAUTILUS_TYPE_PROGRESS_INFO, NautilusProgressInfoClass))
+#define NAUTILUS_TYPE_PROGRESS_INFO (nautilus_progress_info_get_type ())
-typedef struct _NautilusProgressInfo NautilusProgressInfo;
-typedef struct _NautilusProgressInfoClass NautilusProgressInfoClass;
-
-GType nautilus_progress_info_get_type (void) G_GNUC_CONST;
+G_DECLARE_FINAL_TYPE (NautilusProgressInfo, nautilus_progress_info, NAUTILUS, PROGRESS_INFO, GObject)
/* Signals:
"changed" - status or details changed