[balsa/gtk3] Make Gtk3 dialog header bars configurable



commit 0b8174c36184db6e52b5732f0bc640f586af9482
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sun Jun 19 13:43:53 2016 -0400

    Make Gtk3 dialog header bars configurable
    
        * configure.ac: remove definition of BALSA_DIALOG_FLAGS.
        * libbalsa/libbalsa.c (libbalsa_dialog_flags): define it;
          (ask_cert_real): use it.
        * libbalsa/libbalsa.h: declare it.
        * libbalsa/identity.c (libbalsa_identity_select_dialog),
          (libbalsa_identity_config_dialog):
        * libbalsa/libbalsa-gpgme-cb.c (lb_gpgme_select_key),
          (get_passphrase_real):
        * libbalsa/send.c (ensure_send_progress_dialog):
        * libbalsa/smtp-server.c (libbalsa_smtp_server_dialog):
        * src/ab-main.c (libbalsa_dialog_flags):
        * src/address-book-config.c (create_generic_dialog):
        * src/balsa-app.c (ask_password_real):
        * src/balsa-index.c (balsa_index_pipe):
        * src/balsa-mblist.c (bmbl_mru_show_tree):
        * src/filter-edit-callbacks.c (fe_edit_condition):
        * src/filter-edit-dialog.c (filters_edit_dialog):
        * src/filter-export-dialog.c (filters_export_dialog):
        * src/folder-conf.c (folder_conf_imap_node), (browse_button_cb),
          (subfolder_conf_clicked_ok), (folder_conf_imap_sub_node):
        * src/information-dialog.c (balsa_information_list):
        * src/mailbox-conf.c (create_generic_dialog):
        * src/main-window.c (ensure_check_mail_dialog), (bw_find_real):
        * src/pref-manager.c (open_preferences_manager):
        * src/sendmsg-window.c (sw_get_user_codeset),
          (quote_parts_select_dlg), (subject_not_empty):
        * src/store-address.c (store_address_dialog):
        * src/toolbar-prefs.c (customize_dialog_cb): all use it.

 ChangeLog                    |   40 ++++++++++++++++++++++++++++++++++++++++
 configure.ac                 |    5 -----
 libbalsa/identity.c          |    4 ++--
 libbalsa/libbalsa-gpgme-cb.c |    4 ++--
 libbalsa/libbalsa.c          |   22 +++++++++++++++++++++-
 libbalsa/libbalsa.h          |    6 ++++++
 libbalsa/send.c              |    2 +-
 libbalsa/smtp-server.c       |    2 +-
 src/ab-main.c                |   20 ++++++++++++++++++++
 src/address-book-config.c    |    2 +-
 src/balsa-app.c              |    2 +-
 src/balsa-index.c            |    2 +-
 src/balsa-mblist.c           |    2 +-
 src/filter-edit-callbacks.c  |    2 +-
 src/filter-edit-dialog.c     |    2 +-
 src/filter-export-dialog.c   |    2 +-
 src/folder-conf.c            |    8 ++++----
 src/information-dialog.c     |    2 +-
 src/mailbox-conf.c           |    2 +-
 src/main-window.c            |    4 ++--
 src/pref-manager.c           |    2 +-
 src/sendmsg-window.c         |    6 +++---
 src/store-address.c          |    2 +-
 src/toolbar-prefs.c          |    2 +-
 24 files changed, 114 insertions(+), 33 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 96078ef..f7c093a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+2016-06-19  Albrecht Dreß
