+++ /dev/null
-/*
- Copyright (C) 2008-2009 Christian Dywan <christian@twotoasts.de>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- See the file COPYING for the full license text.
-*/
-
-#include "compat.h"
-
-#include <string.h>
-
-#if !GTK_CHECK_VERSION (2, 14, 0)
-
-gboolean
-gtk_show_uri (GdkScreen* screen,
- const gchar* uri,
- guint32 timestamp,
- GError** error)
-{
- g_return_val_if_fail (uri != NULL, FALSE);
-
- return g_app_info_launch_default_for_uri (uri, NULL, NULL);
-}
-
-#endif
-
-#if !GTK_CHECK_VERSION(2, 12, 0)
-
-void
-gtk_widget_set_has_tooltip (GtkWidget* widget,
- gboolean has_tooltip)
-{
- /* Do nothing */
-}
-
-void
-gtk_widget_set_tooltip_text (GtkWidget* widget,
- const gchar* text)
-{
- if (text && *text)
- {
- static GtkTooltips* tooltips = NULL;
- if (G_UNLIKELY (!tooltips))
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, widget, text, NULL);
- }
-}
-
-void
-gtk_tool_item_set_tooltip_text (GtkToolItem* toolitem,
- const gchar* text)
-{
- if (text && *text)
- {
- static GtkTooltips* tooltips = NULL;
- if (G_UNLIKELY (!tooltips))
- tooltips = gtk_tooltips_new ();
-
- gtk_tool_item_set_tooltip (toolitem, tooltips, text, NULL);
- }
-}
-
-#endif
+++ /dev/null
-/*
- Copyright (C) 2008-2009 Christian Dywan <christian@twotoasts.de>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- See the file COPYING for the full license text.
-*/
-
-#ifndef __COMPAT_H__
-#define __COMPAT_H__
-
-#if HAVE_CONFIG_H
- #include <config.h>
-#endif
-
-#include <webkit/webkit.h>
-
-G_BEGIN_DECLS
-
-#if !GLIB_CHECK_VERSION (2, 14, 0)
- #define G_PARAM_STATIC_STRINGS \
- (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
-#endif
-
-#if !GTK_CHECK_VERSION (2, 14, 0)
-
-gboolean
-gtk_show_uri (GdkScreen* screen,
- const gchar* uri,
- guint32 timestamp,
- GError** error);
-
-#endif
-
-#if !GTK_CHECK_VERSION(2, 12, 0)
-
-void
-gtk_widget_set_has_tooltip (GtkWidget* widget,
- gboolean has_tooltip);
-
-void
-gtk_widget_set_tooltip_text (GtkWidget* widget,
- const gchar* text);
-
-void
-gtk_tool_item_set_tooltip_text (GtkToolItem* toolitem,
- const gchar* text);
-
-#endif
-
-G_END_DECLS
-
-#endif /* __COMPAT_H__ */
#include "midori-transfers.h"
#include "sokoke.h"
-#include "compat.h"
#if HAVE_UNISTD_H
#include <unistd.h>
#include "midori-stock.h"
#include "gtkiconentry.h"
-#include "compat.h"
#include "marshal.h"
#include "sokoke.h"
#include "midori-view.h"
-#include "compat.h"
#include "marshal.h"
#include "sokoke.h"
#endif
#include "sokoke.h"
-#include "compat.h"
#include <string.h>
#include <glib/gi18n.h>
#include "midori-stock.h"
#include "midori-browser.h"
-#include "compat.h"
#include "marshal.h"
#include "sokoke.h"
#include <config.h>
#endif
-#include "compat.h"
#include "midori-stock.h"
#if HAVE_UNISTD_H
#include <hildon-uri.h>
#endif
+#if !GTK_CHECK_VERSION(2, 12, 0)
+
+void
+gtk_widget_set_has_tooltip (GtkWidget* widget,
+ gboolean has_tooltip)
+{
+ /* Do nothing */
+}
+
+void
+gtk_widget_set_tooltip_text (GtkWidget* widget,
+ const gchar* text)
+{
+ if (text && *text)
+ {
+ static GtkTooltips* tooltips = NULL;
+ if (G_UNLIKELY (!tooltips))
+ tooltips = gtk_tooltips_new ();
+ gtk_tooltips_set_tip (tooltips, widget, text, NULL);
+ }
+}
+
+void
+gtk_tool_item_set_tooltip_text (GtkToolItem* toolitem,
+ const gchar* text)
+{
+ if (text && *text)
+ {
+ static GtkTooltips* tooltips = NULL;
+ if (G_UNLIKELY (!tooltips))
+ tooltips = gtk_tooltips_new ();
+
+ gtk_tool_item_set_tooltip (toolitem, tooltips, text, NULL);
+ }
+}
+
+#endif
+
static gchar*
sokoke_js_string_utf8 (JSStringRef js_string)
{
g_return_val_if_fail (uri != NULL, FALSE);
g_return_val_if_fail (!error || !*error, FALSE);
+ #if GTK_CHECK_VERSION (2, 14, 0)
if (gtk_show_uri (screen, uri, timestamp, error))
return TRUE;
+ #else
+ if (g_app_info_launch_default_for_uri (uri, NULL, NULL))
+ return TRUE;
+ #endif
for (i = 0; i < G_N_ELEMENTS (fallbacks); i++)
{
#include <webkit/webkit.h>
#include <JavaScriptCore/JavaScript.h>
+#if !GLIB_CHECK_VERSION (2, 14, 0)
+ #define G_PARAM_STATIC_STRINGS \
+ (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
+#endif
+
+#if !GTK_CHECK_VERSION(2, 12, 0)
+
+void
+gtk_widget_set_has_tooltip (GtkWidget* widget,
+ gboolean has_tooltip);
+
+void
+gtk_widget_set_tooltip_text (GtkWidget* widget,
+ const gchar* text);
+
+void
+gtk_tool_item_set_tooltip_text (GtkToolItem* toolitem,
+ const gchar* text);
+
+#endif
+
gchar*
sokoke_js_script_eval (JSContextRef js_context,
const gchar* script,
#include "midori-view.h"
#include "sokoke.h"
-#include "compat.h"
#include <glib/gi18n.h>
struct _MidoriTransfers
#include <config.h>
#endif
-#include "compat.h"
#include "sokoke.h"
#define SM "http://www.searchmash.com/search/"