~midori/midori/trunk

« back to all changes in this revision

Viewing changes to midori/midori-view.c

  • Committer: gue5t
  • Date: 2013-10-06 16:41:01 UTC
  • mto: This revision was merged to the branch mainline in revision 6472.
  • Revision ID: gue5t@midori.launchpad-20131006164101-f8lza3amgwn1dkyl
only autofocus error retry button in main frames

Show diffs side-by-side

added added

removed removed

Lines of Context:
1206
1206
        const gchar* icon;
1207
1207
        gchar* favicon;
1208
1208
        gchar* result;
 
1209
        gboolean is_main_frame;
 
1210
 
 
1211
        #ifdef HAVE_WEBKIT2
 
1212
        is_main_frame = TRUE;
 
1213
        #else
 
1214
        is_main_frame = web_frame && (webkit_web_view_get_main_frame(view->web_view) == web_frame);
 
1215
        #endif
1209
1216
 
1210
1217
        #if !GTK_CHECK_VERSION (3, 0, 0)
1211
1218
        /* g_object_get_valist: object class `GtkSettings' has no property named `gtk-button-images' */
1233
1240
            "{tryagain}", try_again,
1234
1241
            "{uri}", uri,
1235
1242
            "{hide-button-images}", show_button_images ? "" : "display:none",
 
1243
            "{autofocus}", is_main_frame ? "autofocus=\"true\" " : "",
1236
1244
            NULL);
1237
1245
        g_free (favicon);
1238
1246
        g_free (title_escaped);
1263
1271
{
1264
1272
    #ifdef HAVE_WEBKIT2
1265
1273
    void* web_frame = NULL;
 
1274
    /*in WebKit2's UIProcess/API/gtk/WebKitLoaderClient.cpp,
 
1275
    didFailProvisionalLoadWithErrorForFrame early-returns if the frame isn't
 
1276
    main, so we know that the pertinent frame here is the view's main frame--so
 
1277
    it's safe for midori_view_display_error to assume it fills in a main frame*/
1266
1278
    #endif
1267
1279
    gchar* title;
1268
1280
    gchar* message;