Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!1860
This commit is contained in:
Matthias Clasen 2020-05-08 14:51:59 +00:00
commit 0e251906fb
3 changed files with 35 additions and 15 deletions

View File

@ -471,7 +471,7 @@ gtk_drop_target_handle_crossing (GtkEventController *controller,
crossing->new_target == widget)
return;
g_signal_emit (self, signals[LEAVE], 0, self->drop);
g_signal_emit (self, signals[LEAVE], 0);
if (!self->dropping)
gtk_drop_target_end_drop (self);
gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE);
@ -731,7 +731,6 @@ gtk_drop_target_class_init (GtkDropTargetClass *class)
/**
* GtkDropTarget::leave:
* @self: the #GtkDropTarget
* @drop: the #GdkDrop
*
* The ::leave signal is emitted on the drop site when the pointer
* leaves the widget. Its main purpose it to undo things done in

View File

@ -1912,7 +1912,6 @@ dnd_finished_cb (GdkDrag *drag,
*/
static void
drag_leave_callback (GtkDropTarget *dest,
GdkDrop *drop,
gpointer user_data)
{
GtkPlacesSidebar *sidebar = GTK_PLACES_SIDEBAR (user_data);

View File

@ -1588,32 +1588,54 @@ static void
populate_available_protocols_grid (GtkGrid *grid)
{
const gchar* const *supported_protocols;
gboolean has_any = FALSE;
supported_protocols = g_vfs_get_supported_uri_schemes (g_vfs_get_default ());
if (g_strv_contains (supported_protocols, "afp"))
attach_protocol_row_to_grid (grid, _("AppleTalk"), "afp://");
{
attach_protocol_row_to_grid (grid, _("AppleTalk"), "afp://");
has_any = TRUE;
}
if (g_strv_contains (supported_protocols, "ftp"))
attach_protocol_row_to_grid (grid, _("File Transfer Protocol"),
/* Translators: do not translate ftp:// and ftps:// */
_("ftp:// or ftps://"));
{
attach_protocol_row_to_grid (grid, _("File Transfer Protocol"),
/* Translators: do not translate ftp:// and ftps:// */
_("ftp:// or ftps://"));
has_any = TRUE;
}
if (g_strv_contains (supported_protocols, "nfs"))
attach_protocol_row_to_grid (grid, _("Network File System"), "nfs://");
{
attach_protocol_row_to_grid (grid, _("Network File System"), "nfs://");
has_any = TRUE;
}
if (g_strv_contains (supported_protocols, "smb"))
attach_protocol_row_to_grid (grid, _("Samba"), "smb://");
{
attach_protocol_row_to_grid (grid, _("Samba"), "smb://");
has_any = TRUE;
}
if (g_strv_contains (supported_protocols, "ssh"))
attach_protocol_row_to_grid (grid, _("SSH File Transfer Protocol"),
/* Translators: do not translate sftp:// and ssh:// */
_("sftp:// or ssh://"));
{
attach_protocol_row_to_grid (grid, _("SSH File Transfer Protocol"),
/* Translators: do not translate sftp:// and ssh:// */
_("sftp:// or ssh://"));
has_any = TRUE;
}
if (g_strv_contains (supported_protocols, "dav"))
attach_protocol_row_to_grid (grid, _("WebDAV"),
/* Translators: do not translate dav:// and davs:// */
_("dav:// or davs://"));
{
attach_protocol_row_to_grid (grid, _("WebDAV"),
/* Translators: do not translate dav:// and davs:// */
_("dav:// or davs://"));
has_any = TRUE;
}
if (!has_any)
gtk_widget_hide (GTK_WIDGET (grid));
}
static GMenuModel *