Example #1
0
static void
gtk_volume_button_set_property (GObject       *object,
                                guint          prop_id,
                                const GValue  *value,
                                GParamSpec    *pspec)
{
    GtkScaleButton *button = GTK_SCALE_BUTTON (object);

    switch (prop_id)
    {
    case PROP_SYMBOLIC:
        if (get_symbolic (button) != g_value_get_boolean (value))
        {
            if (g_value_get_boolean (value))
                gtk_scale_button_set_icons (button, (const char **) icons_symbolic);
            else
                gtk_scale_button_set_icons (button, (const char **) icons);
            g_object_notify_by_pspec (object, pspec);
        }
        break;
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
        break;
    }
}
Example #2
0
static void
gtk_volume_button_get_property (GObject     *object,
                                guint        prop_id,
                                GValue      *value,
                                GParamSpec  *pspec)
{
    switch (prop_id)
    {
    case PROP_SYMBOLIC:
        g_value_set_boolean (value, get_symbolic (GTK_SCALE_BUTTON (object)));
        break;
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
        break;
    }
}
void test_index_below_symboloc() {
  int *buf = get_symbolic();
  buf[-1] = 0; // no-warning;
}