[gimp/gtk3-port: 390/391] libgimpwidgets: add macros to hide alternative_button_order warnings



commit a50cc94428e1e94932a7db58b39a5eeebf030b4f
Author: Michael Natterer <mitch gimp org>
Date:   Thu May 10 17:01:58 2018 +0200

    libgimpwidgets: add macros to hide alternative_button_order warnings
    
    Since we don't know yet what to do about this, let's not spam the
    build with distracting warnings in the meantime.
    
    gimp_dialog_set_alternative_button_order
    gimp_dialog_set_alternative_button_order_from_array
    
    are macros which just call the deprecated GtkDialog functions, but
    wrap them in G_GNUC_BEGIN,END_IGNORE_DEPRECATIONS.

 libgimpwidgets/gimpdialog.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/libgimpwidgets/gimpdialog.h b/libgimpwidgets/gimpdialog.h
index 7e2577a..8744ac2 100644
--- a/libgimpwidgets/gimpdialog.h
+++ b/libgimpwidgets/gimpdialog.h
@@ -97,6 +97,20 @@ gint        gimp_dialog_run                (GimpDialog     *dialog);
 void        gimp_dialogs_show_help_button  (gboolean        show);
 
 
+/*  since we don't know yet what to do about alternative button order,
+ *  just hide the warnings for now...
+ */
+#define gimp_dialog_set_alternative_button_order(d,f...) \
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS;                      \
+  gtk_dialog_set_alternative_button_order(d,f);          \
+  G_GNUC_END_IGNORE_DEPRECATIONS;
+
+#define gimp_dialog_set_alternative_button_order_from_array(d,n,o) \
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS;                                \
+  gtk_dialog_set_alternative_button_order_from_array(d,n,o);       \
+  G_GNUC_END_IGNORE_DEPRECATIONS;
+
+
 G_END_DECLS
 
 #endif /* __GIMP_DIALOG_H__ */


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