1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2024-12-14 09:25:14 +01:00

"Preserve order when prom_rel."

This commit is contained in:
gyboth 2005-06-22 15:07:34 +00:00
parent 8b1e54d140
commit e4fa353923
6 changed files with 28 additions and 19 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-06-21 15:30+0200\n"
"POT-Creation-Date: 2005-06-22 17:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1530,7 +1530,7 @@ msgstr ""
msgid "Remove user %s from the game?"
msgstr ""
#: src/misc2_interface.c:71 src/window.c:434
#: src/misc2_interface.c:71 src/window.c:436
msgid "Job offer"
msgstr ""
@ -1717,7 +1717,7 @@ msgstr ""
msgid "_Resume last game"
msgstr ""
#: src/misc_interface.c:409 src/window.c:464
#: src/misc_interface.c:409 src/window.c:466
msgid "Select font"
msgstr ""
@ -2498,7 +2498,7 @@ msgstr ""
msgid "Stadium"
msgstr ""
#: src/treeview.c:1229 src/window.c:277
#: src/treeview.c:1229 src/window.c:279
#, c-format
msgid ""
"Improvement in progress.\n"
@ -3104,44 +3104,44 @@ msgstr ""
msgid "All Files"
msgstr ""
#: src/window.c:287
#: src/window.c:289
msgid "No improvements currently in progress."
msgstr ""
#: src/window.c:356
#: src/window.c:358
#, c-format
msgid "Welcome to Bygfoot %s"
msgstr ""
#: src/window.c:393
#: src/window.c:395
msgid "Erm..."
msgstr ""
#: src/window.c:412
#: src/window.c:414
msgid "Numbers..."
msgstr ""
#: src/window.c:423
#: src/window.c:425
msgid "Your stadium"
msgstr ""
#: src/window.c:456
#: src/window.c:458
msgid "Options"
msgstr ""
#: src/window.c:479
#: src/window.c:481
msgid "Contract offer"
msgstr ""
#: src/window.c:487
#: src/window.c:489
msgid "User management"
msgstr ""
#: src/window.c:510
#: src/window.c:512
msgid "Transfer offer"
msgstr ""
#: src/window.c:518
#: src/window.c:520
msgid "Sponsorship offers"
msgstr ""

View File

@ -328,6 +328,7 @@ league_get_team_movements(League *league, GArray *team_movements)
new_move.tm = *(g_array_index(league->table.elements, TableElement, j - 1).team);
new_move.league_idx =
league_index_from_sid(((GString*)g_ptr_array_index(dest_sids, order[k++ % dest_sids->len]))->str);
new_move.prom_rel_type = g_array_index(elements, PromRelElement, i).type;
g_array_append_val(team_movements, new_move);
@ -365,6 +366,7 @@ league_get_team_movements(League *league, GArray *team_movements)
{
new_move.tm = *((Team*)g_ptr_array_index(prom_games_teams, i));
new_move.league_idx = dest_idx;
new_move.prom_rel_type = PROM_REL_PROMOTION;
g_array_append_val(team_movements, new_move);
if(team_is_user((Team*)g_ptr_array_index(prom_games_teams, i)) != -1)
@ -376,6 +378,7 @@ league_get_team_movements(League *league, GArray *team_movements)
if(strlen(league->prom_rel.prom_games_loser_sid->str) > 0)
{
dest_idx = league_index_from_sid(league->prom_rel.prom_games_loser_sid->str);
new_move.prom_rel_type = PROM_REL_RELEGATION;
for(i=league->prom_rel.prom_games_number_of_advance;i<prom_games_teams->len;i++)
{

View File

@ -489,9 +489,13 @@ start_new_season_team_movements(void)
league_get_team_movements(&lig(i), team_movements);
for(i=0;i<team_movements->len;i++)
g_array_append_val(lig(g_array_index(team_movements, TeamMove, i).league_idx).teams,
g_array_index(team_movements, TeamMove, i).tm);
if(g_array_index(team_movements, TeamMove, i).prom_rel_type != PROM_REL_RELEGATION)
g_array_append_val(lig(g_array_index(team_movements, TeamMove, i).league_idx).teams,
g_array_index(team_movements, TeamMove, i).tm);
else
g_array_prepend_val(lig(g_array_index(team_movements, TeamMove, i).league_idx).teams,
g_array_index(team_movements, TeamMove, i).tm);
g_array_free(team_movements, TRUE);
for(i=0;i<ligs->len;i++)

View File

@ -24,7 +24,7 @@ typedef struct
{
Team tm; /**< The team we move. */
gint league_idx; /** The index of the league that the team gets moved to. */
gint prom_rel_type;
} TeamMove;
Team

View File

@ -48,7 +48,7 @@ treeview_create_team_selection_list(gboolean show_cup_teams, gboolean show_user_
if(team_is_user(&g_array_index(lig(i).teams, Team, j)) == -1)
{
gtk_list_store_append(ls, &iter);
treeview_helper_insert_icon(ls, &iter, 1, lig(i).symbol->str);
treeview_helper_insert_icon(ls, &iter, 1, g_array_index(lig(i).teams, Team, j).symbol->str);
gtk_list_store_set(ls, &iter,
0, cnt++,
2, (gpointer)&g_array_index(lig(i).teams, Team, j),

View File

@ -256,6 +256,8 @@ window_show_stadium(void)
if(tm->stadium.name != NULL)
gtk_label_set_text(label_name, tm->stadium.name->str);
else
gtk_widget_hide(GTK_WIDGET(label_name));
if(tm->stadium.games > 0)
average_attendance_perc =