+
+       Make Gtk3 dialog header bars configurable
+       Basically, a new function libbalsa_dialog_flags() is added to
+       libbalsa.c (or simply expanded to 0 for older Gtk versions than
+       3.12.0).  When being called for the first time, the function
+       checks if the environment variable BALSA_DIALOG_HEADERBAR exists
+       and is set to 0.  Only in this case, the header bars are
+       disabled.  The function call replaces the macro
+       BALSA_DIALOG_FLAGS.
+
+       * configure.ac: remove definition of BALSA_DIALOG_FLAGS.
+       * libbalsa/libbalsa.c (libbalsa_dialog_flags): define it;
+         (ask_cert_real): use it.
+       * libbalsa/libbalsa.h: declare it.
+       * libbalsa/identity.c (libbalsa_identity_select_dialog),
+         (libbalsa_identity_config_dialog):
+       * libbalsa/libbalsa-gpgme-cb.c (lb_gpgme_select_key),
+         (get_passphrase_real):
+       * libbalsa/send.c (ensure_send_progress_dialog):
+       * libbalsa/smtp-server.c (libbalsa_smtp_server_dialog):
+       * src/ab-main.c (libbalsa_dialog_flags):
+       * src/address-book-config.c (create_generic_dialog):
+       * src/balsa-app.c (ask_password_real):
+       * src/balsa-index.c (balsa_index_pipe):
+       * src/balsa-mblist.c (bmbl_mru_show_tree):
+       * src/filter-edit-callbacks.c (fe_edit_condition):
+       * src/filter-edit-dialog.c (filters_edit_dialog):
+       * src/filter-export-dialog.c (filters_export_dialog):
+       * src/folder-conf.c (folder_conf_imap_node), (browse_button_cb),
+         (subfolder_conf_clicked_ok), (folder_conf_imap_sub_node):
+       * src/information-dialog.c (balsa_information_list):
+       * src/mailbox-conf.c (create_generic_dialog):
+       * src/main-window.c (ensure_check_mail_dialog), (bw_find_real):
+       * src/pref-manager.c (open_preferences_manager):
+       * src/sendmsg-window.c (sw_get_user_codeset),
+         (quote_parts_select_dlg), (subject_not_empty):
+       * src/store-address.c (store_address_dialog):
+       * src/toolbar-prefs.c (customize_dialog_cb): all use it.
+
 2016-06-18  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Fix saving address when user has only one address book
diff --git a/configure.ac b/configure.ac
index eb48db3..d7a3a12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -301,11 +301,6 @@ PKG_CHECK_MODULES(BALSA_AB, [
    $gnome_extras
 ])
 
-PKG_CHECK_MODULES(GTK3_12, [gtk+-3.0 >= 3.12.0],
-       [AC_DEFINE([BALSA_DIALOG_FLAGS], [GTK_DIALOG_USE_HEADER_BAR], [Create dialog with actions in header 
bar instead of action area])],
-       [AC_DEFINE([BALSA_DIALOG_FLAGS], [0], [])])
-
-
 AC_MSG_CHECKING(whether res_init is available)
 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <resolv.h>;]],
                                [[res_init();]])],
