Automatically close security details on focus out
This commit is contained in:
parent
7bcc270b05
commit
7eb4aa78aa
1 changed files with 13 additions and 0 deletions
|
@ -1261,6 +1261,17 @@ midori_location_action_show_page_info (GtkWidget* widget,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_GRANITE
|
||||||
|
static gboolean
|
||||||
|
midori_location_action_dialog_focus_out_cb (GtkWidget* dialog,
|
||||||
|
GdkEvent* event,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
gtk_widget_destroy (dialog);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
midori_location_action_icon_released_cb (GtkWidget* widget,
|
midori_location_action_icon_released_cb (GtkWidget* widget,
|
||||||
GtkIconEntryPosition icon_pos,
|
GtkIconEntryPosition icon_pos,
|
||||||
|
@ -1292,6 +1303,8 @@ midori_location_action_icon_released_cb (GtkWidget* widget,
|
||||||
#else
|
#else
|
||||||
GtkWidget* dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW (gtk_widget_get_toplevel (widget)),
|
GtkWidget* dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW (gtk_widget_get_toplevel (widget)),
|
||||||
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, NULL, NULL);
|
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, NULL, NULL);
|
||||||
|
g_signal_connect (dialog, "focus-out-event",
|
||||||
|
G_CALLBACK (midori_location_action_dialog_focus_out_cb), NULL);
|
||||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||||
#endif
|
#endif
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_hbox_new (FALSE, 0);
|
||||||
|
|
Loading…
Reference in a new issue