Initizalize and deinitialize the osso context
This commit is contained in:
parent
7f85c28b92
commit
0ffda1fe27
2 changed files with 23 additions and 0 deletions
|
@ -49,6 +49,10 @@
|
|||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_HILDON
|
||||
#include <libosso.h>
|
||||
#endif
|
||||
|
||||
#define MIDORI_HISTORY_ERROR g_quark_from_string("MIDORI_HISTORY_ERROR")
|
||||
|
||||
typedef enum
|
||||
|
@ -1354,6 +1358,9 @@ main (int argc,
|
|||
sqlite3* db;
|
||||
gint max_history_age;
|
||||
#endif
|
||||
#if HAVE_HILDON
|
||||
osso_context_t* osso_context;
|
||||
#endif
|
||||
|
||||
#if ENABLE_NLS
|
||||
setlocale (LC_ALL, "");
|
||||
|
@ -1404,6 +1411,16 @@ main (int argc,
|
|||
if (run)
|
||||
return midori_run_script (uris ? *uris : NULL);
|
||||
|
||||
#if HAVE_HILDON
|
||||
osso_context = osso_initialize (PACKAGE_NAME, PACKAGE_VERSION, FALSE, NULL);
|
||||
|
||||
if (!osso_context)
|
||||
{
|
||||
g_critical ("Error initializing OSSO D-Bus context - Midori");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
app = midori_app_new ();
|
||||
/* FIXME: The app might be 'running' but actually showing a dialog
|
||||
after a crash, so running a new window isn't a good idea. */
|
||||
|
@ -1688,6 +1705,10 @@ main (int argc,
|
|||
|
||||
gtk_main ();
|
||||
|
||||
#if HAVE_HILDON
|
||||
osso_deinitialize (osso_context);
|
||||
#endif
|
||||
|
||||
#if HAVE_SQLITE
|
||||
settings = katze_object_get_object (app, "settings");
|
||||
g_object_get (settings, "maximum-history-age", &max_history_age, NULL);
|
||||
|
|
2
wscript
2
wscript
|
@ -149,6 +149,8 @@ def configure (conf):
|
|||
|
||||
if option_enabled ('hildon'):
|
||||
check_pkg ('hildon-1', mandatory=False, var='HILDON')
|
||||
if conf.env['HAVE_HILDON'] == 1:
|
||||
check_pkg ('libosso', mandatory=False, var='HILDON')
|
||||
hildon = ['N/A','yes'][conf.env['HAVE_HILDON'] == 1]
|
||||
else:
|
||||
option_checkfatal ('hildon', 'Maemo integration')
|
||||
|
|
Loading…
Reference in a new issue