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



commit 052eb51a295e013203bb1e568a6ee50f20a13c0e
Author: Cédric Bellegarde <cedric bellegarde adishatz org>
Date:   Sat Jun 11 13:04:31 2022 +0200

    ECategoryEditor: Use a header bar as title bar

 src/e-util/e-categories-editor.c | 1 +
 src/e-util/e-category-editor.c   | 9 +++------
 2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/e-util/e-categories-editor.c b/src/e-util/e-categories-editor.c
index 7cbc846115..b547dfc89b 100644
--- a/src/e-util/e-categories-editor.c
+++ b/src/e-util/e-categories-editor.c
@@ -157,6 +157,7 @@ edit_button_clicked_cb (GtkButton *button,
 
        cat_editor = g_object_new (E_TYPE_CATEGORY_EDITOR,
                "transient-for", parent,
+               "use-header-bar", TRUE,
                NULL);
 
        category = e_categories_selector_get_selected (
diff --git a/src/e-util/e-category-editor.c b/src/e-util/e-category-editor.c
index f10fdba581..d6559c12a6 100644
--- a/src/e-util/e-category-editor.c
+++ b/src/e-util/e-category-editor.c
@@ -147,7 +147,6 @@ static void
 e_category_editor_init (ECategoryEditor *editor)
 {
        GtkWidget *dialog_content;
-       GtkWidget *dialog_action_area;
        GtkGrid *grid_category_properties;
        GtkWidget *label_name;
        GtkWidget *label_icon;
@@ -248,10 +247,6 @@ e_category_editor_init (ECategoryEditor *editor)
        gtk_grid_attach (grid_category_properties, chooser_button, 1, 1, 1, 1);
        editor->priv->category_icon = chooser_button;
 
-       dialog_action_area = gtk_dialog_get_action_area (GTK_DIALOG (editor));
-       gtk_button_box_set_layout (
-               GTK_BUTTON_BOX (dialog_action_area), GTK_BUTTONBOX_END);
-
        gtk_dialog_add_buttons (
                GTK_DIALOG (editor),
                _("_Cancel"), GTK_RESPONSE_CANCEL,
@@ -283,7 +278,9 @@ e_category_editor_init (ECategoryEditor *editor)
 ECategoryEditor *
 e_category_editor_new (void)
 {
-       return g_object_new (E_TYPE_CATEGORY_EDITOR, NULL);
+       return g_object_new (E_TYPE_CATEGORY_EDITOR,
+               "use-header-bar", TRUE,
+               NULL);
 }
 
 /**


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