diff --git a/libbalsa/identity.c b/libbalsa/identity.c
index 6d8aa03..b022247 100644
--- a/libbalsa/identity.c
+++ b/libbalsa/identity.c
@@ -484,7 +484,7 @@ libbalsa_identity_select_dialog(GtkWindow * parent,
     sdi->dialog = dialog =
         gtk_dialog_new_with_buttons(prompt, parent,
                                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_Cancel"), GTK_RESPONSE_CANCEL,
                                     _("_OK"),     GTK_RESPONSE_OK,
                                     NULL);
@@ -1729,7 +1729,7 @@ libbalsa_identity_config_dialog(GtkWindow *parent, GList **identities,
         gtk_dialog_new_with_buttons(_("Manage Identities"),
                                     parent, /* must NOT be modal */
                                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_Help"),   IDENTITY_RESPONSE_HELP,
                                     _("_New"),    IDENTITY_RESPONSE_NEW,
                                     _("_Remove"), IDENTITY_RESPONSE_REMOVE,
diff --git a/libbalsa/libbalsa-gpgme-cb.c b/libbalsa/libbalsa-gpgme-cb.c
index 327afab..d6af616 100644
--- a/libbalsa/libbalsa-gpgme-cb.c
+++ b/libbalsa/libbalsa-gpgme-cb.c
@@ -165,7 +165,7 @@ lb_gpgme_select_key(const gchar * user_name, lb_key_sel_md_t mode, GList * keys,
     dialog = gtk_dialog_new_with_buttons(_("Select key"),
                                         parent,
                                         GTK_DIALOG_DESTROY_WITH_PARENT |
-                                         BALSA_DIALOG_FLAGS,
+                                         libbalsa_dialog_flags(),
                                          _("_OK"),     GTK_RESPONSE_OK,
                                          _("_Cancel"), GTK_RESPONSE_CANCEL,
                                          NULL);
@@ -377,7 +377,7 @@ get_passphrase_real(const gchar * uid_hint, const gchar * passphrase_info,
     /* FIXME: create dialog according to the Gnome HIG */
     dialog = gtk_dialog_new_with_buttons(_("Enter Passphrase"), parent,
                                         GTK_DIALOG_DESTROY_WITH_PARENT |
-                                         BALSA_DIALOG_FLAGS,
+                                         libbalsa_dialog_flags(),
                                          _("_OK"),     GTK_RESPONSE_OK,
                                          _("_Cancel"), GTK_RESPONSE_CANCEL,
                                          NULL);
diff --git a/libbalsa/libbalsa.c b/libbalsa/libbalsa.c
index 4b4d590..8a9c534 100644
--- a/libbalsa/libbalsa.c
+++ b/libbalsa/libbalsa.c
@@ -578,7 +578,7 @@ ask_cert_real(void *data)
     dialog = gtk_dialog_new_with_buttons(_("SSL/TLS certificate"),
                                          NULL, /* FIXME: NULL parent */
                                          GTK_DIALOG_MODAL |
-                                         BALSA_DIALOG_FLAGS,
+                                         libbalsa_dialog_flags(),
                                          _("_Accept Once"), 0,
                                          _("Accept&_Save"), 1,
                                          _("_Reject"), GTK_RESPONSE_CANCEL, 
@@ -960,3 +960,23 @@ libbalsa_image_error_quark(void)
         quark = g_quark_from_static_string("libbalsa-image-error-quark");
     return quark;
 }
+
+#if GTK_CHECK_VERSION(3, 12, 0)
+GtkDialogFlags
+libbalsa_dialog_flags(void)
+{
+       static GtkDialogFlags dialog_flags = GTK_DIALOG_USE_HEADER_BAR;
+       static gint check_done = 0;
+
+       if (g_atomic_int_get(&check_done) == 0) {
+               const gchar *dialog_env;
+
+               dialog_env = g_getenv("BALSA_DIALOG_HEADERBAR");
+               if ((dialog_env != NULL) && (atoi(dialog_env) == 0)) {
+                       dialog_flags = (GtkDialogFlags) 0;
+               }
+               g_atomic_int_set(&check_done, 1);
+       }
+       return dialog_flags;
+}
+#endif
diff --git a/libbalsa/libbalsa.h b/libbalsa/libbalsa.h
index b43ed49..b2a18e0 100644
--- a/libbalsa/libbalsa.h
+++ b/libbalsa/libbalsa.h
@@ -208,6 +208,12 @@ enum LibBalsaImageError {
 #endif                          /* HAVE_COMPFACE */
 };
 
+#if GTK_CHECK_VERSION(3, 12, 0)
+GtkDialogFlags libbalsa_dialog_flags(void);
+#else
+#define libbalsa_dialog_flags()                (GtkDialogFlags) (0)
+#endif
+
 #if HAVE_GTKSOURCEVIEW
 GtkWidget *libbalsa_source_view_new(gboolean highlight_phrases);
 #endif                          /* HAVE_GTKSOURCEVIEW */
diff --git a/libbalsa/send.c b/libbalsa/send.c
index 559111a..85a35cb 100644
--- a/libbalsa/send.c
+++ b/libbalsa/send.c
@@ -254,7 +254,7 @@ ensure_send_progress_dialog(GtkWindow * parent)
     send_dialog = gtk_dialog_new_with_buttons(_("Sending Mail..."), 
                                               parent,
                                               GTK_DIALOG_DESTROY_WITH_PARENT |
-                                              BALSA_DIALOG_FLAGS,
+                                              libbalsa_dialog_flags(),
                                               _("_Hide"), GTK_RESPONSE_CLOSE,
                                               NULL);
     gtk_window_set_wmclass(GTK_WINDOW(send_dialog), "send_dialog", "Balsa");
diff --git a/libbalsa/smtp-server.c b/libbalsa/smtp-server.c
index 36f2004..34a13d3 100644
--- a/libbalsa/smtp-server.c
+++ b/libbalsa/smtp-server.c
@@ -538,7 +538,7 @@ libbalsa_smtp_server_dialog(LibBalsaSmtpServer * smtp_server,
         gtk_dialog_new_with_buttons(_("SMTP Server"),
                                     parent,
                                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_OK"),     GTK_RESPONSE_OK,
                                     _("_Cancel"), GTK_RESPONSE_CANCEL,
                                     _("_Help"),   GTK_RESPONSE_HELP,
diff --git a/src/ab-main.c b/src/ab-main.c
index c66e299..9a36552 100644
--- a/src/ab-main.c
+++ b/src/ab-main.c
@@ -1047,6 +1047,26 @@ bab_set_intial_address_book(LibBalsaAddressBook * ab,
     g_action_change_state(action, g_variant_new_string(ab->name));
 }
 
+#if GTK_CHECK_VERSION(3, 12, 0)
+GtkDialogFlags
+libbalsa_dialog_flags(void)
+{
+       static GtkDialogFlags dialog_flags = GTK_DIALOG_USE_HEADER_BAR;
+       static gint check_done = 0;
+
+       if (g_atomic_int_get(&check_done) == 0) {
+               const gchar *dialog_env;
+
+               dialog_env = g_getenv("BALSA_DIALOG_HEADERBAR");
+               if ((dialog_env != NULL) && (atoi(dialog_env) == 0)) {
+                       dialog_flags = (GtkDialogFlags) 0;
+               }
+               g_atomic_int_set(&check_done, 0);
+       }
+       return dialog_flags;
+}
+#endif
+
 int
 main(int argc, char *argv[])
 {
diff --git a/src/address-book-config.c b/src/address-book-config.c
index dc673f8..0dc5d80 100644
--- a/src/address-book-config.c
+++ b/src/address-book-config.c
@@ -332,7 +332,7 @@ create_generic_dialog(AddressBookConfig * abc, const gchar * type)
 
     dialog =
         gtk_dialog_new_with_buttons(title, abc->parent,
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_Help"), GTK_RESPONSE_HELP,
                                     action, GTK_RESPONSE_APPLY,
                                     _("_Cancel"), GTK_RESPONSE_CANCEL,
diff --git a/src/balsa-app.c b/src/balsa-app.c
index 2efd2bd..32841de 100644
--- a/src/balsa-app.c
+++ b/src/balsa-app.c
@@ -88,7 +88,7 @@ ask_password_real(LibBalsaServer * server, LibBalsaMailbox * mbox)
     dialog = gtk_dialog_new_with_buttons(_("Password needed"),
                                          GTK_WINDOW(balsa_app.main_window),
                                          GTK_DIALOG_DESTROY_WITH_PARENT |
-                                         BALSA_DIALOG_FLAGS,
+                                         libbalsa_dialog_flags(),
                                          _("_OK"), GTK_RESPONSE_OK,
                                          _("_Cancel"), GTK_RESPONSE_CANCEL,
                                          NULL); 
diff --git a/src/balsa-index.c b/src/balsa-index.c
index b24d6ef..8d09c12 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -2640,7 +2640,7 @@ balsa_index_pipe(BalsaIndex * index)
         gtk_dialog_new_with_buttons(_("Pipe message through a program"),
                                     GTK_WINDOW(balsa_app.main_window),
                                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_Run"), GTK_RESPONSE_OK,
                                     _("_Cancel"), GTK_RESPONSE_CANCEL,
                                     NULL);
diff --git a/src/balsa-mblist.c b/src/balsa-mblist.c
index 6df7ab5..ddecb9c 100644
--- a/src/balsa-mblist.c
+++ b/src/balsa-mblist.c
@@ -1874,7 +1874,7 @@ bmbl_mru_show_tree(GtkWidget * widget, gpointer data)
         gtk_dialog_new_with_buttons(_("Choose destination folder"),
                                     mru->window,
                                     GTK_DIALOG_MODAL |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_Cancel"), GTK_RESPONSE_CANCEL,
                                     NULL);
 #if HAVE_MACOSX_DESKTOP
diff --git a/src/filter-edit-callbacks.c b/src/filter-edit-callbacks.c
index ec4be7b..1d05ca4 100644
--- a/src/filter-edit-callbacks.c
+++ b/src/filter-edit-callbacks.c
@@ -1240,7 +1240,7 @@ fe_edit_condition(GtkWidget * throwaway,gpointer is_new_cnd)
             gtk_dialog_new_with_buttons("",
                                         GTK_WINDOW(fe_window),
                                         GTK_DIALOG_DESTROY_WITH_PARENT |
-                                        BALSA_DIALOG_FLAGS,
+                                        libbalsa_dialog_flags(),
                                         _("_OK"), GTK_RESPONSE_OK,
                                         _("_Cancel"), GTK_RESPONSE_CANCEL,
                                         _("_Help"), GTK_RESPONSE_HELP,
diff --git a/src/filter-edit-dialog.c b/src/filter-edit-dialog.c
index 9f46b65..ca1b4cb 100644
--- a/src/filter-edit-dialog.c
+++ b/src/filter-edit-dialog.c
@@ -568,7 +568,7 @@ filters_edit_dialog(GtkWindow * parent)
 
     fe_window = gtk_dialog_new_with_buttons(_("Filters"),
                                             parent,
-                                            BALSA_DIALOG_FLAGS,
+                                            libbalsa_dialog_flags(),
                                             _("_OK"), GTK_RESPONSE_OK,
                                             _("_Cancel"), GTK_RESPONSE_CANCEL,
                                             _("_Help"), GTK_RESPONSE_HELP,
diff --git a/src/filter-export-dialog.c b/src/filter-export-dialog.c
index a57717a..5981e2b 100644
--- a/src/filter-export-dialog.c
+++ b/src/filter-export-dialog.c
@@ -76,7 +76,7 @@ filters_export_dialog(GtkWindow * parent)
     fex_window =
         gtk_dialog_new_with_buttons(_("Export Filters"),
                                     parent,
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_OK"), GTK_RESPONSE_OK,
                                     _("_Cancel"), GTK_RESPONSE_CANCEL,
                                     _("_Help"), GTK_RESPONSE_HELP,
diff --git a/src/folder-conf.c b/src/folder-conf.c
index 85a07ce..9ef7f14 100644
--- a/src/folder-conf.c
+++ b/src/folder-conf.c
@@ -301,7 +301,7 @@ folder_conf_imap_node(BalsaMailboxNode *mn)
                    (_("Remote IMAP folder"),
                     GTK_WINDOW(balsa_app.main_window),
                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                    BALSA_DIALOG_FLAGS,
+                    libbalsa_dialog_flags(),
                     mn ? _("_Update") : _("C_reate"), GTK_RESPONSE_OK,
                     _("_Cancel"), GTK_RESPONSE_CANCEL,
                     _("_Help"), GTK_RESPONSE_HELP,
@@ -565,7 +565,7 @@ browse_button_cb(GtkWidget * widget, SubfolderDialogData * sdd)
         gtk_dialog_new_with_buttons(_("Select parent folder"),
                                     GTK_WINDOW(sdd->dialog),
                                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_Cancel"), GTK_RESPONSE_CANCEL,
                                     _("_Help"), GTK_RESPONSE_HELP,
                                     NULL);
@@ -651,7 +651,7 @@ folder, parent);
                     gtk_dialog_new_with_buttons(_("Question"),
                                                 GTK_WINDOW(sdd->dialog),
                                                 GTK_DIALOG_MODAL |
-                                                BALSA_DIALOG_FLAGS,
+                                                libbalsa_dialog_flags(),
                                                 _("Rename INBOX"),
                                                 GTK_RESPONSE_OK,
                                                 _("Cancel"),
@@ -797,7 +797,7 @@ folder_conf_imap_sub_node(BalsaMailboxNode * mn)
                    (_("Remote IMAP subfolder"), 
                     GTK_WINDOW(balsa_app.main_window),
                     GTK_DIALOG_DESTROY_WITH_PARENT | /* must NOT be modal */
-                    BALSA_DIALOG_FLAGS,
+                    libbalsa_dialog_flags(),
                     mn ? _("_Update") : _("_Create"), GTK_RESPONSE_OK,
                     _("_Cancel"), GTK_RESPONSE_CANCEL,
                     _("_Help"), GTK_RESPONSE_HELP,
diff --git a/src/information-dialog.c b/src/information-dialog.c
index 82be3cd..7f0a161 100644
--- a/src/information-dialog.c
+++ b/src/information-dialog.c
@@ -233,7 +233,7 @@ balsa_information_list(GtkWindow *parent, LibBalsaInformationType type,
            gtk_dialog_new_with_buttons(_("Information - Balsa"), 
                                         parent,
                                         GTK_DIALOG_DESTROY_WITH_PARENT |
-                                        BALSA_DIALOG_FLAGS,
+                                        libbalsa_dialog_flags(),
                                         _("_Clear"), GTK_RESPONSE_APPLY,
                                         _("Cl_ose"), GTK_RESPONSE_CANCEL,
                                         NULL);
diff --git a/src/mailbox-conf.c b/src/mailbox-conf.c
index 85b5103..f3ea678 100644
--- a/src/mailbox-conf.c
+++ b/src/mailbox-conf.c
@@ -1152,7 +1152,7 @@ create_generic_dialog(MailboxConfWindow * mcw)
         gtk_dialog_new_with_buttons(_("Remote Mailbox Configurator"),
                                     GTK_WINDOW(balsa_app.main_window),
                                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     mcw->ok_button_name, MCW_RESPONSE,
                                     _("_Close"), GTK_RESPONSE_CLOSE,
                                     NULL);
diff --git a/src/main-window.c b/src/main-window.c
index 040c665..2266f60 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -3260,7 +3260,7 @@ ensure_check_mail_dialog(BalsaWindow * window)
        gtk_dialog_new_with_buttons(_("Checking Mail..."),
                                     GTK_WINDOW(window),
                                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_Hide"), GTK_RESPONSE_CLOSE,
                                     NULL);
 #if HAVE_MACOSX_DESKTOP
@@ -3990,7 +3990,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
             gtk_dialog_new_with_buttons(_("Search mailbox"),
                                         GTK_WINDOW(window),
                                         GTK_DIALOG_DESTROY_WITH_PARENT |
-                                        BALSA_DIALOG_FLAGS,
+                                        libbalsa_dialog_flags(),
                                        _("_Help"),   GTK_RESPONSE_HELP,
                                         _("_Close"), GTK_RESPONSE_CLOSE,
                                         NULL);
diff --git a/src/pref-manager.c b/src/pref-manager.c
index 1dec5ea..42474b2 100644
--- a/src/pref-manager.c
+++ b/src/pref-manager.c
@@ -502,7 +502,7 @@ open_preferences_manager(GtkWidget * widget, gpointer data)
         gtk_dialog_new_with_buttons(_("Balsa Preferences"),
                                     GTK_WINDOW(active_win),
                                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_OK"), GTK_RESPONSE_OK,
                                     _("_Apply"), GTK_RESPONSE_APPLY,
                                     _("_Cancel"), GTK_RESPONSE_CANCEL,
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index 5f5dd9f..14e80b4 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -1541,7 +1541,7 @@ sw_get_user_codeset(BalsaSendmsg * bsmsg, gboolean * change_type,
         gtk_dialog_new_with_buttons(_("Choose charset"),
                                     GTK_WINDOW(bsmsg->window),
                                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_OK"), GTK_RESPONSE_OK,
                                     _("_Cancel"), GTK_RESPONSE_CANCEL,
                                     NULL);
@@ -3334,7 +3334,7 @@ quote_parts_select_dlg(GtkTreeStore *tree_store, GtkWindow * parent)
     dialog = gtk_dialog_new_with_buttons(_("Select parts for quotation"),
                                         parent,
                                         GTK_DIALOG_DESTROY_WITH_PARENT |
-                                         BALSA_DIALOG_FLAGS,
+                                         libbalsa_dialog_flags(),
                                         _("_OK"), GTK_RESPONSE_OK,
                                         _("_Cancel"), GTK_RESPONSE_CANCEL,
                                         NULL);
@@ -4979,7 +4979,7 @@ subject_not_empty(BalsaSendmsg * bsmsg)
         gtk_dialog_new_with_buttons(_("No Subject"),
                                     GTK_WINDOW(bsmsg->window),
                                     GTK_DIALOG_MODAL |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_Cancel"), GTK_RESPONSE_CANCEL,
                                     _("_Send"),   GTK_RESPONSE_OK,
                                     NULL);
diff --git a/src/store-address.c b/src/store-address.c
index 6a45023..c8e5ea3 100644
--- a/src/store-address.c
+++ b/src/store-address.c
@@ -206,7 +206,7 @@ store_address_dialog(StoreAddressInfo * info)
         gtk_dialog_new_with_buttons(_("Store Address"),
                                     GTK_WINDOW(balsa_app.main_window),
                                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_Cancel"), GTK_RESPONSE_CANCEL,
                                     _("_OK"), GTK_RESPONSE_OK,
                                     NULL);
diff --git a/src/toolbar-prefs.c b/src/toolbar-prefs.c
index 233f57c..dba0992 100644
--- a/src/toolbar-prefs.c
+++ b/src/toolbar-prefs.c
@@ -138,7 +138,7 @@ customize_dialog_cb(GtkWidget * widget, gpointer data)
         gtk_dialog_new_with_buttons(_("Customize Toolbars"),
                                     GTK_WINDOW(active_window),
                                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                                    BALSA_DIALOG_FLAGS,
+                                    libbalsa_dialog_flags(),
                                     _("_Close"), GTK_RESPONSE_CLOSE,
                                     _("_Help"),  GTK_RESPONSE_HELP,
                                     NULL);


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