[gimp] app: pass all construct params to g_object_new()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: pass all construct params to g_object_new()
- Date: Mon, 21 Jun 2010 19:09:02 +0000 (UTC)
commit ae0ae9fcb8570a2ce4d2ed0e85a8e64fb54549f8
Author: Michael Natterer <mitch gimp org>
Date: Mon Jun 21 21:08:13 2010 +0200
app: pass all construct params to g_object_new()
app/widgets/gimpcolorpanel.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/app/widgets/gimpcolorpanel.c b/app/widgets/gimpcolorpanel.c
index 6f03865..4cfa379 100644
--- a/app/widgets/gimpcolorpanel.c
+++ b/app/widgets/gimpcolorpanel.c
@@ -198,12 +198,12 @@ gimp_color_panel_new (const gchar *title,
g_return_val_if_fail (title != NULL, NULL);
g_return_val_if_fail (color != NULL, NULL);
- panel = g_object_new (GIMP_TYPE_COLOR_PANEL, NULL);
+ panel = g_object_new (GIMP_TYPE_COLOR_PANEL,
+ "title", title,
+ "type", type,
+ "color", color,
+ NULL);
- GIMP_COLOR_BUTTON (panel)->title = g_strdup (title);
-
- gimp_color_button_set_type (GIMP_COLOR_BUTTON (panel), type);
- gimp_color_button_set_color (GIMP_COLOR_BUTTON (panel), color);
gtk_widget_set_size_request (GTK_WIDGET (panel), width, height);
return GTK_WIDGET (panel);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]