From 3885d6a8496af16b0d94abcc6baaa6057761d77e Mon Sep 17 00:00:00 2001 From: gyboth Date: Sun, 10 Apr 2005 09:19:38 +0000 Subject: [PATCH] Minor fixes. --- Makefile.am | 2 +- bygfoot.glade | 2 ++ src/callback_func.c | 4 ++-- src/callbacks.c | 7 ++----- src/interface.c | 2 ++ src/live_game.c | 8 +++++++- src/transfer.c | 2 ++ 7 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4b140479..356020a2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,7 +15,7 @@ dist_man6_MANS = man/bygfoot.6 SUPPORT_DIRS = support_files support_files/names support_files/pixmaps support_files/pixmaps/live_game support_files/definitions -SUPPORT_FILES = support_files/names/player_names.xml support_files/bygfoot.conf support_files/pixmaps/flag_ro.png support_files/pixmaps/bygfoot_team_editor_icon.png support_files/pixmaps/bygfoot_icon.png support_files/pixmaps/pay_loan.png support_files/pixmaps/inc_cap.png support_files/pixmaps/new_week.png support_files/pixmaps/preview.png support_files/pixmaps/get_loan.png support_files/pixmaps/transfers.png support_files/pixmaps/fire_player.png support_files/pixmaps/inc_saf.png support_files/pixmaps/football.png support_files/pixmaps/flag_br.png support_files/pixmaps/flag_de.png support_files/pixmaps/fin_stad.png support_files/pixmaps/flag_en.png support_files/pixmaps/flag_es.png support_files/pixmaps/flag_fr.png support_files/pixmaps/possession_ball.png support_files/pixmaps/flag_hu.png support_files/pixmaps/live_game/yellow.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/flag_it.png support_files/pixmaps/flag_mx.png support_files/pixmaps/flag_pl.png support_files/definitions/league_turkey1_short.xml support_files/definitions/league_italy1_short.xml support_files/definitions/league_germany1_short.xml support_files/definitions/country_england.xml support_files/definitions/league_russia1_short.xml support_files/definitions/league_scotland1_short.xml support_files/definitions/league_england1.xml support_files/definitions/league_england2.xml support_files/definitions/league_england3.xml support_files/definitions/league_england4.xml support_files/definitions/league_england5.xml support_files/definitions/league_greece1_short.xml support_files/definitions/league_denmark1_short.xml support_files/definitions/cup_england_fa.xml support_files/definitions/cup_champ_league.xml support_files/definitions/league_ukraine1_short.xml support_files/definitions/league_switzerland1_short.xml support_files/definitions/cup_cwc.xml support_files/definitions/league_netherlands1_short.xml support_files/definitions/league_europe_div.xml support_files/definitions/league_czech1_short.xml support_files/definitions/cup_england_prom_games.xml support_files/definitions/league_portugal1_short.xml support_files/definitions/league_spain1_short.xml support_files/definitions/cup_uefa.xml support_files/definitions/cup_england_league.xml support_files/definitions/league_belgium1_short.xml support_files/definitions/league_france1_short.xml +SUPPORT_FILES = support_files/names/player_names.xml support_files/bygfoot.conf support_files/pixmaps/flag_ro.png support_files/pixmaps/bygfoot_team_editor_icon.png support_files/pixmaps/bygfoot_icon.png support_files/pixmaps/pay_loan.png support_files/pixmaps/inc_cap.png support_files/pixmaps/new_week.png support_files/pixmaps/preview.png support_files/pixmaps/get_loan.png support_files/pixmaps/transfers.png support_files/pixmaps/fire_player.png support_files/pixmaps/inc_saf.png support_files/pixmaps/football.png support_files/pixmaps/flag_br.png support_files/pixmaps/flag_de.png support_files/pixmaps/fin_stad.png support_files/pixmaps/flag_en.png support_files/pixmaps/flag_es.png support_files/pixmaps/flag_fr.png support_files/pixmaps/possession_ball.png support_files/pixmaps/flag_hu.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/own_goal.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/flag_it.png support_files/pixmaps/flag_mx.png support_files/pixmaps/flag_pl.png support_files/pixmaps/boost_anti.png support_files/pixmaps/boost_off.png support_files/pixmaps/boost_on.png support_files/pixmaps/flag_eu.png support_files/pixmaps/possession_ball_grey.png support_files/pixmaps/style_def.png support_files/pixmaps/style_atk.png support_files/pixmaps/style_bal.png support_files/pixmaps/flag_uk.png support_files/pixmaps/style_all_atk.png support_files/pixmaps/flag_ch.png support_files/pixmaps/style_all_def.png support_files/pixmaps/flag_cz.png support_files/pixmaps/flag_dk.png support_files/pixmaps/flag_gr.png support_files/pixmaps/flag_nl.png support_files/pixmaps/flag_pt.png support_files/pixmaps/flag_ru.png support_files/pixmaps/flag_sco.png support_files/pixmaps/flag_tr.png support_files/pixmaps/flag_bl.png support_files/definitions/league_turkey1_short.xml support_files/definitions/league_italy1_short.xml support_files/definitions/league_germany1_short.xml support_files/definitions/country_england.xml support_files/definitions/league_russia1_short.xml support_files/definitions/league_scotland1_short.xml support_files/definitions/league_england1.xml support_files/definitions/league_england2.xml support_files/definitions/league_england3.xml support_files/definitions/league_england4.xml support_files/definitions/league_england5.xml support_files/definitions/league_greece1_short.xml support_files/definitions/league_denmark1_short.xml support_files/definitions/cup_england_fa.xml support_files/definitions/cup_champ_league.xml support_files/definitions/league_ukraine1_short.xml support_files/definitions/league_switzerland1_short.xml support_files/definitions/cup_cwc.xml support_files/definitions/league_netherlands1_short.xml support_files/definitions/league_europe_div.xml support_files/definitions/league_czech1_short.xml support_files/definitions/cup_england_prom_games.xml support_files/definitions/league_portugal1_short.xml support_files/definitions/league_spain1_short.xml support_files/definitions/cup_uefa.xml support_files/definitions/cup_england_league.xml support_files/definitions/league_belgium1_short.xml support_files/definitions/league_france1_short.xml support_files/definitions/cup_champ_league.xml~ support_files/definitions/cup_england_fa.xml~ support_files/definitions/cup_cwc.xml~ support_files/definitions/cup_uefa.xml~ support_files/definitions/league_england2.xml~ support_files/definitions/league_england1.xml~ support_files/definitions/league_england3.xml~ support_files/definitions/league_england4.xml~ support_files/definitions/league_england5.xml~ support_files/definitions/cup_england_prom_games2.xml support_files/definitions/cup_england_prom_games2.xml~ support_files/definitions/cup_england_prom_games.xml~ support_files/definitions/country_brazil.xml support_files/definitions/league_brazil1.xml support_files/definitions/league_brazil2.xml support_files/definitions/league_brazil3.xml support_files/definitions/league_brazil4.xml support_files/definitions/league_brazil5.xml support_files/definitions/league_brazil6.xml support_files/definitions/country_brazil.xml~ support_files/definitions/cup_brazil_prom_games.xml support_files/bygfoot_constants support_files/bygfoot_user.conf support_files/bygfoot_constants~ support_files/bygfoot.conf~ support_files/bygfoot_gy.conf support_files/bygfoot_user.conf~ install-data-local: @$(NORMAL_INSTALL) diff --git a/bygfoot.glade b/bygfoot.glade index 4d11a453..128f4c55 100644 --- a/bygfoot.glade +++ b/bygfoot.glade @@ -1261,6 +1261,7 @@ True + Right click and left click to change your playing style @@ -1283,6 +1284,7 @@ True + Right click and left click to change boost state diff --git a/src/callback_func.c b/src/callback_func.c index b94d6c32..551f8e68 100644 --- a/src/callback_func.c +++ b/src/callback_func.c @@ -290,12 +290,12 @@ callback_offer_new_contract(gint idx) if(pl->contract >= 2) { - game_gui_print_message(_("You can't offer a new contract if the old one is still above 2 years.")); + game_gui_show_warning(_("You can't offer a new contract if the old one is still above 2 years.")); return; } else if(pl->offers == const_int("int_contract_max_offers")) { - game_gui_print_message(_("The player won't negotiate with you anymore.")); + game_gui_show_warning(_("The player won't negotiate with you anymore.")); return; } diff --git a/src/callbacks.c b/src/callbacks.c index f2c15650..9dde9247 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -318,7 +318,6 @@ on_menu_put_on_transfer_list_activate (GtkMenuItem *menuitem, { setsav0; transfer_add_remove_user_player(player_of(current_user.tm, selected_row[0])); - selected_row[0] = -1; } } @@ -335,7 +334,6 @@ on_menu_remove_from_transfer_list_activate (GtkMenuItem *menuitem, { setsav0; transfer_add_remove_user_player(player_of(current_user.tm, selected_row[0])); - selected_row[0] = -1; } } @@ -346,6 +344,8 @@ on_menu_fire_activate (GtkMenuItem *menuitem, { if(selected_row[0] == -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]); @@ -380,8 +380,6 @@ on_menu_shoots_penalties_activate (GtkMenuItem *menuitem, treeview_show_user_player_list(); setsav0; } - - selected_row[0] = -1; } void @@ -647,7 +645,6 @@ on_menu_offer_new_contract_activate (GtkMenuItem *menuitem, } callback_offer_new_contract(selected_row[0]); - selected_row[0] = -1; setsav0; } diff --git a/src/interface.c b/src/interface.c index 386a9f99..2081c748 100644 --- a/src/interface.c +++ b/src/interface.c @@ -785,6 +785,7 @@ create_main_window (void) eventbox_style = gtk_event_box_new (); gtk_widget_show (eventbox_style); gtk_box_pack_start (GTK_BOX (hbox48), eventbox_style, TRUE, TRUE, 0); + gtk_tooltips_set_tip (tooltips, eventbox_style, _("Right click and left click to change your playing style"), NULL); image_style = create_pixmap (main_window, NULL); gtk_widget_show (image_style); @@ -794,6 +795,7 @@ create_main_window (void) eventbox_boost = gtk_event_box_new (); gtk_widget_show (eventbox_boost); gtk_box_pack_start (GTK_BOX (hbox48), eventbox_boost, TRUE, TRUE, 0); + gtk_tooltips_set_tip (tooltips, eventbox_boost, _("Right click and left click to change boost state"), NULL); image_boost = create_pixmap (main_window, NULL); gtk_widget_show (image_boost); diff --git a/src/live_game.c b/src/live_game.c index 9d9b5ecf..043fd7fe 100644 --- a/src/live_game.c +++ b/src/live_game.c @@ -99,7 +99,13 @@ live_game_create_unit(void) new.result[0] = last_unit.result[0]; new.result[1] = last_unit.result[1]; - if(query_live_game_event_is_break(new.minute, new.time)) + if(last_unit.event.type == LIVE_GAME_EVENT_HALF_TIME || + last_unit.event.type == LIVE_GAME_EVENT_EXTRA_TIME) + { + live_game_event_general(TRUE); + return; + } + else if(query_live_game_event_is_break(new.minute, new.time)) { new.event.type = live_game_get_break(); new.possession = last_unit.possession; diff --git a/src/transfer.c b/src/transfer.c index 65f5e469..a83f27a8 100644 --- a/src/transfer.c +++ b/src/transfer.c @@ -208,6 +208,8 @@ transfer_evaluate_offers(void) player_of(transoff(i, idx).tm, transoff(i, idx).tm->players->len - 1)->id = -1; player_of(transoff(i, idx).tm, transoff(i, idx).tm->players->len - 1)->id = player_new_id(transoff(i, idx).tm->players); + player_of(transoff(i, idx).tm, transoff(i, idx).tm->players->len - 1)->wage = + transoff(i, idx).wage; user_from_team(transoff(i, idx).tm)->money -= transoff(i, idx).fee; user_from_team(transoff(i, idx).tm)->money_out[1][MON_OUT_TRANSFERS] -= transoff(i, idx).fee;