diff --git a/Makefile.am b/Makefile.am index adabdc14..27987d78 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,9 +11,9 @@ EXTRA_DIST = \ bygfoot.glade \ bygfoot.gladep -SUPPORT_DIRS = support_files support_files/names support_files/pixmaps support_files/pixmaps/history support_files/pixmaps/symbols support_files/pixmaps/live_game support_files/definitions support_files/definitions/brazil support_files/definitions/short_leagues support_files/definitions/europe support_files/definitions/misc support_files/definitions/belgium support_files/definitions/england support_files/definitions/romania support_files/definitions/france support_files/definitions/usa support_files/definitions/germany support_files/definitions/scotland support_files/definitions/short_leagues_south_america support_files/definitions/italy support_files/definitions/argentina support_files/definitions/wales support_files/definitions/ireland support_files/definitions/scg support_files/definitions/australia support_files/lg_commentary +SUPPORT_DIRS = support_files support_files/names support_files/pixmaps support_files/pixmaps/history support_files/pixmaps/symbols support_files/pixmaps/live_game support_files/definitions support_files/definitions/brazil support_files/definitions/short_leagues support_files/definitions/europe support_files/definitions/misc support_files/definitions/belgium support_files/definitions/england support_files/definitions/romania support_files/definitions/france support_files/definitions/usa support_files/definitions/germany support_files/definitions/scotland support_files/definitions/short_leagues_south_america support_files/definitions/italy support_files/definitions/argentina support_files/definitions/wales support_files/definitions/ireland support_files/definitions/poland support_files/definitions/scg support_files/definitions/australia support_files/lg_commentary -SUPPORT_FILES = support_files/names/player_names_brazil.xml support_files/names/player_names_england.xml support_files/names/player_names_belgium.xml support_files/names/player_names_usa.xml support_files/names/player_names_general.xml support_files/names/player_names_germany.xml support_files/names/player_names_romania.xml support_files/names/player_names_scotland.xml support_files/names/player_names_france.xml support_files/names/player_names_scg.xml support_files/names/player_names_italy.xml support_files/names/player_names_australia.xml support_files/bygfoot.conf support_files/pixmaps/history/champion.png support_files/pixmaps/history/start_game.png support_files/pixmaps/history/fire_finance.png support_files/pixmaps/history/fire_failure.png support_files/pixmaps/history/job_offer.png support_files/pixmaps/history/end_season.png support_files/pixmaps/history/promoted.png support_files/pixmaps/history/relegated.png support_files/pixmaps/history/win_final.png support_files/pixmaps/history/lose_final.png support_files/pixmaps/history/reach_cup_round.png support_files/pixmaps/menu_history.png support_files/pixmaps/bygfoot_icon.png support_files/pixmaps/menu_league_stats.png support_files/pixmaps/new_week.png support_files/pixmaps/preview.png support_files/pixmaps/symbols/flag_germany.png support_files/pixmaps/symbols/flag_ch.png support_files/pixmaps/symbols/flag_cz.png support_files/pixmaps/symbols/flag_usa.png support_files/pixmaps/symbols/flag_dk.png support_files/pixmaps/symbols/flag_scg.png support_files/pixmaps/symbols/flag_es.png support_files/pixmaps/symbols/flag_eu.png support_files/pixmaps/symbols/flag_gr.png support_files/pixmaps/symbols/flag_hu.png support_files/pixmaps/symbols/flag_wales.png support_files/pixmaps/symbols/flag_nl.png support_files/pixmaps/symbols/flag_pt.png support_files/pixmaps/symbols/flag_ru.png support_files/pixmaps/symbols/flag_tr.png support_files/pixmaps/symbols/flag_uk.png support_files/pixmaps/symbols/flag_belgium.png support_files/pixmaps/symbols/flag_england.png support_files/pixmaps/symbols/flag_france.png support_files/pixmaps/symbols/flag_romania.png support_files/pixmaps/symbols/flag_brazil.png support_files/pixmaps/symbols/flag_scotland.png support_files/pixmaps/symbols/flag_ecuador.png support_files/pixmaps/symbols/flag_argentina.png support_files/pixmaps/symbols/flag_bolivia.png support_files/pixmaps/symbols/flag_chile.png support_files/pixmaps/symbols/flag_colombia.png support_files/pixmaps/symbols/flag_peru.png support_files/pixmaps/symbols/flag_paraguay.png support_files/pixmaps/symbols/flag_uruguay.png support_files/pixmaps/symbols/flag_venezuela.png support_files/pixmaps/symbols/flag_mexico.png support_files/pixmaps/symbols/flag_italy.png support_files/pixmaps/symbols/flag_ireland.png support_files/pixmaps/symbols/flag_n_ireland.png support_files/pixmaps/symbols/map_ireland.png support_files/pixmaps/symbols/flag_poland.png support_files/pixmaps/symbols/flag_czech.png support_files/pixmaps/symbols/flag_denmark.png support_files/pixmaps/symbols/flag_europa.png support_files/pixmaps/symbols/flag_greece.png support_files/pixmaps/symbols/flag_hungry.png support_files/pixmaps/symbols/flag_netherlands.png support_files/pixmaps/symbols/flag_nth_ireland.png support_files/pixmaps/symbols/flag_portugal.png support_files/pixmaps/symbols/flag_russia.png support_files/pixmaps/symbols/flag_serbiaMontenegro.png support_files/pixmaps/symbols/flag_serbia.png support_files/pixmaps/symbols/flag_spain.png support_files/pixmaps/symbols/flag_switzerland.png support_files/pixmaps/symbols/flag_turkey.png support_files/pixmaps/symbols/flag_ukraine.png support_files/pixmaps/symbols/flag_uraguay.png support_files/pixmaps/symbols/flag_australia.png support_files/pixmaps/transfers.png support_files/pixmaps/menu_league_results.png support_files/pixmaps/menu_table.png support_files/pixmaps/menu_fixtures_comp.png support_files/pixmaps/menu_fixtures.png support_files/pixmaps/menu_boost.png support_files/pixmaps/menu_browse_tms.png support_files/pixmaps/menu_finances.png support_files/pixmaps/menu_last_match.png support_files/pixmaps/live_game/sub.png support_files/pixmaps/live_game/red.png support_files/pixmaps/live_game/save.png support_files/pixmaps/live_game/goal.png support_files/pixmaps/live_game/yellow.png support_files/pixmaps/live_game/scoring_chance.png support_files/pixmaps/live_game/injury_temp.png support_files/pixmaps/live_game/injury.png support_files/pixmaps/live_game/structure_change.png support_files/pixmaps/live_game/whistle.png support_files/pixmaps/live_game/miss.png support_files/pixmaps/live_game/foul.png support_files/pixmaps/live_game/cross_bar.png support_files/pixmaps/live_game/post.png support_files/pixmaps/live_game/penalty.png support_files/pixmaps/live_game/stadium_brkn.png support_files/pixmaps/live_game/stadium_fire.png support_files/pixmaps/live_game/stadium_riot.png support_files/pixmaps/live_game/header.png support_files/pixmaps/live_game/goal_own.png support_files/pixmaps/live_game/lost_possession.png support_files/pixmaps/menu_match_stats.png support_files/pixmaps/menu_physio.png support_files/pixmaps/boost_anti.png support_files/pixmaps/boost_off.png support_files/pixmaps/boost_on.png support_files/pixmaps/menu_player_browse.png support_files/pixmaps/style_def.png support_files/pixmaps/style_atk.png support_files/pixmaps/style_bal.png support_files/pixmaps/style_all_atk.png support_files/pixmaps/style_all_def.png support_files/pixmaps/menu_player_contract.png support_files/pixmaps/menu_player_fire.png support_files/pixmaps/menu_player_info.png support_files/pixmaps/menu_player_put_transfer.png support_files/pixmaps/menu_player_remove_transfer.png support_files/pixmaps/table_up.png support_files/pixmaps/table_down.png support_files/pixmaps/table_stay.png support_files/pixmaps/menu_player_shoots.png support_files/pixmaps/menu_rearrange.png support_files/pixmaps/menu_scout.png support_files/pixmaps/menu_stadium.png support_files/pixmaps/menu_structure.png support_files/pixmaps/menu_style.png support_files/definitions/brazil/country_brazil.xml support_files/definitions/brazil/cup_brazil_prom_games2.xml support_files/definitions/brazil/cup_brazil_prom_games3.xml support_files/definitions/brazil/cup_brazil_prom_games4.xml support_files/definitions/brazil/cup_brazil_prom_games5.xml support_files/definitions/brazil/cup_brazil_prom_games6.xml support_files/definitions/brazil/league_brazil1.xml support_files/definitions/brazil/league_brazil2.xml support_files/definitions/brazil/league_brazil3.xml support_files/definitions/brazil/league_brazil4.xml support_files/definitions/brazil/league_brazil5.xml support_files/definitions/brazil/league_brazil6.xml support_files/definitions/brazil/cup_brazil_sul_am_bo_ve.xml support_files/definitions/brazil/cup_brazil_libertadores.xml support_files/definitions/brazil/cup_brazil_copa_do_brasil.xml support_files/definitions/brazil/cup_brazil_sul_am_br2.xml support_files/definitions/brazil/cup_brazil_sul_am_br1.xml support_files/definitions/brazil/cup_brazil_sul_am_br3.xml support_files/definitions/brazil/cup_brazil_sul_am_ar.xml support_files/definitions/brazil/cup_brazil_sul_am_br4.xml support_files/definitions/brazil/cup_brazil_sul_am_pa_ur.xml support_files/definitions/brazil/cup_brazil_sul_am_ch_pe.xml support_files/definitions/brazil/cup_brazil_sul_am_co_ec.xml support_files/definitions/brazil/cup_brazil_sul_am_knockout.xml support_files/definitions/brazil/cup_supercup_brazil_intercontinental.xml support_files/definitions/short_leagues/league_czech1_short.xml support_files/definitions/short_leagues/league_denmark1_short.xml support_files/definitions/short_leagues/league_greece1_short.xml support_files/definitions/short_leagues/league_netherlands1_short.xml support_files/definitions/short_leagues/league_portugal1_short.xml support_files/definitions/short_leagues/league_russia1_short.xml support_files/definitions/short_leagues/league_spain1_short.xml support_files/definitions/short_leagues/league_switzerland1_short.xml support_files/definitions/short_leagues/league_turkey1_short.xml support_files/definitions/short_leagues/league_ukraine1_short.xml support_files/definitions/europe/cup_europe_champ_league.xml support_files/definitions/europe/cup_europe_cwc.xml support_files/definitions/europe/league_europe_div.xml support_files/definitions/europe/cup_europe_uefa.xml support_files/definitions/europe/cup_supercup_europe_uefa.xml support_files/definitions/europe/cup_supercup_europe_intercontinental.xml support_files/definitions/misc/cup_supercup_league_vs_cup.xml support_files/definitions/belgium/country_belgium.xml support_files/definitions/belgium/bel.tar.bz2 support_files/definitions/belgium/league_belgium2.xml support_files/definitions/belgium/league_belgium1.xml support_files/definitions/belgium/league_belgium3a.xml support_files/definitions/belgium/league_belgium3b.xml support_files/definitions/belgium/league_belgium4a.xml support_files/definitions/belgium/league_belgium4b.xml support_files/definitions/belgium/league_belgium4c.xml support_files/definitions/belgium/league_belgium4d.xml support_files/definitions/belgium/cup_belgium_eindronde2.xml support_files/definitions/belgium/cup_belgium_eindronde4.xml support_files/definitions/belgium/cup_belgium_eindronde3.xml support_files/definitions/belgium/cup_belgium_beker.xml support_files/definitions/england/country_england.xml support_files/definitions/england/league_england1.xml support_files/definitions/england/league_england2.xml support_files/definitions/england/league_england3.xml support_files/definitions/england/league_england4.xml support_files/definitions/england/league_england5.xml support_files/definitions/england/cup_england_fa.xml support_files/definitions/england/cup_england_prom_games2.xml support_files/definitions/england/cup_england_league.xml support_files/definitions/england/cup_england_prom_games3.xml support_files/definitions/england/cup_england_prom_games4.xml support_files/definitions/england/cup_england_prom_games5.xml support_files/definitions/romania/country_romania.xml support_files/definitions/romania/cup_romania_cupa.xml support_files/definitions/romania/cup_supercup_romania.xml support_files/definitions/romania/league_romania1.xml support_files/definitions/romania/league_romania2.xml support_files/definitions/romania/league_romania3.xml support_files/definitions/france/country_france.xml support_files/definitions/france/cup_france_coupe.xml support_files/definitions/france/league_france1.xml support_files/definitions/france/league_france2.xml support_files/definitions/france/league_france3.xml support_files/definitions/france/cup_france_ligue.xml support_files/definitions/france/league_france4a.xml support_files/definitions/france/league_france4b.xml support_files/definitions/france/league_france4c.xml support_files/definitions/france/league_france4d.xml support_files/definitions/usa/league_usa_econf.xml support_files/definitions/usa/country_usa.xml support_files/definitions/usa/league_usa_wconf.xml support_files/definitions/usa/cup_usa_eplayoff.xml support_files/definitions/usa/cup_usa_wplayoff.xml support_files/definitions/usa/cup_usa_mls_cup.xml support_files/definitions/germany/cup_germany_dfb.xml support_files/definitions/germany/league_germany1.xml support_files/definitions/germany/league_germany3a.xml support_files/definitions/germany/league_germany2.xml support_files/definitions/germany/league_germany3b.xml support_files/definitions/germany/country_germany.xml support_files/definitions/scotland/league_scotland1.xml support_files/definitions/scotland/country_scotland.xml support_files/definitions/scotland/league_scotland2.xml support_files/definitions/scotland/league_scotland3.xml support_files/definitions/scotland/league_scotland4.xml support_files/definitions/scotland/cup_scotland_fa.xml support_files/definitions/scotland/cup_scotland_league.xml support_files/definitions/short_leagues_south_america/league_bolivia1_short.xml support_files/definitions/short_leagues_south_america/league_chile1_short.xml support_files/definitions/short_leagues_south_america/league_colombia1_short.xml support_files/definitions/short_leagues_south_america/league_ecuador1_short.xml support_files/definitions/short_leagues_south_america/league_mexico1_short.xml support_files/definitions/short_leagues_south_america/league_paraguay1_short.xml support_files/definitions/short_leagues_south_america/league_peru1_short.xml support_files/definitions/short_leagues_south_america/league_uruguay1_short.xml support_files/definitions/short_leagues_south_america/league_venezuela1_short.xml support_files/definitions/italy/league_italy1.xml support_files/definitions/italy/cup_italy_coppa.xml support_files/definitions/italy/league_italy2.xml support_files/definitions/italy/league_italy3a.xml support_files/definitions/italy/league_italy3b.xml support_files/definitions/italy/country_italy.xml support_files/definitions/argentina/league_argentina1.xml support_files/definitions/wales/league_wales1.xml support_files/definitions/wales/league_wales2a.xml support_files/definitions/wales/league_wales2b.xml support_files/definitions/wales/country_wales.xml support_files/definitions/wales/cup_wales_welsh.xml support_files/definitions/wales/cup_wales_challenge.xml support_files/definitions/wales/cup_wales_premier.xml support_files/definitions/wales/league_wales_english.xml support_files/definitions/wales/cup_wales_uefa_q.xml support_files/definitions/wales/cup_wales_uefa.xml support_files/definitions/wales/cup_wales_cl.xml support_files/definitions/wales/cup_wales_cl_q.xml support_files/definitions/ireland/country_ireland.xml support_files/definitions/ireland/cup_ireland_league.xml support_files/definitions/ireland/cup_ireland_senior.xml support_files/definitions/ireland/league_ireland1.xml support_files/definitions/ireland/league_n_ireland1.xml support_files/definitions/ireland/league_ireland2.xml support_files/definitions/ireland/cup_ireland_prom_games.xml support_files/definitions/ireland/cup_ireland_setanta.xml support_files/definitions/ireland/cup_ireland_cl.xml support_files/definitions/ireland/cup_ireland_cl_q.xml support_files/definitions/ireland/cup_ireland_uefa.xml support_files/definitions/ireland/cup_ireland_uefa_q.xml support_files/definitions/scg/country_scg.xml support_files/definitions/scg/cup_scg.xml support_files/definitions/scg/league_scg2a.xml support_files/definitions/scg/league_scg2b.xml support_files/definitions/scg/league_scg1.xml support_files/definitions/australia/league_australia1.xml support_files/definitions/australia/cup_australia_a_league.xml support_files/definitions/australia/country_australia.xml support_files/definitions/australia/cup_australia_playoffs.xml support_files/bygfoot_constants support_files/bygfoot_user.conf support_files/lg_commentary/lg_commentary_de.xml support_files/lg_commentary/lg_commentary_en.xml support_files/lg_commentary/lg_commentary_nl.xml support_files/bygfoot_app support_files/bygfoot_help support_files/bygfoot.conf.sav support_files/bygfoot_lg_tokens support_files/bygfoot-1.9-commentaries.tar.bz2 support_files/bygfoot-1.9-definitions.tar.bz2 +SUPPORT_FILES = support_files/names/player_names_brazil.xml support_files/names/player_names_england.xml support_files/names/player_names_belgium.xml support_files/names/player_names_usa.xml support_files/names/player_names_general.xml support_files/names/player_names_germany.xml support_files/names/player_names_romania.xml support_files/names/player_names_scotland.xml support_files/names/player_names_france.xml support_files/names/player_names_scg.xml support_files/names/player_names_italy.xml support_files/names/player_names_australia.xml support_files/names/player_names_poland.xml support_files/bygfoot.conf support_files/pixmaps/history/champion.png support_files/pixmaps/history/start_game.png support_files/pixmaps/history/fire_finance.png support_files/pixmaps/history/fire_failure.png support_files/pixmaps/history/job_offer.png support_files/pixmaps/history/end_season.png support_files/pixmaps/history/promoted.png support_files/pixmaps/history/relegated.png support_files/pixmaps/history/win_final.png support_files/pixmaps/history/lose_final.png support_files/pixmaps/history/reach_cup_round.png support_files/pixmaps/menu_history.png support_files/pixmaps/bygfoot_icon.png support_files/pixmaps/menu_league_stats.png support_files/pixmaps/new_week.png support_files/pixmaps/preview.png support_files/pixmaps/symbols/flag_germany.png support_files/pixmaps/symbols/flag_ch.png support_files/pixmaps/symbols/flag_cz.png support_files/pixmaps/symbols/flag_usa.png support_files/pixmaps/symbols/flag_dk.png support_files/pixmaps/symbols/flag_scg.png support_files/pixmaps/symbols/flag_es.png support_files/pixmaps/symbols/flag_eu.png support_files/pixmaps/symbols/flag_gr.png support_files/pixmaps/symbols/flag_hu.png support_files/pixmaps/symbols/flag_wales.png support_files/pixmaps/symbols/flag_nl.png support_files/pixmaps/symbols/flag_pt.png support_files/pixmaps/symbols/flag_ru.png support_files/pixmaps/symbols/flag_tr.png support_files/pixmaps/symbols/flag_uk.png support_files/pixmaps/symbols/flag_belgium.png support_files/pixmaps/symbols/flag_england.png support_files/pixmaps/symbols/flag_france.png support_files/pixmaps/symbols/flag_romania.png support_files/pixmaps/symbols/flag_brazil.png support_files/pixmaps/symbols/flag_scotland.png support_files/pixmaps/symbols/flag_ecuador.png support_files/pixmaps/symbols/flag_argentina.png support_files/pixmaps/symbols/flag_bolivia.png support_files/pixmaps/symbols/flag_chile.png support_files/pixmaps/symbols/flag_colombia.png support_files/pixmaps/symbols/flag_peru.png support_files/pixmaps/symbols/flag_paraguay.png support_files/pixmaps/symbols/flag_uruguay.png support_files/pixmaps/symbols/flag_venezuela.png support_files/pixmaps/symbols/flag_mexico.png support_files/pixmaps/symbols/flag_italy.png support_files/pixmaps/symbols/flag_ireland.png support_files/pixmaps/symbols/flag_n_ireland.png support_files/pixmaps/symbols/map_ireland.png support_files/pixmaps/symbols/flag_poland.png support_files/pixmaps/symbols/flag_czech.png support_files/pixmaps/symbols/flag_denmark.png support_files/pixmaps/symbols/flag_europa.png support_files/pixmaps/symbols/flag_greece.png support_files/pixmaps/symbols/flag_hungry.png support_files/pixmaps/symbols/flag_netherlands.png support_files/pixmaps/symbols/flag_nth_ireland.png support_files/pixmaps/symbols/flag_portugal.png support_files/pixmaps/symbols/flag_russia.png support_files/pixmaps/symbols/flag_serbiaMontenegro.png support_files/pixmaps/symbols/flag_serbia.png support_files/pixmaps/symbols/flag_spain.png support_files/pixmaps/symbols/flag_switzerland.png support_files/pixmaps/symbols/flag_turkey.png support_files/pixmaps/symbols/flag_ukraine.png support_files/pixmaps/symbols/flag_uraguay.png support_files/pixmaps/symbols/flag_australia.png support_files/pixmaps/transfers.png support_files/pixmaps/menu_league_results.png support_files/pixmaps/menu_table.png support_files/pixmaps/menu_fixtures_comp.png support_files/pixmaps/menu_fixtures.png support_files/pixmaps/menu_boost.png support_files/pixmaps/menu_browse_tms.png support_files/pixmaps/menu_finances.png support_files/pixmaps/menu_last_match.png support_files/pixmaps/live_game/sub.png support_files/pixmaps/live_game/red.png support_files/pixmaps/live_game/save.png support_files/pixmaps/live_game/goal.png support_files/pixmaps/live_game/yellow.png support_files/pixmaps/live_game/scoring_chance.png support_files/pixmaps/live_game/injury_temp.png support_files/pixmaps/live_game/injury.png support_files/pixmaps/live_game/structure_change.png support_files/pixmaps/live_game/whistle.png support_files/pixmaps/live_game/miss.png support_files/pixmaps/live_game/foul.png support_files/pixmaps/live_game/cross_bar.png support_files/pixmaps/live_game/post.png support_files/pixmaps/live_game/penalty.png support_files/pixmaps/live_game/stadium_brkn.png support_files/pixmaps/live_game/stadium_fire.png support_files/pixmaps/live_game/stadium_riot.png support_files/pixmaps/live_game/header.png support_files/pixmaps/live_game/goal_own.png support_files/pixmaps/live_game/lost_possession.png support_files/pixmaps/menu_match_stats.png support_files/pixmaps/menu_physio.png support_files/pixmaps/boost_anti.png support_files/pixmaps/boost_off.png support_files/pixmaps/boost_on.png support_files/pixmaps/menu_player_browse.png support_files/pixmaps/style_def.png support_files/pixmaps/style_atk.png support_files/pixmaps/style_bal.png support_files/pixmaps/style_all_atk.png support_files/pixmaps/style_all_def.png support_files/pixmaps/menu_player_contract.png support_files/pixmaps/menu_player_fire.png support_files/pixmaps/menu_player_info.png support_files/pixmaps/menu_player_put_transfer.png support_files/pixmaps/menu_player_remove_transfer.png support_files/pixmaps/table_up.png support_files/pixmaps/table_down.png support_files/pixmaps/table_stay.png support_files/pixmaps/menu_player_shoots.png support_files/pixmaps/menu_rearrange.png support_files/pixmaps/menu_scout.png support_files/pixmaps/menu_stadium.png support_files/pixmaps/menu_structure.png support_files/pixmaps/menu_style.png support_files/definitions/brazil/country_brazil.xml support_files/definitions/brazil/cup_brazil_prom_games2.xml support_files/definitions/brazil/cup_brazil_prom_games3.xml support_files/definitions/brazil/cup_brazil_prom_games4.xml support_files/definitions/brazil/cup_brazil_prom_games5.xml support_files/definitions/brazil/cup_brazil_prom_games6.xml support_files/definitions/brazil/league_brazil1.xml support_files/definitions/brazil/league_brazil2.xml support_files/definitions/brazil/league_brazil3.xml support_files/definitions/brazil/league_brazil4.xml support_files/definitions/brazil/league_brazil5.xml support_files/definitions/brazil/league_brazil6.xml support_files/definitions/brazil/cup_brazil_sul_am_bo_ve.xml support_files/definitions/brazil/cup_brazil_libertadores.xml support_files/definitions/brazil/cup_brazil_copa_do_brasil.xml support_files/definitions/brazil/cup_brazil_sul_am_br2.xml support_files/definitions/brazil/cup_brazil_sul_am_br1.xml support_files/definitions/brazil/cup_brazil_sul_am_br3.xml support_files/definitions/brazil/cup_brazil_sul_am_ar.xml support_files/definitions/brazil/cup_brazil_sul_am_br4.xml support_files/definitions/brazil/cup_brazil_sul_am_pa_ur.xml support_files/definitions/brazil/cup_brazil_sul_am_ch_pe.xml support_files/definitions/brazil/cup_brazil_sul_am_co_ec.xml support_files/definitions/brazil/cup_brazil_sul_am_knockout.xml support_files/definitions/brazil/cup_supercup_brazil_intercontinental.xml support_files/definitions/short_leagues/league_czech1_short.xml support_files/definitions/short_leagues/league_denmark1_short.xml support_files/definitions/short_leagues/league_greece1_short.xml support_files/definitions/short_leagues/league_netherlands1_short.xml support_files/definitions/short_leagues/league_portugal1_short.xml support_files/definitions/short_leagues/league_russia1_short.xml support_files/definitions/short_leagues/league_spain1_short.xml support_files/definitions/short_leagues/league_switzerland1_short.xml support_files/definitions/short_leagues/league_turkey1_short.xml support_files/definitions/short_leagues/league_ukraine1_short.xml support_files/definitions/europe/cup_europe_champ_league.xml support_files/definitions/europe/cup_europe_cwc.xml support_files/definitions/europe/league_europe_div.xml support_files/definitions/europe/cup_europe_uefa.xml support_files/definitions/europe/cup_supercup_europe_uefa.xml support_files/definitions/europe/cup_supercup_europe_intercontinental.xml support_files/definitions/misc/cup_supercup_league_vs_cup.xml support_files/definitions/belgium/country_belgium.xml support_files/definitions/belgium/bel.tar.bz2 support_files/definitions/belgium/league_belgium2.xml support_files/definitions/belgium/league_belgium1.xml support_files/definitions/belgium/league_belgium3a.xml support_files/definitions/belgium/league_belgium3b.xml support_files/definitions/belgium/league_belgium4a.xml support_files/definitions/belgium/league_belgium4b.xml support_files/definitions/belgium/league_belgium4c.xml support_files/definitions/belgium/league_belgium4d.xml support_files/definitions/belgium/cup_belgium_eindronde2.xml support_files/definitions/belgium/cup_belgium_eindronde4.xml support_files/definitions/belgium/cup_belgium_eindronde3.xml support_files/definitions/belgium/cup_belgium_beker.xml support_files/definitions/england/country_england.xml support_files/definitions/england/league_england1.xml support_files/definitions/england/league_england2.xml support_files/definitions/england/league_england3.xml support_files/definitions/england/league_england4.xml support_files/definitions/england/league_england5.xml support_files/definitions/england/cup_england_fa.xml support_files/definitions/england/cup_england_prom_games2.xml support_files/definitions/england/cup_england_league.xml support_files/definitions/england/cup_england_prom_games3.xml support_files/definitions/england/cup_england_prom_games4.xml support_files/definitions/england/cup_england_prom_games5.xml support_files/definitions/romania/country_romania.xml support_files/definitions/romania/cup_romania_cupa.xml support_files/definitions/romania/cup_supercup_romania.xml support_files/definitions/romania/league_romania1.xml support_files/definitions/romania/league_romania2.xml support_files/definitions/romania/league_romania3.xml support_files/definitions/france/country_france.xml support_files/definitions/france/cup_france_coupe.xml support_files/definitions/france/league_france1.xml support_files/definitions/france/league_france2.xml support_files/definitions/france/league_france3.xml support_files/definitions/france/cup_france_ligue.xml support_files/definitions/france/league_france4a.xml support_files/definitions/france/league_france4b.xml support_files/definitions/france/league_france4c.xml support_files/definitions/france/league_france4d.xml support_files/definitions/usa/league_usa_econf.xml support_files/definitions/usa/country_usa.xml support_files/definitions/usa/league_usa_wconf.xml support_files/definitions/usa/cup_usa_eplayoff.xml support_files/definitions/usa/cup_usa_wplayoff.xml support_files/definitions/usa/cup_usa_mls_cup.xml support_files/definitions/germany/cup_germany_dfb.xml support_files/definitions/germany/league_germany1.xml support_files/definitions/germany/league_germany3a.xml support_files/definitions/germany/league_germany2.xml support_files/definitions/germany/league_germany3b.xml support_files/definitions/germany/country_germany.xml support_files/definitions/scotland/league_scotland1.xml support_files/definitions/scotland/country_scotland.xml support_files/definitions/scotland/league_scotland2.xml support_files/definitions/scotland/league_scotland3.xml support_files/definitions/scotland/league_scotland4.xml support_files/definitions/scotland/cup_scotland_fa.xml support_files/definitions/scotland/cup_scotland_league.xml support_files/definitions/short_leagues_south_america/league_bolivia1_short.xml support_files/definitions/short_leagues_south_america/league_chile1_short.xml support_files/definitions/short_leagues_south_america/league_colombia1_short.xml support_files/definitions/short_leagues_south_america/league_ecuador1_short.xml support_files/definitions/short_leagues_south_america/league_mexico1_short.xml support_files/definitions/short_leagues_south_america/league_paraguay1_short.xml support_files/definitions/short_leagues_south_america/league_peru1_short.xml support_files/definitions/short_leagues_south_america/league_uruguay1_short.xml support_files/definitions/short_leagues_south_america/league_venezuela1_short.xml support_files/definitions/italy/league_italy1.xml support_files/definitions/italy/cup_italy_coppa.xml support_files/definitions/italy/league_italy2.xml support_files/definitions/italy/league_italy3a.xml support_files/definitions/italy/league_italy3b.xml support_files/definitions/italy/country_italy.xml support_files/definitions/argentina/league_argentina1.xml support_files/definitions/wales/league_wales1.xml support_files/definitions/wales/league_wales2a.xml support_files/definitions/wales/league_wales2b.xml support_files/definitions/wales/country_wales.xml support_files/definitions/wales/cup_wales_welsh.xml support_files/definitions/wales/cup_wales_challenge.xml support_files/definitions/wales/cup_wales_premier.xml support_files/definitions/wales/league_wales_english.xml support_files/definitions/wales/cup_wales_uefa_q.xml support_files/definitions/wales/cup_wales_uefa.xml support_files/definitions/wales/cup_wales_cl.xml support_files/definitions/wales/cup_wales_cl_q.xml support_files/definitions/ireland/country_ireland.xml support_files/definitions/ireland/cup_ireland_league.xml support_files/definitions/ireland/cup_ireland_senior.xml support_files/definitions/ireland/league_ireland1.xml support_files/definitions/ireland/league_n_ireland1.xml support_files/definitions/ireland/league_ireland2.xml support_files/definitions/ireland/cup_ireland_prom_games.xml support_files/definitions/ireland/cup_ireland_setanta.xml support_files/definitions/ireland/cup_ireland_cl.xml support_files/definitions/ireland/cup_ireland_cl_q.xml support_files/definitions/ireland/cup_ireland_uefa.xml support_files/definitions/ireland/cup_ireland_uefa_q.xml support_files/definitions/poland/league_poland1.xml support_files/definitions/poland/league_poland2.xml support_files/definitions/poland/league_poland3a.xml support_files/definitions/poland/league_poland3b.xml support_files/definitions/poland/league_poland3c.xml support_files/definitions/poland/league_poland3d.xml support_files/definitions/poland/country_poland.xml support_files/definitions/poland/cup_poland_prom_games1.xml support_files/definitions/poland/cup_poland_prom_games2.xml support_files/definitions/poland/cup_poland_puchar.xml support_files/definitions/scg/country_scg.xml support_files/definitions/scg/cup_scg.xml support_files/definitions/scg/league_scg2a.xml support_files/definitions/scg/league_scg2b.xml support_files/definitions/scg/league_scg1.xml support_files/definitions/australia/league_australia1.xml support_files/definitions/australia/cup_australia_a_league.xml support_files/definitions/australia/country_australia.xml support_files/definitions/australia/cup_australia_playoffs.xml support_files/bygfoot_constants support_files/bygfoot_user.conf support_files/lg_commentary/lg_commentary_de.xml support_files/lg_commentary/lg_commentary_en.xml support_files/lg_commentary/lg_commentary_nl.xml support_files/bygfoot_app support_files/bygfoot_help support_files/bygfoot.conf.sav support_files/bygfoot_lg_tokens install-data-local: @$(NORMAL_INSTALL) diff --git a/bygfoot.glade b/bygfoot.glade index 337a3162..2dd5f894 100644 --- a/bygfoot.glade +++ b/bygfoot.glade @@ -68,7 +68,7 @@ - + True gtk-revert-to-saved 1 @@ -136,7 +136,7 @@ - + True gtk-preferences 1 @@ -207,7 +207,7 @@ - + True menu_fixtures.png 0.5 @@ -228,7 +228,7 @@ - + True menu_fixtures_comp.png 0.5 @@ -249,7 +249,7 @@ - + True menu_table.png 0.5 @@ -270,7 +270,7 @@ - + True menu_league_results.png 0.5 @@ -297,7 +297,7 @@ - + True menu_league_stats.png 0.5 @@ -318,7 +318,7 @@ - + True menu_history.png 0.5 @@ -350,7 +350,7 @@ True - + True menu_style.png 0.5 @@ -428,7 +428,7 @@ True - + True menu_scout.png 0.5 @@ -495,7 +495,7 @@ True - + True menu_physio.png 0.5 @@ -555,6 +555,95 @@ + + + True + Youth academy + True + + + + + + + True + Show youth academy + True + + + + + + + + True + Youth coach + True + + + + + + + True + Best + True + True + + + + + + + True + Good + True + True + menu_yc_best + + + + + + + True + Average + True + True + menu_yc_best + + + + + + + True + Bad + True + True + menu_yc_best + + + + + + + + + + + True + Set the percentage of your income you want to spend on the youth academy + Set investment + True + + + + + + + + True @@ -562,7 +651,7 @@ True - + True menu_boost.png 0.5 @@ -625,7 +714,7 @@ - + True gtk-undo 1 @@ -646,7 +735,7 @@ - + True menu_structure.png 0.5 @@ -668,7 +757,7 @@ - + True menu_rearrange.png 0.5 @@ -694,7 +783,7 @@ - + True menu_browse_tms.png 0.5 @@ -727,7 +816,7 @@ - + True menu_player_info.png 0.5 @@ -747,7 +836,7 @@ - + True menu_player_put_transfer.png 0.5 @@ -767,7 +856,7 @@ - + True menu_player_remove_transfer.png 0.5 @@ -787,7 +876,7 @@ - + True menu_player_contract.png 0.5 @@ -807,7 +896,7 @@ - + True menu_player_fire.png 0.5 @@ -827,7 +916,7 @@ - + True menu_player_shoots.png 0.5 @@ -839,6 +928,15 @@ + + + True + Move to youth academy + True + + + + True @@ -853,7 +951,7 @@ - + True menu_player_browse.png 0.5 @@ -887,7 +985,7 @@ - + True menu_last_match.png 0.5 @@ -908,7 +1006,7 @@ - + True menu_match_stats.png 0.5 @@ -928,7 +1026,7 @@ - + True gtk-jump-to 1 @@ -956,7 +1054,7 @@ - + True menu_history.png 0.5 @@ -983,7 +1081,7 @@ - + True gtk-go-forward 1 @@ -1005,7 +1103,7 @@ - + True gtk-go-back 1 @@ -1027,7 +1125,7 @@ - + True gtk-justify-fill 1 @@ -1062,7 +1160,7 @@ - + True menu_finances.png 0.5 @@ -1083,7 +1181,7 @@ - + True menu_stadium.png 0.5 @@ -1116,7 +1214,7 @@ - + True gtk-dialog-info 1 @@ -1137,7 +1235,7 @@ - + True gtk-add 1 @@ -1158,7 +1256,7 @@ - + True gtk-help 1 @@ -2335,6 +2433,60 @@ + + + + True + Move to youth academy + True + + + + + + + + + + True + Move to team + True + + + + + True + gtk-go-back + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Kick out of academy + True + + + + + True + gtk-delete + 1 + 0.5 + 0.5 + 0 + 0 + + + + diff --git a/bygfoot_options.glade b/bygfoot_options.glade index 53897d22..bcd7d511 100644 --- a/bygfoot_options.glade +++ b/bygfoot_options.glade @@ -1036,6 +1036,26 @@ False 0 + + + True + Whether a confirmation popup is shown when you kick out a youth from your academy + True + Confirm removing youths + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + True diff --git a/po/bygfoot.pot b/po/bygfoot.pot index 7ef0305a..649e1983 100644 --- a/po/bygfoot.pot +++ b/po/bygfoot.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-07-06 17:44+0200\n" +"POT-Creation-Date: 2005-07-08 11:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,122 +16,122 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/callback_func.c:285 +#: src/callback_func.c:290 msgid "The bank doesn't grant you more money." msgstr "" -#: src/callback_func.c:291 +#: src/callback_func.c:296 #, c-format msgid "You can take out at most %s." msgstr "" -#: src/callback_func.c:293 +#: src/callback_func.c:298 msgid "Loan" msgstr "" -#: src/callback_func.c:305 +#: src/callback_func.c:310 msgid "You are not indebted." msgstr "" -#: src/callback_func.c:311 +#: src/callback_func.c:316 msgid "You don't have enough money to pay back." msgstr "" -#: src/callback_func.c:317 +#: src/callback_func.c:322 #, c-format msgid "You can pay back at most %s" msgstr "" -#: src/callback_func.c:319 +#: src/callback_func.c:324 msgid "Payback" msgstr "" -#: src/callback_func.c:341 +#: src/callback_func.c:346 msgid "There are no offers for the player." msgstr "" -#: src/callback_func.c:344 +#: src/callback_func.c:349 msgid "" "There are some offers for the player which you rejected or will see next " "week." msgstr "" -#: src/callback_func.c:353 +#: src/callback_func.c:358 msgid " more" msgstr "" -#: src/callback_func.c:355 +#: src/callback_func.c:360 msgid " less" msgstr "" -#: src/callback_func.c:357 +#: src/callback_func.c:362 #, c-format msgid "" "%s would like to buy %s. They offer %s for him, which is %s than the " "player's value. Do you accept?" msgstr "" -#: src/callback_func.c:383 src/callbacks.c:537 +#: src/callback_func.c:388 src/callbacks.c:562 msgid "Your offer has been removed." msgstr "" -#: src/callback_func.c:390 +#: src/callback_func.c:395 msgid "Your roster is already full. You can't buy more players." msgstr "" -#: src/callback_func.c:397 +#: src/callback_func.c:402 #, c-format msgid "" "You offered a transfer fee of %s and a wage of %s for %s. The owners and the " "player are satisfied with your offer. Do you still want to buy the player?" msgstr "" -#: src/callback_func.c:426 +#: src/callback_func.c:431 #, c-format msgid "User %s didn't consider your offer yet." msgstr "" -#: src/callback_func.c:434 +#: src/callback_func.c:438 msgid "" "The player is locked (the team owners are considering an offer currently)." msgstr "" -#: src/callback_func.c:441 src/callbacks.c:161 src/transfer.c:457 +#: src/callback_func.c:445 src/callbacks.c:158 src/transfer.c:455 msgid "The transfer deadline is over." msgstr "" -#: src/callback_func.c:453 +#: src/callback_func.c:457 #, c-format msgid "" "You are making an offer for %s. Your scout's recommendations for fee and " "wage are preset." msgstr "" -#: src/callback_func.c:456 src/callback_func.c:464 +#: src/callback_func.c:460 src/callback_func.c:468 msgid "Fee" msgstr "" -#: src/callback_func.c:457 src/callback_func.c:464 src/treeview.c:271 -#: src/treeview.c:1807 +#: src/callback_func.c:461 src/callback_func.c:468 src/treeview.c:271 +#: src/treeview.c:1816 msgid "Wage" msgstr "" -#: src/callback_func.c:461 +#: src/callback_func.c:465 #, c-format msgid "" "You are making an offer for %s again. Your previous values for fee and wage " "are preset." msgstr "" -#: src/callback_func.c:482 +#: src/callback_func.c:486 msgid "You can't offer a new contract if the old one is still above 2 years." msgstr "" -#: src/callback_func.c:487 +#: src/callback_func.c:491 msgid "The player won't negotiate with you anymore." msgstr "" -#: src/callback_func.c:501 +#: src/callback_func.c:505 #, c-format msgid "" "You are negotiating with %s about a new contract. Pay attention to what " @@ -141,109 +141,142 @@ msgid "" "Your scout's recommendations are preset:" msgstr "" -#: src/callback_func.c:626 +#: src/callback_func.c:630 #, c-format msgid "" "You want to fire %s. Since his contract expires in %.1f years, he demands a " "compensation of %s. Do you accept?" msgstr "" +#: src/callback_func.c:761 +msgid "" +"Right click to move players to and from the youth academy; left click for " +"context menu." +msgstr "" + #: src/callbacks.c:81 msgid "The current game state is unsaved and will be lost. Continue?" msgstr "" -#: src/callbacks.c:148 src/callbacks.c:401 +#: src/callbacks.c:146 src/callbacks.c:398 msgid "Transfers are disabled in this country definition." msgstr "" -#: src/callbacks.c:152 +#: src/callbacks.c:150 msgid "Left click to make an offer. Right click to remove offer." msgstr "" -#: src/callbacks.c:153 +#: src/callbacks.c:151 #, c-format msgid "Transfer deadline is Week %d" msgstr "" -#: src/callbacks.c:170 src/callbacks.c:565 src/callbacks.c:582 +#: src/callbacks.c:167 src/callbacks.c:597 src/callbacks.c:614 msgid "You still have some transfer business to manage." msgstr "" -#: src/callbacks.c:174 +#: src/callbacks.c:171 msgid "At least one user didn't take his turn this week. Continue?" msgstr "" -#: src/callbacks.c:180 +#: src/callbacks.c:177 msgid "There are injured or banned players in one of the user teams. Continue?" msgstr "" -#: src/callbacks.c:385 +#: src/callbacks.c:382 msgid "This is your first season." msgstr "" -#: src/callbacks.c:403 src/callbacks.c:419 src/callbacks.c:435 -#: src/callbacks.c:453 src/callbacks.c:798 src/callbacks.c:814 +#: src/callbacks.c:400 src/callbacks.c:416 src/callbacks.c:432 +#: src/callbacks.c:448 src/callbacks.c:476 src/callbacks.c:830 +#: src/callbacks.c:846 msgid "You haven't selected a player." msgstr "" -#: src/callbacks.c:405 +#: src/callbacks.c:402 msgid "The player is already on the list." msgstr "" -#: src/callbacks.c:421 +#: src/callbacks.c:418 msgid "The player is not on the list." msgstr "" -#: src/callbacks.c:437 +#: src/callbacks.c:434 msgid "Your team can't have less than 11 players." msgstr "" -#: src/callbacks.c:458 +#: src/callbacks.c:453 msgid "Penalty/free kick shooter deselected." msgstr "" -#: src/callbacks.c:464 +#: src/callbacks.c:459 #, c-format msgid "%s will shoot penalties and free kicks when he plays." msgstr "" -#: src/callbacks.c:539 +#: src/callbacks.c:482 +msgid "The player is too old for the youth academy." +msgstr "" + +#: src/callbacks.c:484 +msgid "You can't move the player, there are too few players in your team." +msgstr "" + +#: src/callbacks.c:487 +msgid "There is no room in your youth academy." +msgstr "" + +#: src/callbacks.c:564 msgid "You haven't made an offer for the player." msgstr "" -#: src/callbacks.c:598 +#: src/callbacks.c:630 msgid "Enter a structure. The digits must sum up to 10." msgstr "" -#: src/callbacks.c:599 +#: src/callbacks.c:631 msgid "Structure" msgstr "" -#: src/callbacks.c:632 src/callbacks.c:648 +#: src/callbacks.c:664 src/callbacks.c:680 msgid "No match stored." msgstr "" -#: src/callbacks.c:726 src/game_gui.c:309 +#: src/callbacks.c:758 src/game_gui.c:318 msgid "Boost ON is disabled in this country definition." msgstr "" -#: src/callbacks.c:748 +#: src/callbacks.c:780 msgid "Finances are disabled in this country definition." msgstr "" -#: src/callbacks.c:753 +#: src/callbacks.c:785 msgid "" "Left-click: get loan; Right-click: pay back; Middle click: stadium window." msgstr "" -#: src/callbacks.c:767 +#: src/callbacks.c:799 msgid "Stadium management is disabled in this country definition." msgstr "" -#: src/callbacks.c:792 +#: src/callbacks.c:824 msgid "Contracts are disabled in this country definition." msgstr "" +#: src/callbacks.c:1020 +msgid "" +"Set the percentage of your income you want to devote to your youth academy." +msgstr "" + +#: src/callbacks.c:1029 +#, c-format +msgid "You can't have more than %d players in the team." +msgstr "" + +#: src/callbacks.c:1049 +msgid "Do you really want to kick the poor boy out of your academy?" +msgstr "" + #: src/cup.c:799 msgid " -- Second leg" msgstr "" @@ -278,24 +311,24 @@ msgstr "" msgid "Quarter-final" msgstr "" -#: src/finance.c:100 +#: src/finance.c:116 msgid "You have to pay back your loan this week." msgstr "" -#: src/finance.c:104 +#: src/finance.c:120 msgid "Your bank account has to be above your drawing credit limit next week." msgstr "" -#: src/finance.c:167 +#: src/finance.c:181 #, c-format msgid "You have %d weeks to pay back your loan." msgstr "" -#: src/finance.c:190 +#: src/finance.c:202 msgid "You are free from debt." msgstr "" -#: src/finance.c:197 +#: src/finance.c:209 #, c-format msgid "You have %d weeks to pay back the rest of your loan." msgstr "" @@ -312,24 +345,24 @@ msgstr "" #. A goal scored with penalty. #. Penalty shooter. -#: src/game.c:867 src/treeview_helper.c:967 +#: src/game.c:878 src/treeview_helper.c:967 msgid " (P)" msgstr "" #. A goal scored with a free kick. -#: src/game.c:870 +#: src/game.c:881 msgid " (FK)" msgstr "" -#: src/game.c:872 +#: src/game.c:883 msgid " (OG)" msgstr "" -#: src/game_gui.c:333 +#: src/game_gui.c:350 msgid "Next week you'll fire him and hire a new one." msgstr "" -#: src/game_gui.c:548 +#: src/game_gui.c:588 #, c-format msgid "" "The team owners have fired you because of financial mismanagement. Luckily, " @@ -337,7 +370,7 @@ msgid "" "some information on %s:" msgstr "" -#: src/game_gui.c:551 +#: src/game_gui.c:591 #, c-format msgid "" "The team owners have fired you because of unsuccessfulness. Luckily, the " @@ -345,426 +378,459 @@ msgid "" "information on %s:" msgstr "" -#: src/game_gui.c:554 +#: src/game_gui.c:594 #, c-format msgid "" "The owners of %s are deeply impressed by your success with %s and would like " "to hire you. Here's some information on %s:" msgstr "" -#: src/game_gui.c:557 +#: src/game_gui.c:597 msgid "Accept?" msgstr "" -#: src/game_gui.c:559 +#: src/game_gui.c:599 msgid " (NOTE: If you don't, the game is over for you.)" msgstr "" -#: src/game_gui.c:610 +#: src/game_gui.c:649 #, c-format msgid "Job offers set to %s." msgstr "" -#: src/game_gui.c:617 +#: src/game_gui.c:656 #, c-format msgid "Live game set to %s." msgstr "" -#: src/game_gui.c:624 +#: src/game_gui.c:663 #, c-format msgid "Overwrite set to %s." msgstr "" -#: src/game_gui.c:644 +#: src/game_gui.c:681 msgid "" "Bygfoot is a very intuitive and simple game, so there isn't a full-grown " "documentation. However, if you have trouble, there are a few places to go.\n" msgstr "" -#: src/game_gui.c:646 +#: src/game_gui.c:683 msgid "" "At the Bygfoot forums you can report bugs, ask for help and discuss the game " "(you don't have to register):\n" msgstr "" -#: src/game_gui.c:648 +#: src/game_gui.c:685 msgid "" "\n" "If you feel you've found out something about the game that has to be shared, " "you can add it to the Bygfoot Wiki:\n" msgstr "" -#: src/interface.c:260 +#: src/interface.c:272 msgid "_File" msgstr "" -#: src/interface.c:275 +#: src/interface.c:287 msgid "L_oad last save" msgstr "" -#: src/interface.c:303 +#: src/interface.c:315 msgid "_Options" msgstr "" -#: src/interface.c:310 +#: src/interface.c:322 msgid "Preferences" msgstr "" -#: src/interface.c:326 +#: src/interface.c:338 msgid "Job offers" msgstr "" -#: src/interface.c:331 src/misc_interface.c:505 src/options_interface.c:488 +#: src/interface.c:343 src/misc_interface.c:505 src/options_interface.c:489 msgid "Live game" msgstr "" -#: src/interface.c:335 +#: src/interface.c:347 msgid "Overwrite" msgstr "" -#: src/interface.c:340 +#: src/interface.c:352 msgid "F_igures" msgstr "" -#: src/interface.c:347 +#: src/interface.c:359 msgid "Fixtures (week)" msgstr "" -#: src/interface.c:358 +#: src/interface.c:370 msgid "Fixtures (competitions)" msgstr "" -#: src/interface.c:369 +#: src/interface.c:381 msgid "Tables" msgstr "" -#: src/interface.c:380 +#: src/interface.c:392 msgid "My league results" msgstr "" -#: src/interface.c:396 +#: src/interface.c:408 msgid "League stats" msgstr "" -#: src/interface.c:407 +#: src/interface.c:419 msgid "Season history" msgstr "" -#: src/interface.c:418 +#: src/interface.c:430 msgid "_Team" msgstr "" -#: src/interface.c:425 src/treeview.c:1565 +#: src/interface.c:437 src/treeview.c:1574 msgid "Playing style" msgstr "" -#: src/interface.c:436 +#: src/interface.c:448 msgid "All Out Defend" msgstr "" -#: src/interface.c:442 src/treeview.c:1461 +#: src/interface.c:454 src/treeview.c:1470 msgid "Defend" msgstr "" -#: src/interface.c:448 +#: src/interface.c:460 msgid "Balanced" msgstr "" -#: src/interface.c:454 src/treeview.c:1463 +#: src/interface.c:466 src/treeview.c:1472 msgid "Attack" msgstr "" -#: src/interface.c:460 +#: src/interface.c:472 msgid "All Out Attack" msgstr "" -#: src/interface.c:466 src/treeview.c:1276 +#: src/interface.c:478 src/treeview.c:1276 msgid "Scout" msgstr "" -#: src/interface.c:477 src/interface.c:512 +#: src/interface.c:489 src/interface.c:524 src/interface.c:569 msgid "Best" msgstr "" -#: src/interface.c:483 src/interface.c:518 +#: src/interface.c:495 src/interface.c:530 src/interface.c:575 msgid "Good" msgstr "" -#: src/interface.c:489 src/interface.c:524 +#: src/interface.c:501 src/interface.c:536 src/interface.c:581 msgid "Average" msgstr "" -#: src/interface.c:495 src/interface.c:530 +#: src/interface.c:507 src/interface.c:542 src/interface.c:587 msgid "Bad" msgstr "" -#: src/interface.c:501 src/treeview.c:1275 +#: src/interface.c:513 src/treeview.c:1275 msgid "Physio" msgstr "" -#: src/interface.c:536 +#: src/interface.c:548 src/treeview.c:1278 +msgid "Youth academy" +msgstr "" + +#: src/interface.c:555 +msgid "Show youth academy" +msgstr "" + +#: src/interface.c:562 src/treeview.c:1277 +msgid "Youth coach" +msgstr "" + +#: src/interface.c:593 +msgid "Set investment" +msgstr "" + +#: src/interface.c:596 +msgid "" +"Set the percentage of your income you want to spend on the youth academy" +msgstr "" + +#: src/interface.c:598 msgid "Boost" msgstr "" -#: src/interface.c:547 +#: src/interface.c:609 msgid "On" msgstr "" -#: src/interface.c:553 +#: src/interface.c:615 msgid "Off" msgstr "" -#: src/interface.c:559 +#: src/interface.c:621 msgid "Anti" msgstr "" -#: src/interface.c:570 +#: src/interface.c:632 msgid "Reset player list" msgstr "" -#: src/interface.c:572 src/interface.c:1110 +#: src/interface.c:634 src/interface.c:1176 msgid "" "Reset player list to the formation at the beginning of the live game pause " "(right click on player list)" msgstr "" -#: src/interface.c:578 +#: src/interface.c:640 msgid "Enter custom structure" msgstr "" -#: src/interface.c:586 +#: src/interface.c:648 msgid "Rearrange team" msgstr "" -#: src/interface.c:589 +#: src/interface.c:651 msgid "" "Try to put the startup players onto their favoured positions and sort the " "substitutes (Ctrl-R or middle click)" msgstr "" -#: src/interface.c:603 +#: src/interface.c:665 msgid "Browse teams" msgstr "" -#: src/interface.c:611 +#: src/interface.c:673 msgid "_Player" msgstr "" -#: src/interface.c:618 src/interface.c:1627 +#: src/interface.c:680 src/interface.c:1726 msgid "Show info" msgstr "" -#: src/interface.c:626 src/interface.c:1631 +#: src/interface.c:688 src/interface.c:1730 msgid "Put on transfer list" msgstr "" -#: src/interface.c:634 src/interface.c:1635 +#: src/interface.c:696 src/interface.c:1734 msgid "Remove from transfer list" msgstr "" -#: src/interface.c:642 src/interface.c:1639 +#: src/interface.c:704 src/interface.c:1738 msgid "Offer new contract" msgstr "" -#: src/interface.c:650 src/interface.c:1643 +#: src/interface.c:712 src/interface.c:1742 msgid "Fire" msgstr "" -#: src/interface.c:658 src/interface.c:1647 +#: src/interface.c:720 src/interface.c:1746 msgid "Shoots penalties" msgstr "" -#: src/interface.c:671 -msgid "Browse players" -msgstr "" - -#: src/interface.c:679 -msgid "_User" -msgstr "" - -#: src/interface.c:686 -msgid "Show last match" -msgstr "" - -#: src/interface.c:697 -msgid "Show last match stats" -msgstr "" - -#: src/interface.c:708 -msgid "Show coming matches" -msgstr "" - -#: src/interface.c:721 -msgid "Show history" +#: src/interface.c:728 src/interface.c:1750 +msgid "Move to youth academy" msgstr "" #: src/interface.c:737 +msgid "Browse players" +msgstr "" + +#: src/interface.c:745 +msgid "_User" +msgstr "" + +#: src/interface.c:752 +msgid "Show last match" +msgstr "" + +#: src/interface.c:763 +msgid "Show last match stats" +msgstr "" + +#: src/interface.c:774 +msgid "Show coming matches" +msgstr "" + +#: src/interface.c:787 +msgid "Show history" +msgstr "" + +#: src/interface.c:803 msgid "Next user" msgstr "" -#: src/interface.c:748 +#: src/interface.c:814 msgid "Previous user" msgstr "" -#: src/interface.c:759 +#: src/interface.c:825 msgid "Manage users" msgstr "" -#: src/interface.c:770 +#: src/interface.c:836 msgid "Fin_Stad" msgstr "" -#: src/interface.c:777 +#: src/interface.c:843 msgid "Show finances" msgstr "" -#: src/interface.c:788 +#: src/interface.c:854 msgid "Show stadium" msgstr "" -#: src/interface.c:799 +#: src/interface.c:865 msgid "_Help" msgstr "" -#: src/interface.c:806 src/misc2_interface.c:1036 +#: src/interface.c:872 src/misc2_interface.c:1036 msgid "About" msgstr "" -#: src/interface.c:814 src/misc2_interface.c:1050 +#: src/interface.c:880 src/misc2_interface.c:1050 msgid "Contributors" msgstr "" -#: src/interface.c:822 src/misc2_interface.c:1076 +#: src/interface.c:888 src/misc2_interface.c:1076 msgid "Help" msgstr "" -#: src/interface.c:838 +#: src/interface.c:904 msgid "Load game (Ctrl - O)" msgstr "" -#: src/interface.c:848 +#: src/interface.c:914 msgid "Save game (Ctrl - S)" msgstr "" -#: src/interface.c:858 +#: src/interface.c:924 msgid "Quit (Ctrl - Q)" msgstr "" -#: src/interface.c:878 +#: src/interface.c:944 msgid "Back to main menu (Esc)" msgstr "" -#: src/interface.c:891 +#: src/interface.c:957 msgid "Show transferlist (T)" msgstr "" -#: src/interface.c:909 +#: src/interface.c:975 msgid "Begin a new week (Space)" msgstr "" -#: src/interface.c:940 +#: src/interface.c:1006 msgid " Season " msgstr "" -#: src/interface.c:945 src/interface.c:954 src/interface.c:962 -#: src/interface.c:1022 +#: src/interface.c:1011 src/interface.c:1020 src/interface.c:1028 +#: src/interface.c:1088 msgid "1" msgstr "" -#: src/interface.c:949 +#: src/interface.c:1015 msgid " Week " msgstr "" -#: src/interface.c:958 +#: src/interface.c:1024 msgid " Round " msgstr "" -#: src/interface.c:978 +#: src/interface.c:1044 msgid "Right click and left click to change your playing style" msgstr "" -#: src/interface.c:988 +#: src/interface.c:1054 msgid "Right click and left click to change boost state" msgstr "" -#: src/interface.c:1017 +#: src/interface.c:1083 msgid "Rank " msgstr "" -#: src/interface.c:1031 +#: src/interface.c:1097 msgid "Money " msgstr "" -#: src/interface.c:1036 +#: src/interface.c:1102 msgid "2000" msgstr "" -#: src/interface.c:1048 +#: src/interface.c:1114 msgid "" "First value: average current skill of the first 11 players. Second value: " "average skill of all players." msgstr "" -#: src/interface.c:1054 +#: src/interface.c:1120 msgid "Av. skills: " msgstr "" -#: src/interface.c:1096 +#: src/interface.c:1162 msgid "Player list 1" msgstr "" -#: src/interface.c:1104 +#: src/interface.c:1170 msgid "Player list 2" msgstr "" -#: src/interface.c:1128 +#: src/interface.c:1194 msgid "Previous league/cup (1)" msgstr "" -#: src/interface.c:1141 +#: src/interface.c:1207 msgid "Next league/cup (2)" msgstr "" -#: src/interface.c:1154 +#: src/interface.c:1220 msgid "Previous (Q)" msgstr "" -#: src/interface.c:1167 +#: src/interface.c:1233 msgid "Next (W)" msgstr "" -#: src/lg_commentary.c:499 src/team.c:500 +#: src/interface.c:1800 +msgid "Move to team" +msgstr "" + +#: src/interface.c:1808 +msgid "Kick out of academy" +msgstr "" + +#: src/lg_commentary.c:505 src/team.c:485 msgid "ALL OUT DEFEND" msgstr "" -#: src/lg_commentary.c:502 src/team.c:502 +#: src/lg_commentary.c:508 src/team.c:487 msgid "DEFEND" msgstr "" -#: src/lg_commentary.c:505 src/team.c:504 +#: src/lg_commentary.c:511 src/team.c:489 msgid "BALANCED" msgstr "" -#: src/lg_commentary.c:508 src/team.c:506 +#: src/lg_commentary.c:514 src/team.c:491 msgid "ATTACK" msgstr "" -#: src/lg_commentary.c:511 src/team.c:508 +#: src/lg_commentary.c:517 src/team.c:493 msgid "ALL OUT ATTACK" msgstr "" #. Boost value. -#: src/lg_commentary.c:514 src/team.c:516 +#: src/lg_commentary.c:520 src/team.c:501 msgid "ANTI" msgstr "" #. Boost value. -#: src/lg_commentary.c:517 src/team.c:519 +#: src/lg_commentary.c:523 src/team.c:504 msgid "OFF" msgstr "" #. Boost value. -#: src/lg_commentary.c:520 src/team.c:522 +#: src/lg_commentary.c:526 src/team.c:507 msgid "ON" msgstr "" @@ -840,65 +906,65 @@ msgstr "" msgid "Loading miscellaneous..." msgstr "" -#: src/misc2_callback_func.c:47 +#: src/misc2_callback_func.c:46 #, c-format msgid "%s couldn't afford to buy %s or his roster was full." msgstr "" -#: src/misc2_callback_func.c:51 +#: src/misc2_callback_func.c:50 #, c-format msgid "You didn't have enough money to buy %s or your roster was full." msgstr "" -#: src/misc2_callback_func.c:80 +#: src/misc2_callback_func.c:78 msgid "Your player roster is full or you don't enough money." msgstr "" -#: src/misc2_callback_func.c:118 +#: src/misc2_callback_func.c:115 #, c-format msgid "The structure value %d is invalid." msgstr "" -#: src/misc2_callback_func.c:160 +#: src/misc2_callback_func.c:156 #, c-format msgid "%s accepts your offer." msgstr "" -#: src/misc2_callback_func.c:169 +#: src/misc2_callback_func.c:163 #, c-format msgid "%s rejects your offer. You may still make %d offers." msgstr "" -#: src/misc2_callback_func.c:176 +#: src/misc2_callback_func.c:168 #, c-format msgid "" "%s rejects your offer and won't negotiate with you anymore. You should sell " "him before his contract expires (he'll simply leave your team otherwise)." msgstr "" -#: src/misc2_callbacks.c:112 +#: src/misc2_callbacks.c:113 msgid "Your offer has been updated." msgstr "" -#: src/misc2_callbacks.c:114 +#: src/misc2_callbacks.c:115 msgid "Your offer will be considered next week." msgstr "" -#: src/misc2_callbacks.c:280 +#: src/misc2_callbacks.c:290 msgid "You can't play Bygfoot without users!" msgstr "" -#: src/misc2_callbacks.c:285 +#: src/misc2_callbacks.c:295 #, c-format msgid "Remove user %s from the game?" msgstr "" -#: src/misc2_interface.c:71 src/window.c:445 +#: src/misc2_interface.c:71 src/window.c:460 msgid "Job offer" msgstr "" #: src/misc2_interface.c:97 src/treeview.c:246 src/treeview.c:617 -#: src/treeview.c:1797 +#: src/treeview.c:1806 msgid "Name" msgstr "" @@ -907,7 +973,7 @@ msgstr "" msgid "League" msgstr "" -#: src/misc2_interface.c:107 src/treeview.c:1544 +#: src/misc2_interface.c:107 src/treeview.c:1553 msgid "Rank" msgstr "" @@ -932,14 +998,14 @@ msgid "Average skill:" msgstr "" #. Player status: ok. -#: src/misc2_interface.c:221 src/player.c:1131 src/treeview_helper.c:1089 +#: src/misc2_interface.c:221 src/player.c:1136 src/treeview_helper.c:1089 msgid "OK" msgstr "" #: src/misc2_interface.c:434 src/misc2_interface.c:521 #: src/misc2_interface.c:1083 src/misc2_interface.c:1178 #: src/misc_interface.c:263 src/misc_interface.c:1018 -#: src/options_interface.c:978 +#: src/options_interface.c:984 msgid "Esc" msgstr "" @@ -1082,7 +1148,7 @@ msgstr "" msgid "_Resume last game" msgstr "" -#: src/misc_interface.c:409 src/window.c:475 +#: src/misc_interface.c:409 src/window.c:490 msgid "Select font" msgstr "" @@ -1213,360 +1279,370 @@ msgstr "" msgid "Reject for now" msgstr "" -#: src/options_interface.c:208 +#: src/options_interface.c:209 msgid "Confirm quit when not saved" msgstr "" -#: src/options_interface.c:211 +#: src/options_interface.c:212 msgid "" "Whether to show a confirmation popup when you press quit and the game state " "is not saved" msgstr "" -#: src/options_interface.c:213 +#: src/options_interface.c:214 msgid "Confirm when unfit" msgstr "" -#: src/options_interface.c:216 +#: src/options_interface.c:217 msgid "" "Whether to show a confirmation popup if a user team has an injured or banned " "player in the startup formation" msgstr "" -#: src/options_interface.c:218 +#: src/options_interface.c:219 msgid "Save overwrites" msgstr "" -#: src/options_interface.c:221 +#: src/options_interface.c:222 msgid "" "Whether 'Save' overwrites the current save file or pops up a 'Save as' window" msgstr "" -#: src/options_interface.c:223 +#: src/options_interface.c:224 msgid "Maximize main window" msgstr "" -#: src/options_interface.c:226 +#: src/options_interface.c:227 msgid "" "Whether game starts with a maximized main window (doesn't work with all " "window managers)" msgstr "" -#: src/options_interface.c:228 +#: src/options_interface.c:229 msgid "Prefer messages" msgstr "" -#: src/options_interface.c:231 +#: src/options_interface.c:232 msgid "" "Whether to show warnings and such in the message area in the main window " "when possible" msgstr "" -#: src/options_interface.c:233 +#: src/options_interface.c:234 msgid "Skip weeks without user matches" msgstr "" -#: src/options_interface.c:236 +#: src/options_interface.c:237 msgid "" "If checked, weeks without user teams playing are calculated automatically " "(without the user having to press 'New week')" msgstr "" -#: src/options_interface.c:255 +#: src/options_interface.c:256 msgid "Autosave interval " msgstr "" -#: src/options_interface.c:263 +#: src/options_interface.c:264 msgid "How often the game is saved automatically" msgstr "" -#: src/options_interface.c:266 +#: src/options_interface.c:267 msgid " Autosave files " msgstr "" -#: src/options_interface.c:274 +#: src/options_interface.c:275 msgid "How many files the autosave uses" msgstr "" -#: src/options_interface.c:276 +#: src/options_interface.c:277 msgid "Player attribute precision" msgstr "" -#: src/options_interface.c:283 +#: src/options_interface.c:284 msgid "Player list refresh rate" msgstr "" -#: src/options_interface.c:290 +#: src/options_interface.c:291 msgid "Constants file" msgstr "" -#: src/options_interface.c:302 src/options_interface.c:389 +#: src/options_interface.c:303 src/options_interface.c:390 msgid "Font used in treeviews" msgstr "" -#: src/options_interface.c:316 +#: src/options_interface.c:317 msgid "Font name" msgstr "" -#: src/options_interface.c:329 +#: src/options_interface.c:330 msgid "" "File containing settings which determine a lot of aspects of the game " "behaviour. DON'T CHANGE THIS UNLESS YOU REALLY KNOW WHAT YOU ARE DOING." msgstr "" -#: src/options_interface.c:334 +#: src/options_interface.c:335 msgid "Reload the constants file" msgstr "" -#: src/options_interface.c:348 +#: src/options_interface.c:349 msgid "Reload" msgstr "" -#: src/options_interface.c:352 +#: src/options_interface.c:353 msgid "Language" msgstr "" -#: src/options_interface.c:359 +#: src/options_interface.c:360 msgid "Autosave" msgstr "" -#: src/options_interface.c:364 +#: src/options_interface.c:365 msgid "Whether to automatically save the game regularly" msgstr "" -#: src/options_interface.c:372 +#: src/options_interface.c:373 msgid "How many digits after the comma there are for skill etc." msgstr "" -#: src/options_interface.c:381 +#: src/options_interface.c:382 msgid "" "How often the player list gets refreshed during a live game (in live game " "minutes)" msgstr "" -#: src/options_interface.c:396 +#: src/options_interface.c:397 msgid "" "Setting the language only works for installed packages (not for the binary " "package)" msgstr "" -#: src/options_interface.c:402 +#: src/options_interface.c:403 msgid "Global" msgstr "" -#: src/options_interface.c:414 +#: src/options_interface.c:415 msgid "Show live game" msgstr "" -#: src/options_interface.c:418 +#: src/options_interface.c:419 msgid "Show tendency bar" msgstr "" -#: src/options_interface.c:427 +#: src/options_interface.c:428 msgid "Live game speed factor" msgstr "" -#: src/options_interface.c:434 +#: src/options_interface.c:435 msgid "Live game verbosity" msgstr "" -#: src/options_interface.c:447 +#: src/options_interface.c:448 msgid "The lower this value the faster the live game commentary will scroll." msgstr "" -#: src/options_interface.c:456 +#: src/options_interface.c:457 msgid "The higher this value, the more commentary you'll see." msgstr "" -#: src/options_interface.c:459 +#: src/options_interface.c:460 msgid "Automatic substitutions" msgstr "" -#: src/options_interface.c:462 +#: src/options_interface.c:463 msgid "" "Whether the subs (e.g. for injured players) are made by the CPU. This is " "automatically done if the live game is off." msgstr "" -#: src/options_interface.c:473 +#: src/options_interface.c:474 msgid "Pause when injury" msgstr "" -#: src/options_interface.c:476 +#: src/options_interface.c:477 msgid "Whether the live game pauses when a user player is injured" msgstr "" -#: src/options_interface.c:478 +#: src/options_interface.c:479 msgid "Pause when red card" msgstr "" -#: src/options_interface.c:481 +#: src/options_interface.c:482 msgid "Whether the live game pauses when a user player is sent off" msgstr "" -#: src/options_interface.c:483 +#: src/options_interface.c:484 msgid "Pause when break" msgstr "" -#: src/options_interface.c:486 +#: src/options_interface.c:487 msgid "Whether the live game pauses at half time and extra time" msgstr "" -#: src/options_interface.c:500 +#: src/options_interface.c:501 +msgid "Confirm removing youths" +msgstr "" + +#: src/options_interface.c:504 +msgid "" +"Whether a confirmation popup is shown when you kick out a youth from your " +"academy" +msgstr "" + +#: src/options_interface.c:506 msgid "Show job offers" msgstr "" -#: src/options_interface.c:503 +#: src/options_interface.c:509 msgid "Whether to show job offers when a user is successful" msgstr "" -#: src/options_interface.c:508 +#: src/options_interface.c:514 msgid "Set to 0 to switch off warning" msgstr "" -#: src/options_interface.c:514 +#: src/options_interface.c:520 msgid "Show warning if a player contract gets below " msgstr "" -#: src/options_interface.c:524 +#: src/options_interface.c:530 msgid " months" msgstr "" -#: src/options_interface.c:528 +#: src/options_interface.c:534 msgid "Show all leagues in the fixture view" msgstr "" -#: src/options_interface.c:531 +#: src/options_interface.c:537 msgid "" "Whether in the weekly fixture view all leagues or only the user league is " "shown" msgstr "" -#: src/options_interface.c:542 +#: src/options_interface.c:548 msgid "Swap adapts structure" msgstr "" -#: src/options_interface.c:545 +#: src/options_interface.c:551 msgid "" "Whether swapping two players automatically adapts the team structure to the " "player positions" msgstr "" -#: src/options_interface.c:547 +#: src/options_interface.c:553 msgid "Show overall games/goals" msgstr "" -#: src/options_interface.c:550 +#: src/options_interface.c:556 msgid "Whether to show the player games/goals value in all competitions" msgstr "" -#: src/options_interface.c:552 +#: src/options_interface.c:558 msgid "Misc." msgstr "" -#: src/options_interface.c:560 +#: src/options_interface.c:566 msgid "Name " msgstr "" -#: src/options_interface.c:567 +#: src/options_interface.c:573 msgid "CPos " msgstr "" -#: src/options_interface.c:574 +#: src/options_interface.c:580 msgid "Pos " msgstr "" -#: src/options_interface.c:581 +#: src/options_interface.c:587 msgid "CSkill " msgstr "" -#: src/options_interface.c:588 +#: src/options_interface.c:594 msgid "Skill " msgstr "" -#: src/options_interface.c:595 +#: src/options_interface.c:601 msgid "Fitness " msgstr "" -#: src/options_interface.c:602 +#: src/options_interface.c:608 msgid "Games " msgstr "" -#: src/options_interface.c:609 +#: src/options_interface.c:615 msgid "Shots " msgstr "" -#: src/options_interface.c:616 +#: src/options_interface.c:622 msgid "Goals " msgstr "" -#: src/options_interface.c:623 +#: src/options_interface.c:629 msgid "Status " msgstr "" -#: src/options_interface.c:630 +#: src/options_interface.c:636 msgid "Cards " msgstr "" -#: src/options_interface.c:637 +#: src/options_interface.c:643 msgid "Age " msgstr "" -#: src/options_interface.c:644 +#: src/options_interface.c:650 msgid "ETal " msgstr "" -#: src/options_interface.c:651 +#: src/options_interface.c:657 msgid "Value " msgstr "" -#: src/options_interface.c:658 +#: src/options_interface.c:664 msgid "Wage " msgstr "" -#: src/options_interface.c:665 +#: src/options_interface.c:671 msgid "Contract " msgstr "" -#: src/options_interface.c:672 +#: src/options_interface.c:678 msgid "League " msgstr "" -#: src/options_interface.c:679 +#: src/options_interface.c:685 msgid "Team " msgstr "" -#: src/options_interface.c:916 +#: src/options_interface.c:922 msgid "Attribute " msgstr "" -#: src/options_interface.c:923 +#: src/options_interface.c:929 msgid "List 1 " msgstr "" -#: src/options_interface.c:930 +#: src/options_interface.c:936 msgid "List 2" msgstr "" -#: src/options_interface.c:944 +#: src/options_interface.c:950 msgid "Player attributes shown" msgstr "" -#: src/options_interface.c:961 +#: src/options_interface.c:967 msgid "Save global settings to file" msgstr "" -#: src/options_interface.c:964 +#: src/options_interface.c:970 msgid "" "Whether to save the global settings to file (so that they get loaded next " "time you start a new game)" msgstr "" -#: src/options_interface.c:966 +#: src/options_interface.c:972 msgid "Save user settings to file" msgstr "" -#: src/options_interface.c:969 +#: src/options_interface.c:975 msgid "" "Whether to save the user settings to file (so that they get loaded next time " "this user starts a new game)" @@ -1576,52 +1652,52 @@ msgstr "" msgid "You can't replace a banned player." msgstr "" -#: src/player.c:1023 +#: src/player.c:1032 #, c-format msgid "%s's contract expires in %.1f years." msgstr "" -#: src/player.c:1134 +#: src/player.c:1139 msgid "Concussion" msgstr "" -#: src/player.c:1137 +#: src/player.c:1142 msgid "Pulled muscle" msgstr "" -#: src/player.c:1140 +#: src/player.c:1145 msgid "Hamstring" msgstr "" -#: src/player.c:1143 +#: src/player.c:1148 msgid "Groin injury" msgstr "" -#: src/player.c:1146 +#: src/player.c:1151 msgid "Fractured ankle" msgstr "" -#: src/player.c:1149 +#: src/player.c:1154 msgid "Broken rib" msgstr "" -#: src/player.c:1152 +#: src/player.c:1157 msgid "Broken leg" msgstr "" -#: src/player.c:1155 +#: src/player.c:1160 msgid "Broken ankle" msgstr "" -#: src/player.c:1158 +#: src/player.c:1163 msgid "Broken arm" msgstr "" -#: src/player.c:1161 +#: src/player.c:1166 msgid "Broken shoulder" msgstr "" -#: src/player.c:1164 +#: src/player.c:1169 msgid "Torn crucial ligament" msgstr "" @@ -1630,75 +1706,75 @@ msgstr "" msgid "Couldn't find pixmap file: %s" msgstr "" -#: src/team.c:545 +#: src/team.c:528 #, c-format msgid "Team style changed to %s." msgstr "" -#: src/team.c:549 +#: src/team.c:532 #, c-format msgid "Boost changed to %s." msgstr "" #. a won match -#: src/team.c:974 +#: src/team.c:955 #, c-format msgid "W %d : %d" msgstr "" #. a lost match -#: src/team.c:980 +#: src/team.c:961 #, c-format msgid "L %d : %d" msgstr "" #. a drawn match -#: src/team.c:985 +#: src/team.c:966 #, c-format msgid "Dw %d : %d" msgstr "" #. a match at home -#: src/team.c:995 +#: src/team.c:976 #, c-format msgid "%s (H) " msgstr "" #. a match away -#: src/team.c:1001 +#: src/team.c:982 #, c-format msgid "%s (A) " msgstr "" #. a match on neutral ground -#: src/team.c:1011 +#: src/team.c:992 #, c-format msgid "%s (N) " msgstr "" #. draw -#: src/team.c:1061 +#: src/team.c:1042 msgid "Dw " msgstr "" #. lost -#: src/team.c:1065 +#: src/team.c:1046 msgid "L " msgstr "" #. won -#: src/team.c:1068 +#: src/team.c:1049 msgid "W " msgstr "" -#: src/transfer.c:450 +#: src/transfer.c:448 #, c-format msgid "%s has been added to the transfer list for %d weeks." msgstr "" #: src/treeview.c:121 src/treeview.c:273 src/treeview.c:618 -#: src/treeview.c:1149 src/treeview.c:1538 src/treeview.c:1666 -#: src/treeview.c:1958 +#: src/treeview.c:1149 src/treeview.c:1547 src/treeview.c:1675 +#: src/treeview.c:1967 msgid "Team" msgstr "" @@ -1744,7 +1820,7 @@ msgstr "" #. Goals of a player. #. Goals. -#: src/treeview.c:262 src/treeview.c:2077 +#: src/treeview.c:262 src/treeview.c:2086 msgid "Go" msgstr "" @@ -1758,7 +1834,7 @@ msgstr "" msgid "YC" msgstr "" -#: src/treeview.c:267 src/treeview.c:1804 +#: src/treeview.c:267 src/treeview.c:1813 msgid "Age" msgstr "" @@ -1767,11 +1843,11 @@ msgstr "" msgid "Etal" msgstr "" -#: src/treeview.c:270 src/treeview.c:1806 +#: src/treeview.c:270 src/treeview.c:1815 msgid "Value" msgstr "" -#: src/treeview.c:272 src/treeview.c:1808 +#: src/treeview.c:272 src/treeview.c:1817 msgid "Contract" msgstr "" @@ -1784,7 +1860,7 @@ msgstr "" msgid "Shots" msgstr "" -#: src/treeview.c:668 src/treeview.c:2022 +#: src/treeview.c:668 src/treeview.c:2031 msgid "Shot %" msgstr "" @@ -1895,7 +1971,7 @@ msgstr "" msgid "Stadium" msgstr "" -#: src/treeview.c:1250 src/window.c:288 +#: src/treeview.c:1250 src/window.c:304 #, c-format msgid "" "Improvement in progress.\n" @@ -1923,242 +1999,246 @@ msgstr "" msgid "Wages" msgstr "" -#: src/treeview.c:1277 +#: src/treeview.c:1279 msgid "Journey costs" msgstr "" #. Money paid to players a user fired. -#: src/treeview.c:1279 +#: src/treeview.c:1281 msgid "Compensations" msgstr "" #. Finances balance. -#: src/treeview.c:1290 +#: src/treeview.c:1292 msgid "Bi-weekly balance" msgstr "" #. Finances balance. -#: src/treeview.c:1315 +#: src/treeview.c:1317 msgid "Balance" msgstr "" -#: src/treeview.c:1333 +#: src/treeview.c:1335 msgid "Transfers" msgstr "" -#: src/treeview.c:1343 +#: src/treeview.c:1345 msgid "Stadium expenses" msgstr "" -#: src/treeview.c:1356 +#: src/treeview.c:1358 msgid "Money" msgstr "" -#: src/treeview.c:1360 +#: src/treeview.c:1362 msgid "Drawing credit" msgstr "" -#: src/treeview.c:1367 +#: src/treeview.c:1369 #, c-format msgid "Debt (repay in %d weeks)" msgstr "" -#: src/treeview.c:1376 +#: src/treeview.c:1378 msgid "Sponsor" msgstr "" #. Contract time and money a sponsor pays. -#: src/treeview.c:1381 +#: src/treeview.c:1383 #, c-format msgid "%.1f months / %s" msgstr "" -#: src/treeview.c:1383 +#: src/treeview.c:1385 msgid "Contract / Money" msgstr "" -#: src/treeview.c:1401 +#: src/treeview.c:1392 +msgid "Youth acad. invest." +msgstr "" + +#: src/treeview.c:1410 msgid "Income" msgstr "" -#: src/treeview.c:1402 +#: src/treeview.c:1411 msgid "Expenses" msgstr "" -#: src/treeview.c:1462 +#: src/treeview.c:1471 msgid "Midfield" msgstr "" -#: src/treeview.c:1510 +#: src/treeview.c:1519 msgid "Your next opponent" msgstr "" -#: src/treeview.c:1516 src/treeview.c:1521 +#: src/treeview.c:1525 src/treeview.c:1530 #, c-format msgid "Week %d Round %d" msgstr "" -#: src/treeview.c:1527 +#: src/treeview.c:1536 msgid "Neutral ground" msgstr "" -#: src/treeview.c:1529 +#: src/treeview.c:1538 msgid "Home" msgstr "" -#: src/treeview.c:1531 +#: src/treeview.c:1540 msgid "Away" msgstr "" -#: src/treeview.c:1562 +#: src/treeview.c:1571 msgid "Average skill" msgstr "" -#: src/treeview.c:1570 +#: src/treeview.c:1579 msgid "Team structure" msgstr "" -#: src/treeview.c:1576 +#: src/treeview.c:1585 msgid "Latest results" msgstr "" -#: src/treeview.c:1578 src/treeview.c:2045 src/treeview_helper.c:730 +#: src/treeview.c:1587 src/treeview.c:2054 src/treeview_helper.c:730 msgid "Goals" msgstr "" #. The user's results against a specific team. -#: src/treeview.c:1583 +#: src/treeview.c:1592 msgid "Your results" msgstr "" -#: src/treeview.c:1667 +#: src/treeview.c:1676 msgid "Results" msgstr "" -#: src/treeview.c:1798 +#: src/treeview.c:1807 msgid "Position" msgstr "" -#: src/treeview.c:1799 +#: src/treeview.c:1808 msgid "Current position" msgstr "" -#: src/treeview.c:1800 +#: src/treeview.c:1809 msgid "Skill" msgstr "" -#: src/treeview.c:1801 +#: src/treeview.c:1810 msgid "Current skill" msgstr "" -#: src/treeview.c:1802 +#: src/treeview.c:1811 msgid "Fitness" msgstr "" -#: src/treeview.c:1803 +#: src/treeview.c:1812 msgid "Estimated talent" msgstr "" -#: src/treeview.c:1805 +#: src/treeview.c:1814 msgid "Health" msgstr "" -#: src/treeview.c:1809 +#: src/treeview.c:1818 msgid "Games/Goals\n" msgstr "" #. 'Limit' is the number of yellow cards until a player gets #. banned automatically for a match. -#: src/treeview.c:1812 +#: src/treeview.c:1821 msgid "Yellow cards (limit)\n" msgstr "" -#: src/treeview.c:1813 +#: src/treeview.c:1822 msgid "Banned\n" msgstr "" -#: src/treeview.c:1814 +#: src/treeview.c:1823 msgid "Career values" msgstr "" -#: src/treeview.c:1815 +#: src/treeview.c:1824 msgid "" "New contract\n" "offers" msgstr "" #. Season. -#: src/treeview.c:1957 +#: src/treeview.c:1966 msgid "Sea" msgstr "" -#: src/treeview.c:1958 +#: src/treeview.c:1967 msgid "Week" msgstr "" -#: src/treeview.c:1986 +#: src/treeview.c:1995 msgid "Event" msgstr "" -#: src/treeview.c:2018 +#: src/treeview.c:2027 msgid "Best offensive teams" msgstr "" -#: src/treeview.c:2019 +#: src/treeview.c:2028 msgid "Best defensive teams" msgstr "" -#: src/treeview.c:2022 +#: src/treeview.c:2031 msgid "Best goal scorers" msgstr "" -#: src/treeview.c:2023 +#: src/treeview.c:2032 msgid "Best goalkeepers" msgstr "" #. % of saves for goalies (#goals / #shots) -#: src/treeview.c:2025 +#: src/treeview.c:2034 msgid "Save %" msgstr "" #. Goals per game. -#: src/treeview.c:2079 +#: src/treeview.c:2088 msgid "Go/Ga" msgstr "" -#: src/treeview.c:2174 +#: src/treeview.c:2183 msgid "League champions" msgstr "" -#: src/treeview.c:2175 +#: src/treeview.c:2184 msgid "Cup champions" msgstr "" -#: src/treeview.c:2220 +#: src/treeview.c:2229 #, c-format msgid "Season %d" msgstr "" -#: src/treeview.c:2319 +#: src/treeview.c:2328 msgid "Current league" msgstr "" #. Language is system-set (not user chosen). -#: src/treeview.c:2368 +#: src/treeview.c:2377 msgid "System" msgstr "" -#: src/treeview.c:2444 +#: src/treeview.c:2453 msgid "Company" msgstr "" -#: src/treeview.c:2445 +#: src/treeview.c:2454 msgid "" "Contract length\n" "(Months)" msgstr "" -#: src/treeview.c:2446 +#: src/treeview.c:2455 msgid "Money / week" msgstr "" @@ -2238,26 +2318,26 @@ msgstr "" msgid "F" msgstr "" -#: src/user.c:258 +#: src/user.c:261 #, c-format msgid "" "The owners of %s are not satisfied with the recent performance of the team. " "There are rumours they're looking for a new manager." msgstr "" -#: src/user.c:406 +#: src/user.c:415 #, c-format msgid "%s has left your team because his contract expired." msgstr "" -#: src/user.c:430 +#: src/user.c:438 #, c-format msgid "" "You have overdrawn your bank account. The team owners give you %d weeks to " "get above your drawing credit limit." msgstr "" -#: src/user.c:432 +#: src/user.c:440 #, c-format msgid "" "You have overdrawn your bank account once again. Bear in mind that after the " @@ -2265,33 +2345,33 @@ msgid "" "The team owners give you %d weeks to get above your drawing credit limit." msgstr "" -#: src/user.c:436 +#: src/user.c:443 #, c-format msgid "Have a look at the transfer list, there's an offer for %s." msgstr "" -#: src/user.c:441 +#: src/user.c:447 #, c-format msgid "" "Your offer for %s has been accepted. If you still want to buy him, go to the " "transfer list and left click on the player." msgstr "" -#: src/user.c:448 +#: src/user.c:453 #, c-format msgid "" "The owners of %s have rejected your offer (%s / %s) for %s. There was a " "better offer for the player than yours." msgstr "" -#: src/user.c:454 +#: src/user.c:458 #, c-format msgid "" "The owners of %s have rejected your offer (%s / %s) for %s. Neither the fee " "nor the wage you offered were acceptable, they say." msgstr "" -#: src/user.c:460 +#: src/user.c:463 #, c-format msgid "" "The owners of %s have rejected your offer (%s / %s) for %s. The team owners " @@ -2299,7 +2379,7 @@ msgid "" msgstr "" #. A player from a team has rejected a transfer offer. -#: src/user.c:467 +#: src/user.c:469 #, c-format msgid "" "%s of %s has rejected your offer (%s / %s). He wasn't satisfied with the " @@ -2307,7 +2387,7 @@ msgid "" msgstr "" #. Buy a player from a team. -#: src/user.c:474 +#: src/user.c:475 #, c-format msgid "You didn't have enough money to buy %s from %s." msgstr "" @@ -2318,25 +2398,25 @@ msgstr "" msgid "Your roster is full. You couldn't buy %s from %s." msgstr "" -#: src/user.c:485 +#: src/user.c:484 #, c-format msgid "" "%s's injury was so severe that he can't play football on a professional " "level anymore. He leaves your team." msgstr "" -#: src/user.c:488 +#: src/user.c:487 msgid " Fortunately he's got a cousin who can help your team out." msgstr "" #. Buy a team in a league. -#: src/user.c:676 +#: src/user.c:675 #, c-format msgid "You start the game with %s in the %s." msgstr "" #. Team fires, team in a league. -#: src/user.c:682 +#: src/user.c:681 #, c-format msgid "" "%s fires you because of financial mismanagement.\n" @@ -2344,7 +2424,7 @@ msgid "" msgstr "" #. Team fires, team in a league. -#: src/user.c:689 +#: src/user.c:688 #, c-format msgid "" "%s fires you because of unsuccessfulness.\n" @@ -2352,7 +2432,7 @@ msgid "" msgstr "" #. Team in a league. Leave team. -#: src/user.c:696 +#: src/user.c:695 #, c-format msgid "" "%s offer you a job in the %s.\n" @@ -2360,188 +2440,188 @@ msgid "" msgstr "" #. League name. -#: src/user.c:703 +#: src/user.c:702 #, c-format msgid "You finish the season in the %s on rank %d." msgstr "" #. League name. -#: src/user.c:709 +#: src/user.c:708 #, c-format msgid "You get promoted to the %s." msgstr "" #. League name. -#: src/user.c:714 +#: src/user.c:713 #, c-format msgid "You get relegated to the %s." msgstr "" #. Cup name, team name. -#: src/user.c:719 +#: src/user.c:718 #, c-format msgid "You win the %s final against %s." msgstr "" #. Cup name, team name. -#: src/user.c:725 +#: src/user.c:724 #, c-format msgid "You lose in the %s final against %s." msgstr "" #. Cup round name (e.g. Last 32), number, cup name. -#: src/user.c:732 +#: src/user.c:731 #, c-format msgid "You reach the %s (round %d) of the %s." msgstr "" #. League name. -#: src/user.c:738 +#: src/user.c:737 #, c-format msgid "You are champion of the %s!" msgstr "" #. Company name. -#: src/user.c:766 +#: src/user.c:765 msgid " Systems" msgstr "" #. Company name. -#: src/user.c:768 +#: src/user.c:767 msgid " Communications" msgstr "" #. Company name. -#: src/user.c:770 +#: src/user.c:769 msgid " Holdings" msgstr "" #. Company name. -#: src/user.c:772 +#: src/user.c:771 msgid " Industries" msgstr "" #. Company name. -#: src/user.c:774 +#: src/user.c:773 msgid " Company" msgstr "" #. Company name. -#: src/user.c:776 +#: src/user.c:775 msgid " Telecommunications" msgstr "" #. Company name. -#: src/user.c:778 +#: src/user.c:777 msgid " Labs" msgstr "" #. Company name. -#: src/user.c:780 +#: src/user.c:779 msgid " Technologies" msgstr "" #. Company name. -#: src/user.c:782 +#: src/user.c:781 msgid " Chemicals" msgstr "" #. Company name. -#: src/user.c:784 +#: src/user.c:783 msgid " Energy" msgstr "" #. Company name. -#: src/user.c:786 +#: src/user.c:785 msgid " Bank" msgstr "" #. Company name. -#: src/user.c:788 +#: src/user.c:787 msgid " Products" msgstr "" #. Company name. -#: src/user.c:790 +#: src/user.c:789 msgid " Software" msgstr "" #. Company name. -#: src/user.c:792 +#: src/user.c:791 msgid " Scientific" msgstr "" #. Company name. -#: src/user.c:794 +#: src/user.c:793 msgid " Financial" msgstr "" #. Company name. -#: src/user.c:796 +#: src/user.c:795 msgid " Petroleum" msgstr "" #. Company name. -#: src/user.c:798 +#: src/user.c:797 msgid " Restaurants" msgstr "" #. Company name. -#: src/user.c:800 +#: src/user.c:799 msgid " Data Systems" msgstr "" #. Company short name, leading to things like 'Marshall Data Systems Ltd.' -#: src/user.c:803 +#: src/user.c:802 msgid " Ltd." msgstr "" #. Company short name. -#: src/user.c:805 +#: src/user.c:804 msgid " Assoc." msgstr "" #. Company short name. -#: src/user.c:807 +#: src/user.c:806 msgid " Co." msgstr "" #. Company short name. -#: src/user.c:809 +#: src/user.c:808 msgid " Ent." msgstr "" #. Company short name. Copy the '&'. -#: src/user.c:811 +#: src/user.c:810 msgid " & Co." msgstr "" #. Company short name. -#: src/user.c:813 +#: src/user.c:812 msgid " Corp." msgstr "" #. Company short name. -#: src/user.c:815 +#: src/user.c:814 msgid " Group" msgstr "" #. Company addition, leading to 'Marshall & Sons Petroleum Co.'. Copy the '&'. -#: src/user.c:818 +#: src/user.c:817 msgid " & Sons" msgstr "" #. Company addition. Copy the '&'. -#: src/user.c:820 +#: src/user.c:819 msgid " & Daughters" msgstr "" #. Company addition. -#: src/user.c:822 +#: src/user.c:821 msgid " Bros." msgstr "" -#: src/user.c:902 +#: src/user.c:901 #, c-format msgid "" "Your current sponsor is satisfied with your results and would like to renew " @@ -2564,44 +2644,44 @@ msgstr "" msgid "All Files" msgstr "" -#: src/window.c:298 +#: src/window.c:314 msgid "No improvements currently in progress." msgstr "" -#: src/window.c:367 +#: src/window.c:383 #, c-format msgid "Welcome to Bygfoot %s" msgstr "" -#: src/window.c:404 +#: src/window.c:419 msgid "Erm..." msgstr "" -#: src/window.c:423 +#: src/window.c:438 msgid "Numbers..." msgstr "" -#: src/window.c:434 +#: src/window.c:449 msgid "Your stadium" msgstr "" -#: src/window.c:467 +#: src/window.c:482 msgid "Options" msgstr "" -#: src/window.c:490 +#: src/window.c:505 msgid "Contract offer" msgstr "" -#: src/window.c:498 +#: src/window.c:513 msgid "User management" msgstr "" -#: src/window.c:521 +#: src/window.c:536 msgid "Transfer offer" msgstr "" -#: src/window.c:529 +#: src/window.c:544 msgid "Sponsorship offers" msgstr "" diff --git a/src/Makefile.am b/src/Makefile.am index 6c355c4f..e304dc66 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -46,10 +46,10 @@ bygfoot_SOURCES = \ support.c support.h \ table.c cup.h league.h misc.h table.h variables.h \ team.c cup.h file.h fixture.h game_gui.h game.h league.h main.h maths.h misc.h option.h player.h team.h transfer.h user.h xml_team.h \ - transfer.c cup.h finance.h free.h game_gui.h main.h maths.h misc.h option.h player.h support.h team.h transfer.h treeview.h user.h \ + transfer.c callbacks.h cup.h finance.h free.h game_gui.h main.h maths.h misc.h option.h player.h support.h team.h transfer.h treeview.h user.h \ treeview.c cup.h finance.h fixture.h free.h game.h language.h league.h live_game.h maths.h misc.h option.h player.h support.h team.h transfer.h treeview.h treeview_helper.h user.h \ treeview_helper.c cup.h file.h fixture.h free.h league.h misc.h option.h player.h support.h team.h transfer.h treeview.h treeview_helper.h user.h variables.h \ - user.c cup.h finance.h fixture.h free.h game_gui.h league.h live_game.h main.h maths.h misc.h name.h option.h player.h support.h team.h transfer.h treeview.h user.h window.h \ + user.c cup.h finance.h fixture.h free.h game_gui.h league.h live_game.h main.h maths.h misc.h name.h option.h player.h support.h team.h transfer.h treeview.h user.h window.h youth_academy.h \ window.c callbacks.h file.h finance.h free.h game_gui.h gui.h interface.h league.h live_game.h load_save.h main.h misc2_interface.h misc_callback_func.h misc_interface.h option_gui.h option.h options_interface.h support.h transfer.h treeview.h treeview_helper.h user.h window.h \ xml.c cup.h file.h free.h gui.h league.h misc.h option.h support.h table.h transfer_struct.h user.h variables.h xml.h xml_loadsave_cup.h xml_loadsave_fixtures.h xml_loadsave_league.h xml_loadsave_league_stat.h xml_loadsave_live_game.h xml_loadsave_table.h xml_loadsave_teams.h xml_loadsave_transfers.h xml_loadsave_users.h \ xml_loadsave_cup.c cup.h file.h misc.h table.h team.h xml.h xml_loadsave_cup.h xml_loadsave_fixtures.h xml_loadsave_table.h xml_loadsave_teams.h \ @@ -68,7 +68,8 @@ bygfoot_SOURCES = \ xml_league.c cup_struct.h file.h free.h league.h misc.h table.h team.h variables.h xml_cup.h xml_league.h \ xml_lg_commentary.c free.h lg_commentary.h live_game.h misc.h variables.h xml_lg_commentary.h \ xml_name.c file.h free.h misc.h name.h variables.h xml_name.h \ - xml_team.c file.h free.h main.h misc.h option.h player.h team.h variables.h xml_team.h + xml_team.c file.h free.h main.h misc.h option.h player.h team.h variables.h xml_team.h \ + youth_academy.c user.h youth_academy.h bygfoot_LDADD = @PACKAGE_LIBS@ $(INTLLIBS) diff --git a/src/bygfoot.h b/src/bygfoot.h index 985afcd8..ba8630ce 100644 --- a/src/bygfoot.h +++ b/src/bygfoot.h @@ -124,6 +124,7 @@ typedef struct *file_chooser, *contract, *menu_player, + *menu_youth, *user_management, *wdebug, *help, diff --git a/src/callback_func.c b/src/callback_func.c index 31f61ae8..cc2a6a8f 100644 --- a/src/callback_func.c +++ b/src/callback_func.c @@ -75,13 +75,13 @@ callback_player_clicked(gint idx, GdkEventButton *event) if(event->button == 1) { - if(selected_row[0] == -1) + if(selected_row == -1) { - selected_row[0] = idx; + selected_row = idx; return; } - player_swap(current_user.tm, selected_row[0], + player_swap(current_user.tm, selected_row, current_user.tm, idx); if(opt_user_int("int_opt_user_swap_adapts") == 1 && current_user.tm->structure != @@ -94,7 +94,7 @@ callback_player_clicked(gint idx, GdkEventButton *event) game_gui_write_av_skills(); - selected_row[0] = -1; + selected_row = -1; treeview_show_user_player_list(); if(stat0 == STATUS_MAIN) @@ -104,13 +104,18 @@ callback_player_clicked(gint idx, GdkEventButton *event) { if(stat0 == STATUS_SHOW_TRANSFER_LIST) { - selected_row[0] = -1; + selected_row = -1; transfer_add_remove_user_player(player_of_idx_team(current_user.tm, idx)); } + else if(stat0 == STATUS_SHOW_YA) + { + selected_row = idx; + on_menu_move_to_youth_academy_activate(NULL, NULL); + } else { + selected_row = idx; window_show_menu_player((GdkEvent*)event); - selected_row[0] = idx; } } @@ -423,9 +428,8 @@ callback_transfer_list_clicked(gint button, gint idx) { if(team_is_user(tr->tm) != -1) { - sprintf(buf, _("User %s didn't consider your offer yet."), + game_gui_print_message(_("User %s didn't consider your offer yet."), user_from_team(tr->tm)->name->str); - game_gui_print_message(buf); } else callback_transfer_list_cpu(button, idx); @@ -734,3 +738,29 @@ callback_show_player_team(void) treeview_show_player_list_team(treeview_right, pl->team, current_user.scout % 10); } + +/** Show the youth players of the current user. */ +void +callback_show_youth_academy(void) +{ + gint i; + PlayerListAttribute attributes; + + for(i=0;ilen > 0) { stat0 = STATUS_SHOW_TRANSFER_LIST; game_gui_print_message(_("Left click to make an offer. Right click to remove offer.")); - sprintf(buf, _("Transfer deadline is Week %d"), transfer_get_deadline()); - game_gui_print_message_with_delay(buf); + game_gui_print_message_with_delay(_("Transfer deadline is Week %d"), transfer_get_deadline()); treeview_show_transfer_list(GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right"))); gtk_notebook_set_current_page(GTK_NOTEBOOK(lookup_widget(window.main, "notebook_player")), 1); @@ -208,9 +205,9 @@ on_player_list1_button_press_event (GtkWidget *widget, if(treeview_helper_select_row(GTK_TREE_VIEW(widget), event)) idx = treeview_helper_get_index(GTK_TREE_VIEW(widget), 0); - if(idx < 0 || idx - 1 == selected_row[0]) + if(idx < 0 || idx - 1 == selected_row) { - selected_row[0] = -1; + selected_row = -1; return FALSE; } @@ -235,7 +232,7 @@ on_button_browse_forward_clicked (GtkButton *button, callback_show_team(SHOW_NEXT); break; case STATUS_SHOW_PLAYER_INFO: - selected_row[0] = (selected_row[0] + 1) % current_user.tm->players->len; + selected_row = (selected_row + 1) % current_user.tm->players->len; on_menu_show_info_activate(NULL, NULL); break; case STATUS_SHOW_SEASON_HISTORY: @@ -261,7 +258,7 @@ on_button_browse_back_clicked (GtkButton *button, callback_show_team(SHOW_PREVIOUS); break; case STATUS_SHOW_PLAYER_INFO: - selected_row[0] = (selected_row[0] == 0) ? current_user.tm->players->len - 1 : selected_row[0] - 1; + selected_row = (selected_row == 0) ? current_user.tm->players->len - 1 : selected_row - 1; on_menu_show_info_activate(NULL, NULL); break; case STATUS_SHOW_SEASON_HISTORY: @@ -399,14 +396,14 @@ on_menu_put_on_transfer_list_activate (GtkMenuItem *menuitem, { if(sett_int("int_opt_disable_transfers")) game_gui_print_message(_("Transfers are disabled in this country definition.")); - else if(selected_row[0] == -1) + else if(selected_row == -1) game_gui_print_message(_("You haven't selected a player.")); - else if(query_transfer_player_is_on_list(player_of_idx_team(current_user.tm, selected_row[0]))) + else if(query_transfer_player_is_on_list(player_of_idx_team(current_user.tm, selected_row))) game_gui_print_message(_("The player is already on the list.")); else { setsav0; - transfer_add_remove_user_player(player_of_idx_team(current_user.tm, selected_row[0])); + transfer_add_remove_user_player(player_of_idx_team(current_user.tm, selected_row)); } } @@ -415,14 +412,14 @@ void on_menu_remove_from_transfer_list_activate (GtkMenuItem *menuitem, gpointer user_data) { - if(selected_row[0] == -1) + if(selected_row == -1) game_gui_print_message(_("You haven't selected a player.")); - else if(!query_transfer_player_is_on_list(player_of_idx_team(current_user.tm, selected_row[0]))) + else if(!query_transfer_player_is_on_list(player_of_idx_team(current_user.tm, selected_row))) game_gui_print_message(_("The player is not on the list.")); else { setsav0; - transfer_add_remove_user_player(player_of_idx_team(current_user.tm, selected_row[0])); + transfer_add_remove_user_player(player_of_idx_team(current_user.tm, selected_row)); } } @@ -431,14 +428,14 @@ void on_menu_fire_activate (GtkMenuItem *menuitem, gpointer user_data) { - if(selected_row[0] == -1) + if(selected_row == -1) game_gui_print_message(_("You haven't selected a player.")); else if(current_user.tm->players->len == 11) game_gui_show_warning(_("Your team can't have less than 11 players.")); else { - callback_fire_player(selected_row[0]); - selected_row[0] = -1; + callback_fire_player(selected_row); + selected_row = -1; } } @@ -447,11 +444,9 @@ void on_menu_shoots_penalties_activate (GtkMenuItem *menuitem, gpointer user_data) { - gchar buf[SMALL]; - - if(selected_row[0] == -1) + if(selected_row == -1) game_gui_print_message(_("You haven't selected a player.")); - else if(player_of_idx_team(current_user.tm, selected_row[0])->id == + else if(player_of_idx_team(current_user.tm, selected_row)->id == opt_user_int("int_opt_user_penalty_shooter")) { opt_user_set_int("int_opt_user_penalty_shooter", -1); @@ -461,16 +456,46 @@ on_menu_shoots_penalties_activate (GtkMenuItem *menuitem, } else { - sprintf(buf, _("%s will shoot penalties and free kicks when he plays."), - player_of_idx_team(current_user.tm, selected_row[0])->name->str); + game_gui_print_message(_("%s will shoot penalties and free kicks when he plays."), + player_of_idx_team(current_user.tm, selected_row)->name->str); opt_user_set_int("int_opt_user_penalty_shooter", - player_of_idx_team(current_user.tm, selected_row[0])->id); - game_gui_print_message(buf); + player_of_idx_team(current_user.tm, selected_row)->id); treeview_show_user_player_list(); setsav0; } } + +void +on_menu_move_to_youth_academy_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + Player *pl; + + if(selected_row == -1) + game_gui_print_message(_("You haven't selected a player.")); + else + { + pl = player_of_idx_team(current_user.tm, selected_row); + + if(pl->age > const_float("float_player_age_lower")) + game_gui_print_message(_("The player is too old for the youth academy.")); + else if(current_user.tm->players->len <= 11) + game_gui_print_message(_("You can't move the player, there are too few players in your team.")); + else if(current_user.youth_academy.players->len == + const_int("int_youth_academy_max_youths")) + game_gui_print_message(_("There is no room in your youth academy.")); + else + { + player_move_to_ya(selected_row); + treeview_show_user_player_list(); + on_menu_show_youth_academy_activate(NULL, NULL); + selected_row = -1; + } + } +} + + void on_menu_my_league_results_activate (GtkMenuItem *menuitem, gpointer user_data) @@ -549,6 +574,13 @@ on_treeview_right_button_press_event (GtkWidget *widget, case STATUS_SHOW_PLAYER_LIST: callback_show_player_team(); break; + case STATUS_SHOW_YA: + selected_row = idx - 1; + if(event->button == 3) + on_menu_youth_move_to_team_activate(NULL, NULL); + else + window_show_menu_youth((GdkEvent*)event); + break; } gui_set_arrows(); @@ -793,13 +825,13 @@ on_menu_offer_new_contract_activate (GtkMenuItem *menuitem, return; } - if(selected_row[0] == -1) + if(selected_row == -1) { game_gui_print_message(_("You haven't selected a player.")); return; } - callback_offer_new_contract(selected_row[0]); + callback_offer_new_contract(selected_row); setsav0; } @@ -809,7 +841,7 @@ void on_menu_show_info_activate (GtkMenuItem *menuitem, gpointer user_data) { - if(selected_row[0] == -1) + if(selected_row == -1) { game_gui_print_message(_("You haven't selected a player.")); return; @@ -817,7 +849,7 @@ on_menu_show_info_activate (GtkMenuItem *menuitem, if(stat0 != STATUS_LIVE_GAME_PAUSE) stat0 = STATUS_SHOW_PLAYER_INFO; - treeview_show_player_info(player_of_idx_team(current_user.tm, selected_row[0])); + treeview_show_player_info(player_of_idx_team(current_user.tm, selected_row)); gui_set_arrows(); } @@ -866,6 +898,15 @@ on_player_menu_shoots_penalties_activate on_menu_shoots_penalties_activate(NULL, NULL); } +void +on_player_menu_move_to_youth_academy_activate + (GtkMenuItem *menuitem, + gpointer user_data) +{ + on_menu_move_to_youth_academy_activate(NULL, NULL); +} + + void on_menu_browse_players_activate (GtkMenuItem *menuitem, gpointer user_data) @@ -962,3 +1003,56 @@ on_button_quit_button_press_event (GtkWidget *widget, return FALSE; } + +void +on_menu_show_youth_academy_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + callback_show_youth_academy(); + stat0 = STATUS_SHOW_YA; +} + +void +on_menu_set_investment_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + stat1 = STATUS_SET_YA_PERCENTAGE; + window_show_digits(_("Set the percentage of your income you want to devote to your youth academy."), + NULL, -1, "%", current_user.youth_academy.percentage); +} + +void +on_menu_youth_move_to_team_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + if(current_user.tm->players->len == const_int("int_team_max_players")) + game_gui_print_message(_("You can't have more than %d players in the team."), + const_int("int_team_max_players")); + else + { + player_move_from_ya(selected_row); + treeview_show_user_player_list(); + on_menu_show_youth_academy_activate(NULL, NULL); + selected_row = -1; + } +} + + +void +on_menu_youth_kick_out_of_academy_activate + (GtkMenuItem *menuitem, + gpointer user_data) +{ + if(opt_user_int("int_opt_user_confirm_youth")) + { + stat1 = STATUS_QUERY_KICK_YOUTH; + window_show_yesno(_("Do you really want to kick the poor boy out of your academy?")); + } + else + { + free_player(&g_array_index(current_user.youth_academy.players, Player, selected_row)); + g_array_remove_index(current_user.youth_academy.players, selected_row); + on_menu_show_youth_academy_activate(NULL, NULL); + selected_row = -1; + } +} diff --git a/src/callbacks.h b/src/callbacks.h index 135176e3..534eb0df 100644 --- a/src/callbacks.h +++ b/src/callbacks.h @@ -248,7 +248,6 @@ on_menu_reset_players_activate (GtkMenuItem *menuitem, void on_menu_league_stats_activate (GtkMenuItem *menuitem, gpointer user_data); -#endif gboolean on_button_quit_button_press_event (GtkWidget *widget, @@ -267,3 +266,30 @@ void on_menu_user_show_coming_matches_activate (GtkMenuItem *menuitem, gpointer user_data); + +void +on_menu_show_youth_academy_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_menu_set_investment_activate (GtkMenuItem *menuitem, + gpointer user_data); +#endif + +void +on_menu_move_to_youth_academy_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_player_menu_move_to_youth_academy_activate + (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_menu_youth_move_to_team_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_menu_youth_kick_out_of_academy_activate + (GtkMenuItem *menuitem, + gpointer user_data); diff --git a/src/debug.c b/src/debug.c index bb7d167d..09746c25 100644 --- a/src/debug.c +++ b/src/debug.c @@ -9,17 +9,15 @@ void debug_action(const gchar *text, gint value) { - gchar message[SMALL]; - if(g_str_has_prefix(text, "deb")) { opt_set_int("int_opt_debug", value); - sprintf(message, "Debug value set to %d.", value); + game_gui_print_message("Debug value set to %d.", value); } else if(g_str_has_prefix(text, "cap")) { current_user.tm->stadium.capacity += value; - sprintf(message, "Stadium capacity changed by %d. New: %d.", value, + game_gui_print_message("Stadium capacity changed by %d. New: %d.", value, current_user.tm->stadium.capacity); } else if(g_str_has_prefix(text, "saf")) @@ -27,19 +25,19 @@ debug_action(const gchar *text, gint value) current_user.tm->stadium.safety += ((gfloat)value / 100); current_user.tm->stadium.safety = CLAMP(current_user.tm->stadium.safety, 0, 1); - sprintf(message, "Stadium safety changed by %d. New: %.2f", value, + game_gui_print_message("Stadium safety changed by %d. New: %.2f", value, current_user.tm->stadium.safety); } else if(g_str_has_prefix(text, "mon")) { current_user.money += value; - sprintf(message, "Money changed by %d. New: %d.", value, + game_gui_print_message("Money changed by %d. New: %d.", value, current_user.money); } else if(g_str_has_prefix(text, "suc")) { current_user.counters[COUNT_USER_SUCCESS] += value; - sprintf(message, "Success counter changed by %d. New: %d.", value, + game_gui_print_message("Success counter changed by %d. New: %d.", value, current_user.counters[COUNT_USER_SUCCESS]); } else if(g_str_has_prefix(text, "help")) @@ -51,10 +49,8 @@ debug_action(const gchar *text, gint value) "mon \t change money\n" "suc \t change success counter\n" "help \t display this help\n"); - strcpy(message, ""); } - game_gui_print_message(message); setsav0; } diff --git a/src/enums.h b/src/enums.h index 5f28ded3..d48912bf 100644 --- a/src/enums.h +++ b/src/enums.h @@ -102,6 +102,9 @@ enum Status0Value STATUS_QUERY_USER_NO_TURN, STATUS_GENERATE_TEAMS, STATUS_SPONSOR_CONTINUE, + STATUS_SHOW_YA, + STATUS_SET_YA_PERCENTAGE, + STATUS_QUERY_KICK_YOUTH, STATUS_END }; diff --git a/src/file.c b/src/file.c index 31db46d3..ac62edfb 100644 --- a/src/file.c +++ b/src/file.c @@ -426,7 +426,6 @@ file_load_opt_file(const gchar *filename, OptionList *optionlist) new.string_value = NULL; sscanf(opt_value, "%d", &new.value); } - g_array_append_val(optionlist->list, new); } diff --git a/src/finance.c b/src/finance.c index ac679d8b..d87e2010 100644 --- a/src/finance.c +++ b/src/finance.c @@ -24,6 +24,11 @@ finance_update_user_weekly(User *user) const_float("float_finance_scout_factor2"), const_float("float_finance_scout_factor3"), const_float("float_finance_scout_factor4")}; + gfloat yc_factor[4] = + {const_float("float_finance_yc_factor1"), + const_float("float_finance_yc_factor2"), + const_float("float_finance_yc_factor3"), + const_float("float_finance_yc_factor4")}; if(sett_int("int_opt_disable_finances")) return; @@ -46,6 +51,11 @@ finance_update_user_weekly(User *user) user->money_in[1][MON_IN_SPONSOR] += user->sponsor.benefit; user->sponsor.contract = MAX(user->sponsor.contract - 1, 0); + user->money -= (gint)rint((gfloat)user->sponsor.benefit * + (gfloat)user->youth_academy.percentage / 100); + user->money_out[1][MON_OUT_YA] -= (gint)rint((gfloat)user->sponsor.benefit * + (gfloat)user->youth_academy.percentage / 100); + if(user->counters[COUNT_USER_NEW_SPONSOR] > 1) user->counters[COUNT_USER_NEW_SPONSOR]--; else if(user->sponsor.contract == 4 && @@ -74,6 +84,12 @@ finance_update_user_weekly(User *user) user->money_out[1][MON_OUT_SCOUT] -= (gint)(finance_wage_unit(tm) * scout_factor[user->scout % 10]); user->money -= (gint)(finance_wage_unit(tm) * scout_factor[user->scout % 10]); + if(user->youth_academy.players->len > 0) + { + user->money_out[1][MON_OUT_YC] -= (gint)(finance_wage_unit(tm) * yc_factor[user->youth_academy.coach % 10]); + user->money -= (gint)(finance_wage_unit(tm) * yc_factor[user->youth_academy.coach % 10]); + } + user->debt = (gint)rint((gfloat)user->debt * (1 + const_float("float_finance_interest"))); if(user->money < -finance_team_drawing_credit_loan(user->tm, FALSE) && @@ -155,8 +171,6 @@ finance_team_drawing_credit_loan(const Team *tm, gboolean loan) void finance_get_loan(gint value) { - gchar buf[SMALL]; - current_user.money += value; current_user.debt -= value; @@ -164,11 +178,10 @@ finance_get_loan(gint value) const_int("int_finance_payback_weeks") : current_user.counters[COUNT_USER_LOAN]; - sprintf(buf, _("You have %d weeks to pay back your loan."), - current_user.counters[COUNT_USER_LOAN]); + game_gui_print_message(_("You have %d weeks to pay back your loan."), + current_user.counters[COUNT_USER_LOAN]); on_menu_show_finances_activate(NULL, NULL); - game_gui_print_message(buf); } @@ -177,7 +190,6 @@ finance_get_loan(gint value) void finance_pay_loan(gint value) { - gchar buf[SMALL]; gint add = (gint)rint((gfloat)value / (gfloat)(-current_user.debt) * (gfloat)const_int("int_finance_payback_weeks")); @@ -187,19 +199,18 @@ finance_pay_loan(gint value) if(current_user.debt == 0) { current_user.counters[COUNT_USER_LOAN] = -1; - strcpy(buf, _("You are free from debt.")); + game_gui_print_message(_("You are free from debt.")); } else { current_user.counters[COUNT_USER_LOAN] = MIN(current_user.counters[COUNT_USER_LOAN] + add, const_int("int_finance_payback_weeks")); - sprintf(buf, _("You have %d weeks to pay back the rest of your loan."), - current_user.counters[COUNT_USER_LOAN]); + game_gui_print_message(_("You have %d weeks to pay back the rest of your loan."), + current_user.counters[COUNT_USER_LOAN]); } on_menu_show_finances_activate(NULL, NULL); - game_gui_print_message(buf); } /** Return the cost of a stadium improvement. diff --git a/src/free.c b/src/free.c index 71a484a0..2f8e8dbe 100644 --- a/src/free.c +++ b/src/free.c @@ -126,6 +126,8 @@ free_user(User *user) g_string_free(g_array_index(user->history, UserHistory, i).value_string, TRUE); free_g_array(&user->history); + + free_player_array(&user->youth_academy.players); } /** Free a user event. */ @@ -345,20 +347,27 @@ free_teams_array(GArray **teams, gboolean reset) void free_team(Team *tm) { - gint i; - free_g_string(&tm->stadium.name); free_g_string(&tm->name); free_g_string(&tm->names_file); free_g_string(&tm->symbol); free_g_string(&tm->def_file); - if(tm->players != NULL) - { - for(i=0;iplayers->len;i++) - free_player(&g_array_index(tm->players, Player, i)); + free_player_array(&tm->players); +} - free_g_array(&tm->players); +/** Free an array containing players. */ +void +free_player_array(GArray **players) +{ + gint i; + + if(*players != NULL) + { + for(i=0;i<(*players)->len;i++) + free_player(&g_array_index((*players), Player, i)); + + free_g_array(players); } } diff --git a/src/free.h b/src/free.h index e87c507a..ffaa193c 100644 --- a/src/free.h +++ b/src/free.h @@ -58,6 +58,9 @@ free_variables(void); void free_g_string_array(GPtrArray **array); +void +free_player_array(GArray **players); + void free_player(Player *pl); diff --git a/src/game.c b/src/game.c index 60e21eb6..9104e30d 100644 --- a/src/game.c +++ b/src/game.c @@ -257,6 +257,13 @@ game_initialize(Fixture *fix) usr(user_idx[0]).money += ticket_income; usr(user_idx[0]).money_in[1][MON_IN_TICKET] += ticket_income; + usr(user_idx[0]).money -= + (gint)rint((gfloat)ticket_income * + (gfloat)usr(user_idx[0]).youth_academy.percentage / 100); + usr(user_idx[0]).money_out[1][MON_OUT_YA] -= + (gint)rint((gfloat)ticket_income * + (gfloat)usr(user_idx[0]).youth_academy.percentage / 100); + if(debug < 50) { fix->teams[0]->stadium.safety -= @@ -279,6 +286,10 @@ game_initialize(Fixture *fix) g_array_index(fix->teams[i]->players, Player, j).career[PLAYER_VALUE_GAMES]++; g_array_index(fix->teams[i]->players, Player, j).participation = TRUE; + + if(query_player_is_youth((&g_array_index(fix->teams[i]->players, Player, j)))) + g_array_index(fix->teams[i]->players, Player, j).lsu += + const_float("float_youth_lsu_addition_match"); } } } @@ -629,7 +640,7 @@ game_substitute_player(Team *tm, gint player_number) { game_gui_write_av_skills(); - selected_row[0] = -1; + selected_row = -1; treeview_show_user_player_list(); } @@ -757,7 +768,7 @@ game_substitute_player_send_off(gint clid, Team *tm, gint player_number, { game_gui_write_av_skills(); - selected_row[0] = -1; + selected_row = -1; treeview_show_user_player_list(); } } diff --git a/src/game_gui.c b/src/game_gui.c index de4b632c..e49414eb 100644 --- a/src/game_gui.c +++ b/src/game_gui.c @@ -153,7 +153,8 @@ game_gui_live_game_set_hscale(const LiveGameUnit *unit, GtkHScale *hscale) /** Look up the widgets in the main window. */ void game_gui_get_radio_items(GtkWidget **style, GtkWidget **scout, - GtkWidget **physio, GtkWidget **boost) + GtkWidget **physio, GtkWidget **boost, + GtkWidget **yc) { style[0] = lookup_widget(window.main, "menu_all_out_defend"); style[1] = lookup_widget(window.main, "menu_defend"); @@ -174,6 +175,11 @@ game_gui_get_radio_items(GtkWidget **style, GtkWidget **scout, boost[0] = lookup_widget(window.main, "menu_boost_anti"); boost[1] = lookup_widget(window.main, "menu_boost_off"); boost[2] = lookup_widget(window.main, "menu_boost_on"); + + yc[0] = lookup_widget(window.main, "menu_yc_best"); + yc[1] = lookup_widget(window.main, "menu_yc_good"); + yc[2] = lookup_widget(window.main, "menu_yc_average"); + yc[3] = lookup_widget(window.main, "menu_yc_bad"); } /** Set information like season, user, week etc. into the appropriate labels. */ @@ -247,14 +253,16 @@ game_gui_write_av_skills(void) void game_gui_write_radio_items(void) { - GtkWidget *style[5], *scout[4], *physio[4], *boost[3]; + GtkWidget *style[5], *scout[4], *physio[4], + *boost[3], *yc[4]; - game_gui_get_radio_items(style, scout, physio, boost); + game_gui_get_radio_items(style, scout, physio, boost, yc); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(style[current_user.tm->style + 2]), TRUE); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(scout[current_user.scout % 10]), TRUE); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(physio[current_user.physio % 10]), TRUE); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(boost[current_user.tm->boost + 1]), TRUE); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(yc[current_user.youth_academy.coach % 10]), TRUE); } /** Set the appropriate images for the style and boost meters. */ @@ -291,12 +299,13 @@ void game_gui_read_radio_items(GtkWidget *widget) { gint i; - GtkWidget *boost[3]; + GtkWidget *boost[3], *yc[4]; GtkWidget *style[5], *scout[4], *physio[4]; gint old_scout = current_user.scout, - old_physio = current_user.physio; + old_physio = current_user.physio, + old_yc = current_user.youth_academy.coach; - game_gui_get_radio_items(style, scout, physio, boost); + game_gui_get_radio_items(style, scout, physio, boost, yc); for(i=0;i<3;i++) if(widget == boost[i]) @@ -321,6 +330,10 @@ game_gui_read_radio_items(GtkWidget *widget) for(i=0;i<4;i++) if(widget == physio[i]) current_user.physio = 100 + i * 10 + old_physio % 10; + + for(i=0;i<4;i++) + if(widget == yc[i]) + current_user.youth_academy.coach = 100 + i * 10 + old_yc % 10; if(math_get_place(current_user.scout, 2) == old_scout % 10) current_user.scout = old_scout % 10; @@ -328,8 +341,12 @@ game_gui_read_radio_items(GtkWidget *widget) if(math_get_place(current_user.physio, 2) == old_physio % 10) current_user.physio = old_physio % 10; + if(math_get_place(current_user.youth_academy.coach, 2) == old_yc % 10) + current_user.youth_academy.coach = old_yc % 10; + if(old_scout != current_user.scout || - old_physio != current_user.physio) + old_physio != current_user.physio || + old_yc != current_user.youth_academy.coach) game_gui_print_message(_("Next week you'll fire him and hire a new one.")); game_gui_write_meters(); @@ -365,14 +382,22 @@ game_gui_show_main(void) user_show_sponsor_continue(); } -/** Print a message into the main window entry. */ + +/** Print a message in the message area. */ gboolean -game_gui_print_message(gchar *text) +game_gui_print_message(gchar *format, ...) { + gchar text[SMALL]; + va_list args; + + va_start (args, format); + g_vsprintf(text, format, args); + va_end (args); + if(g_str_has_prefix(text, "___")) { gtk_entry_set_text(GTK_ENTRY(lookup_widget(window.main, "entry_message")), text + 3); - g_free(text); + g_free(format); } else gtk_entry_set_text(GTK_ENTRY(lookup_widget(window.main, "entry_message")), text); @@ -388,9 +413,17 @@ game_gui_print_message(gchar *text) /** Print a message after some seconds of delay. */ void -game_gui_print_message_with_delay(gchar *text) +game_gui_print_message_with_delay(const gchar *format, ...) { - gchar *local_text = g_strdup_printf("___%s", text); + gchar text[SMALL]; + gchar *local_text = NULL; + va_list args; + + va_start (args, format); + g_vsprintf(text, format, args); + va_end (args); + + local_text = g_strdup_printf("___%s", text); g_timeout_add(const_int("int_game_gui_message_delay") * 1000, (GSourceFunc)game_gui_print_message, local_text); @@ -509,15 +542,22 @@ game_gui_set_main_window_sensitivity(gboolean value) /** Show a window with a warning. @param text The text to show in the window. */ void -game_gui_show_warning(gchar *text) +game_gui_show_warning(const gchar *format, ...) { + gchar text[SMALL]; + va_list args; + + va_start (args, format); + g_vsprintf(text, format, args); + va_end (args); + if(opt_int("int_opt_prefer_messages") && window.main != NULL) game_gui_print_message(text); else { - window_create(WINDOW_WARNING); - gtk_label_set_text(GTK_LABEL(lookup_widget(window.warning, "label_warning")), text); + window_create(WINDOW_WARNING); + gtk_label_set_text(GTK_LABEL(lookup_widget(window.warning, "label_warning")), text); } } @@ -598,7 +638,6 @@ game_gui_write_check_items(void) void game_gui_read_check_items(GtkWidget *widget) { - gchar buf[SMALL]; GtkWidget *menu_job_offers = lookup_widget(window.main, "menu_job_offers"), *menu_live_game = lookup_widget(window.main, "menu_live_game"), @@ -607,28 +646,26 @@ game_gui_read_check_items(GtkWidget *widget) if(widget == menu_job_offers) { opt_user_set_int("int_opt_user_show_job_offers", !opt_user_int("int_opt_user_show_job_offers")); - sprintf(buf, _("Job offers set to %s."), - team_attribute_to_char(TEAM_ATTRIBUTE_BOOST, - opt_user_int("int_opt_user_show_job_offers"))); + game_gui_print_message(_("Job offers set to %s."), + team_attribute_to_char(TEAM_ATTRIBUTE_BOOST, + opt_user_int("int_opt_user_show_job_offers"))); } else if(widget == menu_live_game) { opt_user_set_int("int_opt_user_show_live_game", !opt_user_int("int_opt_user_show_live_game")); - sprintf(buf, _("Live game set to %s."), - team_attribute_to_char(TEAM_ATTRIBUTE_BOOST, - opt_user_int("int_opt_user_show_live_game"))); + game_gui_print_message(_("Live game set to %s."), + team_attribute_to_char(TEAM_ATTRIBUTE_BOOST, + opt_user_int("int_opt_user_show_live_game"))); } else if(widget == menu_overwrite) { opt_set_int("int_opt_save_will_overwrite", !opt_int("int_opt_save_will_overwrite")); - sprintf(buf, _("Overwrite set to %s."), - team_attribute_to_char(TEAM_ATTRIBUTE_BOOST, - opt_int("int_opt_save_will_overwrite"))); + game_gui_print_message(_("Overwrite set to %s."), + team_attribute_to_char(TEAM_ATTRIBUTE_BOOST, + opt_int("int_opt_save_will_overwrite"))); } else g_warning("game_gui_read_check_items: unknown widget."); - - game_gui_print_message(buf); } /** Set the appropriate text into the labels in the help window. diff --git a/src/game_gui.h b/src/game_gui.h index 65f2fd30..0f5c3ffc 100644 --- a/src/game_gui.h +++ b/src/game_gui.h @@ -1,6 +1,9 @@ #ifndef GAME_GUI_H #define GAME_GUI_H +#include +#include + #include "bygfoot.h" #include "live_game_struct.h" #include "option_struct.h" @@ -22,14 +25,21 @@ void game_gui_show_main(void); void -game_gui_get_radio_items(GtkWidget **style, GtkWidget **scout, - GtkWidget **physio, GtkWidget **boost); +game_gui_show_warning(const gchar *format, ...) +__attribute__ ((format (printf, 1, 2))); gboolean -game_gui_print_message(gchar *text); +game_gui_print_message(gchar *format, ...) +__attribute__ ((format (printf, 1, 2))); void -game_gui_print_message_with_delay(gchar *text); +game_gui_print_message_with_delay(const gchar *format, ...) +__attribute__ ((format (printf, 1, 2))); + +void +game_gui_get_radio_items(GtkWidget **style, GtkWidget **scout, + GtkWidget **physio, GtkWidget **boost, + GtkWidget **yc); void game_gui_read_radio_items(GtkWidget *widget); @@ -46,9 +56,6 @@ game_gui_set_main_window_sensitivity(gboolean value); void game_gui_write_av_skills(void); -void -game_gui_show_warning(gchar *text); - void game_gui_write_meters(void); diff --git a/src/interface.c b/src/interface.c index cd8f20ee..8384a98c 100644 --- a/src/interface.c +++ b/src/interface.c @@ -38,7 +38,7 @@ create_main_window (void) GtkWidget *menu_new; GtkWidget *menu_open; GtkWidget *menu_load_last_save; - GtkWidget *image1112; + GtkWidget *image1384; GtkWidget *menu_save; GtkWidget *menu_save_as; GtkWidget *trennlinie1; @@ -46,7 +46,7 @@ create_main_window (void) GtkWidget *menu_options; GtkWidget *menu_options_menu; GtkWidget *menu_preferences; - GtkWidget *image1113; + GtkWidget *image1385; GtkWidget *trennlinie7; GtkWidget *menu_job_offers; GtkWidget *menu_live_game; @@ -54,22 +54,22 @@ create_main_window (void) GtkWidget *menu_figures; GtkWidget *menu_figures_menu; GtkWidget *menu_fixtures_week; - GtkWidget *image1114; + GtkWidget *image1386; GtkWidget *menu_fixtures; - GtkWidget *image1115; + GtkWidget *image1387; GtkWidget *menu_tables; - GtkWidget *image1116; + GtkWidget *image1388; GtkWidget *menu_my_league_results; - GtkWidget *image1117; + GtkWidget *image1389; GtkWidget *trennlinie13; GtkWidget *menu_league_stats; - GtkWidget *image1118; + GtkWidget *image1390; GtkWidget *menu_season_history; - GtkWidget *image1119; + GtkWidget *image1391; GtkWidget *menu_team; GtkWidget *menu_team_menu; GtkWidget *menu_playing_style; - GtkWidget *image1120; + GtkWidget *image1392; GtkWidget *menu_playing_style_menu; GSList *menu_all_out_defend_group = NULL; GtkWidget *menu_all_out_defend; @@ -78,7 +78,7 @@ create_main_window (void) GtkWidget *menu_attack; GtkWidget *menu_all_out_attack; GtkWidget *menu_scout; - GtkWidget *image1121; + GtkWidget *image1393; GtkWidget *menu_scout_menu; GSList *menu_scout_best_group = NULL; GtkWidget *menu_scout_best; @@ -86,15 +86,26 @@ create_main_window (void) GtkWidget *menu_scout_average; GtkWidget *menu_scout_bad; GtkWidget *menu_physio; - GtkWidget *image1122; + GtkWidget *image1394; GtkWidget *menu_physio_menu; GSList *menu_physio_best_group = NULL; GtkWidget *menu_physio_best; GtkWidget *menu_physio_good; GtkWidget *menu_physio_average; GtkWidget *menu_physio_bad; + GtkWidget *menu_youth_academy; + GtkWidget *menu_youth_academy_menu; + GtkWidget *menu_show_youth_academy; + GtkWidget *youth_coach1; + GtkWidget *youth_coach1_menu; + GSList *menu_yc_best_group = NULL; + GtkWidget *menu_yc_best; + GtkWidget *menu_yc_good; + GtkWidget *menu_yc_average; + GtkWidget *menu_yc_bad; + GtkWidget *menu_set_investment; GtkWidget *menu_boost; - GtkWidget *image1123; + GtkWidget *image1395; GtkWidget *menu_boost_menu; GSList *menu_boost_on_group = NULL; GtkWidget *menu_boost_on; @@ -102,63 +113,64 @@ create_main_window (void) GtkWidget *menu_boost_anti; GtkWidget *trennlinie11; GtkWidget *menu_reset_players; - GtkWidget *image1124; + GtkWidget *image1396; GtkWidget *menu_custom_structure; - GtkWidget *image1125; + GtkWidget *image1397; GtkWidget *menu_rearrange_team; - GtkWidget *image1126; + GtkWidget *image1398; GtkWidget *trennlinie8; GtkWidget *menu_browse_teams; - GtkWidget *image1127; + GtkWidget *image1399; GtkWidget *menu_player; GtkWidget *menu_player_menu; GtkWidget *menu_show_info; - GtkWidget *image1128; + GtkWidget *image1400; GtkWidget *menu_put_on_transfer_list; - GtkWidget *image1129; + GtkWidget *image1401; GtkWidget *menu_remove_from_transfer_list; - GtkWidget *image1130; + GtkWidget *image1402; GtkWidget *menu_offer_new_contract; - GtkWidget *image1131; + GtkWidget *image1403; GtkWidget *menu_fire; - GtkWidget *image1132; + GtkWidget *image1404; GtkWidget *menu_shoots_penalties; - GtkWidget *image1133; + GtkWidget *image1405; + GtkWidget *menu_move_to_youth_academy; GtkWidget *trennlinie10; GtkWidget *menu_browse_players; - GtkWidget *image1134; + GtkWidget *image1406; GtkWidget *menu_user; GtkWidget *menu_user_menu; GtkWidget *menu_user_show_last_match; - GtkWidget *image1135; + GtkWidget *image1407; GtkWidget *menu_user_show_last_stats; - GtkWidget *image1136; + GtkWidget *image1408; GtkWidget *menu_user_show_coming_matches; - GtkWidget *image1137; + GtkWidget *image1409; GtkWidget *trennlinie12; GtkWidget *menu_user_show_history; - GtkWidget *image1138; + GtkWidget *image1410; GtkWidget *trennlinie9; GtkWidget *menu_next_user; - GtkWidget *image1139; + GtkWidget *image1411; GtkWidget *menu_previous_user; - GtkWidget *image1140; + GtkWidget *image1412; GtkWidget *menu_manage_users; - GtkWidget *image1141; + GtkWidget *image1413; GtkWidget *menu_finances_stadium; GtkWidget *menu_finances_stadium_menu; GtkWidget *menu_show_finances; - GtkWidget *image1142; + GtkWidget *image1414; GtkWidget *menu_show_stadium; - GtkWidget *image1143; + GtkWidget *image1415; GtkWidget *menu_help1; GtkWidget *menu_help1_menu; GtkWidget *menu_about; - GtkWidget *image1144; + GtkWidget *image1416; GtkWidget *menu_contributors; - GtkWidget *image1145; + GtkWidget *image1417; GtkWidget *menu_help; - GtkWidget *image1146; + GtkWidget *image1418; GtkWidget *hbox1; GtkWidget *button_load; GtkWidget *image11; @@ -279,9 +291,9 @@ create_main_window (void) GDK_l, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_ACCEL_VISIBLE); - image1112 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1112); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_load_last_save), image1112); + image1384 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1384); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_load_last_save), image1384); menu_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group); gtk_widget_show (menu_save); @@ -314,9 +326,9 @@ create_main_window (void) GDK_p, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image1113 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1113); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_preferences), image1113); + image1385 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1385); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_preferences), image1385); trennlinie7 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie7); @@ -351,9 +363,9 @@ create_main_window (void) GDK_F3, 0, GTK_ACCEL_VISIBLE); - image1114 = create_pixmap (main_window, "menu_fixtures.png"); - gtk_widget_show (image1114); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fixtures_week), image1114); + image1386 = create_pixmap (main_window, "menu_fixtures.png"); + gtk_widget_show (image1386); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fixtures_week), image1386); menu_fixtures = gtk_image_menu_item_new_with_mnemonic (_("Fixtures (competitions)")); gtk_widget_show (menu_fixtures); @@ -362,9 +374,9 @@ create_main_window (void) GDK_F4, 0, GTK_ACCEL_VISIBLE); - image1115 = create_pixmap (main_window, "menu_fixtures_comp.png"); - gtk_widget_show (image1115); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fixtures), image1115); + image1387 = create_pixmap (main_window, "menu_fixtures_comp.png"); + gtk_widget_show (image1387); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fixtures), image1387); menu_tables = gtk_image_menu_item_new_with_mnemonic (_("Tables")); gtk_widget_show (menu_tables); @@ -373,9 +385,9 @@ create_main_window (void) GDK_F5, 0, GTK_ACCEL_VISIBLE); - image1116 = create_pixmap (main_window, "menu_table.png"); - gtk_widget_show (image1116); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_tables), image1116); + image1388 = create_pixmap (main_window, "menu_table.png"); + gtk_widget_show (image1388); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_tables), image1388); menu_my_league_results = gtk_image_menu_item_new_with_mnemonic (_("My league results")); gtk_widget_show (menu_my_league_results); @@ -384,9 +396,9 @@ create_main_window (void) GDK_F6, 0, GTK_ACCEL_VISIBLE); - image1117 = create_pixmap (main_window, "menu_league_results.png"); - gtk_widget_show (image1117); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_my_league_results), image1117); + image1389 = create_pixmap (main_window, "menu_league_results.png"); + gtk_widget_show (image1389); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_my_league_results), image1389); trennlinie13 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie13); @@ -400,9 +412,9 @@ create_main_window (void) GDK_s, 0, GTK_ACCEL_VISIBLE); - image1118 = create_pixmap (main_window, "menu_league_stats.png"); - gtk_widget_show (image1118); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_league_stats), image1118); + image1390 = create_pixmap (main_window, "menu_league_stats.png"); + gtk_widget_show (image1390); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_league_stats), image1390); menu_season_history = gtk_image_menu_item_new_with_mnemonic (_("Season history")); gtk_widget_show (menu_season_history); @@ -411,9 +423,9 @@ create_main_window (void) GDK_h, 0, GTK_ACCEL_VISIBLE); - image1119 = create_pixmap (main_window, "menu_history.png"); - gtk_widget_show (image1119); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_season_history), image1119); + image1391 = create_pixmap (main_window, "menu_history.png"); + gtk_widget_show (image1391); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_season_history), image1391); menu_team = gtk_menu_item_new_with_mnemonic (_("_Team")); gtk_widget_show (menu_team); @@ -426,9 +438,9 @@ create_main_window (void) gtk_widget_show (menu_playing_style); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_playing_style); - image1120 = create_pixmap (main_window, "menu_style.png"); - gtk_widget_show (image1120); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_playing_style), image1120); + image1392 = create_pixmap (main_window, "menu_style.png"); + gtk_widget_show (image1392); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_playing_style), image1392); menu_playing_style_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_playing_style), menu_playing_style_menu); @@ -467,9 +479,9 @@ create_main_window (void) gtk_widget_show (menu_scout); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_scout); - image1121 = create_pixmap (main_window, "menu_scout.png"); - gtk_widget_show (image1121); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_scout), image1121); + image1393 = create_pixmap (main_window, "menu_scout.png"); + gtk_widget_show (image1393); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_scout), image1393); menu_scout_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_scout), menu_scout_menu); @@ -502,9 +514,9 @@ create_main_window (void) gtk_widget_show (menu_physio); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_physio); - image1122 = create_pixmap (main_window, "menu_physio.png"); - gtk_widget_show (image1122); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_physio), image1122); + image1394 = create_pixmap (main_window, "menu_physio.png"); + gtk_widget_show (image1394); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_physio), image1394); menu_physio_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_physio), menu_physio_menu); @@ -533,13 +545,63 @@ create_main_window (void) gtk_container_add (GTK_CONTAINER (menu_physio_menu), menu_physio_bad); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_physio_bad), TRUE); + menu_youth_academy = gtk_menu_item_new_with_mnemonic (_("Youth academy")); + gtk_widget_show (menu_youth_academy); + gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_youth_academy); + + menu_youth_academy_menu = gtk_menu_new (); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_youth_academy), menu_youth_academy_menu); + + menu_show_youth_academy = gtk_menu_item_new_with_mnemonic (_("Show youth academy")); + gtk_widget_show (menu_show_youth_academy); + gtk_container_add (GTK_CONTAINER (menu_youth_academy_menu), menu_show_youth_academy); + gtk_widget_add_accelerator (menu_show_youth_academy, "activate", accel_group, + GDK_y, 0, + GTK_ACCEL_VISIBLE); + + youth_coach1 = gtk_menu_item_new_with_mnemonic (_("Youth coach")); + gtk_widget_show (youth_coach1); + gtk_container_add (GTK_CONTAINER (menu_youth_academy_menu), youth_coach1); + + youth_coach1_menu = gtk_menu_new (); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (youth_coach1), youth_coach1_menu); + + menu_yc_best = gtk_radio_menu_item_new_with_mnemonic (menu_yc_best_group, _("Best")); + menu_yc_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_yc_best)); + gtk_widget_show (menu_yc_best); + gtk_container_add (GTK_CONTAINER (youth_coach1_menu), menu_yc_best); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_yc_best), TRUE); + + menu_yc_good = gtk_radio_menu_item_new_with_mnemonic (menu_yc_best_group, _("Good")); + menu_yc_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_yc_good)); + gtk_widget_show (menu_yc_good); + gtk_container_add (GTK_CONTAINER (youth_coach1_menu), menu_yc_good); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_yc_good), TRUE); + + menu_yc_average = gtk_radio_menu_item_new_with_mnemonic (menu_yc_best_group, _("Average")); + menu_yc_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_yc_average)); + gtk_widget_show (menu_yc_average); + gtk_container_add (GTK_CONTAINER (youth_coach1_menu), menu_yc_average); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_yc_average), TRUE); + + menu_yc_bad = gtk_radio_menu_item_new_with_mnemonic (menu_yc_best_group, _("Bad")); + menu_yc_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_yc_bad)); + gtk_widget_show (menu_yc_bad); + gtk_container_add (GTK_CONTAINER (youth_coach1_menu), menu_yc_bad); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_yc_bad), TRUE); + + menu_set_investment = gtk_menu_item_new_with_mnemonic (_("Set investment")); + gtk_widget_show (menu_set_investment); + gtk_container_add (GTK_CONTAINER (menu_youth_academy_menu), menu_set_investment); + gtk_tooltips_set_tip (tooltips, menu_set_investment, _("Set the percentage of your income you want to spend on the youth academy"), NULL); + menu_boost = gtk_image_menu_item_new_with_mnemonic (_("Boost")); gtk_widget_show (menu_boost); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_boost); - image1123 = create_pixmap (main_window, "menu_boost.png"); - gtk_widget_show (image1123); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_boost), image1123); + image1395 = create_pixmap (main_window, "menu_boost.png"); + gtk_widget_show (image1395); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_boost), image1395); menu_boost_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_boost), menu_boost_menu); @@ -571,17 +633,17 @@ create_main_window (void) gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_reset_players); gtk_tooltips_set_tip (tooltips, menu_reset_players, _("Reset player list to the formation at the beginning of the live game pause (right click on player list)"), NULL); - image1124 = gtk_image_new_from_stock ("gtk-undo", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1124); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reset_players), image1124); + image1396 = gtk_image_new_from_stock ("gtk-undo", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1396); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reset_players), image1396); menu_custom_structure = gtk_image_menu_item_new_with_mnemonic (_("Enter custom structure")); gtk_widget_show (menu_custom_structure); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_custom_structure); - image1125 = create_pixmap (main_window, "menu_structure.png"); - gtk_widget_show (image1125); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_custom_structure), image1125); + image1397 = create_pixmap (main_window, "menu_structure.png"); + gtk_widget_show (image1397); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_custom_structure), image1397); menu_rearrange_team = gtk_image_menu_item_new_with_mnemonic (_("Rearrange team")); gtk_widget_show (menu_rearrange_team); @@ -591,9 +653,9 @@ create_main_window (void) GDK_r, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image1126 = create_pixmap (main_window, "menu_rearrange.png"); - gtk_widget_show (image1126); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_rearrange_team), image1126); + image1398 = create_pixmap (main_window, "menu_rearrange.png"); + gtk_widget_show (image1398); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_rearrange_team), image1398); trennlinie8 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie8); @@ -604,9 +666,9 @@ create_main_window (void) gtk_widget_show (menu_browse_teams); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_browse_teams); - image1127 = create_pixmap (main_window, "menu_browse_tms.png"); - gtk_widget_show (image1127); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_browse_teams), image1127); + image1399 = create_pixmap (main_window, "menu_browse_tms.png"); + gtk_widget_show (image1399); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_browse_teams), image1399); menu_player = gtk_menu_item_new_with_mnemonic (_("_Player")); gtk_widget_show (menu_player); @@ -619,49 +681,53 @@ create_main_window (void) gtk_widget_show (menu_show_info); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_show_info); - image1128 = create_pixmap (main_window, "menu_player_info.png"); - gtk_widget_show (image1128); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_info), image1128); + image1400 = create_pixmap (main_window, "menu_player_info.png"); + gtk_widget_show (image1400); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_info), image1400); menu_put_on_transfer_list = gtk_image_menu_item_new_with_mnemonic (_("Put on transfer list")); gtk_widget_show (menu_put_on_transfer_list); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_put_on_transfer_list); - image1129 = create_pixmap (main_window, "menu_player_put_transfer.png"); - gtk_widget_show (image1129); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_put_on_transfer_list), image1129); + image1401 = create_pixmap (main_window, "menu_player_put_transfer.png"); + gtk_widget_show (image1401); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_put_on_transfer_list), image1401); menu_remove_from_transfer_list = gtk_image_menu_item_new_with_mnemonic (_("Remove from transfer list")); gtk_widget_show (menu_remove_from_transfer_list); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_remove_from_transfer_list); - image1130 = create_pixmap (main_window, "menu_player_remove_transfer.png"); - gtk_widget_show (image1130); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_remove_from_transfer_list), image1130); + image1402 = create_pixmap (main_window, "menu_player_remove_transfer.png"); + gtk_widget_show (image1402); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_remove_from_transfer_list), image1402); menu_offer_new_contract = gtk_image_menu_item_new_with_mnemonic (_("Offer new contract")); gtk_widget_show (menu_offer_new_contract); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_offer_new_contract); - image1131 = create_pixmap (main_window, "menu_player_contract.png"); - gtk_widget_show (image1131); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_offer_new_contract), image1131); + image1403 = create_pixmap (main_window, "menu_player_contract.png"); + gtk_widget_show (image1403); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_offer_new_contract), image1403); menu_fire = gtk_image_menu_item_new_with_mnemonic (_("Fire")); gtk_widget_show (menu_fire); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_fire); - image1132 = create_pixmap (main_window, "menu_player_fire.png"); - gtk_widget_show (image1132); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fire), image1132); + image1404 = create_pixmap (main_window, "menu_player_fire.png"); + gtk_widget_show (image1404); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_fire), image1404); menu_shoots_penalties = gtk_image_menu_item_new_with_mnemonic (_("Shoots penalties")); gtk_widget_show (menu_shoots_penalties); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_shoots_penalties); - image1133 = create_pixmap (main_window, "menu_player_shoots.png"); - gtk_widget_show (image1133); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_shoots_penalties), image1133); + image1405 = create_pixmap (main_window, "menu_player_shoots.png"); + gtk_widget_show (image1405); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_shoots_penalties), image1405); + + menu_move_to_youth_academy = gtk_menu_item_new_with_mnemonic (_("Move to youth academy")); + gtk_widget_show (menu_move_to_youth_academy); + gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_move_to_youth_academy); trennlinie10 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie10); @@ -672,9 +738,9 @@ create_main_window (void) gtk_widget_show (menu_browse_players); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_browse_players); - image1134 = create_pixmap (main_window, "menu_player_browse.png"); - gtk_widget_show (image1134); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_browse_players), image1134); + image1406 = create_pixmap (main_window, "menu_player_browse.png"); + gtk_widget_show (image1406); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_browse_players), image1406); menu_user = gtk_menu_item_new_with_mnemonic (_("_User")); gtk_widget_show (menu_user); @@ -690,9 +756,9 @@ create_main_window (void) GDK_m, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image1135 = create_pixmap (main_window, "menu_last_match.png"); - gtk_widget_show (image1135); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_last_match), image1135); + image1407 = create_pixmap (main_window, "menu_last_match.png"); + gtk_widget_show (image1407); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_last_match), image1407); menu_user_show_last_stats = gtk_image_menu_item_new_with_mnemonic (_("Show last match stats")); gtk_widget_show (menu_user_show_last_stats); @@ -701,17 +767,17 @@ create_main_window (void) GDK_F2, 0, GTK_ACCEL_VISIBLE); - image1136 = create_pixmap (main_window, "menu_match_stats.png"); - gtk_widget_show (image1136); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_last_stats), image1136); + image1408 = create_pixmap (main_window, "menu_match_stats.png"); + gtk_widget_show (image1408); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_last_stats), image1408); menu_user_show_coming_matches = gtk_image_menu_item_new_with_mnemonic (_("Show coming matches")); gtk_widget_show (menu_user_show_coming_matches); gtk_container_add (GTK_CONTAINER (menu_user_menu), menu_user_show_coming_matches); - image1137 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1137); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_coming_matches), image1137); + image1409 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1409); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_coming_matches), image1409); trennlinie12 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie12); @@ -725,9 +791,9 @@ create_main_window (void) GDK_h, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image1138 = create_pixmap (main_window, "menu_history.png"); - gtk_widget_show (image1138); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_history), image1138); + image1410 = create_pixmap (main_window, "menu_history.png"); + gtk_widget_show (image1410); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_user_show_history), image1410); trennlinie9 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie9); @@ -741,9 +807,9 @@ create_main_window (void) GDK_F9, 0, GTK_ACCEL_VISIBLE); - image1139 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1139); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_next_user), image1139); + image1411 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1411); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_next_user), image1411); menu_previous_user = gtk_image_menu_item_new_with_mnemonic (_("Previous user")); gtk_widget_show (menu_previous_user); @@ -752,9 +818,9 @@ create_main_window (void) GDK_F8, 0, GTK_ACCEL_VISIBLE); - image1140 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1140); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_previous_user), image1140); + image1412 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1412); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_previous_user), image1412); menu_manage_users = gtk_image_menu_item_new_with_mnemonic (_("Manage users")); gtk_widget_show (menu_manage_users); @@ -763,9 +829,9 @@ create_main_window (void) GDK_F12, 0, GTK_ACCEL_VISIBLE); - image1141 = gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1141); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_manage_users), image1141); + image1413 = gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1413); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_manage_users), image1413); menu_finances_stadium = gtk_menu_item_new_with_mnemonic (_("Fin_Stad")); gtk_widget_show (menu_finances_stadium); @@ -781,9 +847,9 @@ create_main_window (void) GDK_f, 0, GTK_ACCEL_VISIBLE); - image1142 = create_pixmap (main_window, "menu_finances.png"); - gtk_widget_show (image1142); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_finances), image1142); + image1414 = create_pixmap (main_window, "menu_finances.png"); + gtk_widget_show (image1414); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_finances), image1414); menu_show_stadium = gtk_image_menu_item_new_with_mnemonic (_("Show stadium")); gtk_widget_show (menu_show_stadium); @@ -792,9 +858,9 @@ create_main_window (void) GDK_f, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image1143 = create_pixmap (main_window, "menu_stadium.png"); - gtk_widget_show (image1143); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_stadium), image1143); + image1415 = create_pixmap (main_window, "menu_stadium.png"); + gtk_widget_show (image1415); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_show_stadium), image1415); menu_help1 = gtk_menu_item_new_with_mnemonic (_("_Help")); gtk_widget_show (menu_help1); @@ -807,25 +873,25 @@ create_main_window (void) gtk_widget_show (menu_about); gtk_container_add (GTK_CONTAINER (menu_help1_menu), menu_about); - image1144 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1144); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_about), image1144); + image1416 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1416); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_about), image1416); menu_contributors = gtk_image_menu_item_new_with_mnemonic (_("Contributors")); gtk_widget_show (menu_contributors); gtk_container_add (GTK_CONTAINER (menu_help1_menu), menu_contributors); - image1145 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1145); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_contributors), image1145); + image1417 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1417); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_contributors), image1417); menu_help = gtk_image_menu_item_new_with_mnemonic (_("Help")); gtk_widget_show (menu_help); gtk_container_add (GTK_CONTAINER (menu_help1_menu), menu_help); - image1146 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1146); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_help), image1146); + image1418 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1418); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_help), image1418); hbox1 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox1); @@ -1275,6 +1341,24 @@ create_main_window (void) g_signal_connect ((gpointer) menu_physio_bad, "button_press_event", G_CALLBACK (on_menu_team_button_press_event), NULL); + g_signal_connect ((gpointer) menu_show_youth_academy, "activate", + G_CALLBACK (on_menu_show_youth_academy_activate), + NULL); + g_signal_connect ((gpointer) menu_yc_best, "activate", + G_CALLBACK (on_menu_team_button_press_event), + NULL); + g_signal_connect ((gpointer) menu_yc_good, "activate", + G_CALLBACK (on_menu_team_button_press_event), + NULL); + g_signal_connect ((gpointer) menu_yc_average, "activate", + G_CALLBACK (on_menu_team_button_press_event), + NULL); + g_signal_connect ((gpointer) menu_yc_bad, "activate", + G_CALLBACK (on_menu_team_button_press_event), + NULL); + g_signal_connect ((gpointer) menu_set_investment, "activate", + G_CALLBACK (on_menu_set_investment_activate), + NULL); g_signal_connect ((gpointer) menu_boost_on, "button_press_event", G_CALLBACK (on_menu_team_button_press_event), NULL); @@ -1314,6 +1398,9 @@ create_main_window (void) g_signal_connect ((gpointer) menu_shoots_penalties, "activate", G_CALLBACK (on_menu_shoots_penalties_activate), NULL); + g_signal_connect ((gpointer) menu_move_to_youth_academy, "activate", + G_CALLBACK (on_menu_move_to_youth_academy_activate), + NULL); g_signal_connect ((gpointer) menu_browse_players, "activate", G_CALLBACK (on_menu_browse_players_activate), NULL); @@ -1414,7 +1501,7 @@ create_main_window (void) GLADE_HOOKUP_OBJECT (main_window, menu_new, "menu_new"); GLADE_HOOKUP_OBJECT (main_window, menu_open, "menu_open"); GLADE_HOOKUP_OBJECT (main_window, menu_load_last_save, "menu_load_last_save"); - GLADE_HOOKUP_OBJECT (main_window, image1112, "image1112"); + GLADE_HOOKUP_OBJECT (main_window, image1384, "image1384"); GLADE_HOOKUP_OBJECT (main_window, menu_save, "menu_save"); GLADE_HOOKUP_OBJECT (main_window, menu_save_as, "menu_save_as"); GLADE_HOOKUP_OBJECT (main_window, trennlinie1, "trennlinie1"); @@ -1422,7 +1509,7 @@ create_main_window (void) GLADE_HOOKUP_OBJECT (main_window, menu_options, "menu_options"); GLADE_HOOKUP_OBJECT (main_window, menu_options_menu, "menu_options_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_preferences, "menu_preferences"); - GLADE_HOOKUP_OBJECT (main_window, image1113, "image1113"); + GLADE_HOOKUP_OBJECT (main_window, image1385, "image1385"); GLADE_HOOKUP_OBJECT (main_window, trennlinie7, "trennlinie7"); GLADE_HOOKUP_OBJECT (main_window, menu_job_offers, "menu_job_offers"); GLADE_HOOKUP_OBJECT (main_window, menu_live_game, "menu_live_game"); @@ -1430,22 +1517,22 @@ create_main_window (void) GLADE_HOOKUP_OBJECT (main_window, menu_figures, "menu_figures"); GLADE_HOOKUP_OBJECT (main_window, menu_figures_menu, "menu_figures_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_fixtures_week, "menu_fixtures_week"); - GLADE_HOOKUP_OBJECT (main_window, image1114, "image1114"); + GLADE_HOOKUP_OBJECT (main_window, image1386, "image1386"); GLADE_HOOKUP_OBJECT (main_window, menu_fixtures, "menu_fixtures"); - GLADE_HOOKUP_OBJECT (main_window, image1115, "image1115"); + GLADE_HOOKUP_OBJECT (main_window, image1387, "image1387"); GLADE_HOOKUP_OBJECT (main_window, menu_tables, "menu_tables"); - GLADE_HOOKUP_OBJECT (main_window, image1116, "image1116"); + GLADE_HOOKUP_OBJECT (main_window, image1388, "image1388"); GLADE_HOOKUP_OBJECT (main_window, menu_my_league_results, "menu_my_league_results"); - GLADE_HOOKUP_OBJECT (main_window, image1117, "image1117"); + GLADE_HOOKUP_OBJECT (main_window, image1389, "image1389"); GLADE_HOOKUP_OBJECT (main_window, trennlinie13, "trennlinie13"); GLADE_HOOKUP_OBJECT (main_window, menu_league_stats, "menu_league_stats"); - GLADE_HOOKUP_OBJECT (main_window, image1118, "image1118"); + GLADE_HOOKUP_OBJECT (main_window, image1390, "image1390"); GLADE_HOOKUP_OBJECT (main_window, menu_season_history, "menu_season_history"); - GLADE_HOOKUP_OBJECT (main_window, image1119, "image1119"); + GLADE_HOOKUP_OBJECT (main_window, image1391, "image1391"); GLADE_HOOKUP_OBJECT (main_window, menu_team, "menu_team"); GLADE_HOOKUP_OBJECT (main_window, menu_team_menu, "menu_team_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_playing_style, "menu_playing_style"); - GLADE_HOOKUP_OBJECT (main_window, image1120, "image1120"); + GLADE_HOOKUP_OBJECT (main_window, image1392, "image1392"); GLADE_HOOKUP_OBJECT (main_window, menu_playing_style_menu, "menu_playing_style_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_all_out_defend, "menu_all_out_defend"); GLADE_HOOKUP_OBJECT (main_window, menu_defend, "menu_defend"); @@ -1453,84 +1540,95 @@ create_main_window (void) GLADE_HOOKUP_OBJECT (main_window, menu_attack, "menu_attack"); GLADE_HOOKUP_OBJECT (main_window, menu_all_out_attack, "menu_all_out_attack"); GLADE_HOOKUP_OBJECT (main_window, menu_scout, "menu_scout"); - GLADE_HOOKUP_OBJECT (main_window, image1121, "image1121"); + GLADE_HOOKUP_OBJECT (main_window, image1393, "image1393"); GLADE_HOOKUP_OBJECT (main_window, menu_scout_menu, "menu_scout_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_scout_best, "menu_scout_best"); GLADE_HOOKUP_OBJECT (main_window, menu_scout_good, "menu_scout_good"); GLADE_HOOKUP_OBJECT (main_window, menu_scout_average, "menu_scout_average"); GLADE_HOOKUP_OBJECT (main_window, menu_scout_bad, "menu_scout_bad"); GLADE_HOOKUP_OBJECT (main_window, menu_physio, "menu_physio"); - GLADE_HOOKUP_OBJECT (main_window, image1122, "image1122"); + GLADE_HOOKUP_OBJECT (main_window, image1394, "image1394"); GLADE_HOOKUP_OBJECT (main_window, menu_physio_menu, "menu_physio_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_physio_best, "menu_physio_best"); GLADE_HOOKUP_OBJECT (main_window, menu_physio_good, "menu_physio_good"); GLADE_HOOKUP_OBJECT (main_window, menu_physio_average, "menu_physio_average"); GLADE_HOOKUP_OBJECT (main_window, menu_physio_bad, "menu_physio_bad"); + GLADE_HOOKUP_OBJECT (main_window, menu_youth_academy, "menu_youth_academy"); + GLADE_HOOKUP_OBJECT (main_window, menu_youth_academy_menu, "menu_youth_academy_menu"); + GLADE_HOOKUP_OBJECT (main_window, menu_show_youth_academy, "menu_show_youth_academy"); + GLADE_HOOKUP_OBJECT (main_window, youth_coach1, "youth_coach1"); + GLADE_HOOKUP_OBJECT (main_window, youth_coach1_menu, "youth_coach1_menu"); + GLADE_HOOKUP_OBJECT (main_window, menu_yc_best, "menu_yc_best"); + GLADE_HOOKUP_OBJECT (main_window, menu_yc_good, "menu_yc_good"); + GLADE_HOOKUP_OBJECT (main_window, menu_yc_average, "menu_yc_average"); + GLADE_HOOKUP_OBJECT (main_window, menu_yc_bad, "menu_yc_bad"); + GLADE_HOOKUP_OBJECT (main_window, menu_set_investment, "menu_set_investment"); GLADE_HOOKUP_OBJECT (main_window, menu_boost, "menu_boost"); - GLADE_HOOKUP_OBJECT (main_window, image1123, "image1123"); + GLADE_HOOKUP_OBJECT (main_window, image1395, "image1395"); GLADE_HOOKUP_OBJECT (main_window, menu_boost_menu, "menu_boost_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_boost_on, "menu_boost_on"); GLADE_HOOKUP_OBJECT (main_window, menu_boost_off, "menu_boost_off"); GLADE_HOOKUP_OBJECT (main_window, menu_boost_anti, "menu_boost_anti"); GLADE_HOOKUP_OBJECT (main_window, trennlinie11, "trennlinie11"); GLADE_HOOKUP_OBJECT (main_window, menu_reset_players, "menu_reset_players"); - GLADE_HOOKUP_OBJECT (main_window, image1124, "image1124"); + GLADE_HOOKUP_OBJECT (main_window, image1396, "image1396"); GLADE_HOOKUP_OBJECT (main_window, menu_custom_structure, "menu_custom_structure"); - GLADE_HOOKUP_OBJECT (main_window, image1125, "image1125"); + GLADE_HOOKUP_OBJECT (main_window, image1397, "image1397"); GLADE_HOOKUP_OBJECT (main_window, menu_rearrange_team, "menu_rearrange_team"); - GLADE_HOOKUP_OBJECT (main_window, image1126, "image1126"); + GLADE_HOOKUP_OBJECT (main_window, image1398, "image1398"); GLADE_HOOKUP_OBJECT (main_window, trennlinie8, "trennlinie8"); GLADE_HOOKUP_OBJECT (main_window, menu_browse_teams, "menu_browse_teams"); - GLADE_HOOKUP_OBJECT (main_window, image1127, "image1127"); + GLADE_HOOKUP_OBJECT (main_window, image1399, "image1399"); GLADE_HOOKUP_OBJECT (main_window, menu_player, "menu_player"); GLADE_HOOKUP_OBJECT (main_window, menu_player_menu, "menu_player_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_show_info, "menu_show_info"); - GLADE_HOOKUP_OBJECT (main_window, image1128, "image1128"); + GLADE_HOOKUP_OBJECT (main_window, image1400, "image1400"); GLADE_HOOKUP_OBJECT (main_window, menu_put_on_transfer_list, "menu_put_on_transfer_list"); - GLADE_HOOKUP_OBJECT (main_window, image1129, "image1129"); + GLADE_HOOKUP_OBJECT (main_window, image1401, "image1401"); GLADE_HOOKUP_OBJECT (main_window, menu_remove_from_transfer_list, "menu_remove_from_transfer_list"); - GLADE_HOOKUP_OBJECT (main_window, image1130, "image1130"); + GLADE_HOOKUP_OBJECT (main_window, image1402, "image1402"); GLADE_HOOKUP_OBJECT (main_window, menu_offer_new_contract, "menu_offer_new_contract"); - GLADE_HOOKUP_OBJECT (main_window, image1131, "image1131"); + GLADE_HOOKUP_OBJECT (main_window, image1403, "image1403"); GLADE_HOOKUP_OBJECT (main_window, menu_fire, "menu_fire"); - GLADE_HOOKUP_OBJECT (main_window, image1132, "image1132"); + GLADE_HOOKUP_OBJECT (main_window, image1404, "image1404"); GLADE_HOOKUP_OBJECT (main_window, menu_shoots_penalties, "menu_shoots_penalties"); - GLADE_HOOKUP_OBJECT (main_window, image1133, "image1133"); + GLADE_HOOKUP_OBJECT (main_window, image1405, "image1405"); + GLADE_HOOKUP_OBJECT (main_window, menu_move_to_youth_academy, "menu_move_to_youth_academy"); GLADE_HOOKUP_OBJECT (main_window, trennlinie10, "trennlinie10"); GLADE_HOOKUP_OBJECT (main_window, menu_browse_players, "menu_browse_players"); - GLADE_HOOKUP_OBJECT (main_window, image1134, "image1134"); + GLADE_HOOKUP_OBJECT (main_window, image1406, "image1406"); GLADE_HOOKUP_OBJECT (main_window, menu_user, "menu_user"); GLADE_HOOKUP_OBJECT (main_window, menu_user_menu, "menu_user_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_user_show_last_match, "menu_user_show_last_match"); - GLADE_HOOKUP_OBJECT (main_window, image1135, "image1135"); + GLADE_HOOKUP_OBJECT (main_window, image1407, "image1407"); GLADE_HOOKUP_OBJECT (main_window, menu_user_show_last_stats, "menu_user_show_last_stats"); - GLADE_HOOKUP_OBJECT (main_window, image1136, "image1136"); + GLADE_HOOKUP_OBJECT (main_window, image1408, "image1408"); GLADE_HOOKUP_OBJECT (main_window, menu_user_show_coming_matches, "menu_user_show_coming_matches"); - GLADE_HOOKUP_OBJECT (main_window, image1137, "image1137"); + GLADE_HOOKUP_OBJECT (main_window, image1409, "image1409"); GLADE_HOOKUP_OBJECT (main_window, trennlinie12, "trennlinie12"); GLADE_HOOKUP_OBJECT (main_window, menu_user_show_history, "menu_user_show_history"); - GLADE_HOOKUP_OBJECT (main_window, image1138, "image1138"); + GLADE_HOOKUP_OBJECT (main_window, image1410, "image1410"); GLADE_HOOKUP_OBJECT (main_window, trennlinie9, "trennlinie9"); GLADE_HOOKUP_OBJECT (main_window, menu_next_user, "menu_next_user"); - GLADE_HOOKUP_OBJECT (main_window, image1139, "image1139"); + GLADE_HOOKUP_OBJECT (main_window, image1411, "image1411"); GLADE_HOOKUP_OBJECT (main_window, menu_previous_user, "menu_previous_user"); - GLADE_HOOKUP_OBJECT (main_window, image1140, "image1140"); + GLADE_HOOKUP_OBJECT (main_window, image1412, "image1412"); GLADE_HOOKUP_OBJECT (main_window, menu_manage_users, "menu_manage_users"); - GLADE_HOOKUP_OBJECT (main_window, image1141, "image1141"); + GLADE_HOOKUP_OBJECT (main_window, image1413, "image1413"); GLADE_HOOKUP_OBJECT (main_window, menu_finances_stadium, "menu_finances_stadium"); GLADE_HOOKUP_OBJECT (main_window, menu_finances_stadium_menu, "menu_finances_stadium_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_show_finances, "menu_show_finances"); - GLADE_HOOKUP_OBJECT (main_window, image1142, "image1142"); + GLADE_HOOKUP_OBJECT (main_window, image1414, "image1414"); GLADE_HOOKUP_OBJECT (main_window, menu_show_stadium, "menu_show_stadium"); - GLADE_HOOKUP_OBJECT (main_window, image1143, "image1143"); + GLADE_HOOKUP_OBJECT (main_window, image1415, "image1415"); GLADE_HOOKUP_OBJECT (main_window, menu_help1, "menu_help1"); GLADE_HOOKUP_OBJECT (main_window, menu_help1_menu, "menu_help1_menu"); GLADE_HOOKUP_OBJECT (main_window, menu_about, "menu_about"); - GLADE_HOOKUP_OBJECT (main_window, image1144, "image1144"); + GLADE_HOOKUP_OBJECT (main_window, image1416, "image1416"); GLADE_HOOKUP_OBJECT (main_window, menu_contributors, "menu_contributors"); - GLADE_HOOKUP_OBJECT (main_window, image1145, "image1145"); + GLADE_HOOKUP_OBJECT (main_window, image1417, "image1417"); GLADE_HOOKUP_OBJECT (main_window, menu_help, "menu_help"); - GLADE_HOOKUP_OBJECT (main_window, image1146, "image1146"); + GLADE_HOOKUP_OBJECT (main_window, image1418, "image1418"); GLADE_HOOKUP_OBJECT (main_window, hbox1, "hbox1"); GLADE_HOOKUP_OBJECT (main_window, button_load, "button_load"); GLADE_HOOKUP_OBJECT (main_window, image11, "image11"); @@ -1621,6 +1719,7 @@ create_menu_player (void) GtkWidget *player_menu_offer_new_contract; GtkWidget *player_menu_fire; GtkWidget *player_menu_shoots_penalties; + GtkWidget *player_menu_move_to_youth_academy; menu_player = gtk_menu_new (); @@ -1648,6 +1747,10 @@ create_menu_player (void) gtk_widget_show (player_menu_shoots_penalties); gtk_container_add (GTK_CONTAINER (menu_player), player_menu_shoots_penalties); + player_menu_move_to_youth_academy = gtk_menu_item_new_with_mnemonic (_("Move to youth academy")); + gtk_widget_show (player_menu_move_to_youth_academy); + gtk_container_add (GTK_CONTAINER (menu_player), player_menu_move_to_youth_academy); + g_signal_connect ((gpointer) player_menu_show_info, "activate", G_CALLBACK (on_player_menu_show_info_activate), NULL); @@ -1666,6 +1769,9 @@ create_menu_player (void) g_signal_connect ((gpointer) player_menu_shoots_penalties, "activate", G_CALLBACK (on_player_menu_shoots_penalties_activate), NULL); + g_signal_connect ((gpointer) player_menu_move_to_youth_academy, "activate", + G_CALLBACK (on_player_menu_move_to_youth_academy_activate), + NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (menu_player, menu_player, "menu_player"); @@ -1675,7 +1781,52 @@ create_menu_player (void) GLADE_HOOKUP_OBJECT (menu_player, player_menu_offer_new_contract, "player_menu_offer_new_contract"); GLADE_HOOKUP_OBJECT (menu_player, player_menu_fire, "player_menu_fire"); GLADE_HOOKUP_OBJECT (menu_player, player_menu_shoots_penalties, "player_menu_shoots_penalties"); + GLADE_HOOKUP_OBJECT (menu_player, player_menu_move_to_youth_academy, "player_menu_move_to_youth_academy"); return menu_player; } +GtkWidget* +create_menu_youth (void) +{ + GtkWidget *menu_youth; + GtkWidget *menu_youth_move_to_team; + GtkWidget *image1420; + GtkWidget *menu_youth_kick_out_of_academy; + GtkWidget *image1421; + + menu_youth = gtk_menu_new (); + + menu_youth_move_to_team = gtk_image_menu_item_new_with_mnemonic (_("Move to team")); + gtk_widget_show (menu_youth_move_to_team); + gtk_container_add (GTK_CONTAINER (menu_youth), menu_youth_move_to_team); + + image1420 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1420); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_youth_move_to_team), image1420); + + menu_youth_kick_out_of_academy = gtk_image_menu_item_new_with_mnemonic (_("Kick out of academy")); + gtk_widget_show (menu_youth_kick_out_of_academy); + gtk_container_add (GTK_CONTAINER (menu_youth), menu_youth_kick_out_of_academy); + + image1421 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1421); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_youth_kick_out_of_academy), image1421); + + g_signal_connect ((gpointer) menu_youth_move_to_team, "activate", + G_CALLBACK (on_menu_youth_move_to_team_activate), + NULL); + g_signal_connect ((gpointer) menu_youth_kick_out_of_academy, "activate", + G_CALLBACK (on_menu_youth_kick_out_of_academy_activate), + NULL); + + /* Store pointers to all widgets, for use by lookup_widget(). */ + GLADE_HOOKUP_OBJECT_NO_REF (menu_youth, menu_youth, "menu_youth"); + GLADE_HOOKUP_OBJECT (menu_youth, menu_youth_move_to_team, "menu_youth_move_to_team"); + GLADE_HOOKUP_OBJECT (menu_youth, image1420, "image1420"); + GLADE_HOOKUP_OBJECT (menu_youth, menu_youth_kick_out_of_academy, "menu_youth_kick_out_of_academy"); + GLADE_HOOKUP_OBJECT (menu_youth, image1421, "image1421"); + + return menu_youth; +} + diff --git a/src/interface.h b/src/interface.h index 2a95caca..f32074fc 100644 --- a/src/interface.h +++ b/src/interface.h @@ -4,3 +4,4 @@ GtkWidget* create_main_window (void); GtkWidget* create_menu_player (void); +GtkWidget* create_menu_youth (void); diff --git a/src/lg_commentary.c b/src/lg_commentary.c index 4ebc4b05..991b6a7f 100644 --- a/src/lg_commentary.c +++ b/src/lg_commentary.c @@ -96,23 +96,27 @@ lg_commentary_generate(const LiveGame *live_game, LiveGameUnit *unit) gboolean lg_commentary_check_commentary(const LGCommentary *commentary, gchar *dest) { - if((commentary->condition != NULL && + gchar buf[SMALL]; + + if(strlen(commentary->text->str) == 0 || + (commentary->condition != NULL && !lg_commentary_parse_condition(commentary->condition->str)) || (repetition == FALSE && query_lg_commentary_is_repetition(commentary->id))) return FALSE; strcpy(dest, commentary->text->str); - if(lg_commentary_replace_tokens(dest)) - if(lg_commentary_replace_tokens(dest)) - { - lg_commentary_replace_expressions(dest); - - if(lg_commentary_replace_tokens(dest)) - return TRUE; - } - - return FALSE; + do + { + strcpy(buf, dest); + if(!lg_commentary_replace_tokens(dest)) + return FALSE; + + lg_commentary_replace_expressions(dest); + } + while(strcmp(buf, dest) != 0); + + return TRUE; } /** Check whether a commentary with given id has been used in the last @@ -216,17 +220,19 @@ gboolean lg_commentary_parse_condition(const gchar *condition) { gboolean return_value = FALSE; - gchar buf[SMALL]; + gchar buf[SMALL], buf2[SMALL]; strcpy(buf, condition); - if(!lg_commentary_replace_tokens(buf)) - return FALSE; - - lg_commentary_replace_expressions(buf); + do + { + strcpy(buf2, buf); + if(!lg_commentary_replace_tokens(buf)) + return FALSE; - if(!lg_commentary_replace_tokens(buf)) - return FALSE; + lg_commentary_replace_expressions(buf); + } + while(strcmp(buf2, buf) != 0); misc_parse(buf, &return_value); diff --git a/src/main.c b/src/main.c index 27df30da..63268745 100644 --- a/src/main.c +++ b/src/main.c @@ -61,7 +61,7 @@ main_init_variables(void) constants.datalist = options.datalist = lg_tokens.datalist = NULL; popups_active = 0; - selected_row[0] = selected_row[1] = -1; + selected_row = -1; timeout_id = -1; diff --git a/src/main.h b/src/main.h index 4c738090..0b20602a 100644 --- a/src/main.h +++ b/src/main.h @@ -10,6 +10,7 @@ void main_init_variables(void); void -main_exit_program(gint exit_code, gchar *exit_message); +main_exit_program(gint exit_code, gchar *exit_message) +__attribute__ ((noreturn)); #endif diff --git a/src/misc2_callback_func.c b/src/misc2_callback_func.c index 2147a70c..b6341daa 100644 --- a/src/misc2_callback_func.c +++ b/src/misc2_callback_func.c @@ -19,7 +19,6 @@ void misc2_callback_transfer_user_player(void) { Team *new_team = transoff(stat2, 0).tm; - gchar buf[SMALL]; if(team_is_user(new_team) != -1) { @@ -44,13 +43,12 @@ misc2_callback_transfer_user_player(void) } else { - sprintf(buf, _("%s couldn't afford to buy %s or his roster was full."), - user_from_team(new_team)->name->str, - player_of_id_team(trans(stat2).tm, trans(stat2).id)->name->str); - game_gui_show_warning(buf); - sprintf(buf, _("You didn't have enough money to buy %s or your roster was full."), - player_of_id_team(trans(stat2).tm, trans(stat2).id)->name->str); - user_event_add(user_from_team(new_team), EVENT_TYPE_WARNING, -1, -1, NULL, buf); + game_gui_show_warning(_("%s couldn't afford to buy %s or his roster was full."), + user_from_team(new_team)->name->str, + player_of_id_team(trans(stat2).tm, trans(stat2).id)->name->str); + user_event_add(user_from_team(new_team), EVENT_TYPE_WARNING, -1, -1, NULL, + _("You didn't have enough money to buy %s or your roster was full."), + player_of_id_team(trans(stat2).tm, trans(stat2).id)->name->str); g_array_remove_index(trans(stat2).offers, 0); if(trans(stat2).offers->len > 0 && transoff(stat2, 0).status == TRANSFER_OFFER_NOT_CONSIDERED) @@ -107,7 +105,6 @@ misc2_callback_transfer_cpu_player(void) gboolean misc2_callback_change_structure(gint structure) { - gchar buf[SMALL]; gint poss_struct = team_find_appropriate_structure(current_user.tm); if(math_get_place(structure, 1) + math_get_place(structure, 2) + @@ -115,8 +112,7 @@ misc2_callback_change_structure(gint structure) math_get_place(poss_struct, 1) + math_get_place(poss_struct, 2) + math_get_place(poss_struct, 3)) { - sprintf(buf, _("The structure value %d is invalid."), structure); - game_gui_show_warning(buf); + game_gui_show_warning(_("The structure value %d is invalid."), structure); return FALSE; } @@ -157,25 +153,20 @@ misc2_callback_contract_offer(void) { pl->contract += (i + 1); pl->wage = value; - sprintf(buf, _("%s accepts your offer."), pl->name->str); - game_gui_show_warning(buf); + game_gui_show_warning(_("%s accepts your offer."), pl->name->str); window_destroy(&window.contract, FALSE); } else { pl->offers++; if(pl->offers < const_int("int_contract_max_offers")) - { - sprintf(buf, _("%s rejects your offer. You may still make %d offers."), - pl->name->str, - const_int("int_contract_max_offers") - pl->offers); - game_gui_show_warning(buf); - } + game_gui_show_warning(_("%s rejects your offer. You may still make %d offers."), + pl->name->str, + const_int("int_contract_max_offers") - pl->offers); else { - sprintf(buf, _("%s rejects your offer and won't negotiate with you anymore. You should sell him before his contract expires (he'll simply leave your team otherwise)."), - pl->name->str); - game_gui_show_warning(buf); + game_gui_show_warning(_("%s rejects your offer and won't negotiate with you anymore. You should sell him before his contract expires (he'll simply leave your team otherwise)."), + pl->name->str); window_destroy(&window.contract, FALSE); } } diff --git a/src/misc2_callbacks.c b/src/misc2_callbacks.c index 28d933b0..c897e354 100644 --- a/src/misc2_callbacks.c +++ b/src/misc2_callbacks.c @@ -2,6 +2,7 @@ #include "callback_func.h" #include "debug.h" #include "finance.h" +#include "free.h" #include "game_gui.h" #include "load_save.h" #include "main.h" @@ -118,6 +119,9 @@ on_button_digits_ok_clicked (GtkButton *button, if(destroy_window && stat0 == STATUS_LIVE_GAME_PAUSE) gtk_widget_set_sensitive(window.main, TRUE); break; + case STATUS_SET_YA_PERCENTAGE: + current_user.youth_academy.percentage = values[1]; + break; } if(destroy_window) @@ -189,6 +193,12 @@ on_button_yesno_yes_clicked (GtkButton *button, load_save_autosave(); callback_show_next_live_game(); break; + case STATUS_QUERY_KICK_YOUTH: + free_player(&g_array_index(current_user.youth_academy.players, Player, selected_row)); + g_array_remove_index(current_user.youth_academy.players, selected_row); + on_menu_show_youth_academy_activate(NULL, NULL); + selected_row = -1; + break; } if(stat4 == STATUS_SHOW_EVENT) diff --git a/src/option_gui.c b/src/option_gui.c index a824b462..555def0a 100644 --- a/src/option_gui.c +++ b/src/option_gui.c @@ -14,7 +14,6 @@ enum BooleanOptions { BOOL_OPT_CONF_QUIT = 0, - BOOL_OPT_CONF_UNFIT, BOOL_OPT_SAVE_OVERWRITE, BOOL_OPT_MAXIMIZE, BOOL_OPT_PREFER_MESS, @@ -26,6 +25,8 @@ enum BooleanOptions BOOL_OPT_PAUSE_RED, BOOL_OPT_PAUSE_BREAK, BOOL_OPT_AUTO_SUB, + BOOL_OPT_CONF_UNFIT, + BOOL_OPT_CONF_YOUTH, BOOL_OPT_SHOW_JOB, BOOL_OPT_SWAP, BOOL_OPT_SHOW_OVERALL, @@ -126,6 +127,10 @@ option_gui_write_bool_widgets(gint **bool_options, GtkToggleButton **bool_widget GTK_TOGGLE_BUTTON(lookup_widget(window.options, "checkbutton_auto_sub")); bool_options[BOOL_OPT_AUTO_SUB] = opt_user_intp("int_opt_user_auto_sub"); + bool_widgets[BOOL_OPT_CONF_YOUTH] = + GTK_TOGGLE_BUTTON(lookup_widget(window.options, "checkbutton_conf_youth")); + bool_options[BOOL_OPT_CONF_YOUTH] = opt_user_intp("int_opt_user_confirm_youth"); + bool_widgets[BOOL_OPT_SHOW_JOB] = GTK_TOGGLE_BUTTON(lookup_widget(window.options, "checkbutton_show_job")); bool_options[BOOL_OPT_SHOW_JOB] = opt_user_intp("int_opt_user_show_job_offers"); diff --git a/src/options_interface.c b/src/options_interface.c index 2cf826b4..7d3e8dcf 100644 --- a/src/options_interface.c +++ b/src/options_interface.c @@ -94,6 +94,7 @@ create_window_options (void) GtkWidget *label2; GtkWidget *hbox6; GtkWidget *vbox6; + GtkWidget *checkbutton_conf_youth; GtkWidget *checkbutton_show_job; GtkWidget *eventbox1; GtkWidget *hbox10; @@ -497,6 +498,11 @@ create_window_options (void) gtk_widget_show (vbox6); gtk_box_pack_start (GTK_BOX (hbox6), vbox6, TRUE, TRUE, 0); + checkbutton_conf_youth = gtk_check_button_new_with_mnemonic (_("Confirm removing youths")); + gtk_widget_show (checkbutton_conf_youth); + gtk_box_pack_start (GTK_BOX (vbox6), checkbutton_conf_youth, FALSE, FALSE, 0); + gtk_tooltips_set_tip (tooltips, checkbutton_conf_youth, _("Whether a confirmation popup is shown when you kick out a youth from your academy"), NULL); + checkbutton_show_job = gtk_check_button_new_with_mnemonic (_("Show job offers")); gtk_widget_show (checkbutton_show_job); gtk_box_pack_start (GTK_BOX (vbox6), checkbutton_show_job, FALSE, FALSE, 0); @@ -1059,6 +1065,7 @@ create_window_options (void) GLADE_HOOKUP_OBJECT (window_options, label2, "label2"); GLADE_HOOKUP_OBJECT (window_options, hbox6, "hbox6"); GLADE_HOOKUP_OBJECT (window_options, vbox6, "vbox6"); + GLADE_HOOKUP_OBJECT (window_options, checkbutton_conf_youth, "checkbutton_conf_youth"); GLADE_HOOKUP_OBJECT (window_options, checkbutton_show_job, "checkbutton_show_job"); GLADE_HOOKUP_OBJECT (window_options, eventbox1, "eventbox1"); GLADE_HOOKUP_OBJECT (window_options, hbox10, "hbox10"); diff --git a/src/player.c b/src/player.c index e4bb6d8e..2e43617d 100644 --- a/src/player.c +++ b/src/player.c @@ -914,13 +914,21 @@ player_update_skill(Player *pl) const_float("float_player_skill_devel_else_upper")}}; gfloat diff; - if(pl->age > pl->peak_age) - pl->lsu += (pl->health == 0) ? 1 : const_float("float_player_lsu_injured_old"); - else if(pl->health == 0 && - ((gfloat)player_games_goals_get(pl, pl->team->clid, PLAYER_VALUE_GAMES) / (gfloat)week >= - const_float("float_player_lsu_games_percentage") || - math_rnd(0, 1) <= const_float("float_player_lsu_increase_prob"))) - pl->lsu++; + if(!query_player_is_youth(pl)) + { + if(pl->age > pl->peak_age) + pl->lsu += (pl->health == 0) ? 1 : const_float("float_player_lsu_injured_old"); + else if(pl->health == 0 && + ((gfloat)player_games_goals_get(pl, pl->team->clid, PLAYER_VALUE_GAMES) / (gfloat)week >= + const_float("float_player_lsu_games_percentage") || + math_rnd(0, 1) <= const_float("float_player_lsu_increase_prob"))) + pl->lsu++; + } + else + pl->lsu += (pl->health != 0) ? 0 : + const_float("float_youth_academy_lsu_addition_best") - + (user_from_team(pl->team)->youth_academy.av_coach * + const_float("float_youth_academy_lsu_penalty")); if(pl->lsu < const_float("float_player_lsu_update_limit") || math_rnd(0, 1) < powf(const_float("float_player_lsu_update_base_prob"), @@ -935,14 +943,19 @@ player_update_skill(Player *pl) if(diff > age_limits[i]) break; - if(i < 3) - pl->skill += (pl->talent - pl->skill) * math_rnd(factor_limits[i][0], factor_limits[i][1]); - else if(i < 5) - pl->skill += math_rnd(increase_decrease[0][0], increase_decrease[0][1]); - else if(i < 7) - pl->skill += math_rnd(increase_decrease[i - 4][0], increase_decrease[i - 4][1]); + if(!query_player_is_youth(pl)) + { + if(i < 3) + pl->skill += (pl->talent - pl->skill) * math_rnd(factor_limits[i][0], factor_limits[i][1]); + else if(i < 5) + pl->skill += math_rnd(increase_decrease[0][0], increase_decrease[0][1]); + else if(i < 7) + pl->skill += math_rnd(increase_decrease[i - 4][0], increase_decrease[i - 4][1]); + else + pl->skill += math_rnd(increase_decrease[3][0], increase_decrease[3][1]); + } else - pl->skill += math_rnd(increase_decrease[3][0], increase_decrease[3][1]); + pl->skill /= const_float("float_youth_academy_skill_reduce_factor"); pl->skill = CLAMP(pl->skill, 0, pl->talent); pl->cskill = player_get_cskill(pl, pl->cpos, TRUE); @@ -999,36 +1012,28 @@ player_update_injury(Player *pl) } } -/** Update players in user teams (age, skill, fitness etc.) - @param tm The team of the player. - @param idx The index in the players array. */ +/** Update a player in a user team (age, skill etc.). */ void -player_update_weekly(Team *tm, gint idx) +player_update_weekly(Player *pl) { - gchar buf[SMALL]; - Player *pl = player_of_idx_team(tm, idx); - if(debug < 50) { pl->age += 0.0192; - if(!sett_int("int_opt_disable_contracts")) + if(!sett_int("int_opt_disable_contracts") && + pl->age > const_float("float_player_age_lower")) pl->contract -= 0.0192; } if(!sett_int("int_opt_disable_contracts") && debug < 50 && pl->contract * 12 <= opt_user_int("int_opt_user_contract_limit") && (pl->contract + 0.0192) * 12 > opt_user_int("int_opt_user_contract_limit")) - { - sprintf(buf, _("%s's contract expires in %.1f years."), - pl->name->str, pl->contract); - - user_event_add(&usr(team_is_user(tm)), EVENT_TYPE_WARNING, - -1, -1, NULL, buf); - } + user_event_add(user_from_team(pl->team), EVENT_TYPE_WARNING, + -1, -1, NULL, _("%s's contract expires in %.1f years."), + pl->name->str, pl->contract); if(pl->contract <= 0) - player_remove_contract(tm, idx); + player_remove_contract(pl); player_update_skill(pl); if(pl->health > 0) @@ -1039,11 +1044,11 @@ player_update_weekly(Team *tm, gint idx) @param tm The user team. @param idx The player index. */ void -player_remove_contract(Team *tm, gint idx) +player_remove_contract(Player *pl) { - user_event_add(user_from_team(tm), EVENT_TYPE_PLAYER_LEFT, -1, -1, NULL, - player_of_idx_team(tm, idx)->name->str); - player_remove_from_team(tm, idx); + user_event_add(user_from_team(pl->team), EVENT_TYPE_PLAYER_LEFT, -1, -1, NULL, + pl->name->str); + player_remove_from_team(pl->team, player_id_index(pl->team, pl->id)); } /** Remove a player from a team. @@ -1237,3 +1242,46 @@ player_get_last_name(const gchar *name) return rev_name; } + +/** Create a pointer array with pointers to the players + and return it. */ +GPtrArray* +player_get_pointers_from_array(const GArray *players_array) +{ + gint i; + GPtrArray *players = g_ptr_array_new(); + + for(i=0;ilen;i++) + g_ptr_array_add(players, &g_array_index(players_array, Player, i)); + + return players; +} + + +/** Move a player from the team to the youth academy. */ +void +player_move_to_ya(gint idx) +{ + Player *pl = player_of_idx_team(current_user.tm, idx); + Player player = *pl; + + if(query_transfer_player_is_on_list(pl)) + transfer_remove_player_ptr(pl); + + player.cskill = player.skill; + player.cpos = player.pos; + + g_array_remove_index(current_user.tm->players, idx); + g_array_append_val(current_user.youth_academy.players, player); +} + +/** Move a player from the youth academy to the team. */ +void +player_move_from_ya(gint idx) +{ + Player *pl = &g_array_index(current_user.youth_academy.players, Player, idx); + Player player = *pl; + + g_array_remove_index(current_user.youth_academy.players, idx); + g_array_append_val(current_user.tm->players, player); +} diff --git a/src/player.h b/src/player.h index 0a1ffec6..30578ed6 100644 --- a/src/player.h +++ b/src/player.h @@ -13,6 +13,8 @@ enum PlayerCompareAttrib PLAYER_COMPARE_ATTRIBUTE_END }; +#define query_player_is_youth(pl) (pl->age <= const_float("float_player_age_lower")) + Player player_new(Team *tm, gfloat average_skill, gboolean new_id); @@ -86,10 +88,10 @@ gint player_games_goals_get(const Player *pl, gint clid, gint type); void -player_update_weekly(Team *tm, gint idx); +player_update_weekly(Player *pl); void -player_remove_contract(Team *tm, gint idx); +player_remove_contract(Player *pl); void player_update_skill(Player *pl); @@ -130,4 +132,13 @@ player_get_last_name(const gchar *name); void player_complete_def(Player *pl, gfloat average_skill); +GPtrArray* +player_get_pointers_from_array(const GArray *players); + +void +player_move_to_ya(gint idx); + +void +player_move_from_ya(gint idx); + #endif diff --git a/src/start_end.c b/src/start_end.c index ff647011..49ee8433 100644 --- a/src/start_end.c +++ b/src/start_end.c @@ -21,6 +21,7 @@ #include "user.h" #include "variables.h" #include "xml_name.h" +#include "youth_academy.h" /** Prototype of a function called at the start or end of a week round. */ @@ -42,7 +43,7 @@ WeekFunc start_week_round_funcs[] = WeekFunc start_week_funcs[] = {start_week_add_cups, start_week_update_users, start_week_update_user_teams, start_week_update_user_finances, - transfer_update, NULL}; + youth_academy_update_weekly, transfer_update, NULL}; WeekFunc end_week_funcs[] = {stat_update_leagues, end_week_hide_cups, NULL}; @@ -93,6 +94,11 @@ start_new_season(void) for(i=0;ilen;i++) { usr(i).tm = team_of_id(usr(i).team_id); + + usr(i).youth_academy.tm = usr(i).tm; + for(j=0;jlen;j++) + g_array_index(usr(i).youth_academy.players, Player, j).team = usr(i).tm; + live_game_reset(&usr(i).live_game, NULL, TRUE); } } @@ -470,6 +476,9 @@ start_week_update_users(void) if(usr(i).physio >= 100) usr(i).physio = math_get_place(usr(i).physio, 2); + if(usr(i).youth_academy.coach >= 100) + usr(i).youth_academy.coach = math_get_place(usr(i).youth_academy.coach, 2); + user_weekly_update_counters(&usr(i)); } } diff --git a/src/team.c b/src/team.c index 3562eff1..eb75b922 100644 --- a/src/team.c +++ b/src/team.c @@ -226,21 +226,6 @@ team_of_id(gint id) return NULL; } -/** Return the players of the team in a pointer array. - @param tm The team we examine. - @return The players of the team in an array. */ -GPtrArray* -team_get_player_pointers(const Team *tm) -{ - gint i; - GPtrArray *players = g_ptr_array_new(); - - for(i=0;iplayers->len;i++) - g_ptr_array_add(players, &g_array_index(tm->players, Player, i)); - - return players; -} - /** Return a pointer to the next or last fixture the team participates in. @param tm The team we examine. @return The pointer to the fixture or NULL if none is found. */ @@ -533,8 +518,6 @@ team_attribute_to_char(gint attribute, gint value) void team_change_attribute_with_message(Team *tm, gint attribute, gint new_value) { - gchar buf[SMALL]; - switch(attribute) { default: @@ -542,15 +525,13 @@ team_change_attribute_with_message(Team *tm, gint attribute, gint new_value) break; case TEAM_ATTRIBUTE_STYLE: current_user.tm->style = new_value; - sprintf(buf, _("Team style changed to %s."), team_attribute_to_char(attribute, new_value)); + game_gui_print_message(_("Team style changed to %s."), team_attribute_to_char(attribute, new_value)); break; case TEAM_ATTRIBUTE_BOOST: current_user.tm->boost = new_value; - sprintf(buf, _("Boost changed to %s."), team_attribute_to_char(attribute, new_value)); + game_gui_print_message(_("Boost changed to %s."), team_attribute_to_char(attribute, new_value)); break; } - - game_gui_print_message(buf); } /** Make cpu players healthy etc. @@ -686,7 +667,7 @@ team_update_user_team_weekly(Team *tm) gint i; for(i=tm->players->len - 1;i>=0;i--) - player_update_weekly(tm, i); + player_update_weekly(&g_array_index(tm->players, Player, i)); } /** Regenerate player fitness etc. after a match. diff --git a/src/team.h b/src/team.h index 2ae2a145..79de70e7 100644 --- a/src/team.h +++ b/src/team.h @@ -54,9 +54,6 @@ team_get_pointers_from_array(const GArray *teams); Team* team_of_id(gint id); -GPtrArray* -team_get_player_pointers(const Team *tm); - Fixture* team_get_fixture(const Team *tm, gboolean last_fixture); diff --git a/src/transfer.c b/src/transfer.c index d0190279..34acfb1e 100644 --- a/src/transfer.c +++ b/src/transfer.c @@ -438,8 +438,6 @@ transfer_remove_offer(gint idx, const Team *tm) void transfer_add_remove_user_player(Player *pl) { - gchar buf[SMALL]; - if(!query_transfer_player_is_on_list(pl)) { if(week < transfer_get_deadline()) @@ -447,18 +445,16 @@ transfer_add_remove_user_player(Player *pl) transfer_add_player(pl, (gint)rint(((gfloat)const_int("int_transfer_time_lower") + (gfloat)const_int("int_transfer_time_upper")) / 2)); - sprintf(buf, _("%s has been added to the transfer list for %d weeks."), - pl->name->str, - (gint)rint(((gfloat)const_int("int_transfer_time_lower") + - (gfloat)const_int("int_transfer_time_upper")) / 2)); + game_gui_print_message(_("%s has been added to the transfer list for %d weeks."), + pl->name->str, + (gint)rint(((gfloat)const_int("int_transfer_time_lower") + + (gfloat)const_int("int_transfer_time_upper")) / 2)); } else { game_gui_print_message(_("The transfer deadline is over.")); return; } - - game_gui_print_message(buf); } else transfer_remove_player_ptr(pl); diff --git a/src/treeview.c b/src/treeview.c index aa830ce0..06f7c43a 100644 --- a/src/treeview.c +++ b/src/treeview.c @@ -368,7 +368,7 @@ treeview_show_user_player_list(void) for(i=0;i<2;i++) { - players = team_get_player_pointers(current_user.tm); + players = player_get_pointers_from_array(current_user.tm->players); user_set_player_list_attributes(¤t_user, &attribute, i + 1); treeview_show_player_list(GTK_TREE_VIEW(treeview[i]), players, attribute, TRUE); } @@ -379,7 +379,7 @@ treeview_show_user_player_list(void) void treeview_show_player_list_team(GtkTreeView *treeview, const Team *tm, gint scout) { - GPtrArray *players = team_get_player_pointers(tm); + GPtrArray *players = player_get_pointers_from_array(tm->players); treeview_show_player_list(treeview, players, treeview_helper_get_attributes_from_scout(scout), TRUE); @@ -1274,6 +1274,8 @@ treeview_create_finances(const User* user) {_("Wages"), _("Physio"), _("Scout"), + _("Youth coach"), + _("Youth academy"), _("Journey costs"), /* Money paid to players a user fired. */ _("Compensations")}; @@ -1385,6 +1387,13 @@ treeview_create_finances(const User* user) gtk_list_store_append(ls, &iter); gtk_list_store_set(ls, &iter, 0, "", 1, "", 2, "", -1); + sprintf(buf, "%d%%", user->youth_academy.percentage); + gtk_list_store_append(ls, &iter); + gtk_list_store_set(ls, &iter, 0, _("Youth acad. invest."), 1, buf, 2, "", -1); + + gtk_list_store_append(ls, &iter); + gtk_list_store_set(ls, &iter, 0, "", 1, "", 2, "", -1); + treeview_create_stadium_summary(ls); return GTK_TREE_MODEL(ls); diff --git a/src/user.c b/src/user.c index 705e5bba..66418223 100644 --- a/src/user.c +++ b/src/user.c @@ -17,6 +17,7 @@ #include "treeview.h" #include "user.h" #include "window.h" +#include "youth_academy.h" /** Create a new user with default values. */ User @@ -101,6 +102,8 @@ user_set_up_team(User *user) user_set_up_finances(user); user_set_up_counters(user); + user->youth_academy = youth_academy_new(user->tm); + user->counters[COUNT_USER_NEW_SPONSOR] = (sett_int("int_opt_disable_finances")) ? -5 : 1; } @@ -245,7 +248,6 @@ user_from_team(const Team *tm) void user_job_offer(User *user) { - gchar buf[SMALL]; Team *new_team = NULL; if(math_rnd(0, 1) > const_float("float_user_success_counter_check") || @@ -255,8 +257,8 @@ user_job_offer(User *user) if(user->counters[COUNT_USER_SUCCESS] < -(gfloat)const_int("int_user_success_offer_limit") * 0.9 && !user->counters[COUNT_USER_WARNING]) { - sprintf(buf, _("The owners of %s are not satisfied with the recent performance of the team. There are rumours they're looking for a new manager."), user->tm->name->str); - user_event_add(user, EVENT_TYPE_WARNING, -1, -1, NULL, buf); + user_event_add(user, EVENT_TYPE_WARNING, -1, -1, NULL, + _("The owners of %s are not satisfied with the recent performance of the team. There are rumours they're looking for a new manager."), user->tm->name->str); user->counters[COUNT_USER_WARNING] = 1; return; } @@ -354,18 +356,25 @@ user_event_new(void) /** Add an event with the specified values to the event array of the user. */ void user_event_add(User *user, gint type, gint value1, gint value2, - gpointer value_pointer, gchar *value_string) + gpointer value_pointer, gchar *format, ...) { Event new = user_event_new(); - + gchar text[SMALL]; + va_list args; + new.user = user; new.type = type; new.value1 = value1; new.value2 = value2; new.value_pointer = value_pointer; - if(value_string != NULL) - new.value_string = g_string_new(value_string); + if(format != NULL) + { + va_start (args, format); + g_vsprintf(text, format, args); + va_end (args); + new.value_string = g_string_new(text); + } else new.value_string = NULL; @@ -403,9 +412,8 @@ user_event_show_next(void) g_warning("user_event_show_next: unknown event type %d\n", event->type); break; case EVENT_TYPE_PLAYER_LEFT: - sprintf(buf, _("%s has left your team because his contract expired."), + game_gui_show_warning(_("%s has left your team because his contract expired."), event->value_string->str); - game_gui_show_warning(buf); break; case EVENT_TYPE_WARNING: game_gui_show_warning(event->value_string->str); @@ -427,59 +435,50 @@ user_event_show_next(void) break; case EVENT_TYPE_OVERDRAW: if(event->value1 == 1) - sprintf(buf, _("You have overdrawn your bank account. The team owners give you %d weeks to get above your drawing credit limit."), const_int("int_finance_overdraw_positive")); + game_gui_show_warning(_("You have overdrawn your bank account. The team owners give you %d weeks to get above your drawing credit limit."), const_int("int_finance_overdraw_positive")); else - sprintf(buf, _("You have overdrawn your bank account once again. Bear in mind that after the fourth time you get fired.\nThe team owners give you %d weeks to get above your drawing credit limit."), const_int("int_finance_overdraw_positive")); - game_gui_show_warning(buf); + game_gui_show_warning(_("You have overdrawn your bank account once again. Bear in mind that after the fourth time you get fired.\nThe team owners give you %d weeks to get above your drawing credit limit."), const_int("int_finance_overdraw_positive")); break; case EVENT_TYPE_TRANSFER_OFFER_USER: - sprintf(buf, _("Have a look at the transfer list, there's an offer for %s."), + game_gui_show_warning(_("Have a look at the transfer list, there's an offer for %s."), event->value_string->str); - game_gui_show_warning(buf); break; case EVENT_TYPE_TRANSFER_OFFER_CPU: - sprintf(buf, _("Your offer for %s has been accepted. If you still want to buy him, go to the transfer list and left click on the player."), + game_gui_show_warning(_("Your offer for %s has been accepted. If you still want to buy him, go to the transfer list and left click on the player."), event->value_string->str); - game_gui_show_warning(buf); break; case EVENT_TYPE_TRANSFER_OFFER_REJECTED_BETTER_OFFER: misc_print_grouped_int(event->value1, buf2); misc_print_grouped_int(event->value2, buf3); - sprintf(buf, _("The owners of %s have rejected your offer (%s / %s) for %s. There was a better offer for the player than yours."), ((Team*)event->value_pointer)->name->str, buf2, buf3, event->value_string->str); - game_gui_show_warning(buf); + game_gui_show_warning(_("The owners of %s have rejected your offer (%s / %s) for %s. There was a better offer for the player than yours."), ((Team*)event->value_pointer)->name->str, buf2, buf3, event->value_string->str); break; case EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE_WAGE: misc_print_grouped_int(event->value1, buf2); misc_print_grouped_int(event->value2, buf3); - sprintf(buf, _("The owners of %s have rejected your offer (%s / %s) for %s. Neither the fee nor the wage you offered were acceptable, they say."), ((Team*)event->value_pointer)->name->str, buf2, buf3, event->value_string->str); - game_gui_show_warning(buf); + game_gui_show_warning(_("The owners of %s have rejected your offer (%s / %s) for %s. Neither the fee nor the wage you offered were acceptable, they say."), ((Team*)event->value_pointer)->name->str, buf2, buf3, event->value_string->str); break; case EVENT_TYPE_TRANSFER_OFFER_REJECTED_FEE: misc_print_grouped_int(event->value1, buf2); misc_print_grouped_int(event->value2, buf3); - sprintf(buf, _("The owners of %s have rejected your offer (%s / %s) for %s. The team owners weren't satisfied with the fee you offered."), ((Team*)event->value_pointer)->name->str, buf2, buf3, event->value_string->str); - game_gui_show_warning(buf); + game_gui_show_warning(_("The owners of %s have rejected your offer (%s / %s) for %s. The team owners weren't satisfied with the fee you offered."), ((Team*)event->value_pointer)->name->str, buf2, buf3, event->value_string->str); break; case EVENT_TYPE_TRANSFER_OFFER_REJECTED_WAGE: misc_print_grouped_int(event->value1, buf2); misc_print_grouped_int(event->value2, buf3); /* A player from a team has rejected a transfer offer. */ - sprintf(buf, _("%s of %s has rejected your offer (%s / %s). He wasn't satisfied with the wage you offered."), + game_gui_show_warning(_("%s of %s has rejected your offer (%s / %s). He wasn't satisfied with the wage you offered."), event->value_string->str, ((Team*)event->value_pointer)->name->str, buf2, buf3); - game_gui_show_warning(buf); break; case EVENT_TYPE_TRANSFER_OFFER_MONEY: /* Buy a player from a team. */ - sprintf(buf, _("You didn't have enough money to buy %s from %s."), + game_gui_show_warning(_("You didn't have enough money to buy %s from %s."), event->value_string->str, ((Team*)event->value_pointer)->name->str); - game_gui_show_warning(buf); break; case EVENT_TYPE_TRANSFER_OFFER_ROSTER: /* Buy a player from a team. */ - sprintf(buf, _("Your roster is full. You couldn't buy %s from %s."), + game_gui_show_warning(_("Your roster is full. You couldn't buy %s from %s."), event->value_string->str, ((Team*)event->value_pointer)->name->str); - game_gui_show_warning(buf); break; case EVENT_TYPE_PLAYER_CAREER_STOP: sprintf(buf, _("%s's injury was so severe that he can't play football on a professional level anymore. He leaves your team."), player_of_id_team(event->user->tm, event->value1)->name->str); diff --git a/src/user.h b/src/user.h index 82661bfe..753aaa73 100644 --- a/src/user.h +++ b/src/user.h @@ -45,7 +45,8 @@ user_event_new(void); void user_event_add(User *user, gint type, gint value1, gint value2, - gpointer pointer_value, gchar *string_value); + gpointer value_pointer, gchar *format, ...) +__attribute__ ((format (printf, 6, 7))); void user_event_remove(User *user, gint idx); diff --git a/src/user_struct.h b/src/user_struct.h index 3879e0d1..69e77a8c 100644 --- a/src/user_struct.h +++ b/src/user_struct.h @@ -7,6 +7,7 @@ #include "option_struct.h" #include "player_struct.h" #include "team_struct.h" +#include "youth_academy_struct.h" /** Indices for the money_in array. */ enum MonIn @@ -24,6 +25,8 @@ enum MonOut MON_OUT_WAGE = 0, MON_OUT_PHYSIO, MON_OUT_SCOUT, + MON_OUT_YC, + MON_OUT_YA, MON_OUT_JOURNEY, MON_OUT_COMPENSATIONS, MON_OUT_TRANSFERS, @@ -121,8 +124,10 @@ typedef struct gint scout, physio; /** The variable for the latest user live game. @see #Game */ LiveGame live_game; - + /** Sponsor of the user. */ UserSponsor sponsor; + /** Youth academy of the user. */ + YouthAcademy youth_academy; } User; enum EventType diff --git a/src/variables.h b/src/variables.h index dee2ab77..47aa9403 100644 --- a/src/variables.h +++ b/src/variables.h @@ -54,8 +54,8 @@ gint status[6]; /** A pointer we store temporary stuff in. */ gpointer statp; -/** The currently selected rows in the treeviews. */ -gint selected_row[2]; +/** The currently selected row in the treeview. */ +gint selected_row; /** An array of name lists. */ GArray *name_lists; diff --git a/src/window.c b/src/window.c index 6d01c8ca..0a4411be 100644 --- a/src/window.c +++ b/src/window.c @@ -199,6 +199,19 @@ window_show_menu_player(GdkEvent *event) ((GdkEventButton*)event)->button, gdk_event_get_time(event)); } +/** Show the youth academy context menu, triggered by 'event'. */ +void +window_show_menu_youth(GdkEvent *event) +{ + if(window.menu_youth != NULL) + window_destroy(&window.menu_youth, FALSE); + + window.menu_youth = create_menu_youth(); + + gtk_menu_popup(GTK_MENU(window.menu_youth), NULL, NULL, NULL, NULL, + ((GdkEventButton*)event)->button, gdk_event_get_time(event)); +} + /** Show the digits window with the labels and values set according to the arguments. */ void @@ -217,9 +230,12 @@ window_show_digits(const gchar *text_main, const gchar* text1, gint value1, spinbutton1 = GTK_SPIN_BUTTON(lookup_widget(window.digits, "spinbutton1")); spinbutton2 = GTK_SPIN_BUTTON(lookup_widget(window.digits, "spinbutton2")); - if(stat0 == STATUS_GET_LOAN || - stat0 == STATUS_PAY_LOAN) + if(stat1 == STATUS_GET_LOAN || + stat1 == STATUS_PAY_LOAN) gtk_spin_button_set_range(spinbutton1, (gdouble)1, (gdouble)value1); + else if(stat1 == STATUS_SET_YA_PERCENTAGE) + gtk_spin_button_set_range(spinbutton2, (gdouble)0, + (gdouble)const_int("int_youth_academy_max_percentage")); gtk_spin_button_set_value(spinbutton1, (gdouble)value1); gtk_spin_button_set_value(spinbutton2, (gdouble)value2); @@ -364,8 +380,7 @@ window_create(gint window_type) { window.main = create_main_window(); wind = window.main; - sprintf(buf, _("Welcome to Bygfoot %s"), VERS); - game_gui_print_message(buf); + game_gui_print_message(_("Welcome to Bygfoot %s"), VERS); sprintf(buf, "Bygfoot Football Manager %s", VERS); } else diff --git a/src/window.h b/src/window.h index b27ec4a1..a917096e 100644 --- a/src/window.h +++ b/src/window.h @@ -59,6 +59,9 @@ window_show_options(void); void window_show_menu_player(GdkEvent *event); +void +window_show_menu_youth(GdkEvent *event); + void window_live_set_spinbuttons(void); diff --git a/support_files/bygfoot_constants b/support_files/bygfoot_constants index e13b4464..87cc4732 100644 --- a/support_files/bygfoot_constants +++ b/support_files/bygfoot_constants @@ -291,6 +291,12 @@ float_finance_physio_factor2 5000 float_finance_physio_factor3 4000 float_finance_physio_factor4 3000 +# wage factor for youth coach +float_finance_yc_factor1 35000 +float_finance_yc_factor2 25000 +float_finance_yc_factor3 18000 +float_finance_yc_factor4 10000 + # interest rate float_finance_interest 200 @@ -771,3 +777,66 @@ float_sponsor_continue_prob 1000 # how many live game units we check backwards to avoid # having the same commentary text too often int_lg_commentary_check_backwards 12 + +# default percentage for youth academy +int_youth_academy_default_percentage 5 + +# upper and lower bounds for number of youths +# in the academy +int_youth_academy_youths_lower 1 +int_youth_academy_youths_upper 2 + +# upper and lower values for the counter determining +# when a new youth appears (in weeks) +float_youth_academy_youth_counter_lower 350000 +float_youth_academy_youth_counter_upper 450000 + +# upper and lower values for youth ages +float_youth_academy_age_lower 155000 +float_youth_academy_age_upper 175000 + +# skill reduce factor (exponent is +# peak_age - age) +float_youth_academy_skill_reduce_factor 9800 + +# weight of the coach for the average skill +# between 0 and 1 +float_youth_academy_coach_weight 2500 + +# upper and lower factor values for average skill +# (actual value depends on coach and percentage) +float_youth_academy_skill_factor_lower 8000 +float_youth_academy_skill_factor_upper 12000 + +# youth skill variance (to have random +# skills, not always the same) +float_youth_academy_skill_variance 1000 + +# maximum percentage the user can devote to the youth academy +int_youth_academy_max_percentage 25 + +# Last skill update addition when the user's average +# youth coach was BEST +float_youth_academy_lsu_addition_best 13000 + +# how much we substract from the above value when the +# coach was worse +float_youth_academy_lsu_penalty 2000 + +# how much the average youth coach and +# investment percentage weighs; the higher +# the slower the change of the value when +# the user changes the coach (e.g. BAD -> BEST) +# or the percentage (e.g. 5% -> 20%) +float_youth_academy_average_weight 25000 + +# new youth counter decrease if the average percentage +# is approx. 0 +float_youth_academy_counter_decrease_min 10000 + +# additional lsu change if a youth plays a match +float_youth_lsu_addition_match 10000 + +# how many youths there may be at most in the YA +int_youth_academy_max_youths 10 + diff --git a/support_files/bygfoot_user.conf b/support_files/bygfoot_user.conf index 0d40bdf4..1d961bae 100644 --- a/support_files/bygfoot_user.conf +++ b/support_files/bygfoot_user.conf @@ -4,6 +4,8 @@ # Most of these options are uncommented because their meaning # is rather clear if you take a look at the options window in the game. +int_opt_user_confirm_youth 0 + int_opt_user_show_live_game 0 int_opt_user_live_game_speed 0 int_opt_user_live_game_verbosity 7 diff --git a/support_files/lg_commentary/lg_commentary_de.xml b/support_files/lg_commentary/lg_commentary_de.xml index 2344d741..e8301e45 100644 --- a/support_files/lg_commentary/lg_commentary_de.xml +++ b/support_files/lg_commentary/lg_commentary_de.xml @@ -46,7 +46,7 @@ Das sollte der Sieg sein für _TW_ _TW_ beherrscht _TL_ nach Belieben Keine Chance für _TL_ in diesem Spiel - Das wird wohl nix mehr für_TL_ + Das wird wohl nix mehr für _TL_ Das könnte ein sehr torreiches Spiel werden heute _TL_ kann den Ausgleich noch schaffen Was für eine Überraschung, das vermeintlich unterlegene Team führt