Exemplo n.º 1
0
static void
hippo_canvas_base_set_property(GObject         *object,
                               guint            prop_id,
                               const GValue    *value,
                               GParamSpec      *pspec)
{
    HippoCanvasBase *base;

    base = HIPPO_CANVAS_BASE(object);

    switch (prop_id) {
    case PROP_ACTIONS:
        {
            HippoActions *new_actions = (HippoActions*) g_value_get_object(value);
            set_actions(base, new_actions);
        }
        break;
    case PROP_NOTIFICATION_MODE:
        {
            gboolean notification_mode = g_value_get_boolean(value);
            /* The property is construct-only, so we don't need to adapt the layout */
            base->notification_mode = notification_mode;
        }
        break;
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
        break;
    }
}
Exemplo n.º 2
0
static void
hippo_canvas_block_set_property(GObject         *object,
                                guint            prop_id,
                                const GValue    *value,
                                GParamSpec      *pspec)
{
    HippoCanvasBlock *block;

    block = HIPPO_CANVAS_BLOCK(object);

    switch (prop_id) {
    case PROP_BLOCK:
        {
            HippoBlock *new_block = (HippoBlock*) g_value_get_object(value);
            hippo_canvas_block_set_block(block, new_block);
        }
        break;
    case PROP_ACTIONS:
        {
            HippoActions *new_actions = (HippoActions*) g_value_get_object(value);
            set_actions(block, new_actions);
        }
        break;
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
        break;
    }
}
Exemplo n.º 3
0
static void
hippo_canvas_base_finalize(GObject *object)
{
    HippoCanvasBase *base = HIPPO_CANVAS_BASE(object);

    set_actions(base, NULL);
    
    G_OBJECT_CLASS(hippo_canvas_base_parent_class)->finalize(object);
}
Exemplo n.º 4
0
static void
hippo_canvas_stack_dispose(GObject *object)
{
    HippoCanvasStack *stack = HIPPO_CANVAS_STACK(object);

    set_actions(stack, NULL);

    G_OBJECT_CLASS(hippo_canvas_stack_parent_class)->dispose(object);
}
Exemplo n.º 5
0
static void
hippo_canvas_filter_area_finalize(GObject *object)
{
    HippoCanvasFilterArea *base = HIPPO_CANVAS_FILTER_AREA(object);

    set_actions(base, NULL);
    
    G_OBJECT_CLASS(hippo_canvas_filter_area_parent_class)->finalize(object);
}
Exemplo n.º 6
0
void sc_report_handler::initialize()
{
#if 0 // actually, i do not know whether we have to reset these.
    suppress();
    force();
    set_actions(SC_INFO,    SC_DEFAULT_INFO_ACTIONS);
    set_actions(SC_WARNING, SC_DEFAULT_WARNING_ACTIONS);
    set_actions(SC_ERROR,   SC_DEFAULT_ERROR_ACTIONS);
    set_actions(SC_FATAL,   SC_DEFAULT_FATAL_ACTIONS);
#endif

    sev_call_count[SC_INFO]    = 0;
    sev_call_count[SC_WARNING] = 0;
    sev_call_count[SC_ERROR]   = 0;
    sev_call_count[SC_FATAL]   = 0;

    msg_def_items * items = messages;

    while ( items != &msg_terminator )
    {
        for ( int i = 0; i < items->count; ++i )
        {
            items->md[i].call_count = 0;
            items->md[i].sev_call_count[SC_INFO]    = 0;
            items->md[i].sev_call_count[SC_WARNING] = 0;
            items->md[i].sev_call_count[SC_ERROR]   = 0;
            items->md[i].sev_call_count[SC_FATAL]   = 0;
        }
        items = items->next;
    }

    // PROCESS ANY ENVIRONMENTAL OVERRIDES:

    const char* deprecation_warn = std::getenv("SC_DEPRECATION_WARNINGS");
    if ( (deprecation_warn!=0) && !strcmp(deprecation_warn,"DISABLE") )
    {
        set_actions("/IEEE_Std_1666/deprecated", SC_DO_NOTHING);
    }
}
Exemplo n.º 7
0
static void
hippo_canvas_block_dispose(GObject *object)
{
    HippoCanvasBlock *block = HIPPO_CANVAS_BLOCK(object);

    hippo_canvas_block_set_block(block, NULL);

    set_actions(block, NULL);
    
    block->age_item = NULL;

    G_OBJECT_CLASS(hippo_canvas_block_parent_class)->dispose(object);
}
Exemplo n.º 8
0
static void
hippo_canvas_stack_set_property(GObject         *object,
                                guint            prop_id,
                                const GValue    *value,
                                GParamSpec      *pspec)
{
    HippoCanvasStack *stack;

    stack = HIPPO_CANVAS_STACK(object);

    switch (prop_id) {
    case PROP_ACTIONS:
        set_actions(stack,
                    (HippoActions*) g_value_get_object(value));
        break;
    case PROP_MAX_BLOCKS:
        {
            int new_max = g_value_get_int(value);
            if (new_max != stack->max_blocks) {
                stack->max_blocks = new_max;
                remove_extra_children(stack);
            }
        }
        break;
    case PROP_PIN_MESSAGES:
        {
            gboolean new_pin_messages = g_value_get_boolean(value);
            if (new_pin_messages != stack->pin_messages) {
                stack->pin_messages = new_pin_messages;
                /* Theoretically, we need to resort here; practically
                 * speaking, we don't change this property on the fly
                 */
            }
        }
        break;
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
        break;
    }
}
Exemplo n.º 9
0
static void
hippo_canvas_filter_area_set_property(GObject         *object,
                                      guint            prop_id,
                                      const GValue    *value,
                                      GParamSpec      *pspec)
{
    HippoCanvasFilterArea *base;

    base = HIPPO_CANVAS_FILTER_AREA(object);

    switch (prop_id) {
    case PROP_ACTIONS:
        {
            HippoActions *new_actions = (HippoActions*) g_value_get_object(value);
            set_actions(base, new_actions);
        }
        break;
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
        break;
    }
}
Exemplo n.º 10
0
void SimpleActionData::set_action( Action* action_P )
{
    ActionList* tmp = new ActionList( "Simple_action_data" );
    tmp->append( action_P );
    set_actions( tmp );
}