[gnome-control-center] printers: Propagate cancellation of authentication dialog



commit be6523b66cc04c1e7688b243c5598dbe56f77927
Author: Marek Kasik <mkasik redhat com>
Date:   Mon Sep 2 14:21:30 2013 +0200

    printers: Propagate cancellation of authentication dialog
    
    Return "response_id" of PpAuthenticationDialog in its "response" signal.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698532

 panels/printers/authentication-dialog.ui   |    2 +-
 panels/printers/pp-authentication-dialog.c |    3 ++-
 panels/printers/pp-authentication-dialog.h |    1 +
 panels/printers/pp-samba.c                 |    1 +
 4 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/panels/printers/authentication-dialog.ui b/panels/printers/authentication-dialog.ui
index 3394aaf..25bc613 100644
--- a/panels/printers/authentication-dialog.ui
+++ b/panels/printers/authentication-dialog.ui
@@ -206,7 +206,7 @@
       </object>
     </child>
     <action-widgets>
-      <action-widget response="0">button1</action-widget>
+      <action-widget response="-6">button1</action-widget>
       <action-widget response="-5">authentication-button</action-widget>
     </action-widgets>
   </object>
diff --git a/panels/printers/pp-authentication-dialog.c b/panels/printers/pp-authentication-dialog.c
index 2e6d33e..fd1c300 100644
--- a/panels/printers/pp-authentication-dialog.c
+++ b/panels/printers/pp-authentication-dialog.c
@@ -99,7 +99,7 @@ pp_authentication_dialog_class_init (PpAuthenticationDialogClass *klass)
                   G_STRUCT_OFFSET (PpAuthenticationDialogClass, response),
                   NULL, NULL,
                   g_cclosure_marshal_generic,
-                  G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
+                  G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING);
 }
 
 static void
@@ -228,6 +228,7 @@ authentication_dialog_response_cb (GtkDialog *_dialog,
   g_signal_emit (dialog,
                  signals[RESPONSE],
                  0,
+                 response_id,
                  username,
                  password);
 
diff --git a/panels/printers/pp-authentication-dialog.h b/panels/printers/pp-authentication-dialog.h
index e8e1a2c..b9b7170 100644
--- a/panels/printers/pp-authentication-dialog.h
+++ b/panels/printers/pp-authentication-dialog.h
@@ -48,6 +48,7 @@ struct _PpAuthenticationDialogClass
   GObjectClass parent_class;
 
   void (*response)      (PpAuthenticationDialog *dialog,
+                         gint                    response_id,
                          const gchar            *username,
                          const gchar            *password);
 };
diff --git a/panels/printers/pp-samba.c b/panels/printers/pp-samba.c
index b8b47e7..93f751a 100644
--- a/panels/printers/pp-samba.c
+++ b/panels/printers/pp-samba.c
@@ -213,6 +213,7 @@ smb_data_free (SMBData *data)
 
 static void
 auth_cb (PpAuthenticationDialog *auth_dialog,
+         gint                    response_id,
          const gchar            *username,
          const gchar            *password,
          gpointer                user_data)


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