~midori/midori/trunk

« back to all changes in this revision

Viewing changes to extensions/formhistory/formhistory.c

  • Committer: Tarmac
  • Author(s): Christian Dywan
  • Date: 2013-06-19 21:00:46 UTC
  • mfrom: (6216.1.10 midori.butcher)
  • Revision ID: tarmac-20130619210046-i3yv8cnkyjuafubb
Bump WebKit requirement to 1.8.3 and drop support for earlier versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
    js_context = webkit_web_frame_get_global_context (web_frame);
222
222
    value = sokoke_js_script_eval (js_context, script, NULL);
223
223
 
224
 
#ifdef FORMHISTORY_USE_GDOM
225
224
    formhistory_suggestions_hide_cb (NULL, NULL, priv);
226
 
#endif
227
225
    if (value && *value)
228
226
    {
229
227
        gchar** inputs = g_strsplit (value, "|||", 0);
235
233
            {
236
234
                if (strcmp (parts[2], "password"))
237
235
                    formhistory_update_database (priv->db, NULL, parts[0], parts[1]);
238
 
                #if WEBKIT_CHECK_VERSION (1, 3, 8)
239
236
                else
240
237
                {
241
238
                    #if 0
256
253
                    g_object_set_data (G_OBJECT (web_view), "FormHistoryPasswordEntry", entry);
257
254
                    #endif
258
255
                }
259
 
                #endif
260
256
            }
261
257
            g_strfreev (parts);
262
258
            i++;
287
283
 
288
284
    formhistory_setup_suggestions (web_view, js_context, extension);
289
285
 
290
 
    #if WEBKIT_CHECK_VERSION (1, 3, 8)
291
286
    entry = g_object_get_data (G_OBJECT (web_view), "FormHistoryPasswordEntry");
292
287
    if (entry)
293
288
    {
301
296
                                  _("Never for this page"), GTK_RESPONSE_CANCEL, NULL);
302
297
        g_object_set_data (G_OBJECT (web_view), "FormHistoryPasswordEntry", NULL);
303
298
    }
304
 
    #endif
305
299
}
306
300
 
307
 
#if WEBKIT_CHECK_VERSION (1, 3, 8)
308
301
static gchar*
309
302
formhistory_decrypt (const gchar* data,
310
303
                     const gchar* password)
391
384
    formhistory_fill_login_data (js_context, priv, data);
392
385
    g_free (data);
393
386
}
394
 
#endif
395
387
 
396
388
static void
397
389
formhistory_deactivate_cb (MidoriExtension* extension,
408
400
        G_CALLBACK (formhistory_window_object_cleared_cb), extension);
409
401
    g_signal_connect (web_view, "navigation-policy-decision-requested",
410
402
        G_CALLBACK (formhistory_navigation_decision_cb), extension);
411
 
 
412
 
    #if WEBKIT_CHECK_VERSION (1, 3, 8)
413
403
    g_signal_connect (web_view, "onload-event",
414
404
        G_CALLBACK (formhistory_frame_loaded_cb), extension);
415
 
    #endif
416
405
}
417
406
 
418
407
static void
460
449
       web_view, formhistory_window_object_cleared_cb, extension);
461
450
    g_signal_handlers_disconnect_by_func (
462
451
       web_view, formhistory_navigation_decision_cb, extension);
463
 
    #if WEBKIT_CHECK_VERSION (1, 3, 8)
464
452
    g_signal_handlers_disconnect_by_func (
465
453
       web_view, formhistory_frame_loaded_cb, extension);
466
 
    #endif
467
454
}
468
455
 
469
456
static void