#include <unistd.h>
#endif
-#ifdef G_OS_WIN32
- #define LIBPREFIX ""
-#else
- #define LIBPREFIX "lib"
-#endif
-
static GHashTable* global_keys;
static gchar* jsforms;
</html> */
#endif
-static void
-formhistory_clear_database_cb (void)
-{
- gchar* filename = g_build_filename (sokoke_set_config_dir (NULL),
- "extensions", LIBPREFIX "formhistory." G_MODULE_SUFFIX, "forms.db", NULL);
- sqlite3* db;
- if (sqlite3_open (filename, &db) == SQLITE_OK)
- {
- sqlite3_exec (db, "DELETE FROM forms", NULL, NULL, NULL);
- sqlite3_close (db);
- }
- g_free (filename);
-
-}
-
MidoriExtension*
extension_init (void)
{
g_signal_connect (extension, "activate",
G_CALLBACK (formhistory_activate_cb), NULL);
- /* i18n: Data entered into web forms by the user */
- sokoke_register_privacy_item ("formhistory", _("_Form History"),
- G_CALLBACK (formhistory_clear_database_cb));
-
return extension;
}
#include <gdk/gdkx.h>
#endif
+#ifdef G_OS_WIN32
+ #define LIBPREFIX ""
+#else
+ #define LIBPREFIX "lib"
+#endif
+
static gchar*
build_config_filename (const gchar* filename)
{
}
#endif
+static void
+midori_clear_saved_logins_cb (void)
+{
+ sqlite3* db;
+ gchar* path = g_build_filename (sokoke_set_config_dir (NULL), "logins", NULL);
+ g_unlink (path);
+ /* Form History database, written by the extension */
+ katze_assign (path, g_build_filename (sokoke_set_config_dir (NULL),
+ "extensions", LIBPREFIX "formhistory." G_MODULE_SUFFIX, "forms.db", NULL));
+ if (sqlite3_open (path, &db) == SQLITE_OK)
+ {
+ sqlite3_exec (db, "DELETE FROM forms", NULL, NULL, NULL);
+ sqlite3_close (db);
+ }
+ g_free (path);
+}
+
#if WEBKIT_CHECK_VERSION (1, 1, 14)
static void
midori_clear_html5_databases_cb (void)
sokoke_register_privacy_item ("page-icons", _("Website icons"),
G_CALLBACK (midori_clear_page_icons_cb));
+ /* i18n: Logins and passwords in websites and web forms */
+ sokoke_register_privacy_item ("formhistory", _("Saved logins and _passwords"),
+ G_CALLBACK (midori_clear_saved_logins_cb));
sokoke_register_privacy_item ("web-cookies", _("Cookies"),
G_CALLBACK (midori_clear_web_cookies_cb));
#ifdef GDK_WINDOWING_X11