build.c: Only set next/prev error menu items sensitive on first error

master
Nick Treleaven 2019-08-22 15:14:17 +01:00
parent 431c68aa99
commit 99180dbc6b
2 changed files with 6 additions and 4 deletions

View File

@ -1026,6 +1026,12 @@ static void process_build_output_line(gchar *msg, gint color)
}
build_info.message_count++;
color = COLOR_RED; /* error message parsed on the line */
if (build_info.message_count == 1)
{
gtk_widget_set_sensitive(build_get_menu_items(-1)->menu_item[GBG_FIXED][GBF_NEXT_ERROR], TRUE);
gtk_widget_set_sensitive(build_get_menu_items(-1)->menu_item[GBG_FIXED][GBF_PREV_ERROR], TRUE);
}
}
g_free(filename);

View File

@ -374,10 +374,6 @@ void msgwin_compiler_add_string(gint msg_color, const gchar *msg)
gtk_tree_path_free(path);
}
/* calling build_menu_update for every build message would be overkill, TODO really should call it once when all done */
gtk_widget_set_sensitive(build_get_menu_items(-1)->menu_item[GBG_FIXED][GBF_NEXT_ERROR], TRUE);
gtk_widget_set_sensitive(build_get_menu_items(-1)->menu_item[GBG_FIXED][GBF_PREV_ERROR], TRUE);
if (utf8_msg != msg)
g_free(utf8_msg);
}