mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-19 18:00:09 +00:00
bgo#563010 - Fix clearing the selection in GtkFileChooserButton
Previously the filename would get re-set on the button if one cleared the selection, as an async cancellable was not getting canceled in that case. Signed-off-by: Federico Mena Quintero <federico@novell.com>
This commit is contained in:
parent
0f33ad4ee1
commit
48f1b89eae
@ -2302,6 +2302,12 @@ update_label_and_image (GtkFileChooserButton *button)
|
||||
label_text = NULL;
|
||||
pixbuf = NULL;
|
||||
|
||||
if (priv->update_button_cancellable)
|
||||
{
|
||||
g_cancellable_cancel (priv->update_button_cancellable);
|
||||
priv->update_button_cancellable = NULL;
|
||||
}
|
||||
|
||||
if (files && files->data)
|
||||
{
|
||||
GFile *file;
|
||||
@ -2333,12 +2339,6 @@ update_label_and_image (GtkFileChooserButton *button)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (priv->update_button_cancellable)
|
||||
{
|
||||
g_cancellable_cancel (priv->update_button_cancellable);
|
||||
priv->update_button_cancellable = NULL;
|
||||
}
|
||||
|
||||
if (g_file_is_native (file))
|
||||
{
|
||||
priv->update_button_cancellable =
|
||||
|
Loading…
Reference in New Issue
Block a user