GtkWidget *
create_throbber_dialog             (const gchar        *title,
                                    GtkWidget         **label)
{
  GtkWidget *dialog;
  GtkWidget *status_label;
  GtkWidget *hbox, *throbber;
  GtkWidget *main_box, *main_alignment;

  dialog = gtk_dialog_new_with_buttons (title,
                                 NULL,
                                 GTK_DIALOG_NO_SEPARATOR,
                                 NULL);

  gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
  gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 0);
  gtk_window_set_deletable (GTK_WINDOW (dialog), FALSE);
  gtk_window_set_icon_name (GTK_WINDOW (dialog), "gtk-info");

  /* Create the main alignment for the dialog */
  main_alignment = gtk_alignment_new (0, 0, 1, 1);
  gtk_alignment_set_padding (GTK_ALIGNMENT (main_alignment), 0, 0, 6, 6);
  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), main_alignment, TRUE, TRUE, 0);

  /* Create the main box for the dialog */
  main_box = gtk_vbox_new (FALSE, 10);
  gtk_container_set_border_width (GTK_CONTAINER (main_box), 12);
  gtk_container_add (GTK_CONTAINER (main_alignment), main_box);

  /* Top horizontal box for the throbber */
  hbox= gtk_hbox_new (FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
  gtk_container_add (GTK_CONTAINER (main_box), hbox);

  /* Add the throbber */
  throbber = katze_throbber_new ();
  katze_throbber_set_animated (KATZE_THROBBER (throbber), TRUE);
  gtk_box_pack_end (GTK_BOX (hbox), throbber, FALSE, FALSE, 0);

  /* Status label*/
  status_label = gtk_label_new ("");
  gtk_label_set_markup (GTK_LABEL (status_label),
                        _("<span weight=\"bold\" stretch=\"semiexpanded\">"
                          "Status</span>"));
  gtk_misc_set_alignment (GTK_MISC (status_label), 0, 0);
  gtk_box_pack_start (GTK_BOX (hbox), status_label, FALSE, FALSE, 0);

  /* Information label */
  *label = gtk_label_new ("");
  gtk_container_add (GTK_CONTAINER (main_box), *label);

  gtk_widget_show_all (GTK_DIALOG(dialog)->vbox);
  return dialog;
}
/* Status of loading a site has changed */
static void _interface_tweaks_on_notify_view_load_status(InterfaceTweaks *self, GParamSpec *inSpec, gpointer inUserData)
{
	g_return_if_fail(IS_INTERFACE_TWEAKS(self));
	g_return_if_fail(WEBKIT_IS_WEB_VIEW(inUserData));

	InterfaceTweaksPrivate	*priv=self->priv;
	WebKitWebView			*webkitView=WEBKIT_WEB_VIEW(inUserData);
	WebKitLoadStatus		status;

	/* Check load status */ 
	status=webkit_web_view_get_load_status(webkitView);

	/* If webview was prepared to start network request */
	if(status==WEBKIT_LOAD_PROVISIONAL)
	{
		/* Show start-request throbber now if set */
		if(priv->showStartRequestThrobber)
		{
			MidoriView		*view;
			KatzeThrobber	*throbber;

			/* Get Midori view and the size for icon in tab */
			view=midori_view_get_for_widget(GTK_WIDGET(webkitView));

			/* Start throbber animation of view */
			throbber=_interface_tweaks_find_view_throbber(view);
			if(throbber) katze_throbber_set_animated(throbber, TRUE);
		}
	}

	/* First data of network response has been sent or first data of
	 * network response has been received
	 */
	if(status==WEBKIT_LOAD_COMMITTED)
	{
		const gchar			*uri;

		/* Get URI for current request */
		uri=webkit_web_view_get_uri(webkitView);

		/* Add URI to completion model */
		_interface_tweaks_add_uri_to_completion_model(self, uri);
	}
}