[balsa] Check environment variable in address book widgets
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] Check environment variable in address book widgets
- Date: Sun, 23 Oct 2016 16:16:27 +0000 (UTC)
commit 9ec2d719fc965e957c542d1d9fe3663a0556dd5a
Author: Albrecht Dreß <albrecht dress arcor de>
Date: Sun Oct 23 11:58:27 2016 -0400
Check environment variable in address book widgets
Disable header bars in the address book widgets if the
environment variable BALSA_DIALOG_HEADERBAR is 0.
* src/ab-window.c (balsa_ab_window_new): respect
BALSA_DIALOG_HEADERBAR environment variable.
Signed-off-by: Peter Bloomfield <PeterBloomfield bellsouth net>
ChangeLog | 10 +++++++++-
src/ab-window.c | 12 +++++++++++-
2 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a9170d3..af46146 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-10-23 Albrecht Dreß
+
+Disable header bars in the address book widgets if the
+environment variable BALSA_DIALOG_HEADERBAR is 0.
+
+ * src/ab-window.c (balsa_ab_window_new): respect
+ BALSA_DIALOG_HEADERBAR environment variable.
+
2016-10-23 Peter Bloomfield <pbloomfield bellsouth net>
We no longer use libiconv.
@@ -9,7 +17,7 @@
2016-10-21 Peter Bloomfield <pbloomfield bellsouth net>
Fix deprecation issues in gtk 3.22
-
+
Replace gtk_window_set_wmclass, which is deprecated in gtk 3.22,
with gtk_window_set_role.
diff --git a/src/ab-window.c b/src/ab-window.c
index 80ff2b1..01673d4 100644
--- a/src/ab-window.c
+++ b/src/ab-window.c
@@ -115,9 +115,19 @@ balsa_ab_window_new(gboolean composing, GtkWindow* parent)
{
GtkWidget *ret;
BalsaAbWindow *ab;
+ gint use_headerbar = 1;
+#if GTK_CHECK_VERSION(3, 12, 0)
+ const gchar *dialog_env;
+
+ /* header bar configuration */
+ dialog_env = g_getenv("BALSA_DIALOG_HEADERBAR");
+ if ((dialog_env != NULL) && (atoi(dialog_env) == 0)) {
+ use_headerbar = 0;
+ }
+#endif
ret = g_object_new(BALSA_TYPE_AB_WINDOW,
- "use-header-bar", TRUE,
+ "use-header-bar", use_headerbar,
"transient-for", parent,
NULL);
g_return_val_if_fail(ret != NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]