Fix #ifdefs for building without libxml or sqlite
This commit is contained in:
parent
791c3ecaae
commit
1d8de6e72d
2 changed files with 13 additions and 12 deletions
1
AUTHORS
1
AUTHORS
|
@ -14,6 +14,7 @@ Contributors:
|
||||||
Brian Vuyk <brian@brianvuyk.com>
|
Brian Vuyk <brian@brianvuyk.com>
|
||||||
Nick Schermer <nick@xfce.org>
|
Nick Schermer <nick@xfce.org>
|
||||||
Matthias Kruk <mkruk@matthiaskruk.de>
|
Matthias Kruk <mkruk@matthiaskruk.de>
|
||||||
|
Johannes Reinhardt <jreinhardt@ist-dein-freund.de>
|
||||||
|
|
||||||
Graphics:
|
Graphics:
|
||||||
extension: Nancy Runge <nancy@twotoasts.de>
|
extension: Nancy Runge <nancy@twotoasts.de>
|
||||||
|
|
|
@ -44,12 +44,12 @@
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <JavaScriptCore/JavaScript.h>
|
#include <JavaScriptCore/JavaScript.h>
|
||||||
|
|
||||||
#ifdef HAVE_LIBXML
|
#if HAVE_LIBXML
|
||||||
#include <libxml/parser.h>
|
#include <libxml/parser.h>
|
||||||
#include <libxml/tree.h>
|
#include <libxml/tree.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SQLITE
|
#if HAVE_SQLITE
|
||||||
#include <sqlite3.h>
|
#include <sqlite3.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ search_engines_save_to_file (KatzeArray* search_engines,
|
||||||
return saved;
|
return saved;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBXML
|
#if HAVE_LIBXML
|
||||||
static KatzeItem*
|
static KatzeItem*
|
||||||
katze_item_from_xmlNodePtr (xmlNodePtr cur)
|
katze_item_from_xmlNodePtr (xmlNodePtr cur)
|
||||||
{
|
{
|
||||||
|
@ -502,7 +502,7 @@ katze_array_from_file (KatzeArray* array,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SQLITE
|
#if HAVE_SQLITE
|
||||||
/* Open database 'dbname' */
|
/* Open database 'dbname' */
|
||||||
static sqlite3*
|
static sqlite3*
|
||||||
db_open (const char* dbname,
|
db_open (const char* dbname,
|
||||||
|
@ -1679,7 +1679,7 @@ main (int argc,
|
||||||
#if HAVE_LIBSOUP_2_25_2
|
#if HAVE_LIBSOUP_2_25_2
|
||||||
SoupCookieJar* jar;
|
SoupCookieJar* jar;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SQLITE
|
#if HAVE_SQLITE
|
||||||
sqlite3* db;
|
sqlite3* db;
|
||||||
gint max_history_age;
|
gint max_history_age;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1825,7 +1825,7 @@ main (int argc,
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
bookmarks = katze_array_new (KATZE_TYPE_ARRAY);
|
bookmarks = katze_array_new (KATZE_TYPE_ARRAY);
|
||||||
#ifdef HAVE_LIBXML
|
#if HAVE_LIBXML
|
||||||
katze_assign (config_file, build_config_filename ("bookmarks.xbel"));
|
katze_assign (config_file, build_config_filename ("bookmarks.xbel"));
|
||||||
error = NULL;
|
error = NULL;
|
||||||
if (!katze_array_from_file (bookmarks, config_file, &error))
|
if (!katze_array_from_file (bookmarks, config_file, &error))
|
||||||
|
@ -1837,7 +1837,7 @@ main (int argc,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
_session = katze_array_new (KATZE_TYPE_ITEM);
|
_session = katze_array_new (KATZE_TYPE_ITEM);
|
||||||
#ifdef HAVE_LIBXML
|
#if HAVE_LIBXML
|
||||||
g_object_get (settings, "load-on-startup", &load_on_startup, NULL);
|
g_object_get (settings, "load-on-startup", &load_on_startup, NULL);
|
||||||
if (load_on_startup == MIDORI_STARTUP_LAST_OPEN_PAGES)
|
if (load_on_startup == MIDORI_STARTUP_LAST_OPEN_PAGES)
|
||||||
{
|
{
|
||||||
|
@ -1853,7 +1853,7 @@ main (int argc,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
trash = katze_array_new (KATZE_TYPE_ITEM);
|
trash = katze_array_new (KATZE_TYPE_ITEM);
|
||||||
#ifdef HAVE_LIBXML
|
#if HAVE_LIBXML
|
||||||
katze_assign (config_file, build_config_filename ("tabtrash.xbel"));
|
katze_assign (config_file, build_config_filename ("tabtrash.xbel"));
|
||||||
error = NULL;
|
error = NULL;
|
||||||
if (!katze_array_from_file (trash, config_file, &error))
|
if (!katze_array_from_file (trash, config_file, &error))
|
||||||
|
@ -1864,11 +1864,11 @@ main (int argc,
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SQLITE
|
#if HAVE_SQLITE
|
||||||
katze_assign (config_file, build_config_filename ("history.db"));
|
katze_assign (config_file, build_config_filename ("history.db"));
|
||||||
#endif
|
#endif
|
||||||
history = katze_array_new (KATZE_TYPE_ARRAY);
|
history = katze_array_new (KATZE_TYPE_ARRAY);
|
||||||
#ifdef HAVE_SQLITE
|
#if HAVE_SQLITE
|
||||||
error = NULL;
|
error = NULL;
|
||||||
if ((db = midori_history_initialize (history, config_file, &error)) == NULL)
|
if ((db = midori_history_initialize (history, config_file, &error)) == NULL)
|
||||||
{
|
{
|
||||||
|
@ -2019,7 +2019,7 @@ main (int argc,
|
||||||
g_signal_connect_after (trash, "remove-item",
|
g_signal_connect_after (trash, "remove-item",
|
||||||
G_CALLBACK (midori_trash_remove_item_cb), NULL);
|
G_CALLBACK (midori_trash_remove_item_cb), NULL);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_SQLITE
|
#if HAVE_SQLITE
|
||||||
katze_assign (config_file, build_config_filename ("history.db"));
|
katze_assign (config_file, build_config_filename ("history.db"));
|
||||||
if (is_writable (config_file))
|
if (is_writable (config_file))
|
||||||
{
|
{
|
||||||
|
@ -2064,7 +2064,7 @@ main (int argc,
|
||||||
|
|
||||||
gtk_main ();
|
gtk_main ();
|
||||||
|
|
||||||
#ifdef HAVE_SQLITE
|
#if HAVE_SQLITE
|
||||||
settings = katze_object_get_object (app, "settings");
|
settings = katze_object_get_object (app, "settings");
|
||||||
g_object_get (settings, "maximum-history-age", &max_history_age, NULL);
|
g_object_get (settings, "maximum-history-age", &max_history_age, NULL);
|
||||||
midori_history_terminate (db, max_history_age);
|
midori_history_terminate (db, max_history_age);
|
||||||
|
|
Loading…
Reference in a new issue