[epiphany] file-chooser: Use G_DECLARE_FINAL_TYPE
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] file-chooser: Use G_DECLARE_FINAL_TYPE
- Date: Wed, 10 Feb 2016 06:21:50 +0000 (UTC)
commit e89d3e26e50f2f3b739e97dd54f31699cd49e384
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Tue Feb 9 23:19:47 2016 -0600
file-chooser: Use G_DECLARE_FINAL_TYPE
lib/widgets/ephy-file-chooser.c | 5 +++++
lib/widgets/ephy-file-chooser.h | 22 ++--------------------
2 files changed, 7 insertions(+), 20 deletions(-)
---
diff --git a/lib/widgets/ephy-file-chooser.c b/lib/widgets/ephy-file-chooser.c
index f32f457..add1806 100644
--- a/lib/widgets/ephy-file-chooser.c
+++ b/lib/widgets/ephy-file-chooser.c
@@ -34,6 +34,11 @@ static void ephy_file_chooser_image_preview (GtkFileChooser *file_chooser,
#define PREVIEW_WIDTH 150
#define PREVIEW_HEIGHT 150
+struct _EphyFileChooser
+{
+ GtkFileChooserDialog parent_instance;
+};
+
G_DEFINE_TYPE (EphyFileChooser, ephy_file_chooser, GTK_TYPE_FILE_CHOOSER_DIALOG)
static void
diff --git a/lib/widgets/ephy-file-chooser.h b/lib/widgets/ephy-file-chooser.h
index e97fe3d..0301682 100644
--- a/lib/widgets/ephy-file-chooser.h
+++ b/lib/widgets/ephy-file-chooser.h
@@ -24,15 +24,9 @@
G_BEGIN_DECLS
-#define EPHY_TYPE_FILE_CHOOSER (ephy_file_chooser_get_type ())
-#define EPHY_FILE_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_FILE_CHOOSER,
EphyFileChooser))
-#define EPHY_FILE_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EPHY_TYPE_FILE_CHOOSER,
EphyFileChooserClass))
-#define EPHY_IS_FILE_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_FILE_CHOOSER))
-#define EPHY_IS_FILE_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_FILE_CHOOSER))
-#define EPHY_FILE_CHOOSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_FILE_CHOOSER,
EphyFileChooserClass))
+#define EPHY_TYPE_FILE_CHOOSER (ephy_file_chooser_get_type ())
-typedef struct _EphyFileChooser EphyFileChooser;
-typedef struct _EphyFileChooserClass EphyFileChooserClass;
+G_DECLARE_FINAL_TYPE (EphyFileChooser, ephy_file_chooser, EPHY, FILE_CHOOSER, GtkFileChooserDialog)
typedef enum
{
@@ -44,18 +38,6 @@ typedef enum
EPHY_FILE_FILTER_LAST = EPHY_FILE_FILTER_NONE
} EphyFileFilterDefault;
-struct _EphyFileChooser
-{
- GtkFileChooserDialog parent;
-};
-
-struct _EphyFileChooserClass
-{
- GtkFileChooserDialogClass parent_class;
-};
-
-GType ephy_file_chooser_get_type (void);
-
EphyFileChooser *ephy_file_chooser_new (const char *title,
GtkWidget *parent,
GtkFileChooserAction action,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]