]> spindle.queued.net Git - midori/commitdiff
Delete search history when clearing history
authorSamuel Creshal <creshal@arcor.de>
Tue, 6 Jul 2010 08:42:30 +0000 (10:42 +0200)
committerChristian Dywan <christian@twotoasts.de>
Thu, 8 Jul 2010 20:15:13 +0000 (22:15 +0200)
midori/midori-browser.c

index 3f3808b0b71bbdf3663e6848e1d04bbe617c035b..cdbe57d4637294e25204556fac07b9d386e64871 100644 (file)
@@ -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