Commit c15a1b2c authored by Landry Breuil's avatar Landry Breuil

Check for gcc version for push/pop pragmas, fixes build on OpenBSD.

parent 48d31a84
......@@ -701,7 +701,7 @@ mousepad_print_create_custom_widget (GtkPrintOperation *operation)
gtk_widget_show (alignment);
/* In GTK3, GtkTable is deprecated */
#if GTK_CHECK_VERSION(3, 0, 0) && defined(__GNUC__)
#if GTK_CHECK_VERSION(3, 0, 0) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
......@@ -742,7 +742,7 @@ mousepad_print_create_custom_widget (GtkPrintOperation *operation)
g_signal_connect (G_OBJECT (print->widget_line_numbers_font), "font-set", G_CALLBACK (mousepad_print_button_font_set), print);
gtk_widget_show (print->widget_line_numbers_font);
#if GTK_CHECK_VERSION(3, 0, 0) && defined(__GNUC__)
#if GTK_CHECK_VERSION(3, 0, 0) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2)
# pragma GCC diagnostic pop
#endif
......
......@@ -137,7 +137,7 @@ mousepad_search_bar_class_init (MousepadSearchBarClass *klass)
gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0, "hide-bar", 0);
/* In GTK3, gtkrc is deprecated */
#if GTK_CHECK_VERSION(3, 0, 0) && defined(__GNUC__)
#if GTK_CHECK_VERSION(3, 0, 0) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
......@@ -156,7 +156,7 @@ mousepad_search_bar_class_init (MousepadSearchBarClass *klass)
"}\n"
"widget \"MousepadWindow.*.Gtk*ToolButton\" style \"mousepad-button-style\"\n");
#if GTK_CHECK_VERSION(3, 0, 0) && defined(__GNUC__)
#if GTK_CHECK_VERSION(3, 0, 0) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2)
# pragma GCC diagnostic pop
#endif
......
......@@ -865,7 +865,7 @@ mousepad_window_create_root_warning (MousepadWindow *window)
GtkWidget *ebox, *label, *separator;
/* In GTK3, gtkrc is deprecated */
#if GTK_CHECK_VERSION(3, 0, 0) && defined(__GNUC__)
#if GTK_CHECK_VERSION(3, 0, 0) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
......@@ -879,7 +879,7 @@ mousepad_window_create_root_warning (MousepadWindow *window)
"widget\"MousepadWindow.*.root-warning\"style\"mousepad-window-root-style\"\n"
"widget\"MousepadWindow.*.root-warning.GtkLabel\"style\"mousepad-window-root-style\"\n");
#if GTK_CHECK_VERSION(3, 0, 0) && defined(__GNUC__)
#if GTK_CHECK_VERSION(3, 0, 0) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2)
# pragma GCC diagnostic pop
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment