[balsa/gtk4: 92/248] balsa-mime-widget-crypto: Stop using GtkButtonBox
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 92/248] balsa-mime-widget-crypto: Stop using GtkButtonBox
- Date: Sun, 15 Nov 2020 20:13:59 +0000 (UTC)
commit 2c1b9c923f3ecc057bd4afdb5d15f15fa9fd8fc6
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Fri Aug 28 17:49:00 2020 -0400
balsa-mime-widget-crypto: Stop using GtkButtonBox
src/balsa-mime-widget-crypto.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/balsa-mime-widget-crypto.c b/src/balsa-mime-widget-crypto.c
index a5d3f17ed..17ef0f218 100644
--- a/src/balsa-mime-widget-crypto.c
+++ b/src/balsa-mime-widget-crypto.c
@@ -129,38 +129,38 @@ balsa_mime_widget_signature_widget(LibBalsaMessageBody * mime_body,
if (g_mime_gpgme_sigstat_protocol(mime_body->sig_info) == GPGME_PROTOCOL_OpenPGP) {
GtkWidget *hbox;
GtkWidget *button;
+ GtkSizeGroup *size_group;
- hbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
- gtk_button_box_set_layout(GTK_BUTTON_BOX(hbox), GTK_BUTTONBOX_EXPAND);
- gtk_box_set_spacing(GTK_BOX(hbox), BMW_HBOX_SPACE);
-
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, BMW_HBOX_SPACE);
gtk_widget_set_vexpand(hbox, TRUE);
gtk_widget_set_valign(hbox, GTK_ALIGN_FILL);
gtk_container_add(GTK_CONTAINER(vbox), hbox);
+
+ size_group = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
+
if (g_mime_gpgme_sigstat_status(mime_body->sig_info) == GPG_ERR_NO_PUBKEY) {
#ifdef ENABLE_AUTOCRYPT
GBytes *autocrypt_key;
autocrypt_key = autocrypt_get_key(g_mime_gpgme_sigstat_fingerprint(mime_body->sig_info),
NULL);
if (autocrypt_key != NULL) {
- button = gtk_button_new_with_mnemonic(_("_Import Autocrypt key"));
+ button = libbalsa_button_box_button(_("_Import Autocrypt key"),
+ size_group, GTK_ALIGN_FILL);
g_object_set_data_full(G_OBJECT(button), "autocrypt_key", autocrypt_key,
(GDestroyNotify) g_bytes_unref);
g_signal_connect(button, "clicked", G_CALLBACK(on_key_import_button), NULL);
- gtk_widget_set_hexpand(button, TRUE);
- gtk_widget_set_halign(button, GTK_ALIGN_FILL);
gtk_container_add(GTK_CONTAINER(hbox), button);
}
#endif
- button = gtk_button_new_with_mnemonic(_("_Search key server for this key"));
+ button = libbalsa_button_box_button(_("_Search key server for this key"),
+ size_group, GTK_ALIGN_FILL);
} else {
- button = gtk_button_new_with_mnemonic(_("_Search key server for updates of this key"));
+ button = libbalsa_button_box_button(_("_Search key server for updates of this key"),
+ size_group, GTK_ALIGN_FILL);
}
g_signal_connect(button, "clicked",
G_CALLBACK(on_gpg_key_button),
(gpointer) g_mime_gpgme_sigstat_fingerprint(mime_body->sig_info));
- gtk_widget_set_hexpand(button, TRUE);
- gtk_widget_set_halign(button, GTK_ALIGN_FILL);
gtk_container_add(GTK_CONTAINER(hbox), button);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]