Fix warnings about HAVE_JSCORE not being defined

This commit is contained in:
Christian Dywan 2009-07-20 23:27:06 +02:00
parent 20948034d8
commit 3201370b60
2 changed files with 6 additions and 8 deletions

View file

@ -1335,7 +1335,7 @@ midori_load_session (gpointer data)
return FALSE; return FALSE;
} }
#if HAVE_JSCORE #ifdef HAVE_JSCORE
static gint static gint
midori_run_script (const gchar* filename) midori_run_script (const gchar* filename)
{ {
@ -1435,7 +1435,7 @@ main (int argc,
N_("Run ADDRESS as a web application"), N_("ADDRESS") }, N_("Run ADDRESS as a web application"), N_("ADDRESS") },
{ "config", 'c', 0, G_OPTION_ARG_FILENAME, &config, { "config", 'c', 0, G_OPTION_ARG_FILENAME, &config,
N_("Use FOLDER as configuration folder"), N_("FOLDER") }, N_("Use FOLDER as configuration folder"), N_("FOLDER") },
#if HAVE_JSCORE #ifdef HAVE_JSCORE
{ "run", 'r', 0, G_OPTION_ARG_NONE, &run, { "run", 'r', 0, G_OPTION_ARG_NONE, &run,
N_("Run the specified filename as javascript"), NULL }, N_("Run the specified filename as javascript"), NULL },
#endif #endif
@ -1589,7 +1589,7 @@ main (int argc,
return 0; return 0;
} }
#if HAVE_JSCORE #ifdef HAVE_JSCORE
/* Standalone javascript support */ /* Standalone javascript support */
if (run) if (run)
return midori_run_script (uris ? *uris : NULL); return midori_run_script (uris ? *uris : NULL);

View file

@ -36,7 +36,7 @@
#include <idna.h> #include <idna.h>
#endif #endif
#if HAVE_JSCORE #ifdef HAVE_JSCORE
static gchar* static gchar*
sokoke_js_string_utf8 (JSStringRef js_string) sokoke_js_string_utf8 (JSStringRef js_string)
{ {
@ -57,7 +57,7 @@ sokoke_js_script_eval (JSContextRef js_context,
const gchar* script, const gchar* script,
gchar** exception) gchar** exception)
{ {
#if HAVE_JSCORE #ifdef HAVE_JSCORE
gchar* value; gchar* value;
JSStringRef js_value_string; JSStringRef js_value_string;
#endif #endif
@ -65,7 +65,7 @@ sokoke_js_script_eval (JSContextRef js_context,
g_return_val_if_fail (js_context, FALSE); g_return_val_if_fail (js_context, FALSE);
g_return_val_if_fail (script, FALSE); g_return_val_if_fail (script, FALSE);
#if HAVE_JSCORE #ifdef HAVE_JSCORE
JSStringRef js_script = JSStringCreateWithUTF8CString (script); JSStringRef js_script = JSStringCreateWithUTF8CString (script);
JSValueRef js_exception = NULL; JSValueRef js_exception = NULL;
JSValueRef js_value = JSEvaluateScript (js_context, js_script, JSValueRef js_value = JSEvaluateScript (js_context, js_script,
@ -100,8 +100,6 @@ error_dialog (const gchar* short_message,
gtk_widget_show (dialog); gtk_widget_show (dialog);
g_signal_connect_swapped (dialog, "response", g_signal_connect_swapped (dialog, "response",
G_CALLBACK (gtk_widget_destroy), dialog); G_CALLBACK (gtk_widget_destroy), dialog);
} }
/** /**