[gimp/wip/schumaml/issue-35-outlined-text: 21/21] Achieve quick&dirty compilability



commit 9fdce023cfbf45cc441eebbb6f7099bd7b47694b
Author: Michael Schumacher <schumaml gmx de>
Date:   Wed Dec 25 02:11:59 2019 +0100

    Achieve quick&dirty compilability

 app/text/gimptext.c         |  36 +++++------
 app/tools/gimptextoptions.c | 142 ++++++++++++++++++++++++--------------------
 2 files changed, 94 insertions(+), 84 deletions(-)
---
diff --git a/app/text/gimptext.c b/app/text/gimptext.c
index 1cdb7e3c95..e582ced1f6 100644
--- a/app/text/gimptext.c
+++ b/app/text/gimptext.c
@@ -337,43 +337,43 @@ gimp_text_class_init (GimpTextClass *klass)
                                                      G_PARAM_CONSTRUCT |
                                                      GIMP_PARAM_WRITABLE));
 
-   GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_OUTLINE_STYLE,
-                                  "outline-style", NULL,
+   GIMP_CONFIG_PROP_ENUM (object_class, PROP_OUTLINE_STYLE,
+                                  "outline-style", NULL, NULL,
                                   GIMP_TYPE_FILL_STYLE,
                                   GIMP_FILL_STYLE_SOLID,
                                   GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_OUTLINE_PATTERN,
-                                    "outline-pattern", NULL,
+   GIMP_CONFIG_PROP_OBJECT (object_class, PROP_OUTLINE_PATTERN,
+                                    "outline-pattern", NULL, NULL,
                                     GIMP_TYPE_PATTERN,
                                     GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_OUTLINE_FOREGROUND,
-                                 "outline-foreground", NULL,
+   GIMP_CONFIG_PROP_RGB (object_class, PROP_OUTLINE_FOREGROUND,
+                                 "outline-foreground", NULL, NULL,
                                  FALSE, &gray,
                                  GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_OUTLINE_WIDTH,
-                                    "outline-width", NULL,
+   GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_OUTLINE_WIDTH,
+                                    "outline-width", NULL, NULL,
                                     0.0, 8192.0, 4.0,
                                     GIMP_PARAM_STATIC_STRINGS |
                                     GIMP_CONFIG_PARAM_DEFAULTS);
-   GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_OUTLINE_CAP_STYLE,
-                                  "outline-cap-style", NULL,
+   GIMP_CONFIG_PROP_ENUM (object_class, PROP_OUTLINE_CAP_STYLE,
+                                  "outline-cap-style", NULL, NULL,
                                   GIMP_TYPE_CAP_STYLE, GIMP_CAP_BUTT,
                                   GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_OUTLINE_JOIN_STYLE,
-                                  "outline-join-style", NULL,
+   GIMP_CONFIG_PROP_ENUM (object_class, PROP_OUTLINE_JOIN_STYLE,
+                                  "outline-join-style", NULL, NULL,
                                   GIMP_TYPE_JOIN_STYLE, GIMP_JOIN_MITER,
                                   GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_OUTLINE_MITER_LIMIT,
+   GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_OUTLINE_MITER_LIMIT,
                                     "outline-miter-limit",
-                                    NULL,
+                                    NULL, NULL,
                                     0.0, 100.0, 10.0,
                                     GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_OUTLINE_ANTIALIAS,
-                                     "outline-antialias", NULL,
+   GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_OUTLINE_ANTIALIAS,
+                                     "outline-antialias", NULL, NULL,
                                      TRUE,
                                      GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_OUTLINE_DASH_OFFSET,
-                                    "outline-dash-offset", NULL,
+   GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_OUTLINE_DASH_OFFSET,
+                                    "outline-dash-offset", NULL, NULL,
                                     0.0, 2000.0, 0.0,
                                     GIMP_PARAM_STATIC_STRINGS);
 
diff --git a/app/tools/gimptextoptions.c b/app/tools/gimptextoptions.c
index 4ffa2fd5b8..dfe7f57703 100644
--- a/app/tools/gimptextoptions.c
+++ b/app/tools/gimptextoptions.c
@@ -259,69 +259,83 @@ gimp_text_options_class_init (GimpTextOptionsClass *klass)
                         GIMP_VIEW_SIZE_SMALL,
                         GIMP_PARAM_STATIC_STRINGS);
 
-   GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_OUTLINE,
-                                  "outline", NULL,
-                                  GIMP_TYPE_TEXT_OUTLINE,
-                                  GIMP_TEXT_OUTLINE_NONE,
-                                  GIMP_PARAM_STATIC_STRINGS |
-                                  GIMP_CONFIG_PARAM_DEFAULTS);
-   GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_OUTLINE_STYLE,
-                                  "outline-style", NULL,
-                                  GIMP_TYPE_FILL_STYLE,
-                                  GIMP_FILL_STYLE_SOLID,
-                                  GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_OUTLINE_FOREGROUND,
-                                 "outline-foreground", NULL,
-                                 FALSE, &gray,
-                                 GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_OUTLINE_PATTERN,
-                                    "outline-pattern", NULL,
-                                    GIMP_TYPE_PATTERN,
-                                    GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_OUTLINE_WIDTH,
-                                    "outline-width",
-                                    _("Adjust outline width"),
-                                    0, 8192.0, 2.0,
-                                    GIMP_PARAM_STATIC_STRINGS |
-                                    GIMP_CONFIG_PARAM_DEFAULTS);
-   GIMP_CONFIG_INSTALL_PROP_UNIT (object_class, PROP_OUTLINE_UNIT,
-                                  "outline-unit", NULL,
-                                  TRUE, FALSE, GIMP_UNIT_PIXEL,
-                                  GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_OUTLINE_CAP_STYLE,
-                                  "outline-cap-style", NULL,
-                                  GIMP_TYPE_CAP_STYLE, GIMP_CAP_BUTT,
-                                  GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_OUTLINE_JOIN_STYLE,
-                                  "outline-join-style", NULL,
-                                  GIMP_TYPE_JOIN_STYLE, GIMP_JOIN_MITER,
-                                  GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_OUTLINE_MITER_LIMIT,
-                                    "outline-miter-limit",
-                                    _("Convert a mitered join to a bevelled "
-                                      "join if the miter would extend to a "
-                                      "distance of more than miter-limit * "
-                                      "line-width from the actual join point."),
-                                    0.0, 100.0, 10.0,
-                                    GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_OUTLINE_ANTIALIAS,
-                                     "outline-antialias", NULL,
-                                     TRUE,
-                                     GIMP_PARAM_STATIC_STRINGS);
-   GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_OUTLINE_DASH_OFFSET,
-                                    "outline-dash-offset", NULL,
-                                    0.0, 2000.0, 0.0,
-                                    GIMP_PARAM_STATIC_STRINGS);
- 
-   array_spec = g_param_spec_double ("outline-dash-length", NULL, NULL,
-                                     0.0, 2000.0, 1.0, GIMP_PARAM_READWRITE);
+  GIMP_CONFIG_PROP_ENUM (object_class, PROP_OUTLINE,
+                         "outline",
+                         NULL, NULL,
+                         GIMP_TYPE_TEXT_OUTLINE,
+                         GIMP_TEXT_OUTLINE_NONE,
+                         GIMP_PARAM_STATIC_STRINGS |
+                         GIMP_CONFIG_PARAM_DEFAULTS);
+   GIMP_CONFIG_PROP_ENUM (object_class, PROP_OUTLINE_STYLE,
+                          "outline-style",
+                          NULL, NULL,
+                          GIMP_TYPE_FILL_STYLE,
+                          GIMP_FILL_STYLE_SOLID,
+                          GIMP_PARAM_STATIC_STRINGS);
+   GIMP_CONFIG_PROP_RGB (object_class, PROP_OUTLINE_FOREGROUND,
+                         "outline-foreground",
+                         NULL, NULL,
+                         FALSE, &gray,
+                         GIMP_PARAM_STATIC_STRINGS);
+   GIMP_CONFIG_PROP_OBJECT (object_class, PROP_OUTLINE_PATTERN,
+                            "outline-pattern",
+                            NULL, NULL,
+                            GIMP_TYPE_PATTERN,
+                            GIMP_PARAM_STATIC_STRINGS);
+   GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_OUTLINE_WIDTH,
+                            "outline-width",
+                            _("Outline width"),
+                            _("Adjust outline width"),
+                            0, 8192.0, 2.0,
+                            GIMP_PARAM_STATIC_STRINGS |
+                            GIMP_CONFIG_PARAM_DEFAULTS);
+   GIMP_CONFIG_PROP_UNIT (object_class, PROP_OUTLINE_UNIT,
+                          "outline-unit",
+                          _("Unit"),
+                          _("Outline width unit"),
+                          TRUE, FALSE, GIMP_UNIT_PIXEL,
+                          GIMP_PARAM_STATIC_STRINGS);
+   GIMP_CONFIG_PROP_ENUM (object_class, PROP_OUTLINE_CAP_STYLE,
+                          "outline-cap-style",
+                          NULL, NULL,
+                          GIMP_TYPE_CAP_STYLE, GIMP_CAP_BUTT,
+                          GIMP_PARAM_STATIC_STRINGS);
+   GIMP_CONFIG_PROP_ENUM (object_class, PROP_OUTLINE_JOIN_STYLE,
+                          "outline-join-style",
+                          NULL, NULL,
+                          GIMP_TYPE_JOIN_STYLE, GIMP_JOIN_MITER,
+                          GIMP_PARAM_STATIC_STRINGS);
+   GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_OUTLINE_MITER_LIMIT,
+                            "outline-miter-limit",
+                            _("Outline miter limit"),
+                            _("Convert a mitered join to a bevelled "
+                              "join if the miter would extend to a "
+                              "distance of more than miter-limit * "
+                              "line-width from the actual join point."),
+                            0.0, 100.0, 10.0,
+                            GIMP_PARAM_STATIC_STRINGS);
+   GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_OUTLINE_ANTIALIAS,
+                             "outline-antialias",
+                             NULL, NULL,
+                             TRUE,
+                             GIMP_PARAM_STATIC_STRINGS);
+   GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_OUTLINE_DASH_OFFSET,
+                            "outline-dash-offset",
+                            NULL, NULL,
+                            0.0, 2000.0, 0.0,
+                            GIMP_PARAM_STATIC_STRINGS);
+
+   array_spec = g_param_spec_double ("outline-dash-length",
+                                     NULL, NULL,
+                                     0.0, 2000.0, 1.0,
+                                     GIMP_PARAM_READWRITE);
+
    g_object_class_install_property (object_class, PROP_OUTLINE_DASH_INFO,
                                     gimp_param_spec_value_array ("outline-dash-info",
                                                                  NULL, NULL,
                                                                  array_spec,
                                                                  GIMP_PARAM_READWRITE |
                                                                  G_PARAM_CONSTRUCT));
