mirror of https://github.com/tstellar/bygfoot.git
"Window sensitivity, mmatches bugfixes."
This commit is contained in:
parent
f872d1fd29
commit
b57ddda587
|
@ -1,4 +1,9 @@
|
|||
3/22/2006: v1.9.5
|
||||
3/27/2006: v1.9.6
|
||||
- fixed a bug that made the main window remain insensitive after
|
||||
opening and closing some other window
|
||||
- fixed a bug that crashed the game when loading memorable matches
|
||||
|
||||
3/24/2006: v1.9.5
|
||||
- fixed a bug that led to a 'cup not found' exit after a few
|
||||
seasons
|
||||
- fixed a minor youth academy bug
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_CENTER</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="default_width">550</property>
|
||||
<property name="default_height">600</property>
|
||||
<property name="resizable">True</property>
|
||||
|
@ -746,7 +746,7 @@
|
|||
<property name="title" translatable="yes">Live game</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_CENTER</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="default_width">620</property>
|
||||
<property name="default_height">550</property>
|
||||
<property name="resizable">True</property>
|
||||
|
@ -1585,7 +1585,7 @@
|
|||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_CENTER</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
|
|
|
@ -984,7 +984,7 @@
|
|||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_CENTER</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
|
@ -2360,7 +2360,7 @@
|
|||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_CENTER</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="default_width">600</property>
|
||||
<property name="default_height">500</property>
|
||||
<property name="resizable">True</property>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_CENTER</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -86,7 +86,7 @@ bet_update_user_bets(void)
|
|||
for(j=0;j<usr(i).bets[1]->len;j++)
|
||||
{
|
||||
bet = bet_from_fixture(g_array_index(usr(i).bets[1], BetUser, j).fix_id);
|
||||
fix = fixture_from_id(g_array_index(usr(i).bets[1], BetUser, j).fix_id);
|
||||
fix = fixture_from_id(g_array_index(usr(i).bets[1], BetUser, j).fix_id, TRUE);
|
||||
|
||||
if(fix->result[0][0] < fix->result[1][0])
|
||||
outcome = 2;
|
||||
|
@ -127,7 +127,7 @@ bet_update_user_bets(void)
|
|||
void
|
||||
bet_get_odds(BetMatch *bet)
|
||||
{
|
||||
const Fixture *fix = fixture_from_id(bet->fix_id);
|
||||
const Fixture *fix = fixture_from_id(bet->fix_id, TRUE);
|
||||
gfloat home_advantage = (fix->home_advantage) ?
|
||||
(const_float("float_game_home_advantage_lower") +
|
||||
const_float("float_game_home_advantage_upper")) / 2 : 0;
|
||||
|
|
|
@ -40,10 +40,11 @@
|
|||
/**
|
||||
* Program version number.
|
||||
*/
|
||||
#define VERS "1.9.5"
|
||||
#define VERS "1.9.6"
|
||||
|
||||
/** Home dir name */
|
||||
#define HOMEDIRNAME ".bygfoot-cvs"
|
||||
//#define HOMEDIRNAME ".bygfoot-1.9"
|
||||
|
||||
/**
|
||||
* Convenience macros, used for string sizes (typically buf[SMALL]).
|
||||
|
|
|
@ -83,7 +83,7 @@ callback_show_next_live_game(void)
|
|||
return;
|
||||
}
|
||||
|
||||
window_destroy(&window.live, TRUE);
|
||||
window_destroy(&window.live);
|
||||
|
||||
/* no more user games to show: end round. */
|
||||
end_week_round();
|
||||
|
@ -168,7 +168,8 @@ callback_show_last_match(gboolean start, LiveGame *lg)
|
|||
|
||||
gui_set_sensitive_lg_meters(FALSE);
|
||||
|
||||
treeview_show_game_stats(GTK_TREE_VIEW(lookup_widget(window.live, "treeview_stats")), lg);
|
||||
treeview_show_game_stats(
|
||||
GTK_TREE_VIEW(lookup_widget(window.live, "treeview_stats")), lg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -195,7 +196,7 @@ callback_show_last_match(gboolean start, LiveGame *lg)
|
|||
}
|
||||
else if(stat4 == STATUS_SHOW_LAST_MATCH_ABORT)
|
||||
{
|
||||
window_destroy(&window.live, TRUE);
|
||||
window_destroy(&window.live);
|
||||
stat1 = stat2 = stat3 = stat4 = -1;
|
||||
}
|
||||
else
|
||||
|
@ -207,7 +208,7 @@ void
|
|||
callback_show_last_match_stats(void)
|
||||
{
|
||||
current_user.live_game.fix =
|
||||
fixture_from_id(current_user.live_game.fix_id);
|
||||
fixture_from_id(current_user.live_game.fix_id, TRUE);
|
||||
|
||||
treeview_show_game_stats(GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")),
|
||||
¤t_user.live_game);
|
||||
|
|
|
@ -61,7 +61,7 @@ void
|
|||
on_menu_new_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.main, FALSE);
|
||||
window_destroy(&window.main);
|
||||
free_memory();
|
||||
|
||||
main_init(NULL, NULL);
|
||||
|
|
|
@ -1118,7 +1118,7 @@ fixture_get_matches(const Team *tm1, const Team *tm2)
|
|||
|
||||
/** Return the fixture going with the id. */
|
||||
Fixture*
|
||||
fixture_from_id(gint id)
|
||||
fixture_from_id(gint id, gboolean abort_program)
|
||||
{
|
||||
gint i, j;
|
||||
|
||||
|
@ -1132,8 +1132,9 @@ fixture_from_id(gint id)
|
|||
if(g_array_index(cp(i).fixtures, Fixture, j).id == id)
|
||||
return &g_array_index(cp(i).fixtures, Fixture, j);
|
||||
|
||||
main_exit_program(EXIT_POINTER_NOT_FOUND,
|
||||
"fixture_from_id: fixture with id %d found \n", id);
|
||||
if(abort_program)
|
||||
main_exit_program(EXIT_POINTER_NOT_FOUND,
|
||||
"fixture_from_id: fixture with id %d found \n", id);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ GPtrArray*
|
|||
fixture_get_coming(const Team *tm);
|
||||
|
||||
Fixture*
|
||||
fixture_from_id(gint id);
|
||||
fixture_from_id(gint id, gboolean abort_program);
|
||||
|
||||
gint
|
||||
fixture_get_last_week_round(gint week_number);
|
||||
|
|
|
@ -652,7 +652,7 @@ game_gui_set_main_window_sensitivity(gboolean value)
|
|||
for(i=0;i<SHOW_ITEM_END;i++)
|
||||
gtk_widget_hide(show_items[i]);
|
||||
|
||||
gtk_widget_set_sensitive(window.main, value);
|
||||
gtk_window_set_modal(GTK_WINDOW(window.live), !value);
|
||||
}
|
||||
|
||||
/** Show a window with a warning.
|
||||
|
|
|
@ -68,7 +68,7 @@ gui_show_progress(gfloat value, const gchar *text, gint pictype)
|
|||
|
||||
if(value == 1 || value < 0)
|
||||
{
|
||||
window_destroy(&window.progress, FALSE);
|
||||
window_destroy(&window.progress);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ language_set(gint index)
|
|||
|
||||
if(window.main != NULL)
|
||||
{
|
||||
window_destroy(&window.main, FALSE);
|
||||
window_destroy(&window.main);
|
||||
window_create(WINDOW_MAIN);
|
||||
on_button_back_to_main_clicked(NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ live_game_initialize(Fixture *fix)
|
|||
option_int("int_opt_user_show_live_game",
|
||||
&usr(stat2).options));
|
||||
|
||||
game_initialize(fix);
|
||||
live_game_reset(match, fix, TRUE);
|
||||
|
||||
if(show)
|
||||
|
@ -127,8 +128,6 @@ live_game_initialize(Fixture *fix)
|
|||
game_gui_live_game_show_opponent();
|
||||
}
|
||||
|
||||
game_initialize(fix);
|
||||
|
||||
if(stat2 != -1 || stat5 < -1000)
|
||||
lg_commentary_initialize(fix);
|
||||
}
|
||||
|
@ -1600,12 +1599,14 @@ live_game_reset(LiveGame *live_game, Fixture *fix, gboolean free_variable)
|
|||
if(fix != NULL)
|
||||
{
|
||||
live_game->fix_id = fix->id;
|
||||
live_game->attendance = fix->attendance;
|
||||
live_game->team_names[0] = g_strdup(fix->teams[0]->name);
|
||||
live_game->team_names[1] = g_strdup(fix->teams[1]->name);
|
||||
}
|
||||
else
|
||||
{
|
||||
live_game->fix_id = -1;
|
||||
live_game->attendance = -1;
|
||||
live_game->team_names[0] =
|
||||
live_game->team_names[1] = NULL;
|
||||
}
|
||||
|
|
|
@ -203,6 +203,9 @@ typedef struct
|
|||
/** The names of the teams stored for later use (when the fixture
|
||||
already got freed). */
|
||||
gchar *team_names[2];
|
||||
/** Attendance stored for later use (when the fixture
|
||||
already got freed). */
|
||||
gint attendance;
|
||||
/** Substitutions left for the teams. */
|
||||
gint subs_left[2];
|
||||
/** The team that started the game, 0 or 1. */
|
||||
|
|
|
@ -208,7 +208,6 @@ main_init_variables(void)
|
|||
constants.datalist = options.datalist =
|
||||
tokens.datalist = hints.datalist = NULL;
|
||||
|
||||
popups_active = 0;
|
||||
selected_row = -1;
|
||||
|
||||
timeout_id = -1;
|
||||
|
|
|
@ -191,7 +191,7 @@ misc2_callback_contract_offer(void)
|
|||
pl->offers = 0;
|
||||
pl->wage = value;
|
||||
game_gui_show_warning(_("%s accepts your offer."), pl->name);
|
||||
window_destroy(&window.contract, FALSE);
|
||||
window_destroy(&window.contract);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -204,7 +204,7 @@ misc2_callback_contract_offer(void)
|
|||
{
|
||||
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);
|
||||
window_destroy(&window.contract, FALSE);
|
||||
window_destroy(&window.contract);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -266,14 +266,17 @@ misc2_callback_mmatches_button_press(GtkWidget *widget, gint row_num, gint col_n
|
|||
{
|
||||
stat1 = STATUS_SHOW_LAST_MATCH;
|
||||
stat3 = 0;
|
||||
callback_show_last_match(TRUE,
|
||||
&g_array_index(current_user.mmatches, MemMatch, row_num).lg);
|
||||
callback_show_last_match(
|
||||
TRUE,
|
||||
&g_array_index(current_user.mmatches, MemMatch, row_num).lg);
|
||||
}
|
||||
else if(col_num == TREEVIEW_MMATCH_COL_REMOVE)
|
||||
{
|
||||
gtk_widget_hide(widget);
|
||||
free_g_string(&g_array_index(current_user.mmatches, MemMatch, row_num).competition_name);
|
||||
free_gchar_ptr(g_array_index(current_user.mmatches, MemMatch, row_num).country_name);
|
||||
free_g_string(&g_array_index(current_user.mmatches, MemMatch, row_num).
|
||||
competition_name);
|
||||
free_gchar_ptr(g_array_index(current_user.mmatches, MemMatch, row_num).
|
||||
country_name);
|
||||
free_live_game(&g_array_index(current_user.mmatches, MemMatch, row_num).lg);
|
||||
g_array_remove_index(current_user.mmatches, row_num);
|
||||
treeview2_show_mmatches();
|
||||
|
|
|
@ -76,7 +76,7 @@ on_button_offer_ok_clicked (GtkButton *button,
|
|||
|
||||
g_free(team_name);
|
||||
|
||||
window_destroy(&window.job_offer, FALSE);
|
||||
window_destroy(&window.job_offer);
|
||||
|
||||
setsav0;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ on_button_offer_cancel_clicked (GtkButton *button,
|
|||
}
|
||||
}
|
||||
|
||||
window_destroy(&window.job_offer, FALSE);
|
||||
window_destroy(&window.job_offer);
|
||||
|
||||
if(stat0 != STATUS_SHOW_JOB_EXCHANGE)
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ on_button_warning_clicked (GtkWidget *widget,
|
|||
GdkEvent *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.warning, FALSE);
|
||||
window_destroy(&window.warning);
|
||||
|
||||
if(stat4 == STATUS_SHOW_EVENT)
|
||||
user_event_show_next();
|
||||
|
@ -162,7 +162,7 @@ on_button_digits_ok_clicked (GtkButton *button,
|
|||
}
|
||||
|
||||
if(destroy_window)
|
||||
window_destroy(&window.digits, FALSE);
|
||||
window_destroy(&window.digits);
|
||||
|
||||
game_gui_set_main_window_header();
|
||||
|
||||
|
@ -174,7 +174,7 @@ void
|
|||
on_button_digits_cancel_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.digits, FALSE);
|
||||
window_destroy(&window.digits);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@ -194,7 +194,7 @@ void
|
|||
on_button_yesno_yes_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.yesno, TRUE);
|
||||
window_destroy(&window.yesno);
|
||||
setsav0;
|
||||
|
||||
switch(stat1)
|
||||
|
@ -247,7 +247,7 @@ void
|
|||
on_button_yesno_no_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.yesno, TRUE);
|
||||
window_destroy(&window.yesno);
|
||||
|
||||
if(stat4 == STATUS_SHOW_EVENT)
|
||||
user_event_show_next();
|
||||
|
@ -265,7 +265,7 @@ void
|
|||
on_button_contract_cancel_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.contract, FALSE);
|
||||
window_destroy(&window.contract);
|
||||
}
|
||||
|
||||
|
||||
|
@ -276,7 +276,7 @@ on_window_contract_delete_event (GtkWidget *widget,
|
|||
{
|
||||
|
||||
if(GTK_WIDGET_IS_SENSITIVE(lookup_widget(window.contract, "button_contract_cancel")))
|
||||
window_destroy(&window.contract, FALSE);
|
||||
window_destroy(&window.contract);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -303,7 +303,7 @@ on_button_user_management_close_clicked
|
|||
(GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.user_management, FALSE);
|
||||
window_destroy(&window.user_management);
|
||||
on_button_back_to_main_clicked(NULL, NULL);
|
||||
}
|
||||
|
||||
|
@ -374,7 +374,7 @@ void
|
|||
on_button_debug_close_activate (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.wdebug, FALSE);
|
||||
window_destroy(&window.wdebug);
|
||||
}
|
||||
|
||||
|
||||
|
@ -432,7 +432,7 @@ void
|
|||
on_button_help_close_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.help, FALSE);
|
||||
window_destroy(&window.help);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -472,7 +472,7 @@ on_button_transfer_yes_clicked (GtkButton *button,
|
|||
else if(STATUS_TRANSFER_OFFER_CPU)
|
||||
misc2_callback_transfer_cpu_player();
|
||||
|
||||
window_destroy(&window.transfer_dialog, FALSE);
|
||||
window_destroy(&window.transfer_dialog);
|
||||
}
|
||||
|
||||
|
||||
|
@ -496,7 +496,7 @@ on_button_transfer_no_clicked (GtkButton *button,
|
|||
game_gui_set_main_window_header();
|
||||
on_button_transfers_clicked(NULL, NULL);
|
||||
|
||||
window_destroy(&window.transfer_dialog, FALSE);
|
||||
window_destroy(&window.transfer_dialog);
|
||||
}
|
||||
|
||||
|
||||
|
@ -504,7 +504,7 @@ void
|
|||
on_button_transfer_later_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.transfer_dialog, FALSE);
|
||||
window_destroy(&window.transfer_dialog);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@ -560,7 +560,7 @@ on_button_mm_save_close_clicked (GtkButton *button,
|
|||
user_mm_save_file(current_user.mmatches_file,
|
||||
current_user.mmatches);
|
||||
|
||||
window_destroy(&window.mmatches, TRUE);
|
||||
window_destroy(&window.mmatches);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -510,6 +510,7 @@ create_window_yesno (void)
|
|||
window_yesno = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window_yesno), 5);
|
||||
gtk_window_set_position (GTK_WINDOW (window_yesno), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_modal (GTK_WINDOW (window_yesno), TRUE);
|
||||
|
||||
vbox17 = gtk_vbox_new (FALSE, 5);
|
||||
gtk_widget_show (vbox17);
|
||||
|
@ -1285,6 +1286,7 @@ create_window_mmatches (void)
|
|||
window_mmatches = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window_mmatches), 5);
|
||||
gtk_window_set_position (GTK_WINDOW (window_mmatches), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_modal (GTK_WINDOW (window_mmatches), TRUE);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window_mmatches), 600, 500);
|
||||
|
||||
vbox27 = gtk_vbox_new (FALSE, 3);
|
||||
|
|
|
@ -51,7 +51,7 @@ void
|
|||
on_button_bet_close_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.bets, FALSE);
|
||||
window_destroy(&window.bets);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@ -117,7 +117,7 @@ on_treeview_bets_button_press_event (GtkWidget *widget,
|
|||
|
||||
gtk_tree_model_get(model, &iter, col_num, &bet, -1);
|
||||
|
||||
if(bet == NULL || fixture_from_id(bet->fix_id)->attendance != -1)
|
||||
if(bet == NULL || fixture_from_id(bet->fix_id, TRUE)->attendance != -1)
|
||||
return TRUE;
|
||||
|
||||
if(bet_is_user(bet))
|
||||
|
@ -174,7 +174,7 @@ void
|
|||
on_button_splash_new_game_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.splash, FALSE);
|
||||
window_destroy(&window.splash);
|
||||
|
||||
window_show_startup();
|
||||
stat0 = STATUS_TEAM_SELECTION;
|
||||
|
@ -202,7 +202,7 @@ void
|
|||
on_button_splash_quit_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.splash, FALSE);
|
||||
window_destroy(&window.splash);
|
||||
main_exit_program(EXIT_OK, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ misc_callback_start_game(void)
|
|||
opt_set_int("int_opt_load_defs", 0);
|
||||
|
||||
start_new_game();
|
||||
window_destroy(&window.startup, TRUE);
|
||||
window_destroy(&window.startup);
|
||||
|
||||
if(!opt_int("int_opt_calodds"))
|
||||
{
|
||||
|
@ -288,7 +288,7 @@ misc_callback_improve_stadium(void)
|
|||
current_user.counters[COUNT_USER_STADIUM_CAPACITY] += value_capacity;
|
||||
current_user.counters[COUNT_USER_STADIUM_SAFETY] += value_safety;
|
||||
|
||||
window_destroy(&window.stadium, TRUE);
|
||||
window_destroy(&window.stadium);
|
||||
game_gui_set_main_window_header();
|
||||
|
||||
setsav0;
|
||||
|
@ -301,7 +301,7 @@ misc_callback_startup_load(const gchar *filename)
|
|||
gtk_widget_hide(window.splash);
|
||||
|
||||
if(load_save_load_game(filename, TRUE))
|
||||
window_destroy(&window.splash, TRUE);
|
||||
window_destroy(&window.splash);
|
||||
else
|
||||
gtk_widget_show(window.splash);
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ on_button_font_sel_cancel_clicked (GtkWidget *widget,
|
|||
GdkEvent *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.font_sel, FALSE);
|
||||
window_destroy(&window.font_sel);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ on_button_font_sel_ok_clicked (GtkButton *button,
|
|||
g_free(font);
|
||||
}
|
||||
|
||||
window_destroy(&window.font_sel, FALSE);
|
||||
window_destroy(&window.font_sel);
|
||||
}
|
||||
|
||||
|
||||
|
@ -145,7 +145,7 @@ on_button_live_close_clicked (GtkButton *button,
|
|||
callback_show_next_live_game();
|
||||
else
|
||||
{
|
||||
window_destroy(&window.live, TRUE);
|
||||
window_destroy(&window.live);
|
||||
stat1 = stat2 = stat3 = stat4 = -1;
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ void
|
|||
on_button_stadium_cancel_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.stadium, TRUE);
|
||||
window_destroy(&window.stadium);
|
||||
}
|
||||
|
||||
|
||||
|
@ -327,7 +327,7 @@ on_button_sponsors_clicked (GtkButton *button,
|
|||
{
|
||||
misc_callback_new_sponsor();
|
||||
|
||||
window_destroy(&window.sponsors, FALSE);
|
||||
window_destroy(&window.sponsors);
|
||||
}
|
||||
|
||||
|
||||
|
@ -366,7 +366,7 @@ on_button_sponsors_wait_clicked (GtkButton *button,
|
|||
else
|
||||
current_user.counters[COUNT_USER_NEW_SPONSOR] = 0;
|
||||
|
||||
window_destroy(&window.sponsors, FALSE);
|
||||
window_destroy(&window.sponsors);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@ -454,7 +454,7 @@ void
|
|||
on_button_team_selection_back_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.startup, TRUE);
|
||||
window_destroy(&window.startup);
|
||||
stat0 = STATUS_SPLASH;
|
||||
window_show_splash();
|
||||
}
|
||||
|
|
|
@ -83,6 +83,7 @@ create_window_startup (void)
|
|||
window_startup = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window_startup), 6);
|
||||
gtk_window_set_position (GTK_WINDOW (window_startup), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_modal (GTK_WINDOW (window_startup), TRUE);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window_startup), 550, 600);
|
||||
|
||||
vbox2 = gtk_vbox_new (FALSE, 0);
|
||||
|
@ -496,6 +497,7 @@ create_window_live (void)
|
|||
gtk_container_set_border_width (GTK_CONTAINER (window_live), 6);
|
||||
gtk_window_set_title (GTK_WINDOW (window_live), _("Live game"));
|
||||
gtk_window_set_position (GTK_WINDOW (window_live), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_modal (GTK_WINDOW (window_live), TRUE);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window_live), 620, 550);
|
||||
|
||||
vbox36 = gtk_vbox_new (FALSE, 0);
|
||||
|
@ -896,6 +898,7 @@ create_window_stadium (void)
|
|||
window_stadium = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window_stadium), 5);
|
||||
gtk_window_set_position (GTK_WINDOW (window_stadium), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_modal (GTK_WINDOW (window_stadium), TRUE);
|
||||
|
||||
vbox39 = gtk_vbox_new (FALSE, 5);
|
||||
gtk_widget_show (vbox39);
|
||||
|
|
|
@ -63,7 +63,7 @@ on_button_options_ok_clicked (GtkButton *button,
|
|||
file_save_opt_file(buf, ¤t_user.options);
|
||||
}
|
||||
|
||||
window_destroy(&window.options, TRUE);
|
||||
window_destroy(&window.options);
|
||||
}
|
||||
|
||||
|
||||
|
@ -71,7 +71,7 @@ void
|
|||
on_button_options_cancel_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
window_destroy(&window.options, TRUE);
|
||||
window_destroy(&window.options);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -200,6 +200,7 @@ create_window_options (void)
|
|||
window_options = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window_options), 5);
|
||||
gtk_window_set_position (GTK_WINDOW (window_options), GTK_WIN_POS_CENTER);
|
||||
gtk_window_set_modal (GTK_WINDOW (window_options), TRUE);
|
||||
|
||||
vbox1 = gtk_vbox_new (FALSE, 2);
|
||||
gtk_widget_show (vbox1);
|
||||
|
|
|
@ -745,11 +745,19 @@ treeview_create_game_stats(LiveGame *live_game)
|
|||
G_TYPE_STRING,
|
||||
G_TYPE_STRING);
|
||||
|
||||
fixture_result_to_buf(live_game->fix, buf[0], FALSE);
|
||||
if(live_game->fix != NULL)
|
||||
fixture_result_to_buf(live_game->fix, buf[0], FALSE);
|
||||
else
|
||||
sprintf(
|
||||
buf[0], "%d : %d",
|
||||
g_array_index(live_game->units, LiveGameUnit, live_game->units->len - 1).
|
||||
result[0],
|
||||
g_array_index(live_game->units, LiveGameUnit, live_game->units->len - 1).
|
||||
result[1]);
|
||||
gtk_list_store_append(ls, &iter);
|
||||
gtk_list_store_set(ls, &iter, 0, live_game->fix->teams[0]->name,
|
||||
gtk_list_store_set(ls, &iter, 0, live_game->team_names[0],
|
||||
1, buf[0],
|
||||
2, live_game->fix->teams[1]->name,
|
||||
2, live_game->team_names[0],
|
||||
-1);
|
||||
|
||||
for(k=0;k<LIVE_GAME_STAT_ARRAY_END;k++)
|
||||
|
@ -791,7 +799,7 @@ treeview_create_game_stats(LiveGame *live_game)
|
|||
}
|
||||
}
|
||||
|
||||
misc_print_grouped_int(live_game->fix->attendance, buf[0]);
|
||||
misc_print_grouped_int(live_game->attendance, buf[0]);
|
||||
sprintf(buf[1], _("Attendance\n%s"), buf[0]);
|
||||
gtk_list_store_append(ls, &iter);
|
||||
gtk_list_store_set(ls, &iter, 0, buf[1], 1, "", 2, "", -1);
|
||||
|
|
|
@ -277,7 +277,7 @@ treeview2_create_bets(GtkListStore *ls)
|
|||
|
||||
for(i=0;i<bets[k]->len;i++)
|
||||
{
|
||||
fix = fixture_from_id(g_array_index(bets[k], BetMatch, i).fix_id);
|
||||
fix = fixture_from_id(g_array_index(bets[k], BetMatch, i).fix_id, TRUE);
|
||||
if(fix->clid == current_user.tm->clid ||
|
||||
(fix->clid >= ID_CUP_START &&
|
||||
opt_user_int("int_opt_user_bet_show_cups")) ||
|
||||
|
@ -293,7 +293,8 @@ treeview2_create_bets(GtkListStore *ls)
|
|||
!opt_user_int("int_opt_user_bet_show_my_recent"))))
|
||||
{
|
||||
if(i == 0 || fix->clid !=
|
||||
fixture_from_id(g_array_index(bets[k], BetMatch, i - 1).fix_id)->clid)
|
||||
fixture_from_id(
|
||||
g_array_index(bets[k], BetMatch, i - 1).fix_id, TRUE)->clid)
|
||||
{
|
||||
if(i > 0)
|
||||
{
|
||||
|
|
|
@ -1626,7 +1626,7 @@ treeview_helper_bet_odds(GtkTreeViewColumn *col,
|
|||
|
||||
strcpy(buf, "");
|
||||
bet_user = bet_is_user(bet);
|
||||
fix = fixture_from_id(bet->fix_id);
|
||||
fix = fixture_from_id(bet->fix_id, TRUE);
|
||||
|
||||
if(fix->attendance == -1)
|
||||
sprintf(buf, "%.2f", bet->odds[column - 1]);
|
||||
|
|
|
@ -94,11 +94,6 @@ GArray *name_lists;
|
|||
/** The struct containing the window pointers. */
|
||||
Windows window;
|
||||
|
||||
/** With this we keep track of the number of popup
|
||||
windows and make the main window sensitive or
|
||||
insensitive, depending. */
|
||||
gint popups_active;
|
||||
|
||||
/** The variable for non-user games (which aren't shown). */
|
||||
LiveGame live_game_temp;
|
||||
|
||||
|
|
42
src/window.c
42
src/window.c
|
@ -420,7 +420,7 @@ window_show_file_sel(void)
|
|||
g_free(filename);
|
||||
}
|
||||
|
||||
window_destroy(&window.file_chooser, FALSE);
|
||||
window_destroy(&window.file_chooser);
|
||||
}
|
||||
|
||||
/** Show window with memorable matches list. */
|
||||
|
@ -449,7 +449,7 @@ void
|
|||
window_show_menu_player(GdkEvent *event)
|
||||
{
|
||||
if(window.menu_player != NULL)
|
||||
window_destroy(&window.menu_player, FALSE);
|
||||
window_destroy(&window.menu_player);
|
||||
|
||||
window.menu_player = create_menu_player();
|
||||
|
||||
|
@ -462,7 +462,7 @@ void
|
|||
window_show_menu_youth(GdkEvent *event)
|
||||
{
|
||||
if(window.menu_youth != NULL)
|
||||
window_destroy(&window.menu_youth, FALSE);
|
||||
window_destroy(&window.menu_youth);
|
||||
|
||||
window.menu_youth = create_menu_youth();
|
||||
|
||||
|
@ -695,7 +695,6 @@ window_main_load_geometry(void)
|
|||
GtkWidget*
|
||||
window_create(gint window_type)
|
||||
{
|
||||
gint old_popups_active = popups_active;
|
||||
gchar buf[SMALL];
|
||||
GtkWidget *wind = NULL;
|
||||
|
||||
|
@ -728,21 +727,16 @@ window_create(gint window_type)
|
|||
if(window.startup != NULL)
|
||||
g_warning("window_create: called on already existing window\n");
|
||||
else
|
||||
{
|
||||
popups_active++;
|
||||
window.startup = create_window_startup();
|
||||
}
|
||||
wind = window.startup;
|
||||
break;
|
||||
case WINDOW_LIVE:
|
||||
if(window.live != NULL)
|
||||
g_warning("window_create: called on already existing window\n");
|
||||
else
|
||||
{
|
||||
popups_active++;
|
||||
window.live = create_window_live();
|
||||
}
|
||||
strcpy(buf, league_cup_get_name_string(((LiveGame*)statp)->fix->clid));
|
||||
if(((LiveGame*)statp)->fix != NULL)
|
||||
strcpy(buf, league_cup_get_name_string(((LiveGame*)statp)->fix->clid));
|
||||
wind = window.live;
|
||||
window_live_set_up();
|
||||
break;
|
||||
|
@ -775,10 +769,7 @@ window_create(gint window_type)
|
|||
if(window.stadium != NULL)
|
||||
g_warning("window_create: called on already existing window\n");
|
||||
else
|
||||
{
|
||||
popups_active++;
|
||||
window.stadium = create_window_stadium();
|
||||
}
|
||||
wind = window.stadium;
|
||||
strcpy(buf, _("Your stadium"));
|
||||
break;
|
||||
|
@ -794,10 +785,7 @@ window_create(gint window_type)
|
|||
if(window.yesno != NULL)
|
||||
g_warning("window_create: called on already existing window\n");
|
||||
else
|
||||
{
|
||||
popups_active++;
|
||||
window.yesno = create_window_yesno();
|
||||
}
|
||||
wind = window.yesno;
|
||||
strcpy(buf, "???");
|
||||
break;
|
||||
|
@ -805,10 +793,7 @@ window_create(gint window_type)
|
|||
if(window.options != NULL)
|
||||
g_warning("window_create: called on already existing window\n");
|
||||
else
|
||||
{
|
||||
popups_active++;
|
||||
window.options = create_window_options();
|
||||
}
|
||||
wind = window.options;
|
||||
strcpy(buf, _("Options"));
|
||||
break;
|
||||
|
@ -878,10 +863,7 @@ window_create(gint window_type)
|
|||
if(window.mmatches != NULL)
|
||||
g_warning("window_create: called on already existing window\n");
|
||||
else
|
||||
{
|
||||
window.mmatches = create_window_mmatches();
|
||||
popups_active++;
|
||||
}
|
||||
wind = window.mmatches;
|
||||
strcpy(buf, _("Memorable matches"));
|
||||
break;
|
||||
|
@ -910,10 +892,6 @@ window_create(gint window_type)
|
|||
else
|
||||
gtk_widget_show(wind);
|
||||
|
||||
if(popups_active != old_popups_active &&
|
||||
window.main != NULL)
|
||||
gtk_widget_set_sensitive(window.main, FALSE);
|
||||
|
||||
return wind;
|
||||
}
|
||||
|
||||
|
@ -923,19 +901,11 @@ window_create(gint window_type)
|
|||
@param count_popups Whether this window adds to the popup
|
||||
counter that determines when the main window gets (in)sensitive. */
|
||||
void
|
||||
window_destroy(GtkWidget **wind, gboolean count_popups)
|
||||
window_destroy(GtkWidget **wind)
|
||||
{
|
||||
if(*wind == NULL)
|
||||
return;
|
||||
|
||||
if(*wind != window.main && count_popups)
|
||||
{
|
||||
popups_active--;
|
||||
|
||||
if(popups_active == 0 && window.main != NULL)
|
||||
gtk_widget_set_sensitive(window.main, TRUE);
|
||||
}
|
||||
|
||||
if(*wind == window.splash)
|
||||
{
|
||||
counters[COUNT_HINT_NUMBER] =
|
||||
|
|
|
@ -66,7 +66,7 @@ GtkWidget*
|
|||
window_create(gint window_type);
|
||||
|
||||
void
|
||||
window_destroy(GtkWidget **wind, gboolean count_popups);
|
||||
window_destroy(GtkWidget **wind);
|
||||
|
||||
void
|
||||
window_show_digits(const gchar *text_main, const gchar* text1,
|
||||
|
|
|
@ -39,6 +39,7 @@ enum
|
|||
TAG_LIVE_GAME = TAG_START_LIVE_GAME,
|
||||
TAG_LIVE_GAME_FIX_ID,
|
||||
TAG_LIVE_GAME_TEAM_NAME,
|
||||
TAG_LIVE_GAME_ATTENDANCE,
|
||||
TAG_LIVE_GAME_UNIT,
|
||||
TAG_LIVE_GAME_UNIT_POSSESSION,
|
||||
TAG_LIVE_GAME_UNIT_AREA,
|
||||
|
@ -113,6 +114,7 @@ xml_loadsave_live_game_end_element (GMarkupParseContext *context,
|
|||
|
||||
if(tag == TAG_LIVE_GAME_FIX_ID ||
|
||||
tag == TAG_LIVE_GAME_TEAM_NAME ||
|
||||
tag == TAG_LIVE_GAME_ATTENDANCE ||
|
||||
tag == TAG_LIVE_GAME_UNIT ||
|
||||
tag == TAG_LIVE_GAME_STAT)
|
||||
{
|
||||
|
@ -188,10 +190,12 @@ xml_loadsave_live_game_text (GMarkupParseContext *context,
|
|||
if(state == TAG_LIVE_GAME_FIX_ID)
|
||||
{
|
||||
lgame->fix_id = int_value;
|
||||
lgame->fix = fixture_from_id(int_value);
|
||||
lgame->fix = fixture_from_id(int_value, FALSE);
|
||||
}
|
||||
else if(state == TAG_LIVE_GAME_TEAM_NAME)
|
||||
misc_string_assign(&lgame->team_names[team_name_idx], buf);
|
||||
else if(state == TAG_LIVE_GAME_ATTENDANCE)
|
||||
lgame->attendance = int_value;
|
||||
else if(state == TAG_LIVE_GAME_UNIT_POSSESSION)
|
||||
new_unit.possession = int_value;
|
||||
else if(state == TAG_LIVE_GAME_UNIT_AREA)
|
||||
|
@ -282,6 +286,8 @@ xml_loadsave_live_game_write(const gchar *filename, const LiveGame *live_game)
|
|||
for(i=0;i<2;i++)
|
||||
xml_write_string(fil, live_game->team_names[i],
|
||||
TAG_LIVE_GAME_TEAM_NAME, I0);
|
||||
|
||||
xml_write_int(fil, live_game->attendance, TAG_LIVE_GAME_ATTENDANCE, I0);
|
||||
}
|
||||
|
||||
for(i=0;i<live_game->units->len;i++)
|
||||
|
|
|
@ -130,7 +130,9 @@ xml_mmatches_text (GMarkupParseContext *context,
|
|||
{
|
||||
sprintf(lg_file, "%s%s%s", dirname, G_DIR_SEPARATOR_S, buf);
|
||||
live_game_reset(&new_match.lg, NULL, FALSE);
|
||||
xml_loadsave_live_game_read(lg_file, &new_match.lg);
|
||||
xml_loadsave_live_game_read(lg_file, &new_match.lg);
|
||||
new_match.lg.fix = NULL;
|
||||
new_match.lg.fix_id = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ string_contrib_title Author
|
|||
string_contrib_entry Győző Both (gyboth@bygfoot.com)
|
||||
|
||||
string_contrib_title Artwork
|
||||
string_contrib_entry Mark D. Symonds
|
||||
string_contrib_entry Mark D. Symonds, Marcelo Garrone
|
||||
|
||||
string_contrib_title Windows port
|
||||
string_contrib_entry Simon Binns
|
||||
|
@ -27,6 +27,7 @@ string_contrib_entry Cristian Spoiala (Romania)
|
|||
string_contrib_entry Sebastian Vöcking (Germany)
|
||||
|
||||
string_contrib_title Translations
|
||||
string_contrib_entry Benyuan Liu (Chinese)
|
||||
string_contrib_entry Alexandre Beraud, Arnaud Le Rouzic (French)
|
||||
string_contrib_entry Győző Both, Michael Trent (German)
|
||||
string_contrib_entry Tobe & Arne Deprez (Dutch)
|
||||
|
|
|
@ -1,23 +1,12 @@
|
|||
string_hint ÌáÊŸ Äã¿ÉÒÔÖ±œÓÍš¹ýÃüÁîÐÐÀŽ¶ÁÈ¡œø¶È(×÷ΪbygfootµÄ²ÎÊý),.zipµÄºó׺¿ÉÒÔÊ¡È¥,µ±ŽæµµÔÚĬÈÏÎÄŒþŒÐÖÐʱ,ÄãÒ²¿ÉÒÔÊ¡ÂÔÍêÕû·Ÿ¶
|
||||
string_hint
|
||||
string_hint ÌáÊŸ ÄãµÄÇòÌœÄÜÁŠÔœÇ¿,ÄãŸÍÄÜÔڲ鿎±ðµÄÇò¶Ó»òÕßת»áÁбíʱ¿ŽµœžüÏ꟡µÄÇòÔ±ÐÅÏ¢
|
||||
string_hint
|
||||
string_hint ÌáÊŸ ºÃµÄÇòÌœÄܹ»×ŒÈ·µÄ·ÖÎö³öÇòÔ±µÄŒÛÖµºÍ¹€×Ê
|
||||
string_hint
|
||||
string_hint ÌáÊŸ ºÃµÄÇòÌœÄܹ»×ŒÈ·µÄÅжÏÇòÔ±µÄDZÁŠ
|
||||
string_hint
|
||||
string_hint ÌáÊŸ ºÃµÄ¶ÓÒœÄܹ»Ê¹ÇòÔ±žü¿ìµÄŽÓÉ˲¡Öл֞Ž
|
||||
string_hint
|
||||
string_hint ÌáÊŸ BygfootÖ»ÓкÜÉÙµÄÃüÁîÐвÎÊý,²ÎŒû 'bygfoot -h'
|
||||
string_hint
|
||||
string_hint ÌáÊŸ ÔÚŒÓǿģʜÏÂ,ÇòÔ±»áÓОüºÃµÄ·¢»Ó,µ«ÊÇÒ²»áÔöŒÓÇòÔ±µÃºì»ÆÅƺÍÉ˲¡µÄŒžÂÊ,ËûÃǵĜ¡¿µ×Ž¿öÒ²»áÏÂœµµÄžü¿ì.µ±ÉèÖÃŒÓǿģʜΪantiʱ,¿ÉÒÔ±ÜÃâÒÔÉϵÄÇé¿ö
|
||||
string_hint
|
||||
string_hint ÌáÊŸ Äã¶ÔÇàÄê¶ÓµÄͶ×ÊÔœ¶à,ÄãÇò¶Ó×¢²áµÄ¶ÓÔ±µÄˮ׌ŸÍ»áÔœžß,ͬʱҲ»ážüŒÓƵ·±
|
||||
string_hint
|
||||
string_hint ÌáÊŸ ÇàÄê¶ÓœÌÁ·µÄˮƜԜžß,×¢²áÄãµÄÇàÄê¶ÔµÄÇòÔ±µÄˮƜŸÍ»áÔœžß.ÓÐÒ»žöºÃµÄœÌÁ·,ÇàÄê¶ÓÇòÔ±µÄ³É³€Ò²»ážüŒÓÑžËÙ
|
||||
string_hint
|
||||
string_hint ÌáÊŸ µ±Äãµ÷ÓÃÇàÄê¶ÓÔÚÄãµÄÇò¶ÓÖбÈÈüʱ,ËûÃÇŸÍ»á³É³€µÄžüŒÓÑžËÙ
|
||||
string_hint
|
||||
string_hint ÌáÊŸ Çò³¡µÄ°²È«ÏµÊýÔœžß,¹ÛÖÚŸÍ»áÔœ¶à,ŒŽ±ãÈçŽË,ÄãÒ²²»»áÔÚÒ»žöËÄŒ¶ÁªÈüÖÐÓÀŽ³¬¹ý100,000Ö®¶àµÄÇòÃÔ
|
||||
string_hint
|
||||
string_hint ÌáÊŸ ÔÚºò²¹ÇòÔ±ÁбíÖÐ,Äã¿ÉÒÔÍš¹ýµ¥»÷¶¥¶ËµÄÏà¹ØÀžÄ¿ÀŽ¶ÔÇòÔ±œøÐÐÅÅÐò
|
||||
|
|
Loading…
Reference in New Issue