g_free (template_file);
if (g_file_get_contents (path, &template, NULL, NULL))
{
+ #if !WEBKIT_CHECK_VERSION (1, 1, 14)
SoupServer* res_server;
guint port;
+ #endif
gchar* res_root;
gchar* stock_root;
gchar* title;
gchar* message;
gchar* result;
- res_server = sokoke_get_res_server ();
- port = soup_server_get_port (res_server);
#if WEBKIT_CHECK_VERSION (1, 1, 14)
res_root = g_strdup ("res:/");
stock_root = g_strdup ("stock:/");
#else
+ res_server = sokoke_get_res_server ();
+ port = soup_server_get_port (res_server);
res_root = g_strdup_printf ("http://localhost:%d/res", port);
stock_root = g_strdup_printf ("http://localhost:%d/stock", port);
#endif
if (view->speed_dial_in_new_tabs && !g_strcmp0 (uri, ""))
{
+ #if !WEBKIT_CHECK_VERSION (1, 1, 14)
SoupServer* res_server;
guint port;
+ #endif
gchar* res_root;
gchar* speed_dial_head;
gchar* speed_dial_body;
if (G_UNLIKELY (!speed_dial_head))
speed_dial_head = g_strdup ("");
+ #if WEBKIT_CHECK_VERSION (1, 1, 14)
+ res_root = g_strdup ("res:/");
+ stock_root = g_strdup ("stock:/");
+ #else
res_server = sokoke_get_res_server ();
port = soup_server_get_port (res_server);
res_root = g_strdup_printf ("http://localhost:%d/res", port);
stock_root = g_strdup_printf ("http://localhost:%d/stock", port);
+ #endif
body_fname = g_build_filename (sokoke_set_config_dir (NULL),
"speeddial.json", NULL);
return g_build_filename (MDATADIR, filename, NULL);
}
+#if !WEBKIT_CHECK_VERSION (1, 1, 14)
static void
res_server_handler_cb (SoupServer* res_server,
SoupMessage* msg,
return res_server;
}
+#endif
gchar*
sokoke_replace_variables (const gchar* template,
#include <katze/katze.h>
-#include <gtk/gtk.h>
-#include <libsoup/soup.h>
+#include <webkit/webkit.h>
#include <JavaScriptCore/JavaScript.h>
gchar*
gchar*
sokoke_find_data_filename (const gchar* filename);
+#if !WEBKIT_CHECK_VERSION (1, 1, 14)
SoupServer*
sokoke_get_res_server (void);
+#endif
gchar*
sokoke_replace_variables (const gchar* template,