Merge branch 'upstream-unstable'

This commit is contained in:
Yves-Alexis Perez 2011-05-16 08:06:33 +02:00
commit c5f7a13c1c
34 changed files with 9558 additions and 7839 deletions

View file

@ -1,5 +1,22 @@
This file is licensed under the terms of the expat license, see the file EXPAT.
v0.3.6:
+ Track selected search engine per window
+ Improve preference dialogue size and alignments
+ Validate URIs in Adblock, homepage and bookmarks
+ Fix loading of Adblock lists from https
+ Support Backspace as Go Back and F5 as Reload
+ Show 'Private Browsing' in Unity Quicklist
+ Ignore Network Cancelled errors
+ Reduce allocations when preparing speed dial
+ Fix icon sie of scalable stock icons
+ Implement geo URI support as per RFC 5870
+ Fix crash after clearing cookies
+ Faster javascript-based JSON import
+ Improve speed dial markup, without scripts
+ Allow Escape to cancel History List
+ Fix crashes in completion
v0.3.5:
+ Remove frame titles from preference dialogue
+ Show search engine icons in completion

View file

@ -7,7 +7,7 @@
<title>midori:faq</title>
<meta name="generator" content="DokuWiki" />
<meta name="robots" content="index,follow" />
<meta name="date" content="2011-04-25T16:56:20+0200" />
<meta name="date" content="2011-05-05T22:28:18+0200" />
<meta name="keywords" content="midori,faq" />
<link rel="search" type="application/opensearchdescription+xml" href="/lib/exe/opensearch.php" title="Xfce Wiki" />
<link rel="start" href="/" />
@ -19,9 +19,9 @@
<link rel="canonical" href="http://wiki.xfce.org/midori/faq" />
<link rel="stylesheet" type="text/css" href="faq.css" />
<script type="text/javascript" ><!--//--><![CDATA[//><!--
var NS='midori';var SIG=' --- //[[christian@twotoasts.de|Christian Dywan]] 2011/05/02 00:39//';var JSINFO = {"id":"midori:faq","namespace":"midori"};
var NS='midori';var SIG=' --- //[[christian@twotoasts.de|Christian Dywan]] 2011/05/16 01:12//';var JSINFO = {"id":"midori:faq","namespace":"midori"};
//--><!]]></script>
<script type="text/javascript" charset="utf-8" src="/lib/exe/js.php?tseed=1304238868" ></script>
<script type="text/javascript" charset="utf-8" src="/lib/exe/js.php?tseed=1305397590" ></script>
</head>
<body>
<div class="dokuwiki export">
@ -47,7 +47,7 @@ var NS='midori';var SIG=' --- //[[christian@twotoasts.de|Christian Dywan]] 2011/
<ul class="toc">
<li class="level3"><div class="li"><span class="li"><a href="#hjkl" class="toc">HJKL</a></span></div></li>
<li class="level3"><div class="li"><span class="li"><a href="#following_links" class="toc">Following Links</a></span></div></li>
<li class="level3"><div class="li"><span class="li"><a href="#toggling_between_pages" class="toc">Toggling between pages</a></span></div></li>
<li class="level3"><div class="li"><span class="li"><a href="#use_ctrl_shift_tab_to_switch_between_pages" class="toc">Use Ctrl(+Shift)+Tab to switch between pages</a></span></div></li>
<li class="level3"><div class="li"><span class="li"><a href="#customizing_keyboard_shortcuts" class="toc">Customizing keyboard shortcuts</a></span></div></li>
</ul>
</li>
@ -140,7 +140,22 @@ Midori and all delivered artwork are licensed under the LGPL2.
<p>
Because they discriminate against your browser. Go to Preferences &gt; Network &gt; Identify As, and choose Safari.
Some websites discriminate against your browser.
</p>
<p>
If you have Midori older than 0.3.5, go to Preferences &gt; Network &gt; Identify As, and choose Custom. Paste this into the entry:
</p>
<p>
Mozilla/5.0 (X11; Linux) AppleWebKit/531.2+ Midori/0.3
</p>
<p>
If this doesn&#039;t do the trick, try choosing Safari or Firefox.
</p>
<p>
Many other websites use similar means of detecting the browser.
</p>
@ -154,7 +169,7 @@ Ideally Google would follow <a href="http://code.google.com/p/doctype/wiki/Artic
<div class="level4">
<p>
The set of themed icons Midori can use is very limited. For instance icons for a new tab or the throbber are not guaranteed to be available. To fix this, install a Freedesktop.org <acronym title="specification">spec</acronym> compliant icon theme, such as Tango or Gnome, or one that is compatible with these.
The set of themed icons Midori can use is very limited. For instance icons for a new tab or the throbber are not guaranteed to be available. To fix this, install a Freedesktop.org <acronym title="specification">spec</acronym> compliant icon theme, such as Elementary, Faenza, Buuf or GNOME.
</p>
</div>
@ -235,30 +250,6 @@ That&#039;s a problem with WebKit. You can work around it to some extent if you
</div>
<h4><a name="javascript_popup_windows" id="javascript_popup_windows">Javascript Popup windows</a></h4>
<div class="level4">
<p>
By default, Midori blocks all popup windows that openen on their own. With WebKitGTK+ 1.1.11 or higher, you can use a hidden setting to enable these windows.
</p>
<ol>
<li class="level1"><div class="li"> Quit Midori</div>
</li>
<li class="level1"><div class="li"> Open the file ~/.config/midori/config</div>
</li>
<li class="level1"><div class="li"> Add a line “javascript-can-open-windows-automatically=true”</div>
</li>
</ol>
<p>
There is also a preference in the git version as of 2010-03-23.
</p>
</div>
<h4><a name="scroll_with_middle_mouse_button" id="scroll_with_middle_mouse_button">Scroll with middle mouse button</a></h4>
<div class="level4">
@ -290,6 +281,8 @@ You need to have GStreamer plugins installed which implement the codecs.
</li>
<li class="level1"><div class="li"> You can <a href="http://ie.microsoft.com/testdrive/Graphics/VideoFormatSupport/Default.html" class="urlextern" title="http://ie.microsoft.com/testdrive/Graphics/VideoFormatSupport/Default.html" rel="nofollow">test your installed codecs here</a>..</div>
</li>
<li class="level1"><div class="li"> Since Midori 0.3.5 you can look at “about:version” to see which video codecs you have installed.</div>
</li>
</ol>
</div>
@ -381,7 +374,7 @@ Since Midori 0.3.2 you can use Ctrl+Shift+R.
<p>
Right-click the tab label, and click &#039;Minimize&#039;.
Right-click the tab label, and click &#039;Minimize&#039; or &#039;Show Tab Icon Only&#039; (Midori 0.3.5 or older).
</p>
</div>
@ -474,12 +467,12 @@ Note that incomplete .desktop files will silently fail and it will look as if it
</p>
</div>
<!-- EDIT4 SECTION "Common problems" [1213-9012] -->
<!-- EDIT4 SECTION "Common problems" [1213-8946] -->
<h1 class="sectionedit5"><a name="features" id="features">Features</a></h1>
<div class="level1">
</div>
<!-- EDIT5 SECTION "Features" [9013-9035] -->
<!-- EDIT5 SECTION "Features" [8947-8969] -->
<h2 class="sectionedit6"><a name="web_applications" id="web_applications">Web Applications</a></h2>
<div class="level2">
@ -502,7 +495,7 @@ There are two closely related features to open websites as dedicated windows of
</p>
</div>
<!-- EDIT6 SECTION "Web Applications" [9036-9552] -->
<!-- EDIT6 SECTION "Web Applications" [8970-9486] -->
<h2 class="sectionedit7"><a name="private_browsing" id="private_browsing">Private Browsing</a></h2>
<div class="level2">
<ol>
@ -529,7 +522,7 @@ The same options available to -a/ app can be used for private browsing mode.
</p>
</div>
<!-- EDIT7 SECTION "Private Browsing" [9553-10476] -->
<!-- EDIT7 SECTION "Private Browsing" [9487-10410] -->
<h2 class="sectionedit8"><a name="proxy_servers" id="proxy_servers">Proxy servers</a></h2>
<div class="level2">
@ -538,18 +531,6 @@ The same options available to -a/ app can be used for private browsing mode.
By running a local proxy you can modify web content even before it has reached Midori. That allows you to do things similar to what user scripts and user styles provide and even others that neither is suitable for.
</p>
<p>
To use Midori with a proxy server, there are two options:
</p>
<ol>
<li class="level1"><div class="li"> WebKit is built with libcurl. Define an environment variable http_proxy and set it to your proxy server like so:<pre class="code"> export http_proxy = 234.22.154.11:8000</pre>
</div>
</li>
<li class="level1"><div class="li"> WebKit is built with libsoup. Midori &gt;= 0.1.2, is built with libsoup. Try to open some web page. Now open the preferences, and you should see a Network tab with a &#039;Proxy server&#039; field.</div>
</li>
</ol>
</div>
<h4><a name="privoxy" id="privoxy">Privoxy</a></h4>
@ -595,12 +576,12 @@ Mousehole is a scriptable proxy server written in Ruby.
</p>
</div>
<!-- EDIT8 SECTION "Proxy servers" [10477-11727] -->
<!-- EDIT8 SECTION "Proxy servers" [10411-11241] -->
<h2 class="sectionedit9"><a name="using_the_keyboard" id="using_the_keyboard">Using the Keyboard</a></h2>
<div class="level2">
</div>
<!-- EDIT9 SECTION "Using the Keyboard" [11728-11759] -->
<!-- EDIT9 SECTION "Using the Keyboard" [11242-11273] -->
<h3 class="sectionedit10"><a name="hjkl" id="hjkl">HJKL</a></h3>
<div class="level3">
@ -619,7 +600,7 @@ You can also use the arrow keys to do the same.
</p>
</div>
<!-- EDIT10 SECTION "HJKL" [11760-11967] -->
<!-- EDIT10 SECTION "HJKL" [11274-11481] -->
<h3 class="sectionedit11"><a name="following_links" id="following_links">Following Links</a></h3>
<div class="level3">
@ -633,17 +614,21 @@ With hints enabled, type the link number, and press Enter to open the link in th
</p>
</div>
<!-- EDIT11 SECTION "Following Links" [11968-12299] -->
<h3 class="sectionedit12"><a name="toggling_between_pages" id="toggling_between_pages">Toggling between pages</a></h3>
<!-- EDIT11 SECTION "Following Links" [11482-11813] -->
<h3 class="sectionedit12"><a name="use_ctrl_shift_tab_to_switch_between_pages" id="use_ctrl_shift_tab_to_switch_between_pages">Use Ctrl(+Shift)+Tab to switch between pages</a></h3>
<div class="level3">
<p>
Enable the History List extension Tools → Extensions. Now you can conveniently toggle between any two pages with Ctrl-Tab.
Since Midori 0.3.5 Ctrl+Tab is supported by default.
</p>
<p>
In older versions you can enable the History List extension under Tools → Extensions.
</p>
</div>
<!-- EDIT12 SECTION "Toggling between pages" [12300-12459] -->
<!-- EDIT12 SECTION "Use Ctrl(+Shift)+Tab to switch between pages" [11814-12012] -->
<h3 class="sectionedit13"><a name="customizing_keyboard_shortcuts" id="customizing_keyboard_shortcuts">Customizing keyboard shortcuts</a></h3>
<div class="level3">
@ -654,17 +639,13 @@ Enable the Shortcuts extension Tools → Extensions. To edit a keybinding Tools
</p>
</div>
<!-- EDIT13 SECTION "Customizing keyboard shortcuts" [12460-12608] -->
<!-- EDIT13 SECTION "Customizing keyboard shortcuts" [12013-12161] -->
<h2 class="sectionedit14"><a name="mouse_gestures" id="mouse_gestures">Mouse Gestures</a></h2>
<div class="level2">
<p>
Midori has a Mouse Gestures extension (since git 2009-01-21).
</p>
<p>
As of 0.2.5 the right button initiates gestures.
By default the right mouse button initiates gestures.
</p>
<p>
@ -691,14 +672,14 @@ Additionally, there are programs allowing mouse gestures system-wide, for exampl
</p>
</div>
<!-- EDIT14 SECTION "Mouse Gestures" [12609-13340] -->
<!-- EDIT14 SECTION "Mouse Gestures" [12162-12835] -->
<h2 class="sectionedit15"><a name="spell_check" id="spell_check">Spell check</a></h2>
<div class="level2">
<p>
First enable spell checking:
Edit→Preferences→Behavior and Check off “Enable Spell Checking”.
Edit→Preferences→Behavior and check “Enable Spell Checking”.
</p>
<p>
@ -706,7 +687,7 @@ Now while typing any errors should get underlined in red. To get suggestions, hi
</p>
</div>
<!-- EDIT15 SECTION "Spell check" [13341-13634] -->
<!-- EDIT15 SECTION "Spell check" [12836-13125] -->
<h2 class="sectionedit16"><a name="user_scripts" id="user_scripts">User scripts</a></h2>
<div class="level2">
@ -777,7 +758,7 @@ You can also use <a href="http://rightfootin.blogspot.com/2009/04/flashblock-wan
</p>
</div>
<!-- EDIT16 SECTION "User scripts" [13635-16195] -->
<!-- EDIT16 SECTION "User scripts" [13126-15686] -->
<h2 class="sectionedit17"><a name="user_styles" id="user_styles">User styles</a></h2>
<div class="level2">
@ -848,6 +829,6 @@ Customize as needed:
}</pre>
</div>
<!-- EDIT17 SECTION "User styles" [16196-] --></div>
<!-- EDIT17 SECTION "User styles" [15687-] --></div>
</body>
</html>

