Remove static current_session variable of libqof - we keep one in gnc-session.c already.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18780 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming
2010-03-02 20:21:37 +00:00
parent 358670a0a2
commit 3babeb9de7
2 changed files with 0 additions and 30 deletions

View File

@@ -53,9 +53,6 @@
#include "qofobject-p.h"
#include "qofla-dir.h" /* for QOF_LIB_DIR */
/** \deprecated should not be static */
static QofSession * current_session = NULL;
static GHookList * session_closed_hooks = NULL;
static QofLogModule log_module = QOF_MOD_SESSION;
static GSList *provider_list = NULL;
@@ -234,29 +231,6 @@ qof_session_new (void)
return session;
}
/** \deprecated Each application should keep
their \b own session context. */
QofSession *
qof_session_get_current_session (void)
{
if (!current_session)
{
qof_event_suspend ();
current_session = qof_session_new ();
qof_event_resume ();
}
return current_session;
}
/** \deprecated Each application should keep
their \b own session context. */
void
qof_session_set_current_session (QofSession *session)
{
current_session = session;
}
QofBook *
qof_session_get_book (const QofSession *session)
{
@@ -1602,8 +1576,6 @@ qof_session_destroy (QofSession *session)
}
session->books = NULL;
if (session == current_session)
current_session = NULL;
g_free (session);

View File

@@ -111,8 +111,6 @@ typedef struct _QofSession QofSession;
QofSession * qof_session_new (void);
void qof_session_destroy (QofSession *session);
QofSession * qof_session_get_current_session (void);
void qof_session_set_current_session (QofSession *session);
/** The qof_session_swap_data () method swaps the book of
* the two given sessions. It is useful