Requirements: GTK+ 2.10, WebkitGTK+ 1.1.17, libXML2, libsoup 2.25.2, sqlite 3.0, Vala 0.10
-Optional: Unique 0.9, libidn, libnotify
+Optional: Unique 0.9, libnotify
For installation instructions read INSTALL.
katze_preferences_add_widget (preferences, button, "indented");
button = katze_property_proxy (settings, "enable-html5-local-storage", NULL);
katze_preferences_add_widget (preferences, button, "spanned");
- #if HAVE_LIBSOUP_2_27_90
button = katze_property_proxy (settings, "strip-referer", NULL);
katze_preferences_add_widget (preferences, button, "indented");
- #endif
katze_preferences_add_widget (preferences, gtk_label_new (NULL), "indented");
button = katze_property_label (settings, "maximum-history-age");
katze_preferences_add_widget (preferences, button, "indented");
soup_message_headers_append (msg->request_headers, "Accept-Language", accpt);
g_free (accpt);
- #if HAVE_LIBSOUP_2_27_90
if (katze_object_get_boolean (settings, "strip-referer"))
{
const gchar* referer
g_free (stripped_referer);
}
}
- #endif
}
static void
#endif
katze_assign (view->uri, g_strdup (uri));
- #ifndef WEBKIT_USER_AGENT_MAJOR_VERSION
- #define WEBKIT_USER_AGENT_MAJOR_VERSION 532
- #define WEBKIT_USER_AGENT_MINOR_VERSION 1
- #endif
#ifdef G_ENABLE_DEBUG
#define DEBUGGING " (Debug)"
#else
"<tr><td>Glib</td><td>%d.%d.%d (%d.%d.%d)</td></tr>"
"<tr><td>libsoup</td><td>%s</td></tr>"
"<tr><td>libnotify</td><td>%s</td></tr>"
- "<tr><td>libidn</td><td>%s</td></tr>"
"<tr><td>libunique</td><td>%s</td></tr>"
"<tr><td>libhildon</td><td>%s</td></tr>"
"<tr><td>Platform</td><td>%s</td></tr>"
glib_major_version, glib_minor_version, glib_micro_version,
LIBSOUP_VERSION,
HAVE_LIBNOTIFY ? "Yes" : "No",
- HAVE_LIBIDN ? "Yes" : "No",
HAVE_UNIQUE ? "Yes" : "No",
HAVE_HILDON ? "Yes" : "No",
sys_name, ident,
const gchar* lang = pango_language_to_string (gtk_get_default_language ());
- #ifndef WEBKIT_USER_AGENT_MAJOR_VERSION
- #define WEBKIT_USER_AGENT_MAJOR_VERSION 532
- #define WEBKIT_USER_AGENT_MINOR_VERSION 1
- #endif
const int webcore_major = WEBKIT_USER_AGENT_MAJOR_VERSION;
const int webcore_minor = WEBKIT_USER_AGENT_MINOR_VERSION;
#include <glib/gprintf.h>
#include <glib/gstdio.h>
-#if HAVE_LIBIDN
- #include <stringprep.h>
- #include <punycode.h>
- #include <idna.h>
-#endif
-
#ifdef HAVE_HILDON_FM
#include <hildon/hildon-file-chooser-dialog.h>
#endif
*
* The specified hostname is encoded if it is not ASCII.
*
- * If no IDN support is available at compile time,
- * the hostname will be returned unaltered.
- *
* Return value: a newly allocated hostname
**/
static gchar*
sokoke_hostname_to_ascii (const gchar* hostname)
{
- #ifdef HAVE_LIBSOUP_2_27_90
return g_hostname_to_ascii (hostname);
- #elif HAVE_LIBIDN
- uint32_t* q;
- char* encoded;
- int rc;
-
- if ((q = stringprep_utf8_to_ucs4 (hostname, -1, NULL)))
- {
- rc = idna_to_ascii_4z (q, &encoded, IDNA_ALLOW_UNASSIGNED);
- free (q);
- if (rc == IDNA_SUCCESS)
- return encoded;
- }
- #endif
- return g_strdup (hostname);
}
/**
static gchar*
sokoke_idn_to_punycode (gchar* uri)
{
- #if HAVE_LIBIDN
- gchar* result = sokoke_uri_to_ascii (uri);
- g_free (uri);
- return result;
- #else
return uri;
- #endif
}
/**
if (uri && g_str_has_prefix (uri, "http://"))
{
gchar* unescaped = sokoke_uri_unescape_string (uri);
- #ifdef HAVE_LIBSOUP_2_27_90
gchar* path = NULL;
gchar* hostname;
gchar* decoded;
}
g_free (hostname);
return unescaped;
- #elif HAVE_LIBIDN
- gchar* decoded;
-
- if (!unescaped)
- return g_strdup (uri);
- else if (!g_utf8_validate (unescaped, -1, NULL))
- {
- g_free (unescaped);
- return g_strdup (uri);
- }
-
- if (!idna_to_unicode_8z8z (unescaped, &decoded, 0) == IDNA_SUCCESS)
- return unescaped;
- g_free (unescaped);
- return decoded;
- #else
- return unescaped;
- #endif
}
return g_strdup (uri);
}
} URIItem;
static const URIItem items[] = {
- #if HAVE_LIBIDN || defined (HAVE_LIBSOUP_2_27_90)
{ "http://www.münchhausen.at", "http://www.xn--mnchhausen-9db.at" },
{ "http://www.خداوند.com/", "http://www.xn--mgbndb8il.com/" },
{ "айкидо.com", "xn--80aildf0a.com" },
{ "http://東京理科大学.jp", "http://xn--1lq68wkwbj6ugkpigi.jp" },
{ "https://青のネコ", "https://xn--u9jthzcs263c" },
- #else
- { "http://www.münchhausen.at", NULL },
- { "http://www.خداوند.com/", NULL },
- { "айкидо.com", NULL },
- { "http://東京理科大学.jp", NULL },
- { "https://青のネコ.co.jp", NULL },
- #endif
{ "http://en.wikipedia.org/wiki/Kölsch_language", NULL },
{ "file:///home/mark/frühstück", NULL },
{ "about:version", NULL },
g_free (result);
}
- #if HAVE_LIBIDN
- test_input ("айкидо.com", "http://xn--80aildf0a.com");
- #else
test_input ("айкидо.com", "http://айкидо.com");
- #endif
test_input ("sm Küchenzubehör", SM "Küchenzubehör");
test_input ("sm 東京理科大学", SM "東京理科大学");
}
webkit_version = conf.check_cfg (modversion='webkit-1.0').split ('.')
if int(webkit_version[0]) >= 1 and int(webkit_version[1]) >= 5 and int(webkit_version[2]) >= 1:
check_pkg ('javascriptcoregtk-1.0', '1.1.17', args=args)
- check_pkg ('libsoup-2.4', '2.25.2')
+ check_pkg ('libsoup-2.4', '2.27.90')
conf.define ('HAVE_LIBSOUP_2_25_2', 1)
- check_pkg ('libsoup-2.4', '2.27.90', False, var='LIBSOUP_2_27_90')
+ conf.define ('HAVE_LIBSOUP_2_27_90', 1)
check_pkg ('libsoup-2.4', '2.29.3', False, var='LIBSOUP_2_29_3')
check_pkg ('libsoup-2.4', '2.29.91', False, var='LIBSOUP_2_29_91')
conf.define ('LIBSOUP_VERSION', conf.check_cfg (modversion='libsoup-2.4'))
check_pkg ('libxml-2.0', '2.6')
check_pkg ('sqlite3', '3.0', True, var='SQLITE')
- if conf.env['HAVE_LIBSOUP_2_27_90']:
- idn = 'yes'
- conf.define ('HAVE_LIBIDN', 0)
- else:
- if option_enabled ('libidn'):
- check_pkg ('libidn', '1.0', False)
- idn = ['N/A','yes'][conf.env['HAVE_LIBIDN'] == 1]
- if idn != 'yes':
- option_checkfatal ('libidn', 'international domain names')
- else:
- idn = 'no '
- conf.define ('HAVE_LIBIDN', [0,1][idn == 'yes'])
-
if option_enabled ('hildon'):
if check_pkg ('hildon-1', mandatory=False, var='HILDON'):
check_pkg ('libosso', var='HILDON')
Icon optimizations: %(icons)s (rsvg-convert)
Notifications: %(libnotify)s (libnotify)
- IDN support: %(idn)s (libidn or libsoup 2.27.90)
API documentation: %(api_docs)s (gtk-doc)
''' % locals ())
if unique == 'yes' and conf.check_cfg (modversion='unique-1.0') == '1.0.4':
group = opt.add_option_group ('Optional features', '')
add_enable_option ('unique', 'single instance support', group)
- add_enable_option ('libidn', 'international domain name support', group)
add_enable_option ('libnotify', 'notification support', group)
add_enable_option ('addons', 'building of extensions', group)
add_enable_option ('tests', 'building of tests', group, disable=True)