[gtk/gtk-4-2: 44/91] placesview: Fix server mount feedback
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-4-2: 44/91] placesview: Fix server mount feedback
- Date: Tue, 4 May 2021 02:05:41 +0000 (UTC)
commit e6bab9b64ca6c9f8cc16a19d9bde6133eaf85b9b
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Apr 16 19:34:24 2021 -0400
placesview: Fix server mount feedback
We weren't properly resetting the in-entry progress.
gtk/gtkplacesview.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index 855c29cb3b..9a57a18492 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -1215,12 +1215,14 @@ server_mount_ready_cb (GObject *source_file,
g_clear_error (&error);
}
- if (view->destroyed) {
- g_object_unref (view);
- return;
- }
+ if (view->destroyed)
+ {
+ g_object_unref (view);
+ return;
+ }
view->should_pulse_entry = FALSE;
+ gtk_entry_set_progress_fraction (GTK_ENTRY (view->address_entry), 0);
/* Restore from Cancel to Connect */
gtk_button_set_label (GTK_BUTTON (view->connect_button), _("Con_nect"));
@@ -1397,8 +1399,7 @@ pulse_entry_cb (gpointer user_data)
}
else
{
- gtk_entry_set_progress_pulse_step (GTK_ENTRY (view->address_entry), 0.0);
- gtk_entry_set_progress_fraction (GTK_ENTRY (view->address_entry), 0.0);
+ gtk_entry_set_progress_fraction (GTK_ENTRY (view->address_entry), 0);
view->entry_pulse_timeout_id = 0;
return G_SOURCE_REMOVE;
@@ -1452,6 +1453,7 @@ mount_server (GtkPlacesView *view,
view->should_pulse_entry = TRUE;
gtk_entry_set_progress_pulse_step (GTK_ENTRY (view->address_entry), 0.1);
+ gtk_entry_set_progress_fraction (GTK_ENTRY (view->address_entry), 0.1);
/* Allow to cancel the operation */
gtk_button_set_label (GTK_BUTTON (view->connect_button), _("Cance_l"));
gtk_widget_set_sensitive (view->address_entry, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]