]> Pileus Git - ~andy/gtk/commitdiff
Require GLib 2.19.7 for GMountOperation::aborted.
authorMatthias Clasen <matthiasc@src.gnome.org>
Tue, 17 Feb 2009 06:29:21 +0000 (06:29 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 17 Feb 2009 06:29:21 +0000 (06:29 +0000)
        * configure.in: Require GLib 2.19.7 for GMountOperation::aborted.

        * gtk/gtkmountoperation.c: Implement GMountOperation::aborted.

svn path=/trunk/; revision=22347

configure.in
gtk/gtkmountoperation.c

index 833dc5fc755259a4b544d665ba77b7d1b0f19b52..907821edab738adbca68f652b4525948183b88f0 100644 (file)
@@ -31,7 +31,7 @@ m4_define([gtk_api_version], [2.0])
 m4_define([gtk_binary_version], [2.10.0])
 
 # required versions of other packages
-m4_define([glib_required_version], [2.17.6])
+m4_define([glib_required_version], [2.19.7])
 m4_define([pango_required_version], [1.20])
 m4_define([atk_required_version], [1.13.0])
 m4_define([cairo_required_version], [1.6])
index 53fe5c11211158a759533aaa7a5d5053795bdf6e..d79fd43f283d58ee2e60ea2cfc8c9f8e5c372517 100644 (file)
@@ -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