[gnome-bluetooth] settings: Add a spinner to pairing dialogues



commit f3616a4a6523794f0b33f79b51d86e32295a3f39
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Dec 11 19:39:29 2013 +0100

    settings: Add a spinner to pairing dialogues
    
    We either have a confirmation button, or a spinner.

 lib/bluetooth-pairing-dialog.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/lib/bluetooth-pairing-dialog.c b/lib/bluetooth-pairing-dialog.c
index 7516e86..9b391a7 100644
--- a/lib/bluetooth-pairing-dialog.c
+++ b/lib/bluetooth-pairing-dialog.c
@@ -45,6 +45,7 @@ struct _BluetoothPairingDialogPrivate {
        GtkWidget            *entry_pin;
        GtkWidget            *pin_notebook;
        GtkWidget            *done;
+       GtkWidget            *spinner;
        GtkWidget            *cancel;
 
        BluetoothPairingMode  mode;
@@ -256,6 +257,17 @@ bluetooth_pairing_dialog_init (BluetoothPairingDialog *self)
                          G_CALLBACK (response_cb), self);
        gtk_header_bar_pack_end (GTK_HEADER_BAR (priv->header), priv->done);
 
+       /* Spinner */
+       priv->spinner = gtk_spinner_new ();
+       gtk_widget_set_margin_end (priv->spinner, 12);
+       gtk_widget_set_no_show_all (priv->spinner, TRUE);
+       gtk_header_bar_pack_end (GTK_HEADER_BAR (priv->header), priv->spinner);
+       g_object_bind_property (priv->spinner, "visible",
+                               priv->spinner, "active", 0);
+       g_object_bind_property (priv->spinner, "visible",
+                               priv->done, "visible",
+                               G_BINDING_SYNC_CREATE | G_BINDING_INVERT_BOOLEAN | G_BINDING_BIDIRECTIONAL);
+
        /* Cancel button */
        priv->cancel = gtk_button_new_with_label (_("Cancel"));
        g_signal_connect (G_OBJECT (priv->cancel), "clicked",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]