public Directive.from_header (string header) {
var param_list = Soup.header_parse_param_list (header);
+ if (param_list == null)
+ return;
+
string? max_age = param_list.lookup ("max-age");
if (max_age != null)
expires = new Soup.Date.from_now (max_age.to_int ());
- if (param_list.lookup_extended ("includeSubDomains", null, null))
+ // if (param_list.lookup_extended ("includeSubDomains", null, null))
+ if ("includeSubDomains" in header)
sub_domains = true;
Soup.header_free_param_list (param_list);
}
foreach (string tile in keyfile.get_groups ()) {
try {
string img = keyfile.get_string (tile, "img");
+ keyfile.remove_key (tile, "img");
string uri = keyfile.get_string (tile, "uri");
if (img != null && uri[0] != '\0' && uri[0] != '#') {
uchar[] decoded = Base64.decode (img);
FileUtils.set_data (build_thumbnail_path (uri), decoded);
}
- keyfile.remove_key (tile, "img");
}
catch (GLib.Error img_error) {
/* img and uri can be missing */
g_return_val_if_fail (command != NULL, FALSE);
g_return_val_if_fail (argument != NULL, FALSE);
- g_print ("Preparing command: %s %d %s %d\n",
- command, quote_command, argument, quote_argument);
+ if (midori_debug ("paths"))
+ g_print ("Preparing command: %s %d %s %d\n",
+ command, quote_command, argument, quote_argument);
{
gchar* uri_format;
'LIBNOTIFY WEBKIT JAVASCRIPTCOREGTK LIBXML X11 XSS WS2_32 HILDON' \
'HILDON_FM GCR GRANITE ZEITGEIST'
-if progressive or Options.commands['check']:
+if progressive:
obj = bld.new_task_gen ('cc', 'staticlib')
obj.target = 'midori-core'
obj.includes = '.. ../katze . ../toolbars'
obj.packages += ' gtk+-2.0 webkit-1.0'
bld.add_group ()
-if progressive:
obj = bld.new_task_gen ('cc', 'program')
obj.target = 'midori'
obj.includes = '.. ../katze . ../panels'
obj.uselib_local = 'midori-core'
if bld.env['WINRC']:
obj.source += ' ../data/midori.rc'
-else:
- obj = bld.new_task_gen ('cc', 'program')
- obj.target = 'midori'
- obj.includes = '.. ../katze . ../panels ../toolbars'
- obj.find_sources_in_dirs ('../katze . ../panels ../toolbars')
- obj.add_marshal_file ('marshal.list', 'midori_cclosure_marshal')
- obj.uselib = libs
- if bld.env['WINRC']:
- obj.source += ' ../data/midori.rc'
gchar *errmsg = NULL;
fixture->db_bookmarks = katze_array_new (KATZE_TYPE_ARRAY);
- db = midori_bookmarks_initialize (fixture->db_bookmarks, params->dbfile, &errmsg);
+ db = NULL; /* FIXME midori_bookmarks_initialize (fixture->db_bookmarks, params->dbfile, &errmsg); */
if (db == NULL)
g_error ("Bookmarks couldn't be loaded: %s\n", errmsg);
g_assert (errmsg == NULL);
See the file COPYING for the full license text.
*/
+
static void http_hsts () {
Midori.HSTS.Directive d;
d = new Midori.HSTS.Directive.from_header ("max-age=31536000");
for (j = 0; j < G_N_ELEMENTS (arguments); j++)
{
gchar* input = g_strconcat (commands[i].command, " ", arguments[j].command, NULL);
- gchar* ce = commands[i].expected ? commands[i].expected
+ gchar* ce = commands[i].expected ? (gchar*)commands[i].expected
: g_strconcat ("'", commands[i].command, "'", NULL);
- gchar* ae = arguments[j].expected ? arguments[j].expected
+ gchar* ae = arguments[j].expected ? (gchar*)arguments[j].expected
: (arguments[j].quote ? g_strconcat ("'", arguments[j].command, "'", NULL)
: g_strdup (arguments[j].command));
gchar* expected = g_strconcat (ce, " ", ae, NULL);
Katze.assert_str_equal (json, dial_data.keyfile.to_data (), dial_json.keyfile.to_data ());
Katze.assert_str_equal (json, dial_data.get_next_free_slot (), "Dial 2");
Katze.assert_str_equal (json, dial_json.get_next_free_slot (), "Dial 2");
+
+ dial_data.save_message ("speed_dial-save-rename s1 Lorem");
+ Katze.assert_str_equal (data, dial_data.keyfile.get_string ("Dial 1", "title"), "Lorem");
+ dial_data.save_message ("speed_dial-save-delete s1");
+ Katze.assert_str_equal (data, dial_data.get_next_free_slot (), "Dial 1");
}
void main (string[] args) {
string temporary_cache = DirUtils.make_tmp ("cacheXXXXXX");
Environment.set_variable ("XDG_CACHE_HOME", temporary_cache, true);
Test.init (ref args);
+ Midori.Paths.init (Midori.RuntimeMode.PRIVATE, null);
Test.add_func ("/speeddial/load", speeddial_load);
Test.run ();
DirUtils.remove (temporary_cache);
for fila in files:
if fila[-2:] == '.c':
source += ' ' + test + os.sep + fila
- elif 'VALAC' in bld.env and file[-5:] == '.vala':
+ elif file[-5:] == '.vala':
source += ' ' + test + os.sep + fila
if not source:
Utils.pprint ('RED', folder + ': No source files found')
else:
if test[-2:] == '.c':
target = test[:-2]
- elif 'VALAC' in bld.env and test[-5:] == '.vala':
+ elif test[-5:] == '.vala':
target = test[:-5]
else:
continue
obj.cflags = ['-DEXTENSION_PATH="' + os.path.abspath ('_build/default/extensions') + '"']
obj.source = source
obj.vapi_dirs = '../midori ../katze'
- obj.packages = 'glib-2.0 gio-2.0 libsoup-2.4 katze midori'
+ obj.packages = 'glib-2.0 gio-2.0 libsoup-2.4 katze midori midori-core'
if bld.env['HAVE_GTK3']:
obj.packages += ' gtk+-3.0 webkitgtk-3.0'
else: