[gedit: 4/4] spell-checker-dialog: derivable -> final type



commit d74761bfa996bcf3a738e920e6830eadad63ac4f
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Aug 8 15:10:33 2015 +0200

    spell-checker-dialog: derivable -> final type
    
    I currently don't see any use case where subclassing it is useful.
    Keep the Private struct, so if we change our minds later, it's really
    easy to come back to a derivable type.

 plugins/spell/gedit-spell-checker-dialog.c |    5 +++++
 plugins/spell/gedit-spell-checker-dialog.h |   11 +++--------
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-checker-dialog.c b/plugins/spell/gedit-spell-checker-dialog.c
index 54f4a92..14d79a3 100644
--- a/plugins/spell/gedit-spell-checker-dialog.c
+++ b/plugins/spell/gedit-spell-checker-dialog.c
@@ -35,6 +35,11 @@
 
 typedef struct _GeditSpellCheckerDialogPrivate GeditSpellCheckerDialogPrivate;
 
+struct _GeditSpellCheckerDialog
+{
+       GtkDialog parent_instance;
+};
+
 struct _GeditSpellCheckerDialogPrivate
 {
        GeditSpellNavigator *navigator;
diff --git a/plugins/spell/gedit-spell-checker-dialog.h b/plugins/spell/gedit-spell-checker-dialog.h
index b207e37..de47d5a 100644
--- a/plugins/spell/gedit-spell-checker-dialog.h
+++ b/plugins/spell/gedit-spell-checker-dialog.h
@@ -28,14 +28,9 @@
 G_BEGIN_DECLS
 
 #define GEDIT_TYPE_SPELL_CHECKER_DIALOG (gedit_spell_checker_dialog_get_type ())
-G_DECLARE_DERIVABLE_TYPE (GeditSpellCheckerDialog, gedit_spell_checker_dialog,
-                         GEDIT, SPELL_CHECKER_DIALOG,
-                         GtkDialog)
-
-struct _GeditSpellCheckerDialogClass
-{
-       GtkDialogClass parent_class;
-};
+G_DECLARE_FINAL_TYPE (GeditSpellCheckerDialog, gedit_spell_checker_dialog,
+                     GEDIT, SPELL_CHECKER_DIALOG,
+                     GtkDialog)
 
 GtkWidget *    gedit_spell_checker_dialog_new          (GtkWindow           *parent,
                                                         GeditSpellNavigator *navigator);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]