diff --git a/bygfoot.glade b/bygfoot.glade index f7e23636..2788f2ad 100644 --- a/bygfoot.glade +++ b/bygfoot.glade @@ -63,13 +63,13 @@ True - Load last save + _Load last save True - + True gtk-open 1 @@ -122,7 +122,7 @@ True - Options + _Options True @@ -137,7 +137,7 @@ - + True gtk-preferences 1 @@ -193,7 +193,7 @@ True - Figures + F_igures True @@ -269,7 +269,7 @@ True - Team + _Team True @@ -556,7 +556,7 @@ True - Player + _Player True @@ -638,7 +638,7 @@ True - User + _User True @@ -694,7 +694,7 @@ - + True gtk-go-forward 1 @@ -716,7 +716,7 @@ - + True gtk-go-back 1 @@ -738,7 +738,7 @@ - + True gtk-justify-fill 1 @@ -758,7 +758,7 @@ True - FinStad + Fin_Stad True diff --git a/src/callbacks.c b/src/callbacks.c index 322f2bc1..7a23f745 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -739,7 +739,8 @@ on_menu_show_info_activate (GtkMenuItem *menuitem, return; } - stat0 = STATUS_SHOW_PLAYER_INFO; + 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])); gui_set_arrows(); diff --git a/src/game_gui.c b/src/game_gui.c index ba3d93e8..045bd042 100644 --- a/src/game_gui.c +++ b/src/game_gui.c @@ -358,7 +358,7 @@ game_gui_clear_entry_message(gpointer data) enum MainWindowInensitiveItems { INSENSITIVE_ITEM_TOOLBAR = 0, - INSENSITIVE_ITEM_PLAYER_LIST2, +/* INSENSITIVE_ITEM_PLAYER_LIST2, */ INSENSITIVE_ITEM_MENU_FILE, INSENSITIVE_ITEM_MENU_OPTIONS, INSENSITIVE_ITEM_MENU_FIGURES, @@ -398,8 +398,8 @@ game_gui_set_main_window_sensitivity(gboolean value) insensitive_items[INSENSITIVE_ITEM_TOOLBAR] = lookup_widget(window.main, "hbox1"); - insensitive_items[INSENSITIVE_ITEM_PLAYER_LIST2] = - lookup_widget(window.main, "vbox8"); +/* insensitive_items[INSENSITIVE_ITEM_PLAYER_LIST2] = */ +/* lookup_widget(window.main, "vbox8"); */ insensitive_items[INSENSITIVE_ITEM_MENU_FILE] = lookup_widget(window.main, "menu_file"); insensitive_items[INSENSITIVE_ITEM_MENU_OPTIONS] = diff --git a/src/interface.c b/src/interface.c index 0d96c24e..18b823df 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 *image303; + GtkWidget *image307; 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 *image304; + GtkWidget *image308; GtkWidget *trennlinie7; GtkWidget *menu_job_offers; GtkWidget *menu_live_game; @@ -114,11 +114,11 @@ create_main_window (void) GtkWidget *menu_user_show_history; GtkWidget *trennlinie9; GtkWidget *menu_next_user; - GtkWidget *image305; + GtkWidget *image309; GtkWidget *menu_previous_user; - GtkWidget *image306; + GtkWidget *image310; GtkWidget *menu_manage_users; - GtkWidget *image307; + GtkWidget *image311; GtkWidget *menu_finances_stadium; GtkWidget *menu_finances_stadium_menu; GtkWidget *menu_show_finances; @@ -243,16 +243,16 @@ create_main_window (void) gtk_widget_show (menu_open); gtk_container_add (GTK_CONTAINER (menu_file_menu), menu_open); - menu_load_last_save = gtk_image_menu_item_new_with_mnemonic (_("Load last save")); + menu_load_last_save = gtk_image_menu_item_new_with_mnemonic (_("_Load last save")); gtk_widget_show (menu_load_last_save); gtk_container_add (GTK_CONTAINER (menu_file_menu), menu_load_last_save); gtk_widget_add_accelerator (menu_load_last_save, "activate", accel_group, GDK_l, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_ACCEL_VISIBLE); - image303 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); - gtk_widget_show (image303); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_load_last_save), image303); + image307 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); + gtk_widget_show (image307); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_load_last_save), image307); menu_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group); gtk_widget_show (menu_save); @@ -271,7 +271,7 @@ create_main_window (void) gtk_widget_show (menu_quit); gtk_container_add (GTK_CONTAINER (menu_file_menu), menu_quit); - menu_options = gtk_menu_item_new_with_mnemonic (_("Options")); + menu_options = gtk_menu_item_new_with_mnemonic (_("_Options")); gtk_widget_show (menu_options); gtk_container_add (GTK_CONTAINER (menubar1), menu_options); @@ -285,9 +285,9 @@ create_main_window (void) GDK_p, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - image304 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU); - gtk_widget_show (image304); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_preferences), image304); + image308 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU); + gtk_widget_show (image308); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_preferences), image308); trennlinie7 = gtk_separator_menu_item_new (); gtk_widget_show (trennlinie7); @@ -308,7 +308,7 @@ create_main_window (void) gtk_container_add (GTK_CONTAINER (menu_options_menu), menu_overwrite); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_overwrite), TRUE); - menu_figures = gtk_menu_item_new_with_mnemonic (_("Figures")); + menu_figures = gtk_menu_item_new_with_mnemonic (_("F_igures")); gtk_widget_show (menu_figures); gtk_container_add (GTK_CONTAINER (menubar1), menu_figures); @@ -353,7 +353,7 @@ create_main_window (void) gtk_widget_show (menu_season_history); gtk_container_add (GTK_CONTAINER (menu_figures_menu), menu_season_history); - menu_team = gtk_menu_item_new_with_mnemonic (_("Team")); + menu_team = gtk_menu_item_new_with_mnemonic (_("_Team")); gtk_widget_show (menu_team); gtk_container_add (GTK_CONTAINER (menubar1), menu_team); @@ -514,7 +514,7 @@ create_main_window (void) gtk_widget_show (menu_browse_teams); gtk_container_add (GTK_CONTAINER (menu_team_menu), menu_browse_teams); - menu_player = gtk_menu_item_new_with_mnemonic (_("Player")); + menu_player = gtk_menu_item_new_with_mnemonic (_("_Player")); gtk_widget_show (menu_player); gtk_container_add (GTK_CONTAINER (menubar1), menu_player); @@ -554,7 +554,7 @@ create_main_window (void) gtk_widget_show (menu_browse_players); gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_browse_players); - menu_user = gtk_menu_item_new_with_mnemonic (_("User")); + menu_user = gtk_menu_item_new_with_mnemonic (_("_User")); gtk_widget_show (menu_user); gtk_container_add (GTK_CONTAINER (menubar1), menu_user); @@ -596,9 +596,9 @@ create_main_window (void) GDK_F9, 0, GTK_ACCEL_VISIBLE); - image305 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_MENU); - gtk_widget_show (image305); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_next_user), image305); + image309 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_MENU); + gtk_widget_show (image309); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_next_user), image309); menu_previous_user = gtk_image_menu_item_new_with_mnemonic (_("Previous user")); gtk_widget_show (menu_previous_user); @@ -607,9 +607,9 @@ create_main_window (void) GDK_F8, 0, GTK_ACCEL_VISIBLE); - image306 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU); - gtk_widget_show (image306); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_previous_user), image306); + image310 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU); + gtk_widget_show (image310); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_previous_user), image310); menu_manage_users = gtk_image_menu_item_new_with_mnemonic (_("Manage users")); gtk_widget_show (menu_manage_users); @@ -618,11 +618,11 @@ create_main_window (void) GDK_F12, 0, GTK_ACCEL_VISIBLE); - image307 = gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_MENU); - gtk_widget_show (image307); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_manage_users), image307); + image311 = gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_MENU); + gtk_widget_show (image311); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_manage_users), image311); - menu_finances_stadium = gtk_menu_item_new_with_mnemonic (_("FinStad")); + menu_finances_stadium = gtk_menu_item_new_with_mnemonic (_("Fin_Stad")); gtk_widget_show (menu_finances_stadium); gtk_container_add (GTK_CONTAINER (menubar1), menu_finances_stadium); @@ -1260,7 +1260,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, image303, "image303"); + GLADE_HOOKUP_OBJECT (main_window, image307, "image307"); 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"); @@ -1268,7 +1268,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, image304, "image304"); + GLADE_HOOKUP_OBJECT (main_window, image308, "image308"); 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"); @@ -1332,11 +1332,11 @@ create_main_window (void) GLADE_HOOKUP_OBJECT (main_window, menu_user_show_history, "menu_user_show_history"); GLADE_HOOKUP_OBJECT (main_window, trennlinie9, "trennlinie9"); GLADE_HOOKUP_OBJECT (main_window, menu_next_user, "menu_next_user"); - GLADE_HOOKUP_OBJECT (main_window, image305, "image305"); + GLADE_HOOKUP_OBJECT (main_window, image309, "image309"); GLADE_HOOKUP_OBJECT (main_window, menu_previous_user, "menu_previous_user"); - GLADE_HOOKUP_OBJECT (main_window, image306, "image306"); + GLADE_HOOKUP_OBJECT (main_window, image310, "image310"); GLADE_HOOKUP_OBJECT (main_window, menu_manage_users, "menu_manage_users"); - GLADE_HOOKUP_OBJECT (main_window, image307, "image307"); + GLADE_HOOKUP_OBJECT (main_window, image311, "image311"); 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"); diff --git a/src/misc_callback_func.c b/src/misc_callback_func.c index 576ccf54..3cbb91f3 100644 --- a/src/misc_callback_func.c +++ b/src/misc_callback_func.c @@ -83,8 +83,6 @@ misc_callback_add_player(void) new_user.tm = tm; new_user.team_id = tm->id; - user_history_add(&new_user, USER_HISTORY_START_GAME, tm->id, tm->clid, -1, ""); - g_array_append_val(users, new_user); treeview_show_users(treeview_users); diff --git a/src/misc_callbacks.c b/src/misc_callbacks.c index 6d584d4c..3431671c 100644 --- a/src/misc_callbacks.c +++ b/src/misc_callbacks.c @@ -305,6 +305,7 @@ on_window_stadium_delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) { + on_button_stadium_cancel_clicked(NULL, NULL); return TRUE; } diff --git a/src/user.c b/src/user.c index 2376c609..0895ef0d 100644 --- a/src/user.c +++ b/src/user.c @@ -44,7 +44,10 @@ user_set_up_team_new_game(User *user) gint rndom, max, lig_idx = -1; if(user->scout == 0) + { user_set_up_team(user); + user_history_add(user, USER_HISTORY_START_GAME, user->tm->id, user->tm->clid, -1, ""); + } else { if(user->scout == 1 && @@ -63,6 +66,8 @@ user_set_up_team_new_game(User *user) user->tm = &g_array_index(lig(lig_idx).teams, Team, rndom); user->team_id = g_array_index(lig(lig_idx).teams, Team, rndom).id; + user_history_add(user, USER_HISTORY_START_GAME, user->tm->id, user->tm->clid, -1, ""); + user_set_up_team(user); } }