[evolution] EMSubscriptionEditor: Use a header bar as title bar



commit ee76049b930eca98f12ee8d80f1ca30bca3d395f
Author: Cédric Bellegarde <cedric bellegarde adishatz org>
Date:   Sat Jun 25 19:26:58 2022 +0200

    EMSubscriptionEditor: Use a header bar as title bar

 src/mail/em-subscription-editor.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)
---
diff --git a/src/mail/em-subscription-editor.c b/src/mail/em-subscription-editor.c
index 77f881a73d..dd0b1df7f7 100644
--- a/src/mail/em-subscription-editor.c
+++ b/src/mail/em-subscription-editor.c
@@ -1441,16 +1441,6 @@ subscription_editor_add_store (EMSubscriptionEditor *editor,
        g_ptr_array_add (editor->priv->stores, data);
 }
 
-static void
-emse_notebook_sensitive_changed_cb (GtkWidget *notebook,
-                                    GParamSpec *param,
-                                    GtkDialog *editor)
-{
-       gtk_dialog_set_response_sensitive (
-               editor, GTK_RESPONSE_CLOSE,
-               gtk_widget_get_sensitive (notebook));
-}
-
 static gboolean
 subscription_editor_delete_event_cb (EMSubscriptionEditor *editor,
                                      GdkEvent *event,
@@ -1729,10 +1719,6 @@ em_subscription_editor_init (EMSubscriptionEditor *editor)
                "/org/gnome/evolution/mail/subscription-window/",
                E_RESTORE_WINDOW_SIZE);
 
-       gtk_dialog_add_button (
-               GTK_DIALOG (editor),
-               _("_Close"), GTK_RESPONSE_CLOSE);
-
        container = gtk_dialog_get_content_area (GTK_DIALOG (editor));
 
        widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
@@ -1814,10 +1800,6 @@ em_subscription_editor_init (EMSubscriptionEditor *editor)
                G_BINDING_BIDIRECTIONAL |
                G_BINDING_SYNC_CREATE);
 
-       e_signal_connect_notify (
-               widget, "notify::sensitive",
-               G_CALLBACK (emse_notebook_sensitive_changed_cb), editor);
-
        widget = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
        gtk_box_set_spacing (GTK_BOX (widget), 6);
        gtk_button_box_set_layout (
@@ -1978,6 +1960,7 @@ em_subscription_editor_new (GtkWindow *parent,
                EM_TYPE_SUBSCRIPTION_EDITOR,
                "session", session,
                "store", initial_store,
+               "use-header-bar", TRUE,
                "transient-for", parent,
                NULL);
 }


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