- 
 
 }
 
@@ -331,6 +345,9 @@ gimp_text_options_config_iface_init (GimpConfigInterface *config_iface)
   parent_config_iface = g_type_interface_peek_parent (config_iface);
 
   config_iface->reset = gimp_text_options_reset;
+
+  config_iface->serialize_property   = gimp_text_options_serialize_property;
+  config_iface->deserialize_property = gimp_text_options_deserialize_property;  
 }
 
 static void
@@ -339,13 +356,6 @@ gimp_text_options_init (GimpTextOptions *options)
   options->size_entry = NULL;
 }
 
-static void
-gimp_text_options_config_iface_init (GimpConfigInterface *iface)
-{
-  iface->serialize_property   = gimp_text_options_serialize_property;
-  iface->deserialize_property = gimp_text_options_deserialize_property;
-}
-
 static void
 gimp_text_options_finalize (GObject *object)
 {
@@ -811,9 +821,9 @@ gimp_text_options_gui (GimpToolOptions *tool_options)
   size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
   button = gimp_prop_enum_combo_box_new (config, "outline", -1, -1);
-  gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
+  gimp_grid_attach_aligned (GTK_GRID (grid), 0, row++,
                              _("Outline:"), 0.0, 0.5,
-                             button, 1, TRUE);
+                             button, 1);
   gtk_size_group_add_widget (size_group, button);
 
   button = gimp_prop_enum_combo_box_new (config, "hint-style", -1, -1);


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