[gnome-builder] GbWorkbench: a desensitize the dialog while saving
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] GbWorkbench: a desensitize the dialog while saving
- Date: Sat, 13 Dec 2014 03:27:06 +0000 (UTC)
commit 2fb1b6eccd6776a0e2ab10a291af6d83fd813025
Author: Christian Hergert <christian hergert me>
Date: Fri Dec 12 19:26:49 2014 -0800
GbWorkbench: a desensitize the dialog while saving
Just in case since we are runnign the main loop in the process.
I think it would be nice if we could display the progress in the list
box if possible.
src/workbench/gb-workbench.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/workbench/gb-workbench.c b/src/workbench/gb-workbench.c
index 70edecc..06b9e1e 100644
--- a/src/workbench/gb-workbench.c
+++ b/src/workbench/gb-workbench.c
@@ -513,15 +513,17 @@ gb_workbench_begin_save_as (GbWorkbench *workbench,
static void
gb_workbench_wait_for_saved (GbWorkbench *workbench,
+ GtkDialog *dialog,
SavedState *state)
{
g_return_if_fail (GB_IS_WORKBENCH (workbench));
+ g_return_if_fail (GTK_IS_DIALOG (dialog));
g_return_if_fail (state);
+ gtk_widget_set_sensitive (GTK_WIDGET (dialog), FALSE);
while (state->outstanding)
- {
- gtk_main_iteration_do (TRUE);
- }
+ gtk_main_iteration_do (TRUE);
+ gtk_widget_set_sensitive (GTK_WIDGET (dialog), TRUE);
}
static gboolean
@@ -563,7 +565,7 @@ gb_workbench_confirm_close (GbWorkbench *workbench)
gb_workbench_begin_save (workbench, document, &state);
}
- gb_workbench_wait_for_saved (workbench, &state);
+ gb_workbench_wait_for_saved (workbench, GTK_DIALOG (dialog), &state);
g_clear_object (&state.cancellable);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]