[gnome-control-center/fix-remote-desktop-fingerprint-dialog-closing: 2/2] sharing: Let GtkWindowControls add its own buttons




commit 44fdf9a492e6e78a1270353d759699d0368cb1f9
Author: Felipe Borges <felipeborges gnome org>
Date:   Fri May 13 13:10:04 2022 +0200

    sharing: Let GtkWindowControls add its own buttons
    
    On the Verify Encryption dialog we were adding a GtkWindowControls
    widget with a button child. This is a misunderstanding of the behavior
    of GtkWindowControls, which adds its own buttons to the window.
    
    Let's remove our custom close-button and its callback, since the
    previous commit disabled this codepath for hiding the dialog.

 panels/sharing/cc-sharing-panel.c  | 7 -------
 panels/sharing/cc-sharing-panel.ui | 7 -------
 2 files changed, 14 deletions(-)
---
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index 874695ed7..3d8efd071 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -247,12 +247,6 @@ remote_desktop_show_encryption_fingerprint (CcSharingPanel *self)
   gtk_window_present (GTK_WINDOW (self->remote_desktop_fingerprint_dialog));
 }
 
-static void
-remote_desktop_hide_encryption_fingerprint (CcSharingPanel *self)
-{
-  gtk_widget_hide (self->remote_desktop_fingerprint_dialog);
-}
-
 static void
 cc_sharing_panel_class_init (CcSharingPanelClass *klass)
 {
@@ -305,7 +299,6 @@ cc_sharing_panel_class_init (CcSharingPanelClass *klass)
   gtk_widget_class_bind_template_child (widget_class, CcSharingPanel, shared_folders_listbox);
 
   gtk_widget_class_bind_template_callback (widget_class, remote_desktop_show_encryption_fingerprint);
-  gtk_widget_class_bind_template_callback (widget_class, remote_desktop_hide_encryption_fingerprint);
 
   g_type_ensure (CC_TYPE_LIST_ROW);
   g_type_ensure (CC_TYPE_HOSTNAME_ENTRY);
diff --git a/panels/sharing/cc-sharing-panel.ui b/panels/sharing/cc-sharing-panel.ui
index 9f797dafa..8299e4311 100644
--- a/panels/sharing/cc-sharing-panel.ui
+++ b/panels/sharing/cc-sharing-panel.ui
@@ -425,13 +425,6 @@
           <object class="GtkWindowControls">
             <property name="halign">end</property>
             <property name="side">end</property>
-            <child>
-              <object class="GtkButton">
-                <property name="halign">end</property>
-                <property name="icon-name">window-close-symbolic</property>
-                <signal name="clicked" handler="remote_desktop_hide_encryption_fingerprint" swapped="yes"/>
-              </object>
-            </child>
           </object>
         </child>
         <child>


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