From 6951acd7dce83c04c18b60ea32916f6c43c053dd Mon Sep 17 00:00:00 2001 From: gyboth Date: Mon, 1 Dec 2008 19:59:17 +0000 Subject: [PATCH] Season stat and load/save bugfixes. --- src/callback_func.c | 12 +++++++----- src/xml_loadsave_league.c | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/callback_func.c b/src/callback_func.c index 55dfac65..2480bbd5 100644 --- a/src/callback_func.c +++ b/src/callback_func.c @@ -69,7 +69,8 @@ callback_show_next_live_game(void) &usr(fixture_user_team_involved(&g_array_index(lig(i).fixtures, Fixture, j))). options)) { - live_game_calculate_fixture(&g_array_index(lig(i).fixtures, Fixture, j)); + live_game_calculate_fixture(&g_array_index(lig(i).fixtures, Fixture, j), + &usr(fixture_user_team_involved(&g_array_index(lig(i).fixtures, Fixture, j))).live_game); return; } @@ -83,7 +84,8 @@ callback_show_next_live_game(void) &usr(fixture_user_team_involved(&g_array_index(acp(i)->fixtures, Fixture, j))). options)) { - live_game_calculate_fixture(&g_array_index(acp(i)->fixtures, Fixture, j)); + live_game_calculate_fixture(&g_array_index(acp(i)->fixtures, Fixture, j), + &usr(fixture_user_team_involved(&g_array_index(acp(i)->fixtures, Fixture, j))).live_game); return; } @@ -808,7 +810,7 @@ callback_show_season_history(gint type) stat = &g_array_index(season_stats, SeasonStat, stat2); if(stat1 == -1) stat1 = 0; - else if(stat1 == stat->league_champs->len - 1) + else if(stat1 == stat->league_stats->len - 1) stat1 = -1; else stat1++; @@ -816,7 +818,7 @@ callback_show_season_history(gint type) case SHOW_PREVIOUS_LEAGUE: stat = &g_array_index(season_stats, SeasonStat, stat2); if(stat1 == -1) - stat1 = stat->league_champs->len - 1; + stat1 = stat->league_stats->len - 1; else if(stat1 == 0) stat1 = -1; else @@ -829,7 +831,7 @@ callback_show_season_history(gint type) stat2 = (stat2 == 0) ? len - 1 : stat2 - 1; break; } - + treeview_show_season_history(stat1, stat2); } diff --git a/src/xml_loadsave_league.c b/src/xml_loadsave_league.c index f255050f..6c743ee4 100644 --- a/src/xml_loadsave_league.c +++ b/src/xml_loadsave_league.c @@ -144,6 +144,7 @@ xml_loadsave_league_end_element (GMarkupParseContext *context, tag == TAG_LEAGUE_NEW_TABLE_NAME || tag == TAG_LEAGUE_NEW_TABLE_ADD_WEEK || tag == TAG_LEAGUE_TWO_MATCH_WEEK_START || + tag == TAG_LEAGUE_TWO_MATCH_WEEK_END || tag == TAG_LEAGUE_TABLE_FILE || tag == TAG_LEAGUE_AVERAGE_TALENT || tag == TAG_LEAGUE_AVERAGE_TALENT ||