[gnome-control-center] user-accounts: Hide 'Add Account' dialog when panel goes away
- From: Thomas Wood <thos src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Hide 'Add Account' dialog when panel goes away
- Date: Tue, 4 Jun 2013 10:34:20 +0000 (UTC)
commit 05147e093a65d98c2ee462534f7f9c793c7e1efd
Author: Stef Walter <stefw gnome org>
Date: Thu Apr 18 17:49:03 2013 +0200
user-accounts: Hide 'Add Account' dialog when panel goes away
When the user panel goes away (usually due to another panel replacing
it) complete the add account dialog, if it's up.
https://bugzilla.gnome.org/show_bug.cgi?id=698263
panels/user-accounts/um-user-panel.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/panels/user-accounts/um-user-panel.c b/panels/user-accounts/um-user-panel.c
index f55a21d..de2ae56 100644
--- a/panels/user-accounts/um-user-panel.c
+++ b/panels/user-accounts/um-user-panel.c
@@ -75,6 +75,8 @@ struct _CcUserPanelPrivate {
gint other_accounts;
GtkTreeIter *other_iter;
+
+ UmAccountDialog *account_dialog;
};
static GtkWidget *
@@ -349,6 +351,7 @@ select_created_user (GObject *object,
dialog = UM_ACCOUNT_DIALOG (object);
user = um_account_dialog_finish (dialog, result);
gtk_widget_destroy (GTK_WIDGET (dialog));
+ d->account_dialog = NULL;
if (user == NULL)
return;
@@ -378,10 +381,8 @@ select_created_user (GObject *object,
static void
add_user (GtkButton *button, CcUserPanelPrivate *d)
{
- UmAccountDialog *dialog;
-
- dialog = um_account_dialog_new ();
- um_account_dialog_show (dialog, GTK_WINDOW (gtk_widget_get_toplevel (d->main_box)),
+ d->account_dialog = um_account_dialog_new ();
+ um_account_dialog_show (d->account_dialog, GTK_WINDOW (gtk_widget_get_toplevel (d->main_box)),
d->permission, select_created_user, d);
}
@@ -1423,6 +1424,10 @@ cc_user_panel_dispose (GObject *object)
um_history_dialog_free (priv->history_dialog);
priv->history_dialog = NULL;
}
+ if (priv->account_dialog) {
+ gtk_dialog_response (GTK_DIALOG (priv->account_dialog), GTK_RESPONSE_DELETE_EVENT);
+ priv->account_dialog = NULL;
+ }
if (priv->language_chooser) {
gtk_widget_destroy (priv->language_chooser);
priv->language_chooser = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]