View file

@ -5,10 +5,17 @@ _Name=Midori
_GenericName=Web Browser
_Comment=Lightweight web browser
Categories=GTK;Network;WebBrowser;
MimeType=text/html;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
MimeType=text/html;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/geo;
Exec=midori %u
Icon=midori
Terminal=false
StartupNotify=true
X-Osso-Type=application/x-executable
X-Osso-Service=midori
X-Ayatana-Desktop-Shortcuts=Private
[Private Shortcut Group]
Name=P_rivate Browsing
Exec=midori --private
TargetEnvironment=Unity

View file

@ -37,8 +37,6 @@
float: left;
border: 1px solid #ccc;
position: relative;
width: 200px;
height: 150px;
margin: 20px 20px 0px 0px;
background-color: #fff;
-webkit-border-radius: 10px;
@ -57,7 +55,6 @@
font-size: 50px;
font-weight: bold;
margin: 0px;
height: 30px;
padding: 10px 0px 0px 0px;
display: block;
}
@ -82,8 +79,6 @@
div.shortcut a {
border: 1px solid #ccc;
display: block;
width: 160px;
height: 107px;
margin: 15px auto 0px;
background-color: #fafafa;
color: #aaa;
@ -121,7 +116,6 @@
height: 16px;
width: 16px;
margin-bottom: -17px;
margin-left: 180px;
margin-top: 2px;
background: url({stock}/1/gtk-close) 98% 70% no-repeat;
cursor: pointer;
@ -264,38 +258,6 @@
var setThumbSize = function (size)
{
var i;
var rules = document.styleSheets[0].cssRules;
var width = columns;
var height = Math.round (size / 1.5);
$('wrap').style.width = (width * (size + 60)) + 'px';
for (i = 0; i < rules.length; i++)
{
switch (rules[i].selectorText)
{
case 'div.shortcut a':
rules[i].style.width = size + 'px';
rules[i].style.height = height + 'px';
break;
case 'div.shortcut':
rules[i].style.width = (size + 40) + 'px';
rules[i].style.height = (height + 43) + 'px';
break;
case '.cross':
rules[i].style.marginLeft = (size + 20) + 'px';
break;
case 'h1':
rules[i].style.fontSize = (size / 4 + 10) + 'px';
rules[i].style.height = (size / 4 - 10) + 'px';
break;
case 'h4 span::before':
rules[i].style.visibility = (size < 160) ? 'hidden' : 'visible';
break;
}
}
console.log ("speed_dial-save-thumbsize " + size);
}

View file

@ -29,9 +29,9 @@
(__filter && (g_str_has_prefix (__filter, "http") \
|| g_str_has_prefix (__filter, "file")))
#define ADBLOCK_FILTER_SET(__filter,__active) \
filter[4] = __active ? (__filter[5] == ':' ? 's' : ':') : '-'
__filter[4] = __active ? (__filter[5] == ':' ? 's' : ':') : '-'
#define ADBLOCK_FILTER_IS_SET(__filter) \
filter[4] != '-'
(__filter[4] != '-' && __filter[5] != '-')
#ifdef G_ENABLE_DEBUG
#define adblock_debug(dmsg, darg1, darg2) \
do { if (debug == 1) g_debug (dmsg, darg1, darg2); } while (0)
@ -119,7 +119,7 @@ adblock_get_filename_for_uri (const gchar* uri)
gchar* folder;
gchar* path;
if (strchr (uri + 4,'-'))
if (!ADBLOCK_FILTER_IS_SET (uri))
return NULL;
if (!strncmp (uri, "file", 4))
@ -460,7 +460,7 @@ adblock_get_preferences_dialog (MidoriExtension* extension)
g_free (description);
gtk_label_set_line_wrap (GTK_LABEL (button), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 4);
entry = gtk_entry_new ();
entry = katze_uri_entry_new (NULL);
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 4);
liststore = gtk_list_store_new (1, G_TYPE_STRING);
treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (liststore));

