diff --git a/configure.ac b/configure.ac index c2fe7f4..2002402 100644 --- a/configure.ac +++ b/configure.ac @@ -358,6 +358,11 @@ 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 ;]], [[res_init();]])], diff --git a/libbalsa/identity.c b/libbalsa/identity.c index b11b4d8..6d8aa03 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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_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 c6139fe..c360be0 100644 --- a/libbalsa/libbalsa-gpgme-cb.c +++ b/libbalsa/libbalsa-gpgme-cb.c @@ -161,7 +161,7 @@ lb_gpgme_select_key(const gchar * user_name, gboolean secret, GList * keys, dialog = gtk_dialog_new_with_buttons(_("Select key"), parent, GTK_DIALOG_DESTROY_WITH_PARENT | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_OK"), GTK_RESPONSE_OK, _("_Cancel"), GTK_RESPONSE_CANCEL, NULL); @@ -345,7 +345,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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_OK"), GTK_RESPONSE_OK, _("_Cancel"), GTK_RESPONSE_CANCEL, NULL); diff --git a/libbalsa/libbalsa.c b/libbalsa/libbalsa.c index 310f9e3..3f7cfb2 100644 --- a/libbalsa/libbalsa.c +++ b/libbalsa/libbalsa.c @@ -585,7 +585,7 @@ ask_cert_real(void *data) dialog = gtk_dialog_new_with_buttons(_("SSL/TLS certificate"), NULL, /* FIXME: NULL parent */ GTK_DIALOG_MODAL | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_Accept Once"), 0, _("Accept&_Save"), 1, _("_Reject"), GTK_RESPONSE_CANCEL, diff --git a/libbalsa/send.c b/libbalsa/send.c index 20d4bbb..4c7ba42 100644 --- a/libbalsa/send.c +++ b/libbalsa/send.c @@ -255,7 +255,7 @@ ensure_send_progress_dialog(GtkWindow * parent) send_dialog = gtk_dialog_new_with_buttons(_("Sending Mail..."), parent, GTK_DIALOG_DESTROY_WITH_PARENT | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_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 6eb5b75..f0dc3f4 100644 --- a/libbalsa/smtp-server.c +++ b/libbalsa/smtp-server.c @@ -540,7 +540,7 @@ libbalsa_smtp_server_dialog(LibBalsaSmtpServer * smtp_server, gtk_dialog_new_with_buttons(_("SMTP Server"), parent, GTK_DIALOG_DESTROY_WITH_PARENT | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_OK"), GTK_RESPONSE_OK, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Help"), GTK_RESPONSE_HELP, diff --git a/src/address-book-config.c b/src/address-book-config.c index ec28d9c..dc673f8 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, - GTK_DIALOG_USE_HEADER_BAR, + BALSA_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 4087d32..22b8f01 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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_OK"), GTK_RESPONSE_OK, _("_Cancel"), GTK_RESPONSE_CANCEL, NULL); diff --git a/src/balsa-index.c b/src/balsa-index.c index 2cf5016..ff3f293 100644 --- a/src/balsa-index.c +++ b/src/balsa-index.c @@ -2642,7 +2642,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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_Run"), GTK_RESPONSE_OK, _("_Cancel"), GTK_RESPONSE_CANCEL, NULL); diff --git a/src/balsa-mblist.c b/src/balsa-mblist.c index a189737..926cb41 100644 --- a/src/balsa-mblist.c +++ b/src/balsa-mblist.c @@ -1882,7 +1882,7 @@ bmbl_mru_show_tree(GtkWidget * widget, gpointer data) gtk_dialog_new_with_buttons(_("Choose destination folder"), mru->window, GTK_DIALOG_MODAL | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_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 37406af..45bc0a5 100644 --- a/src/filter-edit-callbacks.c +++ b/src/filter-edit-callbacks.c @@ -1237,7 +1237,7 @@ fe_edit_condition(GtkWidget * throwaway,gpointer is_new_cnd) gtk_dialog_new_with_buttons("", GTK_WINDOW(fe_window), GTK_DIALOG_DESTROY_WITH_PARENT | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_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 720795c..9f46b65 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, - GTK_DIALOG_USE_HEADER_BAR, + BALSA_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 cdb1e10..a57717a 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, - GTK_DIALOG_USE_HEADER_BAR, + BALSA_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 c6fdb85..c2333f8 100644 --- a/src/folder-conf.c +++ b/src/folder-conf.c @@ -303,7 +303,7 @@ folder_conf_imap_node(BalsaMailboxNode *mn) (_("Remote IMAP folder"), GTK_WINDOW(balsa_app.main_window), GTK_DIALOG_DESTROY_WITH_PARENT | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, mn ? _("_Update") : _("C_reate"), GTK_RESPONSE_OK, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Help"), GTK_RESPONSE_HELP, @@ -569,7 +569,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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Help"), GTK_RESPONSE_HELP, NULL); @@ -655,7 +655,7 @@ folder, parent); gtk_dialog_new_with_buttons(_("Question"), GTK_WINDOW(sdd->dialog), GTK_DIALOG_MODAL | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("Rename INBOX"), GTK_RESPONSE_OK, _("Cancel"), @@ -801,7 +801,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 */ - GTK_DIALOG_USE_HEADER_BAR, + BALSA_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 8002796..82be3cd 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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_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 c5ff327..7a1c985 100644 --- a/src/mailbox-conf.c +++ b/src/mailbox-conf.c @@ -1171,7 +1171,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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_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 c348970..942192d 100644 --- a/src/main-window.c +++ b/src/main-window.c @@ -3335,7 +3335,7 @@ ensure_check_mail_dialog(BalsaWindow * window) gtk_dialog_new_with_buttons(_("Checking Mail..."), GTK_WINDOW(window), GTK_DIALOG_DESTROY_WITH_PARENT | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_Hide"), GTK_RESPONSE_CLOSE, NULL); #if HAVE_MACOSX_DESKTOP @@ -4066,7 +4066,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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_Help"), GTK_RESPONSE_HELP, _("_Close"), GTK_RESPONSE_CLOSE, NULL); diff --git a/src/pref-manager.c b/src/pref-manager.c index 10a6dcd..1b98087 100644 --- a/src/pref-manager.c +++ b/src/pref-manager.c @@ -506,7 +506,7 @@ open_preferences_manager(GtkWidget * widget, gpointer data) gtk_dialog_new_with_buttons(_("Balsa Preferences"), GTK_WINDOW(active_win), GTK_DIALOG_DESTROY_WITH_PARENT | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_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 34d18cb..2702879 100644 --- a/src/sendmsg-window.c +++ b/src/sendmsg-window.c @@ -1551,7 +1551,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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_OK"), GTK_RESPONSE_OK, _("_Cancel"), GTK_RESPONSE_CANCEL, NULL); @@ -3377,7 +3377,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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_OK"), GTK_RESPONSE_OK, _("_Cancel"), GTK_RESPONSE_CANCEL, NULL); @@ -5044,7 +5044,7 @@ subject_not_empty(BalsaSendmsg * bsmsg) gtk_dialog_new_with_buttons(_("No Subject"), GTK_WINDOW(bsmsg->window), GTK_DIALOG_MODAL | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Send"), GTK_RESPONSE_OK, NULL); @@ -6595,7 +6595,7 @@ bsmsg_check_format_compatibility(GtkWindow *parent, const gchar *filename) dialog = (GtkDialog*)gtk_dialog_new_with_buttons (_("Compatibility check"), parent, GTK_DIALOG_MODAL| GTK_DIALOG_DESTROY_WITH_PARENT | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Attach it in the current format"), GTK_RESPONSE_OK, NULL); #if HAVE_MACOSX_DESKTOP diff --git a/src/store-address.c b/src/store-address.c index 8cd2361..48893af 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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_OK"), GTK_RESPONSE_OK, NULL); diff --git a/src/toolbar-prefs.c b/src/toolbar-prefs.c index 1553eee..233f57c 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 | - GTK_DIALOG_USE_HEADER_BAR, + BALSA_DIALOG_FLAGS, _("_Close"), GTK_RESPONSE_CLOSE, _("_Help"), GTK_RESPONSE_HELP, NULL);