EMSubscriptionEditor: Use a header bar as title bar

This commit is contained in:
Cédric Bellegarde
2022-06-25 19:26:58 +02:00
committed by Milan Crha
parent 9835af53e7
commit ee76049b93

View File

@ -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);
}