View file

@ -869,9 +869,11 @@ addons_get_files (AddonsKind kind)
g_assert (kind == ADDONS_USER_SCRIPTS || kind == ADDONS_USER_STYLES);
if (kind == ADDONS_USER_SCRIPTS)
file_extension = g_strdup (".js");
file_extension = ".js";
else if (kind == ADDONS_USER_STYLES)
file_extension = g_strdup (".css");
file_extension = ".css";
else
g_assert_not_reached ();
files = NULL;
@ -895,7 +897,6 @@ addons_get_files (AddonsKind kind)
directories = g_slist_next (directories);
}
g_free (file_extension);
g_slist_free (directories);
return files;
@ -1014,6 +1015,8 @@ css_metadata_from_file (const gchar* filename,
rest_of_line = g_strdup (line);
rest_of_line = g_strstrip (rest_of_line);
line_has_meta = g_str_has_suffix (rest_of_line, "{") ? FALSE : TRUE;
parts = g_strsplit (rest_of_line, " ", 0);
i = 0;
while (parts[i] && (*parts[i] != '\0' && *parts[i] != '{'))
@ -1050,8 +1053,10 @@ css_metadata_from_file (const gchar* filename,
i++;
}
g_strfreev (parts);
g_free (rest_of_line);
}
line_has_meta = g_str_has_suffix (rest_of_line, "{") ? FALSE : TRUE;
else
line_has_meta = FALSE;
}
g_free (line);
}

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2010 André Stösel <andre@stoesel.de>
Copyright (C) 2010-2011 André Stösel <andre@stoesel.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -164,6 +164,7 @@ private class NewTabWindow : TabWindow {
}
private class HistoryList : Midori.Extension {
protected uint escKeyval;
protected uint modifier_count;
protected HistoryWindow? history_window;
protected ulong[] tmp_sig_ids = new ulong[2];
@ -176,13 +177,17 @@ private class HistoryList : Midori.Extension {
public bool key_release (Gdk.EventKey event_key, Browser browser) {
if (event_key.is_modifier > 0) {
this.modifier_count--;
}
if (this.modifier_count == 0 || event_key.keyval == this.escKeyval) {
browser.disconnect (this.tmp_sig_ids[0]);
browser.disconnect (this.tmp_sig_ids[1]);
if (this.modifier_count == 0) {
browser.disconnect (this.tmp_sig_ids[0]);
browser.disconnect (this.tmp_sig_ids[1]);
this.history_window.make_update ();
this.history_window.destroy ();
this.history_window = null;
} else {
this.modifier_count = 0;
}
this.history_window.destroy ();
this.history_window = null;
}
return false;
}
@ -358,6 +363,9 @@ private class HistoryList : Midori.Extension {
activate.connect (activated);
deactivate.connect (deactivated);
}
construct {
this.escKeyval = Gdk.keyval_from_name ("Escape");
}
}
public Midori.Extension extension_init () {

View file

@ -276,10 +276,11 @@ katze_http_cookies_attach (SoupSessionFeature* feature,
SoupSession* session)
{
KatzeHttpCookies* http_cookies = (KatzeHttpCookies*)feature;
const gchar* filename = g_object_get_data (G_OBJECT (feature), "filename");
SoupSessionFeature* jar = soup_session_get_feature (session, SOUP_TYPE_COOKIE_JAR);
g_return_if_fail (jar != NULL);
http_cookies->filename = g_object_get_data (G_OBJECT (feature), "filename");
g_return_if_fail (http_cookies->filename != NULL);
g_return_if_fail (filename != NULL);
katze_assign (http_cookies->filename, g_strdup (filename));
http_cookies->jar = g_object_ref (jar);
cookie_jar_load (http_cookies->jar, http_cookies->filename);
g_signal_connect (jar, "changed",

View file

@ -477,6 +477,9 @@ g_icon_to_string (GIcon *icon)
* Since 0.2.9 the following hints are also supported:
* "languages": the widget will be particularly suitable for choosing
* multiple language codes, ie. "de,en_GB".
* Since 0.3.6 the following hints are also supported:
* "address": the widget will be particularly suitable for typing
* a valid URI or IP address and highlight errors.
*
* Any other values for @hint are silently ignored.
*
@ -741,7 +744,10 @@ katze_property_proxy (gpointer object,
{
gchar* notify_property;
widget = gtk_entry_new ();
if (_hint == I_("address"))
widget = katze_uri_entry_new (NULL);
else
widget = gtk_entry_new ();
g_object_get (object, property, &string, NULL);
if (!string)
string = g_strdup (G_PARAM_SPEC_STRING (pspec)->default_value);
@ -1559,3 +1565,55 @@ katze_load_cached_icon (const gchar* uri,
GTK_STOCK_FILE, GTK_ICON_SIZE_MENU, NULL);
}
static void
katze_uri_entry_changed_cb (GtkWidget* entry,
GtkWidget* other_widget)
{
const gchar* uri = gtk_entry_get_text (GTK_ENTRY (entry));
gboolean valid = g_str_has_prefix (uri, "http://")
|| g_str_has_prefix (uri, "https://")
|| g_str_has_prefix (uri, "file://")
|| g_str_has_prefix (uri, "data:")
|| g_str_has_prefix (uri, "about:")
|| g_str_has_prefix (uri, "javascript:");
if (*uri && !valid)
{
GdkColor bg_color = { 0 };
GdkColor fg_color = { 0 };
gdk_color_parse ("#ef7070", &bg_color);
gdk_color_parse ("#000", &fg_color);
gtk_widget_modify_base (entry, GTK_STATE_NORMAL, &bg_color);
gtk_widget_modify_text (entry, GTK_STATE_NORMAL, &fg_color);
}
else
{
gtk_widget_modify_base (entry, GTK_STATE_NORMAL, NULL);
gtk_widget_modify_text (entry, GTK_STATE_NORMAL, NULL);
}
if (other_widget != NULL)
gtk_widget_set_sensitive (other_widget, *uri && valid);
}
/**
* katze_uri_entry_new:
* @other_widget: a #GtkWidget, or %NULL
*
* Creates an entry that validates the typed URI.
*
* If @other_widget is given, it will become insensitive if
* the input is not a valid URI.
*
* Returns: a #GtkEntry
*
* Since: 0.3.6
*/
GtkWidget*
katze_uri_entry_new (GtkWidget* other_widget)
{
GtkWidget* entry = gtk_entry_new ();
g_signal_connect (entry, "changed",
G_CALLBACK (katze_uri_entry_changed_cb), other_widget);
return entry;
}

View file

@ -139,6 +139,9 @@ GdkPixbuf*
katze_load_cached_icon (const gchar* uri,
GtkWidget* widget);
GtkWidget*
katze_uri_entry_new (GtkWidget* other_widget);
G_END_DECLS
#endif /* __KATZE_UTILS_H__ */

View file

@ -797,6 +797,7 @@ midori_browser_privacy_preferences_cb (MidoriBrowser* browser,
button = katze_property_proxy (settings, "strip-referer", NULL);
katze_preferences_add_widget (preferences, button, "indented");
#endif
katze_preferences_add_group (preferences, NULL);
button = katze_property_label (settings, "maximum-history-age");
katze_preferences_add_widget (preferences, button, "indented");
button = katze_property_proxy (settings, "maximum-history-age", NULL);
@ -1631,14 +1632,13 @@ speeddial_new_from_file (const gchar* config,
GKeyFile* key_file = g_key_file_new ();
gchar* config_file = g_build_filename (config, "speeddial", NULL);
guint i = 0;
guint columns = 3;
guint slot_count = 0;
guint rows;
gchar* slot = NULL;
gchar* dial_id = NULL;
gchar* uri = NULL;
gchar* json_content;
gchar** parts;
gsize json_length;
GString* script;
JSGlobalContextRef js_context;
gchar* keyfile;
gchar* thumb_dir;
gchar** tiles;
if (g_key_file_load_from_file (key_file, config_file, G_KEY_FILE_NONE, error))
{
@ -1647,114 +1647,62 @@ speeddial_new_from_file (const gchar* config,
}
katze_assign (config_file, g_build_filename (config, "speeddial.json", NULL));
g_file_get_contents (config_file, &json_content, NULL, NULL);
parts = g_strsplit (json_content ? json_content : "", ",", -1);
while (parts && parts[i] != NULL)
g_file_get_contents (config_file, &json_content, &json_length, NULL);
script = g_string_sized_new (json_length);
g_string_append (script, "var json = JSON.parse (");
g_string_append_len (script, json_content, json_length);
g_string_append (script, "); "
"var keyfile = '';"
"for (i in json['shortcuts']) {"
"var tile = json['shortcuts'][i];"
"keyfile += '[Dial ' + tile['id'].substring (1) + ']\\n'"
" + 'uri=' + tile['href'] + '\\n'"
" + 'img=' + tile['img'] + '\\n'"
" + 'title=' + tile['title'] + '\\n\\n';"
"} "
"var columns = json['width'] ? json['width'] : 3;"
"var rows = json['shortcuts'].length / columns;"
"keyfile += '[settings]\\n'"
" + 'columns=' + columns + '\\n'"
" + 'rows=' + (rows > 3 ? rows : 3) + '\\n\\n';"
"keyfile;");
g_free (json_content);
js_context = JSGlobalContextCreateInGroup (NULL, NULL);
keyfile = sokoke_js_script_eval (js_context, script->str, NULL);
JSGlobalContextRelease (js_context);
g_string_free (script, TRUE);
g_key_file_load_from_data (key_file, keyfile, -1, 0, NULL);
g_free (keyfile);
tiles = g_key_file_get_groups (key_file, NULL);
thumb_dir = g_build_path (G_DIR_SEPARATOR_S, g_get_user_cache_dir (),
PACKAGE_NAME, "thumbnails", NULL);
if (!g_file_test (thumb_dir, G_FILE_TEST_EXISTS))
katze_mkdir_with_parents (thumb_dir, 0700);
g_free (thumb_dir);
while (tiles[i] != NULL)
{
gchar* key;
gchar* val;
gchar** values = g_strsplit (parts[i], "\"", -1);
if (*values[1])
gsize sz;
gchar* uri = g_key_file_get_string (key_file, tiles[i], "uri", NULL);
gchar* img = g_key_file_get_string (key_file, tiles[i], "img", NULL);
if (img != NULL && (uri && *uri && *uri != '#'))
{
if (!g_strcmp0 (values[1], "shortcuts"))
{
key = g_strdup (values[3]);
val = g_strdup (values[5]);
}
else if (!g_strcmp0 (values[1], "thumb"))
{
key = g_strdup (values[1]);
val = g_strdup (values[2]);
}
else
{
key = g_strdup (values[1]);
val = g_strdup (values[3]);
}
if (g_str_equal (key, "id"))
{
katze_assign (slot, g_strdup (val));
dial_id = g_strdup_printf ("Dial %s", slot + 1);
slot_count++;
}
else if (g_str_equal (key, "href"))
{
katze_assign (uri, g_strdup (val));
g_key_file_set_value (key_file, dial_id, "uri", uri);
}
else if (g_str_equal (key, "img") && (*val && strncmp (val, "#", 1)))
{
gsize sz;
gint state = 0;
guint save = 0;
gchar* thumb_dir;
gchar* thumb_path;
gsize base64_size = strlen (val);
guchar* decoded = g_malloc0 ((base64_size * 3) / 4);
sz = g_base64_decode_step (g_strdup (val), base64_size,
decoded, &state, &save);
thumb_dir = g_build_path (G_DIR_SEPARATOR_S, g_get_user_cache_dir (),
PACKAGE_NAME, "thumbnails", NULL);
if (!g_file_test (thumb_dir, G_FILE_TEST_EXISTS))
katze_mkdir_with_parents (thumb_dir, 0700);
thumb_path = sokoke_build_thumbnail_path (uri);
g_file_set_contents (thumb_path, (gchar*)decoded, sz, NULL);
g_free (decoded);
g_free (thumb_dir);
g_free (thumb_path);
}
else if (g_str_equal (key, "thumb"))
{
guint thumb_size;
gchar* thumb_size_type;
gchar* size_tmp = g_strndup (val + 1, strlen (val) - 3);
thumb_size = atoi (size_tmp);
g_free (size_tmp);
if (thumb_size == 80)
thumb_size_type = g_strdup ("SMALL");
else if (thumb_size == 240)
thumb_size_type = g_strdup ("BIG");
else /* if (thumb_size == 160) */
thumb_size_type = g_strdup ("MEDIUM");
g_key_file_set_value (key_file, "settings", "size", thumb_size_type);
g_free (thumb_size_type);
}
else if (g_str_equal (key, "title") && *val)
{
g_key_file_set_value (key_file, dial_id, key, val);
}
else if (g_str_equal (key, "width"))
{
columns = atoi (val);
}
i++;
g_free (key);
g_free (val);
g_strfreev (values);
guchar* decoded = g_base64_decode (img, &sz);
gchar* thumb_path = sokoke_build_thumbnail_path (uri);
g_file_set_contents (thumb_path, (gchar*)decoded, sz, NULL);
g_free (thumb_path);
g_free (decoded);
}
g_free (img);
g_free (uri);
g_key_file_remove_key (key_file, tiles[i], "img", NULL);
i++;
}
/* Default to 3 x 3 grid. Calculate rows here, columns is initialized as 3 */
rows = slot_count / columns > 3 ? slot_count / columns : 3;
g_key_file_set_integer (key_file, "settings", "columns", columns);
g_key_file_set_integer (key_file, "settings", "rows", rows);
g_strfreev (tiles);
katze_assign (config_file, g_build_filename (config, "speeddial", NULL));
sokoke_key_file_save_to_file (key_file, config_file, NULL);
g_strfreev (parts);
g_free (dial_id);
g_free (slot);
g_free (config_file);
g_free (json_content);
return key_file;
}

View file

@ -101,6 +101,7 @@ struct _MidoriBrowser
gboolean show_statusbar;
guint maximum_history_age;
gchar* location_entry_search;
guint last_web_search;
gchar* news_aggregator;
};
@ -670,19 +671,6 @@ midori_view_notify_statusbar_text_cb (GtkWidget* view,
}
}
static void
midori_browser_edit_bookmark_uri_changed_cb (GtkEntry* entry,
GtkDialog* dialog)
{
const gchar* uri = gtk_entry_get_text (entry);
gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_ACCEPT,
uri && (g_str_has_prefix (uri, "http://")
|| g_str_has_prefix (uri, "https://")
|| g_str_has_prefix (uri, "file://")
|| g_str_has_prefix (uri, "data:")
|| g_str_has_prefix (uri, "javascript:")));
}
static void
midori_browser_edit_bookmark_title_changed_cb (GtkEntry* entry,
GtkDialog* dialog)
@ -803,7 +791,12 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
label = gtk_label_new_with_mnemonic (_("_Address:"));
gtk_size_group_add_widget (sizegroup, label);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
entry_uri = gtk_entry_new ();
entry_uri = katze_uri_entry_new (
#if GTK_CHECK_VERSION (2, 20, 0)
gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT));
#else
NULL);
#endif
#if HAVE_HILDON
HildonGtkInputMode mode = hildon_gtk_entry_get_input_mode (GTK_ENTRY (entry_uri));
mode &= ~HILDON_GTK_INPUT_MODE_AUTOCAP;
@ -811,10 +804,6 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
#endif
gtk_entry_set_activates_default (GTK_ENTRY (entry_uri), TRUE);
gtk_entry_set_text (GTK_ENTRY (entry_uri), katze_item_get_uri (bookmark));
midori_browser_edit_bookmark_uri_changed_cb (GTK_ENTRY (entry_uri),
GTK_DIALOG (dialog));
g_signal_connect (entry_uri, "changed",
G_CALLBACK (midori_browser_edit_bookmark_uri_changed_cb), dialog);
gtk_box_pack_start (GTK_BOX (hbox), entry_uri, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (content_area), hbox);
gtk_widget_show_all (hbox);
@ -1689,6 +1678,12 @@ midori_browser_key_press_event (GtkWidget* widget,
gtk_action_activate (_action_by_name (browser, "TabPrevious"));
return TRUE;
}
/* Interpret F5 as reloading for compatibility */
else if (event->keyval == GDK_F5)
{
gtk_action_activate (_action_by_name (browser, "Reload"));
return TRUE;
}
if (gtk_window_get_focus (GTK_WINDOW (widget)) == NULL)
gtk_widget_grab_focus (midori_browser_get_current_tab (MIDORI_BROWSER (widget)));
@ -1708,6 +1703,13 @@ midori_browser_key_press_event (GtkWidget* widget,
if (event->state && gtk_window_propagate_key_event (window, event))
return TRUE;
/* Interpret Backspace as going back for compatibility */
if (event->keyval == GDK_BackSpace)
{
gtk_action_activate (_action_by_name (browser, "Back"));
return TRUE;
}
widget_class = g_type_class_peek_static (g_type_parent (GTK_TYPE_WINDOW));
return widget_class->key_press_event (widget, event);
}
@ -3802,13 +3804,11 @@ _action_search_submit (GtkAction* action,
gboolean new_tab,
MidoriBrowser* browser)
{
guint last_web_search;
KatzeItem* item;
const gchar* url;
gchar* search;
g_object_get (browser->settings, "last-web-search", &last_web_search, NULL);
item = katze_array_get_nth_item (browser->search_engines, last_web_search);
item = katze_array_get_nth_item (browser->search_engines, browser->last_web_search);
if (item)
url = katze_item_get_uri (item);
else /* The location entry search is our fallback */
@ -3867,6 +3867,7 @@ _action_search_notify_current_item (GtkAction* action,
idx = 0;
g_object_set (browser->settings, "last-web-search", idx, NULL);
browser->last_web_search = idx;
}
static void
@ -6357,7 +6358,6 @@ _midori_browser_update_settings (MidoriBrowser* browser)
gboolean show_panel;
MidoriToolbarStyle toolbar_style;
gchar* toolbar_items;
gint last_web_search;
gboolean close_buttons_on_tabs;
KatzeItem* item;
@ -6382,7 +6382,6 @@ _midori_browser_update_settings (MidoriBrowser* browser)
"show-statusbar", &browser->show_statusbar,
"toolbar-style", &toolbar_style,
"toolbar-items", &toolbar_items,
"last-web-search", &last_web_search,
"location-entry-search", &browser->location_entry_search,
"close-buttons-on-tabs", &close_buttons_on_tabs,
"maximum-history-age", &browser->maximum_history_age,
@ -6430,7 +6429,7 @@ _midori_browser_update_settings (MidoriBrowser* browser)
if (browser->search_engines)
{
item = katze_array_get_nth_item (browser->search_engines,
last_web_search);
browser->last_web_search);
if (item)
midori_search_action_set_current_item (MIDORI_SEARCH_ACTION (
_action_by_name (browser, "Search")), item);
@ -6718,7 +6717,6 @@ midori_browser_set_property (GObject* object,
GParamSpec* pspec)
{
MidoriBrowser* browser = MIDORI_BROWSER (object);
guint last_web_search;
KatzeItem* item;
switch (prop_id)
@ -6777,8 +6775,8 @@ midori_browser_set_property (GObject* object,
if (browser->search_engines)
{
g_object_get (browser->settings, "last-web-search", &last_web_search, NULL);
item = katze_array_get_nth_item (browser->search_engines, last_web_search);
g_object_get (browser->settings, "last-web-search", &browser->last_web_search, NULL);
item = katze_array_get_nth_item (browser->search_engines, browser->last_web_search);
midori_search_action_set_current_item (MIDORI_SEARCH_ACTION (
_action_by_name (browser, "Search")), item);

View file

@ -926,7 +926,7 @@ midori_location_action_key_press_event_cb (GtkEntry* entry,
selected = MIN (selected + 14, matches -1);
else if (event->keyval == GDK_Page_Up)
selected = MAX (selected - 14, 0);
else
else if (event->keyval != GDK_KP_Delete && event->keyval != GDK_Delete)
g_assert_not_reached ();
path = gtk_tree_path_new_from_indices (selected, -1);

View file

@ -159,17 +159,9 @@ midori_preferences_new (GtkWindow* parent,
return GTK_WIDGET (preferences);
}
#if GTK_CHECK_VERSION (2, 16, 0)
static void
midori_preferences_homepage_icon_press_cb (GtkWidget* button,
GtkEntryIconPosition position,
GdkEvent* event,
MidoriWebSettings* settings)
#else
static void
midori_preferences_homepage_current_clicked_cb (GtkWidget* button,
MidoriWebSettings* settings)
#endif
{
GtkWidget* preferences = gtk_widget_get_toplevel (button);
GtkWidget* browser = katze_object_get_object (preferences, "transient-for");
@ -307,26 +299,20 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
SPANNED_ADD (button);
label = katze_property_label (settings, "homepage");
INDENTED_ADD (label);
entry = katze_property_proxy (settings, "homepage", NULL);
entry = katze_property_proxy (settings, "homepage", "address");
SPANNED_ADD (entry);
if (parent && katze_object_has_property (parent, "uri"))
{
#if GTK_CHECK_VERSION (2, 16, 0)
gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_JUMP_TO);
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry),
GTK_ENTRY_ICON_SECONDARY, _("Use current page as homepage"));
g_signal_connect (entry, "icon-press",
G_CALLBACK (midori_preferences_homepage_icon_press_cb), settings);
#if 0
button = gtk_button_new_with_mnemonic (_("Use _current page"));
#else
button = gtk_button_new ();
label = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (button), label);
gtk_widget_set_tooltip_text (button, _("Use current page as homepage"));
label = gtk_label_new (NULL);
INDENTED_ADD (label);
button = gtk_button_new_with_label (_("Use current page as homepage"));
#endif
g_signal_connect (button, "clicked",
G_CALLBACK (midori_preferences_homepage_current_clicked_cb), settings);
SPANNED_ADD (button);
#endif
}
/* Page "Appearance" */
@ -334,6 +320,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
FRAME_NEW (NULL);
#if !HAVE_HILDON
label = gtk_label_new (_("Default Font Family"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
INDENTED_ADD (label);
button = katze_property_proxy (settings, "default-font-family", "font");
gtk_widget_set_tooltip_text (button, _("The default font family used to display text"));
@ -342,6 +329,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
gtk_widget_set_tooltip_text (entry, _("The default font size used to display text"));
SPANNED_ADD (entry);
label = gtk_label_new (_("Fixed-width Font Family"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
INDENTED_ADD (label);
button = katze_property_proxy (settings, "monospace-font-family", "font-monospace");
gtk_widget_set_tooltip_text (button, _("The font family used to display fixed-width text"));
@ -350,6 +338,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
gtk_widget_set_tooltip_text (entry, _("The font size used to display fixed-width text"));
SPANNED_ADD (entry);
label = gtk_label_new (_("Minimum Font Size"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
INDENTED_ADD (label);
entry = katze_property_proxy (settings, "minimum-font-size", NULL);
gtk_widget_set_tooltip_text (entry, _("The minimum font size used to display text"));
@ -397,6 +386,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
#endif
if (button != NULL)
INDENTED_ADD (button);
FRAME_NEW (NULL);
button = katze_property_label (settings, "preferred-languages");
INDENTED_ADD (button);
entry = katze_property_proxy (settings, "preferred-languages", "languages");
@ -434,10 +424,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
INDENTED_ADD (button);
button = katze_property_proxy (settings, "open-tabs-in-the-background", NULL);
SPANNED_ADD (button);
/* Page "Applications" */
#if !HAVE_HILDON
PAGE_NEW (GTK_STOCK_CONVERT, _("Applications"));
FRAME_NEW (NULL);
label = katze_property_label (settings, "text-editor");
INDENTED_ADD (label);
@ -458,6 +445,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
button = katze_property_proxy (settings, "proxy-type", NULL);
SPANNED_ADD (button);
label = gtk_label_new (_("Hostname"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
INDENTED_ADD (label);
entry = katze_property_proxy (settings, "http-proxy", NULL);
SPANNED_ADD (entry);
@ -471,6 +459,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
button = katze_property_proxy (settings, "maximum-cache-size", NULL);
SPANNED_ADD (button);
label = gtk_label_new (_("MB"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
SPANNED_ADD (label);
#endif
label = katze_property_label (settings, "identify-as");

View file

@ -412,6 +412,8 @@ midori_search_action_get_icon (KatzeItem* item,
if ((icon = katze_item_get_uri (item)) && (g_strstr_len (icon, 8, "://")))
return katze_load_cached_icon (icon, widget);
if (icon_name == NULL)
return NULL;
screen = gtk_widget_get_screen (widget);
icon_theme = gtk_icon_theme_get_for_screen (screen);

View file

@ -983,7 +983,14 @@ midori_view_web_view_navigation_decision_cb (WebKitWebView* web_view
JSContextRef js_context;
gchar* result;
const gchar* uri = webkit_network_request_get_uri (request);
if (g_str_has_prefix (uri, "mailto:") || sokoke_external_uri (uri))
if (g_str_has_prefix (uri, "geo:"))
{
gchar* new_uri = sokoke_magic_uri (uri);
midori_view_set_uri (view, new_uri);
g_free (new_uri);
return TRUE;
}
else if (g_str_has_prefix (uri, "mailto:") || sokoke_external_uri (uri))
{
if (sokoke_show_uri (gtk_widget_get_screen (GTK_WIDGET (web_view)),
uri, GDK_CURRENT_TIME, NULL))
@ -1172,7 +1179,7 @@ midori_view_web_view_resource_request_cb (WebKitWebView* web_view,
}
/* If available, load SVG icon as SVG markup */
icon_size = gtk_icon_size_lookup_for_settings (
gtk_icon_size_lookup_for_settings (
gtk_widget_get_settings (GTK_WIDGET (view)),
icon_size, &real_icon_size, &real_icon_size);
icon_info = gtk_icon_theme_lookup_icon (icon_theme, icon_name,
@ -1507,6 +1514,9 @@ webkit_web_view_load_error_cb (WebKitWebView* web_view,
case WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD:
/* A plugin will take over. That's expected, it's not fatal. */
return FALSE;
case WEBKIT_NETWORK_ERROR_CANCELLED:
/* Mostly initiated by JS redirects. */
return FALSE;
}
title = g_strdup_printf (_("Error - %s"), uri);
@ -3953,27 +3963,52 @@ prepare_speed_dial_html (MidoriView* view)
g_free (thumb_size_type);
g_string_append_printf (markup,
"<script>var columns = %d; var rows = %d;"
"setThumbSize(%d);</script>\n",
cols, rows, thumb_size);
"<script>var columns = %d; var rows = %d;"
"setThumbSize(%d);</script>\n",
cols, rows, thumb_size);
g_string_append_printf (markup,
"<style type=\"text/css\">"
"#content div.shortcut { width: %dpx; height: %dpx; }\n"
"#content div.shortcut a { width: %dpx; height: %dpx; }\n"
"#content div.shortcut .cross { margin-left: %dpx; }\n"
"#content div.shortcut h1 { font-size: %dpx; height: %dpx; }\n"
"#wrap { width: %dpx; }\n"
"#content h4 span:before { visibility: %s; }\n</style>",
thumb_size + 40, (int)((thumb_size / 1.5) + 43),
thumb_size, (int)(thumb_size / 1.5),
thumb_size + 20,
(int)((thumb_size / 4) + 10), (int)((thumb_size / 4) - 10),
cols * (thumb_size + 60),
thumb_size < 160 ? "hidden" : "visible");
if (!katze_object_get_boolean (view->settings, "enable-scripts"))
{
g_string_append (markup,
"<style type=\"text/css\">"
"#content h4 span:before { visibility: hidden; }\n"
"div.config { visibility: hidden; }\n"
".cross { visibility:hidden; }\n"
".activated p { background-image: none; }</style>");
}
while (slot <= rows * cols)
{
gchar* position;
gchar* dial_entry = g_strdup_printf ("Dial %d", slot);
gchar* uri = g_key_file_get_string (key_file, dial_entry, "uri", NULL);
const gchar* position;
if (slot < cols)
position = g_strdup (" top");
position = " top";
else if (slot == cols)
position = g_strdup (" top right");
position = " top right";
else if (slot > cols && slot % cols == 0)
position = g_strdup (" right");
position = " right";
else
position = g_strdup ("");
position = "";
if (g_key_file_has_group (key_file, dial_entry))
if (uri && *uri && *uri != '#')
{
gchar* slot_id = g_strdup_printf ("s%d", slot);
gchar* uri = g_key_file_get_string (key_file, dial_entry, "uri", NULL);
gchar* title = g_key_file_get_string (key_file, dial_entry, "title", NULL);
gchar* thumb_file = sokoke_build_thumbnail_path (uri);
gchar* encoded;
@ -4002,7 +4037,6 @@ prepare_speed_dial_html (MidoriView* view)
"%s</p></div>\n",
position, slot, slot, uri, encoded, slot, title);
g_free (uri);
g_free (title);
g_free (encoded);
}
@ -4018,8 +4052,8 @@ prepare_speed_dial_html (MidoriView* view)
}
slot++;
g_free (position);
g_free (dial_entry);
g_free (uri);
}
g_string_append_printf (markup,
"</div>\n</div>\n</body>\n</html>\n");

View file

@ -1173,7 +1173,7 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
g_param_spec_boolean (
"strip-referer",
/* i18n: Reworded: Shorten details propagated when going to another page */
_("Strip referrer details sent to external sites"),
_("Strip referrer details sent to websites"),
/* i18n: Referer here is not a typo but a technical term */
_("Whether the \"Referer\" header should be shortened to the hostname"),
FALSE,

View file

@ -812,6 +812,7 @@ sokoke_external_uri (const gchar* uri)
if (!uri || !strncmp (uri, "http", 4)
|| !strncmp (uri, "file", 4)
|| !strncmp (uri, "geo", 3)
|| !strncmp (uri, "about:", 6))
return FALSE;
@ -850,6 +851,33 @@ sokoke_magic_uri (const gchar* uri)
/* Add file:// if we have a local path */
if (g_path_is_absolute (uri))
return g_strconcat ("file://", uri, NULL);
/* Parse geo URI geo:48.202778,16.368472;crs=wgs84;u=40 as a location */
if (!strncmp (uri, "geo:", 4))
{
gchar* comma;
gchar* semicolon;
gchar* latitude;
gchar* longitude;
gchar* geo;
comma = strchr (&uri[4], ',');
/* geo:latitude,longitude[,altitude][;u=u][;crs=crs] */
if (!(comma && *comma))
return g_strdup (uri);
semicolon = strchr (comma + 1, ';');
if (!semicolon)
semicolon = strchr (comma + 1, ',');
latitude = g_strndup (&uri[4], comma - &uri[4]);
if (semicolon)
longitude = g_strndup (comma + 1, semicolon - comma - 1);
else
longitude = g_strdup (comma + 1);
geo = g_strdup_printf ("http://www.openstreetmap.org/?mlat=%s&mlon=%s",
latitude, longitude);
g_free (latitude);
g_free (longitude);
return geo;
}
/* Do we have a protocol? */
if (g_strstr_len (uri, 8, "://"))
return sokoke_idn_to_punycode (g_strdup (uri));

1155
po/cs.po

File diff suppressed because it is too large Load diff

1915
po/da.po

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: midori 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-05-01 18:05+0200\n"
"POT-Creation-Date: 2011-05-15 11:36+0200\n"
"PO-Revision-Date: 2009-04-30 00:15+0100\n"
"Last-Translator: Christian Dywan <christian@twotoasts.de>\n"
"Language-Team: German <de@li.org>\n"
@ -102,10 +102,6 @@ msgstr "Erweiterungen"
msgid "Privacy"
msgstr "Privatsphäre"
#: ../midori/main.c:752
msgid "Web Cookies"
msgstr "Benutzerprofile"
#: ../midori/main.c:756
msgid "Delete old cookies after 1 hour"
msgstr "Alte Cookies nach 1 Stunde löschen"
@ -1796,7 +1792,7 @@ msgstr "Zum Löschen ausgewählte Daten"
#. i18n: Reworded: Shorten details propagated when going to another page
#: ../midori/midori-websettings.c:1175
msgid "Strip referrer details sent to external sites"
msgid "Strip referrer details sent to websites"
msgstr "Herkunftsdetails beim Seitenwechsel kürzen"
#. i18n: Referer here is not a typo but a technical term
@ -2056,32 +2052,24 @@ msgid "Features"
msgstr "Inhalte"
#. Page "General"
#: ../midori/midori-preferences.c:302
msgid "General"
msgstr "Allgemein"
#: ../midori/midori-preferences.c:303
#: ../midori/midori-preferences.c:294
msgid "Startup"
msgstr "Programmstart"
#: ../midori/midori-preferences.c:318 ../midori/midori-preferences.c:325
#: ../midori/midori-preferences.c:307
msgid "Use _current page"
msgstr "_Aktuelle Seite benutzen"
#: ../midori/midori-preferences.c:311
msgid "Use current page as homepage"
msgstr "Aktuelle Seite als Startseite benutzen"
#: ../midori/midori-preferences.c:331 ../panels/midori-transfers.c:87
msgid "Transfers"
msgstr "Übertragungen"
#. Page "Appearance"
#: ../midori/midori-preferences.c:340
msgid "Appearance"
msgstr "Erscheinungsbild"
#: ../midori/midori-preferences.c:341
msgid "Font settings"
msgstr "Schrifteinstellungen"
#: ../midori/midori-preferences.c:343
#: ../midori/midori-preferences.c:322
msgid "Default Font Family"
msgstr "Standardschriftart"
@ -2139,22 +2127,6 @@ msgstr "Skripte können selbstständig neue Fenster öffnen"
msgid "Browsing"
msgstr "Navigation"
#: ../midori/midori-preferences.c:417
msgid "Navigationbar"
msgstr "Navigationsleiste"
#: ../midori/midori-preferences.c:423
msgid "Interface"
msgstr "Oberfläche"
#: ../midori/midori-preferences.c:441
msgid "Applications"
msgstr "Anwendungen"
#: ../midori/midori-preferences.c:442
msgid "External applications"
msgstr "Externe Anwendungen"
#. Page "Network"
#: ../midori/midori-preferences.c:454 ../midori/midori-preferences.c:455
msgid "Network"
@ -2287,7 +2259,7 @@ msgstr " (%s/s)"
#: ../midori/sokoke.c:2273
#, c-format
msgid " - %s remaining"
msgstr ""
msgstr " - %s verbleibend"
#. i18n: A panel at the bottom, to search text in pages
#: ../toolbars/midori-findbar.c:231
@ -2416,6 +2388,10 @@ msgstr "Ausgewählten Verlaufseintrag löschen"
msgid "Clear the entire history"
msgstr "Den gesamten Verlauf löschen"
#: ../panels/midori-transfers.c:87
msgid "Transfers"
msgstr "Übertragungen"
#: ../panels/midori-transfers.c:481
msgid "Open Destination _Folder"
msgstr "Zielordner ö_ffnen"
@ -2991,6 +2967,27 @@ msgstr "Werkzeugleisten leicht anpassen"
msgid "Cache HTTP communication on disk"
msgstr "HTTP-Kommunikation auf der Festplatte zwischenspeichern"
#~ msgid "Web Cookies"
#~ msgstr "Benutzerprofile"
#~ msgid "General"
#~ msgstr "Allgemein"
#~ msgid "Font settings"
#~ msgstr "Schrifteinstellungen"
#~ msgid "Navigationbar"
#~ msgstr "Navigationsleiste"
#~ msgid "Interface"
#~ msgstr "Oberfläche"
#~ msgid "Applications"
#~ msgstr "Anwendungen"
#~ msgid "External applications"
#~ msgstr "Externe Anwendungen"
#~ msgid "Delete cookies when quitting Midori"
#~ msgstr "Cookies beim Beenden von Midori löschen"

View file

@ -1831,7 +1831,7 @@ msgstr "Les informations sélectionnées pour la suppression"
#. i18n: Reworded: Shorten details propagated when going to another page
#: ../midori/midori-websettings.c:1175
msgid "Strip referrer details sent to external sites"
msgid "Strip referrer details sent to websites"
msgstr "Raccourcir l'en-tête « Referer » envoyée aux sites"
#. i18n: Referer here is not a typo but a technical term

1561
po/hr.po

File diff suppressed because it is too large Load diff

1305
po/ja.po

File diff suppressed because it is too large Load diff

1152
po/ko.po

File diff suppressed because it is too large Load diff

1514
po/pl.po

File diff suppressed because it is too large Load diff

View file

@ -1761,7 +1761,7 @@ msgstr "Os dados selecionados para apagar"
#. i18n: Reworded: Shorten details propagated when going to another page
#: ../midori/midori-websettings.c:1175
msgid "Strip referrer details sent to external sites"
msgid "Strip referrer details sent to websites"
msgstr "Detalhes enviados para sítios externos"
#. i18n: Referer here is not a typo but a technical term

File diff suppressed because it is too large Load diff

3541
po/sr.po

File diff suppressed because it is too large Load diff

1153
po/uk.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

BIN
win32/makedist/midori.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View file

@ -9,12 +9,21 @@
#
# See the file COPYING for the full license text.
export MINGW_PREFIX=~/dev/mingw/ming32
export MINGW_PREFIX=~/dev/mingw/mingw32
export PATH=$MINGW_PREFIX/bin:$PATH
export PKG_CONFIG_PATH=$MINGW_PREFIX/lib/pkgconfig
export PKG_CONFIG_LIBDIR=
export MINGW_BUILD=`gcc -dumpmachine`
export MINGW_TARGET=i386-mingw32
CC=i386-mingw32-gcc ./configure --prefix=$MINGW_PREFIX $@
find_compiler ()
{
export CC=$( find /usr/bin -iname *mingw32*gcc )
}
find_compiler
if [ "$CC" != "" ]; then
CC=${CC} ./configure --prefix=$MINGW_PREFIX $@
else
echo "Cannot find cross-complier! Please install mingw version of gcc compiler."
fi

View file

@ -29,7 +29,7 @@ from Configure import find_program_impl
major = 0
minor = 3
micro = 5
micro = 6
APPNAME = 'midori'
VERSION = str (major) + '.' + str (minor) + '.' + str (micro)