[balsa/gtk4: 97/284] mime-widget-vcalendar: Stop using GtkButtonBox




commit e257e84d06055f580b8efc456dcba0a476efeb16
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sat Aug 29 15:04:44 2020 -0400

    mime-widget-vcalendar: Stop using GtkButtonBox

 src/balsa-mime-widget-vcalendar.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/balsa-mime-widget-vcalendar.c b/src/balsa-mime-widget-vcalendar.c
index 2e8201bd0..65d6c5ead 100644
--- a/src/balsa-mime-widget-vcalendar.c
+++ b/src/balsa-mime-widget-vcalendar.c
@@ -251,6 +251,7 @@ balsa_vevent_widget(LibBalsaVEvent *event, LibBalsaVCal *vcal, gboolean may_repl
        GtkWidget *label;
        GtkWidget *bbox;
        GtkWidget *button;
+        GtkSizeGroup *size_group;
 
        /* add the callback data to the event object */
        g_object_set_data_full(G_OBJECT(event), "ev:sender",
@@ -265,12 +266,12 @@ balsa_vevent_widget(LibBalsaVEvent *event, LibBalsaVCal *vcal, gboolean may_repl
        label =
            gtk_label_new(_("The sender asks you for a reply to this request:"));
        gtk_container_add(GTK_CONTAINER(box), label);
-       bbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
-       gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox),
-                                 GTK_BUTTONBOX_SPREAD);
+        bbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_container_add(GTK_CONTAINER(box), bbox);
 
-       button = gtk_button_new_with_label(_("Accept"));
+        size_group = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
+
+        button = libbalsa_button_box_button(_("Accept"), size_group, GTK_ALIGN_CENTER);
        g_object_set_data(G_OBJECT(button), "event", event);
 
        /* Note: we must ref the full VCal object here as time zone information is stored in it.  Only 
ref'ing the event would thus
@@ -283,7 +284,7 @@ balsa_vevent_widget(LibBalsaVEvent *event, LibBalsaVCal *vcal, gboolean may_repl
                         G_CALLBACK(vevent_reply), bbox);
        gtk_container_add(GTK_CONTAINER(bbox), button);
 
-       button = gtk_button_new_with_label(_("Accept tentatively"));
+        button = libbalsa_button_box_button(_("Accept tentatively"), size_group, GTK_ALIGN_CENTER);
        g_object_set_data(G_OBJECT(button), "event", event);
        g_object_set_data(G_OBJECT(button), "mode",
                          GINT_TO_POINTER(ICAL_PARTSTAT_TENTATIVE));
@@ -291,7 +292,7 @@ balsa_vevent_widget(LibBalsaVEvent *event, LibBalsaVCal *vcal, gboolean may_repl
                         G_CALLBACK(vevent_reply), bbox);
        gtk_container_add(GTK_CONTAINER(bbox), button);
 
-       button = gtk_button_new_with_label(_("Decline"));
+        button = libbalsa_button_box_button(_("Decline"), size_group, GTK_ALIGN_CENTER);
        g_object_set_data(G_OBJECT(button), "event", event);
        g_object_set_data(G_OBJECT(button), "mode",
                          GINT_TO_POINTER(ICAL_PARTSTAT_DECLINED));


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