Make webkit_web_view_mime_type_decision_cb more explicit
This commit is contained in:
parent
e0c021de3d
commit
f76d538564
1 changed files with 10 additions and 10 deletions
|
@ -2956,23 +2956,23 @@ webkit_web_view_mime_type_decision_cb (GtkWidget* web_view,
|
||||||
case 4:
|
case 4:
|
||||||
g_object_set_data (G_OBJECT (view), "save-as-download", (gpointer)1);
|
g_object_set_data (G_OBJECT (view), "save-as-download", (gpointer)1);
|
||||||
webkit_web_policy_decision_download (decision);
|
webkit_web_policy_decision_download (decision);
|
||||||
webkit_web_view_stop_loading (WEBKIT_WEB_VIEW (view->web_view));
|
break;
|
||||||
return TRUE;
|
|
||||||
case 3:
|
case 3:
|
||||||
g_object_set_data (G_OBJECT (view), "open-download", (gpointer)1);
|
g_object_set_data (G_OBJECT (view), "open-download", (gpointer)1);
|
||||||
case 1:
|
case 1:
|
||||||
webkit_web_policy_decision_download (decision);
|
webkit_web_policy_decision_download (decision);
|
||||||
/* Apparently WebKit will continue loading which ends in an error.
|
break;
|
||||||
It's unclear whether it's a bug or we are doing something wrong. */
|
|
||||||
webkit_web_view_stop_loading (WEBKIT_WEB_VIEW (view->web_view));
|
|
||||||
return TRUE;
|
|
||||||
case 2:
|
case 2:
|
||||||
|
webkit_web_policy_decision_ignore (decision);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
/* Apparently WebKit will continue loading which ends in an error.
|
g_warn_if_reached ();
|
||||||
It's unclear whether it's a bug or we are doing something wrong. */
|
|
||||||
webkit_web_view_stop_loading (WEBKIT_WEB_VIEW (view->web_view));
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Apparently WebKit will continue loading which ends in an error.
|
||||||
|
It's unclear whether it's a bug or we are doing something wrong. */
|
||||||
|
webkit_web_view_stop_loading (WEBKIT_WEB_VIEW (view->web_view));
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue