From 922a94fc98c9ac7dd2ba3ed39323a8a3e68879a2 Mon Sep 17 00:00:00 2001 From: Samuel Creshal Date: Tue, 6 Jul 2010 10:42:30 +0200 Subject: [PATCH] Delete search history when clearing history --- midori/midori-browser.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 3f3808b0..cdbe57d4 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -4164,9 +4164,18 @@ midori_browser_clear_private_data_response_cb (GtkWidget* dialog, if (sqlite3_exec (db, sqlcmd, NULL, NULL, &errmsg) != SQLITE_OK) { - g_printerr (_("Failed to remove history item: %s\n"), errmsg); + g_printerr (_("Failed to clear history: %s\n"), errmsg); sqlite3_free (errmsg); } + else + { + sqlcmd = "DELETE FROM search"; + if (sqlite3_exec (db, sqlcmd, NULL, NULL, &errmsg) != SQLITE_OK) + { + g_printerr (_("Failed to clear search history: %s\n"), errmsg); + sqlite3_free (errmsg); + } + } clear_prefs |= MIDORI_CLEAR_HISTORY; } #endif -- 2.39.5