fix enum name incompatability between gtk 2 and 3

This commit is contained in:
Vincent Sanders 2019-05-05 15:38:19 +01:00
parent 9a3b644bf0
commit efdea7757b
2 changed files with 7 additions and 1 deletions

View File

@ -159,6 +159,9 @@ GtkStateType nsgtk_widget_get_state(GtkWidget *widget);
typedef GtkStateType GtkStateFlags;
typedef GtkStyle GtkStyleContext;
/* gtk 3 changed the enum name for the state flags */
#define GTK_STATE_FLAG_NORMAL GTK_STATE_NORMAL
#if GTK_CHECK_VERSION(2,22,0)
enum {
GTK_IN_DESTRUCTION = 1 << 0,

View File

@ -786,7 +786,10 @@ static void nsgtk_toolbar_close(struct nsgtk_scaffolding *g)
gtk_widget_show_all(GTK_WIDGET(nsgtk_scaffolding_toolbar(
list)));
nsgtk_scaffolding_set_sensitivity(list);
nsgtk_widget_override_background_color(GTK_WIDGET(nsgtk_window_get_layout(nsgtk_scaffolding_top_level(list))), GTK_STATE_NORMAL, 0, 0xFFFF, 0xFFFF, 0xFFFF);
nsgtk_widget_override_background_color(
GTK_WIDGET(nsgtk_window_get_layout(nsgtk_scaffolding_top_level(list))),
GTK_STATE_FLAG_NORMAL,
0, 0xFFFF, 0xFFFF, 0xFFFF);
g_signal_handler_unblock(GTK_WIDGET(
nsgtk_window_get_layout(
nsgtk_scaffolding_top_level(list))),