libgimp*: implement GObject::constructed() instead of ::constructor()
This commit is contained in:
@ -54,9 +54,7 @@ typedef struct
|
|||||||
} PreviewSettings;
|
} PreviewSettings;
|
||||||
|
|
||||||
|
|
||||||
static GObject * gimp_aspect_preview_constructor (GType type,
|
static void gimp_aspect_preview_constructed (GObject *object);
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params);
|
|
||||||
static void gimp_aspect_preview_dispose (GObject *object);
|
static void gimp_aspect_preview_dispose (GObject *object);
|
||||||
static void gimp_aspect_preview_get_property (GObject *object,
|
static void gimp_aspect_preview_get_property (GObject *object,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
@ -102,7 +100,7 @@ gimp_aspect_preview_class_init (GimpAspectPreviewClass *klass)
|
|||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||||
GimpPreviewClass *preview_class = GIMP_PREVIEW_CLASS (klass);
|
GimpPreviewClass *preview_class = GIMP_PREVIEW_CLASS (klass);
|
||||||
|
|
||||||
object_class->constructor = gimp_aspect_preview_constructor;
|
object_class->constructed = gimp_aspect_preview_constructed;
|
||||||
object_class->dispose = gimp_aspect_preview_dispose;
|
object_class->dispose = gimp_aspect_preview_dispose;
|
||||||
object_class->get_property = gimp_aspect_preview_get_property;
|
object_class->get_property = gimp_aspect_preview_get_property;
|
||||||
object_class->set_property = gimp_aspect_preview_set_property;
|
object_class->set_property = gimp_aspect_preview_set_property;
|
||||||
@ -134,21 +132,19 @@ gimp_aspect_preview_init (GimpAspectPreview *preview)
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GObject *
|
static void
|
||||||
gimp_aspect_preview_constructor (GType type,
|
gimp_aspect_preview_constructed (GObject *object)
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params)
|
|
||||||
{
|
{
|
||||||
GObject *object;
|
|
||||||
gchar *data_name;
|
gchar *data_name;
|
||||||
PreviewSettings settings;
|
PreviewSettings settings;
|
||||||
|
|
||||||
|
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||||
|
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||||
|
|
||||||
data_name = g_strdup_printf ("%s-aspect-preview-%d",
|
data_name = g_strdup_printf ("%s-aspect-preview-%d",
|
||||||
g_get_prgname (),
|
g_get_prgname (),
|
||||||
gimp_aspect_preview_counter++);
|
gimp_aspect_preview_counter++);
|
||||||
|
|
||||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
|
||||||
|
|
||||||
if (gimp_get_data (data_name, &settings))
|
if (gimp_get_data (data_name, &settings))
|
||||||
{
|
{
|
||||||
gimp_preview_set_update (GIMP_PREVIEW (object), settings.update);
|
gimp_preview_set_update (GIMP_PREVIEW (object), settings.update);
|
||||||
@ -156,8 +152,6 @@ gimp_aspect_preview_constructor (GType type,
|
|||||||
|
|
||||||
g_object_set_data_full (object, "gimp-aspect-preview-data-name",
|
g_object_set_data_full (object, "gimp-aspect-preview-data-name",
|
||||||
data_name, (GDestroyNotify) g_free);
|
data_name, (GDestroyNotify) g_free);
|
||||||
|
|
||||||
return object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -56,9 +56,7 @@ typedef struct
|
|||||||
} PreviewSettings;
|
} PreviewSettings;
|
||||||
|
|
||||||
|
|
||||||
static GObject * gimp_drawable_preview_constructor (GType type,
|
static void gimp_drawable_preview_constructed (GObject *object);
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params);
|
|
||||||
static void gimp_drawable_preview_dispose (GObject *object);
|
static void gimp_drawable_preview_dispose (GObject *object);
|
||||||
static void gimp_drawable_preview_get_property (GObject *object,
|
static void gimp_drawable_preview_get_property (GObject *object,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
@ -100,7 +98,7 @@ gimp_drawable_preview_class_init (GimpDrawablePreviewClass *klass)
|
|||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||||
GimpPreviewClass *preview_class = GIMP_PREVIEW_CLASS (klass);
|
GimpPreviewClass *preview_class = GIMP_PREVIEW_CLASS (klass);
|
||||||
|
|
||||||
object_class->constructor = gimp_drawable_preview_constructor;
|
object_class->constructed = gimp_drawable_preview_constructed;
|
||||||
object_class->dispose = gimp_drawable_preview_dispose;
|
object_class->dispose = gimp_drawable_preview_dispose;
|
||||||
object_class->get_property = gimp_drawable_preview_get_property;
|
object_class->get_property = gimp_drawable_preview_get_property;
|
||||||
object_class->set_property = gimp_drawable_preview_set_property;
|
object_class->set_property = gimp_drawable_preview_set_property;
|
||||||
@ -131,21 +129,19 @@ gimp_drawable_preview_init (GimpDrawablePreview *preview)
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GObject *
|
static void
|
||||||
gimp_drawable_preview_constructor (GType type,
|
gimp_drawable_preview_constructed (GObject *object)
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params)
|
|
||||||
{
|
{
|
||||||
GObject *object;
|
|
||||||
gchar *data_name;
|
gchar *data_name;
|
||||||
PreviewSettings settings;
|
PreviewSettings settings;
|
||||||
|
|
||||||
|
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||||
|
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||||
|
|
||||||
data_name = g_strdup_printf ("%s-drawable-preview-%d",
|
data_name = g_strdup_printf ("%s-drawable-preview-%d",
|
||||||
g_get_prgname (),
|
g_get_prgname (),
|
||||||
++gimp_drawable_preview_counter);
|
++gimp_drawable_preview_counter);
|
||||||
|
|
||||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
|
||||||
|
|
||||||
if (gimp_get_data (data_name, &settings))
|
if (gimp_get_data (data_name, &settings))
|
||||||
{
|
{
|
||||||
gimp_preview_set_update (GIMP_PREVIEW (object), settings.update);
|
gimp_preview_set_update (GIMP_PREVIEW (object), settings.update);
|
||||||
@ -155,8 +151,6 @@ gimp_drawable_preview_constructor (GType type,
|
|||||||
|
|
||||||
g_object_set_data_full (object, "gimp-drawable-preview-data-name",
|
g_object_set_data_full (object, "gimp-drawable-preview-data-name",
|
||||||
data_name, (GDestroyNotify) g_free);
|
data_name, (GDestroyNotify) g_free);
|
||||||
|
|
||||||
return object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -66,9 +66,7 @@ typedef struct
|
|||||||
#define GIMP_ZOOM_PREVIEW_GET_PRIVATE(obj) \
|
#define GIMP_ZOOM_PREVIEW_GET_PRIVATE(obj) \
|
||||||
((GimpZoomPreviewPrivate *) ((GimpZoomPreview *) (obj))->priv)
|
((GimpZoomPreviewPrivate *) ((GimpZoomPreview *) (obj))->priv)
|
||||||
|
|
||||||
static GObject * gimp_zoom_preview_constructor (GType type,
|
static void gimp_zoom_preview_constructed (GObject *object);
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params);
|
|
||||||
static void gimp_zoom_preview_finalize (GObject *object);
|
static void gimp_zoom_preview_finalize (GObject *object);
|
||||||
static void gimp_zoom_preview_dispose (GObject *object);
|
static void gimp_zoom_preview_dispose (GObject *object);
|
||||||
static void gimp_zoom_preview_get_property (GObject *object,
|
static void gimp_zoom_preview_get_property (GObject *object,
|
||||||
@ -137,7 +135,7 @@ gimp_zoom_preview_class_init (GimpZoomPreviewClass *klass)
|
|||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||||
GimpPreviewClass *preview_class = GIMP_PREVIEW_CLASS (klass);
|
GimpPreviewClass *preview_class = GIMP_PREVIEW_CLASS (klass);
|
||||||
|
|
||||||
object_class->constructor = gimp_zoom_preview_constructor;
|
object_class->constructed = gimp_zoom_preview_constructed;
|
||||||
object_class->finalize = gimp_zoom_preview_finalize;
|
object_class->finalize = gimp_zoom_preview_finalize;
|
||||||
object_class->dispose = gimp_zoom_preview_dispose;
|
object_class->dispose = gimp_zoom_preview_dispose;
|
||||||
object_class->get_property = gimp_zoom_preview_get_property;
|
object_class->get_property = gimp_zoom_preview_get_property;
|
||||||
@ -203,22 +201,20 @@ gimp_zoom_preview_init (GimpZoomPreview *preview)
|
|||||||
GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS);
|
GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GObject *
|
static void
|
||||||
gimp_zoom_preview_constructor (GType type,
|
gimp_zoom_preview_constructed (GObject *object)
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params)
|
|
||||||
{
|
{
|
||||||
GimpZoomPreviewPrivate *priv;
|
GimpZoomPreviewPrivate *priv = GIMP_ZOOM_PREVIEW_GET_PRIVATE (object);
|
||||||
GObject *object;
|
|
||||||
gchar *data_name;
|
gchar *data_name;
|
||||||
PreviewSettings settings;
|
PreviewSettings settings;
|
||||||
|
|
||||||
|
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||||
|
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||||
|
|
||||||
data_name = g_strdup_printf ("%s-zoom-preview-%d",
|
data_name = g_strdup_printf ("%s-zoom-preview-%d",
|
||||||
g_get_prgname (),
|
g_get_prgname (),
|
||||||
gimp_zoom_preview_counter++);
|
gimp_zoom_preview_counter++);
|
||||||
|
|
||||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
|
||||||
|
|
||||||
if (gimp_get_data (data_name, &settings))
|
if (gimp_get_data (data_name, &settings))
|
||||||
{
|
{
|
||||||
gimp_preview_set_update (GIMP_PREVIEW (object), settings.update);
|
gimp_preview_set_update (GIMP_PREVIEW (object), settings.update);
|
||||||
@ -227,8 +223,6 @@ gimp_zoom_preview_constructor (GType type,
|
|||||||
g_object_set_data_full (object, "gimp-zoom-preview-data-name",
|
g_object_set_data_full (object, "gimp-zoom-preview-data-name",
|
||||||
data_name, (GDestroyNotify) g_free);
|
data_name, (GDestroyNotify) g_free);
|
||||||
|
|
||||||
priv = GIMP_ZOOM_PREVIEW_GET_PRIVATE (object);
|
|
||||||
|
|
||||||
if (! priv->model)
|
if (! priv->model)
|
||||||
{
|
{
|
||||||
GimpZoomModel *model = gimp_zoom_model_new ();
|
GimpZoomModel *model = gimp_zoom_model_new ();
|
||||||
@ -240,8 +234,6 @@ gimp_zoom_preview_constructor (GType type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
gimp_zoom_preview_set_adjustments (GIMP_ZOOM_PREVIEW (object), 1.0, 1.0);
|
gimp_zoom_preview_set_adjustments (GIMP_ZOOM_PREVIEW (object), 1.0, 1.0);
|
||||||
|
|
||||||
return object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -63,9 +63,7 @@ enum
|
|||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
static GObject * gimp_chain_button_constructor (GType type,
|
static void gimp_chain_button_constructed (GObject *object);
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params);
|
|
||||||
static void gimp_chain_button_set_property (GObject *object,
|
static void gimp_chain_button_set_property (GObject *object,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
const GValue *value,
|
const GValue *value,
|
||||||
@ -103,7 +101,7 @@ gimp_chain_button_class_init (GimpChainButtonClass *klass)
|
|||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->constructor = gimp_chain_button_constructor;
|
object_class->constructed = gimp_chain_button_constructed;
|
||||||
object_class->set_property = gimp_chain_button_set_property;
|
object_class->set_property = gimp_chain_button_set_property;
|
||||||
object_class->get_property = gimp_chain_button_get_property;
|
object_class->get_property = gimp_chain_button_get_property;
|
||||||
|
|
||||||
@ -150,17 +148,13 @@ gimp_chain_button_init (GimpChainButton *button)
|
|||||||
button);
|
button);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GObject *
|
static void
|
||||||
gimp_chain_button_constructor (GType type,
|
gimp_chain_button_constructed (GObject *object)
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params)
|
|
||||||
{
|
{
|
||||||
GObject *object;
|
GimpChainButton *button = GIMP_CHAIN_BUTTON (object);
|
||||||
GimpChainButton *button;
|
|
||||||
|
|
||||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||||
|
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||||
button = GIMP_CHAIN_BUTTON (object);
|
|
||||||
|
|
||||||
button->line1 = gimp_chain_line_new (button->position, 1);
|
button->line1 = gimp_chain_line_new (button->position, 1);
|
||||||
button->line2 = gimp_chain_line_new (button->position, -1);
|
button->line2 = gimp_chain_line_new (button->position, -1);
|
||||||
@ -191,8 +185,6 @@ gimp_chain_button_constructor (GType type,
|
|||||||
gtk_widget_show (button->button);
|
gtk_widget_show (button->button);
|
||||||
gtk_widget_show (button->line1);
|
gtk_widget_show (button->line1);
|
||||||
gtk_widget_show (button->line2);
|
gtk_widget_show (button->line2);
|
||||||
|
|
||||||
return object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -62,6 +62,7 @@ enum
|
|||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GimpColorConfig *config;
|
GimpColorConfig *config;
|
||||||
@ -70,9 +71,8 @@ typedef struct
|
|||||||
|
|
||||||
#define GIMP_COLOR_DISPLAY_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GIMP_TYPE_COLOR_DISPLAY, GimpColorDisplayPrivate))
|
#define GIMP_COLOR_DISPLAY_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GIMP_TYPE_COLOR_DISPLAY, GimpColorDisplayPrivate))
|
||||||
|
|
||||||
static GObject * gimp_color_display_constructor (GType type,
|
|
||||||
guint n_params,
|
static void gimp_color_display_constructed (GObject *object);
|
||||||
GObjectConstructParam *params);
|
|
||||||
static void gimp_color_display_dispose (GObject *object);
|
static void gimp_color_display_dispose (GObject *object);
|
||||||
static void gimp_color_display_set_property (GObject *object,
|
static void gimp_color_display_set_property (GObject *object,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
@ -102,7 +102,7 @@ gimp_color_display_class_init (GimpColorDisplayClass *klass)
|
|||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->constructor = gimp_color_display_constructor;
|
object_class->constructed = gimp_color_display_constructed;
|
||||||
object_class->dispose = gimp_color_display_dispose;
|
object_class->dispose = gimp_color_display_dispose;
|
||||||
object_class->set_property = gimp_color_display_set_property;
|
object_class->set_property = gimp_color_display_set_property;
|
||||||
object_class->get_property = gimp_color_display_get_property;
|
object_class->get_property = gimp_color_display_get_property;
|
||||||
@ -154,19 +154,14 @@ gimp_color_display_init (GimpColorDisplay *display)
|
|||||||
display->enabled = FALSE;
|
display->enabled = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GObject *
|
static void
|
||||||
gimp_color_display_constructor (GType type,
|
gimp_color_display_constructed (GObject *object)
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params)
|
|
||||||
{
|
{
|
||||||
GObject *object;
|
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||||
|
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
|
||||||
|
|
||||||
/* emit an initial "changed" signal after all construct properties are set */
|
/* emit an initial "changed" signal after all construct properties are set */
|
||||||
gimp_color_display_changed (GIMP_COLOR_DISPLAY (object));
|
gimp_color_display_changed (GIMP_COLOR_DISPLAY (object));
|
||||||
|
|
||||||
return object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -54,9 +54,7 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static GObject * gimp_color_profile_store_constructor (GType type,
|
static void gimp_color_profile_store_constructed (GObject *object);
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params);
|
|
||||||
static void gimp_color_profile_store_dispose (GObject *object);
|
static void gimp_color_profile_store_dispose (GObject *object);
|
||||||
static void gimp_color_profile_store_finalize (GObject *object);
|
static void gimp_color_profile_store_finalize (GObject *object);
|
||||||
static void gimp_color_profile_store_set_property (GObject *object,
|
static void gimp_color_profile_store_set_property (GObject *object,
|
||||||
@ -95,7 +93,7 @@ gimp_color_profile_store_class_init (GimpColorProfileStoreClass *klass)
|
|||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->constructor = gimp_color_profile_store_constructor;
|
object_class->constructed = gimp_color_profile_store_constructed;
|
||||||
object_class->dispose = gimp_color_profile_store_dispose;
|
object_class->dispose = gimp_color_profile_store_dispose;
|
||||||
object_class->finalize = gimp_color_profile_store_finalize;
|
object_class->finalize = gimp_color_profile_store_finalize;
|
||||||
object_class->set_property = gimp_color_profile_store_set_property;
|
object_class->set_property = gimp_color_profile_store_set_property;
|
||||||
@ -131,18 +129,14 @@ gimp_color_profile_store_init (GimpColorProfileStore *store)
|
|||||||
G_N_ELEMENTS (types), types);
|
G_N_ELEMENTS (types), types);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GObject *
|
static void
|
||||||
gimp_color_profile_store_constructor (GType type,
|
gimp_color_profile_store_constructed (GObject *object)
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params)
|
|
||||||
{
|
{
|
||||||
GObject *object;
|
GimpColorProfileStore *store = GIMP_COLOR_PROFILE_STORE (object);
|
||||||
GimpColorProfileStore *store;
|
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
|
|
||||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||||
|
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||||
store = GIMP_COLOR_PROFILE_STORE (object);
|
|
||||||
|
|
||||||
gtk_list_store_append (GTK_LIST_STORE (store), &iter);
|
gtk_list_store_append (GTK_LIST_STORE (store), &iter);
|
||||||
gtk_list_store_set (GTK_LIST_STORE (store), &iter,
|
gtk_list_store_set (GTK_LIST_STORE (store), &iter,
|
||||||
@ -156,8 +150,6 @@ gimp_color_profile_store_constructor (GType type,
|
|||||||
{
|
{
|
||||||
gimp_color_profile_store_load (store, store->history, NULL);
|
gimp_color_profile_store_load (store, store->history, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -48,27 +48,26 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static GObject * gimp_dialog_constructor (GType type,
|
static void gimp_dialog_constructed (GObject *object);
|
||||||
guint n_params,
|
static void gimp_dialog_dispose (GObject *object);
|
||||||
GObjectConstructParam *params);
|
static void gimp_dialog_set_property (GObject *object,
|
||||||
static void gimp_dialog_dispose (GObject *object);
|
guint property_id,
|
||||||
static void gimp_dialog_set_property (GObject *object,
|
const GValue *value,
|
||||||
guint property_id,
|
GParamSpec *pspec);
|
||||||
const GValue *value,
|
static void gimp_dialog_get_property (GObject *object,
|
||||||
GParamSpec *pspec);
|
guint property_id,
|
||||||
static void gimp_dialog_get_property (GObject *object,
|
GValue *value,
|
||||||
guint property_id,
|
GParamSpec *pspec);
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
|
|
||||||
static void gimp_dialog_hide (GtkWidget *widget);
|
static void gimp_dialog_hide (GtkWidget *widget);
|
||||||
static gboolean gimp_dialog_delete_event (GtkWidget *widget,
|
static gboolean gimp_dialog_delete_event (GtkWidget *widget,
|
||||||
GdkEventAny *event);
|
GdkEventAny *event);
|
||||||
static void gimp_dialog_close (GtkDialog *dialog);
|
|
||||||
|
|
||||||
static void gimp_dialog_help (GObject *dialog);
|
static void gimp_dialog_close (GtkDialog *dialog);
|
||||||
static void gimp_dialog_response (GtkDialog *dialog,
|
|
||||||
gint response_id);
|
static void gimp_dialog_help (GObject *dialog);
|
||||||
|
static void gimp_dialog_response (GtkDialog *dialog,
|
||||||
|
gint response_id);
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GimpDialog, gimp_dialog, GTK_TYPE_DIALOG)
|
G_DEFINE_TYPE (GimpDialog, gimp_dialog, GTK_TYPE_DIALOG)
|
||||||
@ -85,7 +84,7 @@ gimp_dialog_class_init (GimpDialogClass *klass)
|
|||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||||
GtkDialogClass *dialog_class = GTK_DIALOG_CLASS (klass);
|
GtkDialogClass *dialog_class = GTK_DIALOG_CLASS (klass);
|
||||||
|
|
||||||
object_class->constructor = gimp_dialog_constructor;
|
object_class->constructed = gimp_dialog_constructed;
|
||||||
object_class->dispose = gimp_dialog_dispose;
|
object_class->dispose = gimp_dialog_dispose;
|
||||||
object_class->set_property = gimp_dialog_set_property;
|
object_class->set_property = gimp_dialog_set_property;
|
||||||
object_class->get_property = gimp_dialog_get_property;
|
object_class->get_property = gimp_dialog_get_property;
|
||||||
@ -128,16 +127,14 @@ gimp_dialog_init (GimpDialog *dialog)
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GObject *
|
static void
|
||||||
gimp_dialog_constructor (GType type,
|
gimp_dialog_constructed (GObject *object)
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params)
|
|
||||||
{
|
{
|
||||||
GObject *object;
|
|
||||||
GimpHelpFunc help_func;
|
GimpHelpFunc help_func;
|
||||||
const gchar *help_id;
|
const gchar *help_id;
|
||||||
|
|
||||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||||
|
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||||
|
|
||||||
help_func = g_object_get_data (object, "gimp-dialog-help-func");
|
help_func = g_object_get_data (object, "gimp-dialog-help-func");
|
||||||
help_id = g_object_get_data (object, "gimp-dialog-help-id");
|
help_id = g_object_get_data (object, "gimp-dialog-help-id");
|
||||||
@ -162,8 +159,6 @@ gimp_dialog_constructor (GType type,
|
|||||||
|
|
||||||
g_object_set_data (object, "gimp-dialog-help-button", button);
|
g_object_set_data (object, "gimp-dialog-help-button", button);
|
||||||
}
|
}
|
||||||
|
|
||||||
return object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -55,18 +55,18 @@ enum
|
|||||||
PROP_HINT
|
PROP_HINT
|
||||||
};
|
};
|
||||||
|
|
||||||
static GObject * gimp_hint_box_constructor (GType type,
|
|
||||||
guint n_params,
|
static void gimp_hint_box_constructed (GObject *object);
|
||||||
GObjectConstructParam *params);
|
static void gimp_hint_box_finalize (GObject *object);
|
||||||
static void gimp_hint_box_finalize (GObject *object);
|
static void gimp_hint_box_set_property (GObject *object,
|
||||||
static void gimp_hint_box_set_property (GObject *object,
|
guint property_id,
|
||||||
guint property_id,
|
const GValue *value,
|
||||||
const GValue *value,
|
GParamSpec *pspec);
|
||||||
GParamSpec *pspec);
|
static void gimp_hint_box_get_property (GObject *object,
|
||||||
static void gimp_hint_box_get_property (GObject *object,
|
guint property_id,
|
||||||
guint property_id,
|
GValue *value,
|
||||||
GValue *value,
|
GParamSpec *pspec);
|
||||||
GParamSpec *pspec);
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GimpHintBox, gimp_hint_box, GTK_TYPE_HBOX)
|
G_DEFINE_TYPE (GimpHintBox, gimp_hint_box, GTK_TYPE_HBOX)
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ gimp_hint_box_class_init (GimpHintBoxClass *klass)
|
|||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->constructor = gimp_hint_box_constructor;
|
object_class->constructed = gimp_hint_box_constructed;
|
||||||
object_class->finalize = gimp_hint_box_finalize;
|
object_class->finalize = gimp_hint_box_finalize;
|
||||||
object_class->set_property = gimp_hint_box_set_property;
|
object_class->set_property = gimp_hint_box_set_property;
|
||||||
object_class->get_property = gimp_hint_box_get_property;
|
object_class->get_property = gimp_hint_box_get_property;
|
||||||
@ -102,18 +102,14 @@ gimp_hint_box_init (GimpHintBox *box)
|
|||||||
box->hint = NULL;
|
box->hint = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GObject *
|
static void
|
||||||
gimp_hint_box_constructor (GType type,
|
gimp_hint_box_constructed (GObject *object)
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params)
|
|
||||||
{
|
{
|
||||||
GObject *object;
|
GimpHintBox *box = GIMP_HINT_BOX (object);
|
||||||
GimpHintBox *box;
|
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
|
|
||||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||||
|
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||||
box = GIMP_HINT_BOX (object);
|
|
||||||
|
|
||||||
gtk_box_set_spacing (GTK_BOX (box), 12);
|
gtk_box_set_spacing (GTK_BOX (box), 12);
|
||||||
|
|
||||||
@ -139,8 +135,6 @@ gimp_hint_box_constructor (GType type,
|
|||||||
-1);
|
-1);
|
||||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
|
||||||
return object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -54,12 +54,9 @@ typedef struct
|
|||||||
} GimpIntStorePrivate;
|
} GimpIntStorePrivate;
|
||||||
|
|
||||||
|
|
||||||
static GObject * gimp_int_store_constructor (GType type,
|
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params);
|
|
||||||
|
|
||||||
static void gimp_int_store_tree_model_init (GtkTreeModelIface *iface);
|
static void gimp_int_store_tree_model_init (GtkTreeModelIface *iface);
|
||||||
|
|
||||||
|
static void gimp_int_store_constructed (GObject *object);
|
||||||
static void gimp_int_store_finalize (GObject *object);
|
static void gimp_int_store_finalize (GObject *object);
|
||||||
static void gimp_int_store_set_property (GObject *object,
|
static void gimp_int_store_set_property (GObject *object,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
@ -93,7 +90,7 @@ gimp_int_store_class_init (GimpIntStoreClass *klass)
|
|||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->constructor = gimp_int_store_constructor;
|
object_class->constructed = gimp_int_store_constructed;
|
||||||
object_class->finalize = gimp_int_store_finalize;
|
object_class->finalize = gimp_int_store_finalize;
|
||||||
object_class->set_property = gimp_int_store_set_property;
|
object_class->set_property = gimp_int_store_set_property;
|
||||||
object_class->get_property = gimp_int_store_get_property;
|
object_class->get_property = gimp_int_store_get_property;
|
||||||
@ -120,26 +117,29 @@ gimp_int_store_class_init (GimpIntStoreClass *klass)
|
|||||||
g_type_class_add_private (object_class, sizeof (GimpIntStorePrivate));
|
g_type_class_add_private (object_class, sizeof (GimpIntStorePrivate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_int_store_tree_model_init (GtkTreeModelIface *iface)
|
||||||
|
{
|
||||||
|
parent_iface = g_type_interface_peek_parent (iface);
|
||||||
|
|
||||||
|
iface->row_inserted = gimp_int_store_row_inserted;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_int_store_init (GimpIntStore *store)
|
gimp_int_store_init (GimpIntStore *store)
|
||||||
{
|
{
|
||||||
store->empty_iter = NULL;
|
store->empty_iter = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GObject *
|
static void
|
||||||
gimp_int_store_constructor (GType type,
|
gimp_int_store_constructed (GObject *object)
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params)
|
|
||||||
{
|
{
|
||||||
GObject *object;
|
GimpIntStore *store = GIMP_INT_STORE (object);
|
||||||
GimpIntStore *store;
|
GimpIntStorePrivate *priv = GIMP_INT_STORE_GET_PRIVATE (store);
|
||||||
GimpIntStorePrivate *priv;
|
|
||||||
GType types[GIMP_INT_STORE_NUM_COLUMNS];
|
GType types[GIMP_INT_STORE_NUM_COLUMNS];
|
||||||
|
|
||||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||||
|
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||||
store = GIMP_INT_STORE (object);
|
|
||||||
priv = GIMP_INT_STORE_GET_PRIVATE (store);
|
|
||||||
|
|
||||||
types[GIMP_INT_STORE_VALUE] = G_TYPE_INT;
|
types[GIMP_INT_STORE_VALUE] = G_TYPE_INT;
|
||||||
types[GIMP_INT_STORE_LABEL] = G_TYPE_STRING;
|
types[GIMP_INT_STORE_LABEL] = G_TYPE_STRING;
|
||||||
@ -152,16 +152,6 @@ gimp_int_store_constructor (GType type,
|
|||||||
GIMP_INT_STORE_NUM_COLUMNS, types);
|
GIMP_INT_STORE_NUM_COLUMNS, types);
|
||||||
|
|
||||||
gimp_int_store_add_empty (store);
|
gimp_int_store_add_empty (store);
|
||||||
|
|
||||||
return object;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_int_store_tree_model_init (GtkTreeModelIface *iface)
|
|
||||||
{
|
|
||||||
parent_iface = g_type_interface_peek_parent (iface);
|
|
||||||
|
|
||||||
iface->row_inserted = gimp_int_store_row_inserted;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -59,18 +59,15 @@ typedef struct
|
|||||||
((GimpStringComboBoxPrivate *) ((GimpStringComboBox *) (obj))->priv)
|
((GimpStringComboBoxPrivate *) ((GimpStringComboBox *) (obj))->priv)
|
||||||
|
|
||||||
|
|
||||||
static GObject * gimp_string_combo_box_constructor (GType type,
|
static void gimp_string_combo_box_constructed (GObject *object);
|
||||||
guint n_params,
|
static void gimp_string_combo_box_set_property (GObject *object,
|
||||||
GObjectConstructParam *params);
|
guint property_id,
|
||||||
|
const GValue *value,
|
||||||
static void gimp_string_combo_box_set_property (GObject *object,
|
GParamSpec *pspec);
|
||||||
guint property_id,
|
static void gimp_string_combo_box_get_property (GObject *object,
|
||||||
const GValue *value,
|
guint property_id,
|
||||||
GParamSpec *pspec);
|
GValue *value,
|
||||||
static void gimp_string_combo_box_get_property (GObject *object,
|
GParamSpec *pspec);
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GimpStringComboBox, gimp_string_combo_box, GTK_TYPE_COMBO_BOX)
|
G_DEFINE_TYPE (GimpStringComboBox, gimp_string_combo_box, GTK_TYPE_COMBO_BOX)
|
||||||
@ -83,7 +80,7 @@ gimp_string_combo_box_class_init (GimpStringComboBoxClass *klass)
|
|||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->constructor = gimp_string_combo_box_constructor;
|
object_class->constructed = gimp_string_combo_box_constructed;
|
||||||
object_class->set_property = gimp_string_combo_box_set_property;
|
object_class->set_property = gimp_string_combo_box_set_property;
|
||||||
object_class->get_property = gimp_string_combo_box_get_property;
|
object_class->get_property = gimp_string_combo_box_get_property;
|
||||||
|
|
||||||
@ -145,18 +142,14 @@ gimp_string_combo_box_init (GimpStringComboBox *combo_box)
|
|||||||
GimpStringComboBoxPrivate);
|
GimpStringComboBoxPrivate);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GObject *
|
static void
|
||||||
gimp_string_combo_box_constructor (GType type,
|
gimp_string_combo_box_constructed (GObject *object)
|
||||||
guint n_params,
|
|
||||||
GObjectConstructParam *params)
|
|
||||||
{
|
{
|
||||||
GObject *object;
|
GimpStringComboBoxPrivate *priv = GIMP_STRING_COMBO_BOX_GET_PRIVATE (object);
|
||||||
GimpStringComboBoxPrivate *priv;
|
|
||||||
GtkCellRenderer *cell;
|
GtkCellRenderer *cell;
|
||||||
|
|
||||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||||
|
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||||
priv = GIMP_STRING_COMBO_BOX_GET_PRIVATE (object);
|
|
||||||
|
|
||||||
priv->text_renderer = cell = gtk_cell_renderer_text_new ();
|
priv->text_renderer = cell = gtk_cell_renderer_text_new ();
|
||||||
|
|
||||||
@ -164,8 +157,6 @@ gimp_string_combo_box_constructor (GType type,
|
|||||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (object), cell,
|
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (object), cell,
|
||||||
"text", priv->label_column,
|
"text", priv->label_column,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
return object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user