FormHistoryPriv* priv;
static sqlite3_stmt* stmt;
const char* sqlcmd;
+ const unsigned char* key;
+ const unsigned char* value;
+
gint result, pos;
priv = g_object_get_data (G_OBJECT (extension), "priv");
while (result == SQLITE_ROW)
{
pos++;
- const unsigned char* value = sqlite3_column_text (stmt, 0);
- const unsigned char* key = sqlite3_column_text (stmt, 1);
+ value = sqlite3_column_text (stmt, 0);
+ key = sqlite3_column_text (stmt, 1);
if (value)
{
g_string_append_printf (suggestions, " arr[\"%s\"] = [\"%s\"]; ",
WebKitWebPolicyDecision* decision,
MidoriExtension* extension)
{
+ FormHistoryPriv* priv;
+ JSContextRef js_context;
+ gchar* value;
+
/* The script returns form data in the form "field_name|,|value|,|field_type".
We are handling only input fields with 'text' or 'password' type.
The field separator is "|||" */
if (webkit_web_navigation_action_get_reason (action) != WEBKIT_WEB_NAVIGATION_REASON_FORM_SUBMITTED)
return FALSE;
- FormHistoryPriv* priv = g_object_get_data (G_OBJECT (extension), "priv");
- JSContextRef js_context = webkit_web_frame_get_global_context (web_frame);
- gchar* value = sokoke_js_script_eval (js_context, script, NULL);
+ priv = g_object_get_data (G_OBJECT (extension), "priv");
+ js_context = webkit_web_frame_get_global_context (web_frame);
+ value = sokoke_js_script_eval (js_context, script, NULL);
formhistory_suggestions_hide_cb (NULL, NULL, priv);
if (value && *value)
MidoriView* view,
MidoriExtension* extension)
{
- g_return_if_fail (MIDORI_IS_VIEW (view));
- g_return_if_fail (MIDORI_IS_EXTENSION (extension));
GtkWidget* web_view = midori_view_get_web_view (view);
g_signal_connect (web_view, "window-object-cleared",
formhistory_add_tab_foreach_cb (MidoriView* view,
MidoriExtension* extension)
{
- g_return_if_fail (MIDORI_IS_VIEW (view));
formhistory_add_tab_cb (NULL, view, extension);
}
MidoriBrowser* browser,
MidoriExtension* extension)
{
- g_return_if_fail (MIDORI_IS_APP (app));
- g_return_if_fail (MIDORI_IS_BROWSER (browser));
- g_return_if_fail (MIDORI_IS_EXTENSION (extension));
GtkAccelGroup* acg = gtk_accel_group_new ();
GtkActionGroup* action_group = midori_browser_get_action_group (browser);
formhistory_deactivate_tab (MidoriView* view,
MidoriExtension* extension)
{
- g_return_if_fail (MIDORI_IS_VIEW (view));
- g_return_if_fail (MIDORI_IS_EXTENSION (extension));
GtkWidget* web_view = midori_view_get_web_view (view);
g_signal_handlers_disconnect_by_func (