Exemple #1
0
void gui_filterbar_c::show_options(bool show)
{
    if (show && option1 != nullptr)
        return;
    if (!show && option1 == nullptr)
        return;

    if (show)
    {
        int tag = gui->get_free_tag();
        gui_button_c &o1 = MAKE_VISIBLE_CHILD<gui_button_c>(getrid());
        o1.set_check(tag);
        o1.set_handler(DELEGATE(this, option_handler), as_param(1));
        o1.set_face_getter(BUTTON_FACE(check));
        o1.set_text(TTT("Search in messages",337));
        if (search_in_messages)
            o1.mark();

        option1 = &o1;
    } else
    {
        TSDEL( option1 );
    }

    HOLD( getparent() ).as<gui_contactlist_c>().update_filter_pos();
}
Exemple #2
0
void gmsgbase::send_to_main_thread()
{
    if (gui)
        gui->enqueue_gmsg( this );
    else
        TSDEL( this );
}
Exemple #3
0
bool active_protocol_c::check_die(RID, GUIPARAM)
{
    auto r = syncdata.lock_read();
    if (r().flags.is(F_WORKER))
    {
        // worker still works. waiting again
        if (ipcp) ipcp->something_happens();
        r.unlock();
        DEFERRED_UNIQUE_CALL(0.01, DELEGATE(this, check_die), nullptr);
    } else
    {
        r.unlock();
        TSDEL( this ); // actual death
    }
    return true;
}