qulogic/libgnt

aafedfc9474d
libgnt: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
  • +4 -5
    gntbox.c
  • +2 -2
    gntlabel.c
  • +1 -1
    gntline.c
  • +2 -3
    gnttree.c
  • --- a/gntbox.c Sat Oct 12 22:40:48 2013 +0530
    +++ b/gntbox.c Sun Nov 17 02:06:03 2013 +0530
    @@ -592,7 +592,7 @@
    g_param_spec_boolean("vertical", "Vertical",
    "Whether the child widgets in the box should be stacked vertically.",
    TRUE,
    - G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
    + G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_STATIC_STRINGS
    )
    );
    g_object_class_install_property(gclass,
    @@ -600,7 +600,7 @@
    g_param_spec_boolean("homogeneous", "Homogeneous",
    "Whether the child widgets in the box should have the same size.",
    TRUE,
    - G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
    + G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_STATIC_STRINGS
    )
    );
    @@ -662,11 +662,10 @@
    GntWidget *gnt_box_new(gboolean homo, gboolean vert)
    {
    - GntWidget *widget = g_object_new(GNT_TYPE_BOX, NULL);
    + GntWidget *widget = g_object_new(GNT_TYPE_BOX, "homogeneous", homo,
    + "vertical", vert, NULL);
    GntBox *box = GNT_BOX(widget);
    - box->homogeneous = homo;
    - box->vertical = vert;
    box->alignment = vert ? GNT_ALIGN_LEFT : GNT_ALIGN_MID;
    return widget;
    --- a/gntlabel.c Sat Oct 12 22:40:48 2013 +0530
    +++ b/gntlabel.c Sun Nov 17 02:06:03 2013 +0530
    @@ -123,7 +123,7 @@
    g_param_spec_string("text", "Text",
    "The text for the label.",
    NULL,
    - G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
    + G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS
    )
    );
    @@ -135,7 +135,7 @@
    GNT_TEXT_FLAG_NORMAL|GNT_TEXT_FLAG_BOLD|GNT_TEXT_FLAG_UNDERLINE|
    GNT_TEXT_FLAG_BLINK|GNT_TEXT_FLAG_DIM|GNT_TEXT_FLAG_HIGHLIGHT,
    GNT_TEXT_FLAG_NORMAL,
    - G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
    + G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS
    )
    );
    GNTDEBUG;
    --- a/gntline.c Sat Oct 12 22:40:48 2013 +0530
    +++ b/gntline.c Sun Nov 17 02:06:03 2013 +0530
    @@ -120,7 +120,7 @@
    g_param_spec_boolean("vertical", "Vertical",
    "Whether it's a vertical line or a horizontal one.",
    TRUE,
    - G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
    + G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS
    )
    );
    }
    --- a/gnttree.c Sat Oct 12 22:40:48 2013 +0530
    +++ b/gnttree.c Sun Nov 17 02:06:03 2013 +0530
    @@ -1009,7 +1009,6 @@
    if (tree->priv->expander_level == g_value_get_int(value))
    break;
    tree->priv->expander_level = g_value_get_int(value);
    - g_object_notify(obj, "expander-level");
    default:
    break;
    }
    @@ -1054,7 +1053,7 @@
    g_param_spec_int("columns", "Columns",
    "Number of columns in the tree.",
    1, G_MAXINT, 1,
    - G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
    + G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS
    )
    );
    g_object_class_install_property(gclass,
    @@ -1062,7 +1061,7 @@
    g_param_spec_int("expander-level", "Expander level",
    "Number of levels to show expander in the tree.",
    0, G_MAXINT, 1,
    - G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
    + G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS
    )
    );