Esempio n. 1
0
void
athena_navigation_state_set_master (AthenaNavigationState *self,
                                    GtkActionGroup *master)
{
    if (self->priv->master != master) {
        clear_bindings (self);

        g_clear_object (&self->priv->master);
        self->priv->master = g_object_ref (master);

        update_bindings (self);

        g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MASTER]);
    }
}
Esempio n. 2
0
static void
athena_navigation_state_dispose (GObject *obj)
{
    AthenaNavigationState *self = ATHENA_NAVIGATION_STATE (obj);

    clear_bindings (self);

    g_clear_object (&self->priv->slave);
    g_clear_object (&self->priv->master);

    if (self->priv->groups != NULL) {
        g_list_free_full (self->priv->groups, g_object_unref);
        self->priv->groups = NULL;
    }

    G_OBJECT_CLASS (athena_navigation_state_parent_class)->dispose (obj);
}
Esempio n. 3
0
bool
SQLStatementImpl::step()
{
    if (!m_sqlite_dbconn.is_valid())
    {
        JEWEL_THROW(InvalidConnection, "Invalid database connection.");
    }
    int code = SQLITE_OK;
    try
    {
        // Intentional assignment
        throw_on_failure(code = sqlite3_step(m_statement));
    }
    catch (SQLiteException&)
    {
        reset();
        clear_bindings();
        throw;
    }
    switch (code)
    {
    case SQLITE_DONE:

        // After SQLite version 3.6.23.1, the statement is
        // reset automatically.
        #if SQLITE_VERSION_NUMBER < 3007000
            sqlite3_reset(m_statement);
        #endif

        return false;
    case SQLITE_ROW:
        return true;
    default:
        ;
        // Do nothing
    }
    JEWEL_HARD_ASSERT (false);  // Execution should never reach here.
    return false;  // Silence compiler re. return from non-void function. 
}