diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2009-02-17 06:29:21 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2009-02-17 06:29:21 +0000 |
commit | 9a5e06ce7b2ba4d934a67ba23c3423976503f884 (patch) | |
tree | 320daa63f506e68fa7e916d2e44798040316cb3f /gtk/gtkmountoperation.c | |
parent | ede806330c797b385da6598ffd5702f51a3ef2be (diff) | |
download | gtk+-9a5e06ce7b2ba4d934a67ba23c3423976503f884.tar.gz |
Require GLib 2.19.7 for GMountOperation::aborted.
* configure.in: Require GLib 2.19.7 for GMountOperation::aborted.
* gtk/gtkmountoperation.c: Implement GMountOperation::aborted.
svn path=/trunk/; revision=22347
Diffstat (limited to 'gtk/gtkmountoperation.c')
-rw-r--r-- | gtk/gtkmountoperation.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c index 53fe5c1121..d79fd43f28 100644 --- a/gtk/gtkmountoperation.c +++ b/gtk/gtkmountoperation.c @@ -92,6 +92,8 @@ static void gtk_mount_operation_ask_question (GMountOperation *op, const char *message, const char *choices[]); +static void gtk_mount_operation_aborted (GMountOperation *op); + G_DEFINE_TYPE (GtkMountOperation, gtk_mount_operation, G_TYPE_MOUNT_OPERATION); enum { @@ -153,6 +155,7 @@ gtk_mount_operation_class_init (GtkMountOperationClass *klass) mount_op_class = G_MOUNT_OPERATION_CLASS (klass); mount_op_class->ask_password = gtk_mount_operation_ask_password; mount_op_class->ask_question = gtk_mount_operation_ask_question; + mount_op_class->aborted = gtk_mount_operation_aborted; g_object_class_install_property (object_class, PROP_PARENT, @@ -734,6 +737,22 @@ gtk_mount_operation_ask_question (GMountOperation *op, g_object_ref (op); } +static void +gtk_mount_operation_aborted (GMountOperation *op) +{ + GtkMountOperationPrivate *priv; + + priv = GTK_MOUNT_OPERATION (op)->priv; + + if (priv->dialog != NULL) + { + gtk_widget_destroy (GTK_WIDGET (priv->dialog)); + priv->dialog = NULL; + g_object_notify (G_OBJECT (op), "is-showing"); + g_object_unref (op); + } +} + /** * gtk_mount_operation_new: * @parent: transient parent of the window, or %NULL |