]> git.sur5r.net Git - glabels/commitdiff
Use pre-2.44 GObject boilerplate in new glLabelPropertiesDialog.
authorJim Evins <evins@snaught.com>
Fri, 1 Apr 2016 00:48:36 +0000 (20:48 -0400)
committerJim Evins <evins@snaught.com>
Fri, 1 Apr 2016 00:53:38 +0000 (20:53 -0400)
Maintains compatability with older or less bleeding-edge distributions.

src/label-properties-dialog.c
src/label-properties-dialog.h

index 595ec5f474dc06fd163bf128f0ea8af11872c93b..b7dff9ed57e7820108a020c1843d1a4ebc0c5a32 100644 (file)
@@ -40,7 +40,7 @@
 /* Private types.                                         */
 /*========================================================*/
 
-typedef struct
+struct _glLabelPropertiesDialogPrivate
 {
        glLabel        *label;
        GtkBox         *box;
@@ -58,15 +58,6 @@ typedef struct
        GtkBox         *orientation_box;
        GtkRadioButton *normal_orientation;
        GtkRadioButton *rotated_orientation;
-
-} glLabelPropertiesDialogPrivate;
-
-
-struct _glLabelPropertiesDialog
-{
-       GtkDialog                       parent;
-
-       glLabelPropertiesDialogPrivate *priv;
 };
 
 
@@ -94,8 +85,7 @@ static void gl_label_properties_dialog_construct   (glLabelPropertiesDialog *dia
 /*****************************************************************************/
 /* Boilerplate object stuff.                                                 */
 /*****************************************************************************/
-
-G_DEFINE_TYPE_WITH_PRIVATE (glLabelPropertiesDialog, gl_label_properties_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE (glLabelPropertiesDialog, gl_label_properties_dialog, GTK_TYPE_DIALOG)
 
 
 
@@ -165,7 +155,7 @@ gl_label_properties_dialog_init (glLabelPropertiesDialog *dialog)
 
        gl_debug (DEBUG_UI, "START");
 
-       dialog->priv = gl_label_properties_dialog_get_instance_private (dialog);
+       dialog->priv = g_new0 (glLabelPropertiesDialogPrivate, 1);
 
         vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
 
index 53c98ccf3d7819268808181f9b2c0be7820f880a..78a67cfb3912d205b1b7ffb43d0891bf5e4fcec1 100644 (file)
@@ -32,8 +32,34 @@ G_BEGIN_DECLS
 #define GL_RESPONSE_SELECT_OTHER 1
 
 #define GL_TYPE_LABEL_PROPERTIES_DIALOG (gl_label_properties_dialog_get_type ())
+#define GL_LABEL_PROPERTIES_DIALOG(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_PROPERTIES_DIALOG, glLabelPropertiesDialog))
+#define GL_LABEL_PROPERTIES_DIALOG_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_PROPERTIES_DIALOG, glLabelPropertiesDialogClass))
+#define GL_IS_LABEL_PROPERTIES_DIALOG(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_PROPERTIES_DIALOG))
+#define GL_IS_LABEL_PROPERTIES_DIALOG_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_PROPERTIES_DIALOG))
+#define GL_LABEL_PROPERTIES_DIALOG_GET_CLASS(obj) \
+        (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_LABEL_PROPERTIES_DIALOG, glLabelPropertiesDialogClass))
+
+typedef struct _glLabelPropertiesDialog         glLabelPropertiesDialog;
+typedef struct _glLabelPropertiesDialogClass    glLabelPropertiesDialogClass;
+
+typedef struct _glLabelPropertiesDialogPrivate  glLabelPropertiesDialogPrivate;
+
+struct _glLabelPropertiesDialog
+{
+       GtkDialog                       parent_instance;
+
+       glLabelPropertiesDialogPrivate *priv;
+};
+
+struct  _glLabelPropertiesDialogClass
+{
+       GtkDialogClass                  parent_class;
+};
 
-G_DECLARE_FINAL_TYPE (glLabelPropertiesDialog, gl_label_properties_dialog, GL, LABEL_PROPERTIES_DIALOG, GtkDialog)
 
 GtkWidget *gl_label_properties_dialog_new (glLabel *label, GtkWindow *parent);