[balsa/gtk4: 110/312] balsa-mime-widget-crypto: Stop using GtkButtonBox
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 110/312] balsa-mime-widget-crypto: Stop using GtkButtonBox
- Date: Tue, 5 Oct 2021 20:01:00 +0000 (UTC)
commit 536006500b57bca9d2c36a7103f66e61f277412e
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 | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/src/balsa-mime-widget-crypto.c b/src/balsa-mime-widget-crypto.c
index fc5d3ff7f..bb66ee3b0 100644
--- a/src/balsa-mime-widget-crypto.c
+++ b/src/balsa-mime-widget-crypto.c
@@ -129,40 +129,46 @@ 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);
+<<<<<<< HEAD
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
} else if (libbalsa_message_get_headers(mime_body->message)->autocrypt_hdr_present) {
libbalsa_information(LIBBALSA_INFORMATION_WARNING,
_("The message contains an Autocrypt header, but it is either broken "
"or the signature has been created using a different key."));
+=======
+ gtk_container_add(GTK_CONTAINER(hbox), button);
+>>>>>>> 03c35ad3b (balsa-mime-widget-crypto: Stop using GtkButtonBox)
}
#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]