German news.

This commit is contained in:
gyboth 2008-12-19 17:28:51 +00:00
parent 1d10d37bae
commit bbce9e1f0a
15 changed files with 420 additions and 302 deletions

View File

@ -1626,7 +1626,7 @@
<property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_CENTER</property> <property name="window_position">GTK_WIN_POS_CENTER</property>
<property name="modal">False</property> <property name="modal">False</property>
<property name="default_width">560</property> <property name="default_width">700</property>
<property name="default_height">600</property> <property name="default_height">600</property>
<property name="resizable">True</property> <property name="resizable">True</property>
<property name="destroy_with_parent">False</property> <property name="destroy_with_parent">False</property>

View File

@ -770,11 +770,7 @@ free_newspaper(gboolean reset)
gint i; gint i;
for(i = 0; i < newspaper.articles->len; i++) for(i = 0; i < newspaper.articles->len; i++)
{ free_newspaper_article(&g_array_index(newspaper.articles, NewsPaperArticle, i));
g_free(g_array_index(newspaper.articles, NewsPaperArticle, i).title_small);
g_free(g_array_index(newspaper.articles, NewsPaperArticle, i).title);
g_free(g_array_index(newspaper.articles, NewsPaperArticle, i).subtitle);
}
g_array_free(newspaper.articles, TRUE); g_array_free(newspaper.articles, TRUE);
@ -782,6 +778,14 @@ free_newspaper(gboolean reset)
newspaper.articles = g_array_new(FALSE, FALSE, sizeof(NewsPaperArticle)); newspaper.articles = g_array_new(FALSE, FALSE, sizeof(NewsPaperArticle));
} }
void
free_newspaper_article(NewsPaperArticle *article)
{
g_free(article->title_small);
g_free(article->title);
g_free(article->subtitle);
}
/** /**
Free a GPtrArray containing strings. Free a GPtrArray containing strings.
@param array The array to be freed. @param array The array to be freed.

View File

@ -32,6 +32,7 @@
#include "league_struct.h" #include "league_struct.h"
#include "live_game_struct.h" #include "live_game_struct.h"
#include "name_struct.h" #include "name_struct.h"
#include "news_struct.h"
#include "player_struct.h" #include "player_struct.h"
#include "team_struct.h" #include "team_struct.h"
#include "user_struct.h" #include "user_struct.h"
@ -152,6 +153,9 @@ free_news(gboolean reset);
void void
free_newspaper(gboolean reset); free_newspaper(gboolean reset);
void
free_newspaper_article(NewsPaperArticle *article);
void void
free_cup_round(CupRound *cup_round); free_cup_round(CupRound *cup_round);

View File

@ -789,7 +789,7 @@ create_window_news (void)
window_news = gtk_window_new (GTK_WINDOW_TOPLEVEL); window_news = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window_news), _("Bygfoot News")); gtk_window_set_title (GTK_WINDOW (window_news), _("Bygfoot News"));
gtk_window_set_position (GTK_WINDOW (window_news), GTK_WIN_POS_CENTER); gtk_window_set_position (GTK_WINDOW (window_news), GTK_WIN_POS_CENTER);
gtk_window_set_default_size (GTK_WINDOW (window_news), 560, 600); gtk_window_set_default_size (GTK_WINDOW (window_news), 700, 600);
vbox6 = gtk_vbox_new (FALSE, 0); vbox6 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox6); gtk_widget_show (vbox6);

View File

@ -83,6 +83,7 @@ news_generate_match(const LiveGame *live_game)
new_article.title_id = title_id; new_article.title_id = title_id;
new_article.subtitle_id = subtitle_id; new_article.subtitle_id = subtitle_id;
new_article.user_idx = fixture_user_team_involved(live_game->fix); new_article.user_idx = fixture_user_team_involved(live_game->fix);
new_article.clid = live_game->fix->clid;
if(counters[COUNT_NEW_NEWS] == 0) if(counters[COUNT_NEW_NEWS] == 0)
counters[COUNT_NEW_NEWS] = 2; counters[COUNT_NEW_NEWS] = 2;

View File

@ -78,6 +78,7 @@ typedef struct
{ {
gint week_number, week_round_number; gint week_number, week_round_number;
gint title_id, subtitle_id; gint title_id, subtitle_id;
gint clid;
gchar *title_small, *title, *subtitle; gchar *title_small, *title, *subtitle;
gint id; gint id;
gint user_idx; gint user_idx;

View File

@ -539,6 +539,13 @@ end_week_round_generate_news(void)
for(i = 0; i < live_games->len; i++) for(i = 0; i < live_games->len; i++)
if(news_check_match_relevant(&g_array_index(live_games, LiveGame, i))) if(news_check_match_relevant(&g_array_index(live_games, LiveGame, i)))
news_generate_match(&g_array_index(live_games, LiveGame, i)); news_generate_match(&g_array_index(live_games, LiveGame, i));
/* Get rid of older news. */
while(newspaper.articles->len > const_int("int_news_history_length"))
{
free_newspaper_article(&g_array_index(newspaper.articles, NewsPaperArticle, 0));
g_array_remove_index(newspaper.articles, 0);
}
} }
/** Start a new week round. */ /** Start a new week round. */

View File

@ -590,6 +590,7 @@ treeview2_create_news(GtkListStore *ls)
gint i; gint i;
GtkTreeIter iter; GtkTreeIter iter;
gchar buf[SMALL], buf2[SMALL]; gchar buf[SMALL], buf2[SMALL];
gboolean second_column;
if(newspaper.articles->len == 0) if(newspaper.articles->len == 0)
{ {
@ -603,6 +604,11 @@ treeview2_create_news(GtkListStore *ls)
for(i = newspaper.articles->len - 1; i >= 0; i--) for(i = newspaper.articles->len - 1; i >= 0; i--)
{ {
second_column = (i == newspaper.articles->len - 1 ||
(i < newspaper.articles->len - 1 &&
g_array_index(newspaper.articles, NewsPaperArticle, i).clid !=
g_array_index(newspaper.articles, NewsPaperArticle, i + 1).clid));
if(!opt_int("int_opt_news_show_recent") || if(!opt_int("int_opt_news_show_recent") ||
g_array_index(newspaper.articles, NewsPaperArticle, i).week_number == week - 1) g_array_index(newspaper.articles, NewsPaperArticle, i).week_number == week - 1)
{ {
@ -614,7 +620,7 @@ treeview2_create_news(GtkListStore *ls)
g_array_index(newspaper.articles, NewsPaperArticle, i + 1).week_round_number))) g_array_index(newspaper.articles, NewsPaperArticle, i + 1).week_round_number)))
{ {
gtk_list_store_append(ls, &iter); gtk_list_store_append(ls, &iter);
gtk_list_store_set(ls, &iter, 0, "", 1, NULL, -1); gtk_list_store_set(ls, &iter, 0, "", 1, NULL, 2, NULL, -1);
gtk_list_store_append(ls, &iter); gtk_list_store_append(ls, &iter);
sprintf(buf2, _("Week %d Round %d"), sprintf(buf2, _("Week %d Round %d"),
@ -623,13 +629,25 @@ treeview2_create_news(GtkListStore *ls)
sprintf(buf, "<span %s>%s</span>\n\n", sprintf(buf, "<span %s>%s</span>\n\n",
const_app("string_news_window_week_number_attribute"), const_app("string_news_window_week_number_attribute"),
buf2); buf2);
gtk_list_store_set(ls, &iter, 0, buf, 1, &g_array_index(newspaper.articles, NewsPaperArticle, i), -1);
second_column = TRUE;
} }
else else
{ {
gtk_list_store_append(ls, &iter); gtk_list_store_append(ls, &iter);
gtk_list_store_set(ls, &iter, 0, "", 1, &g_array_index(newspaper.articles, NewsPaperArticle, i), -1); strcpy(buf, "");
} }
if(second_column)
gtk_list_store_set(ls, &iter,
0, buf,
1, &g_array_index(newspaper.articles, NewsPaperArticle, i),
2, &g_array_index(newspaper.articles, NewsPaperArticle, i), -1);
else
gtk_list_store_set(ls, &iter,
0, buf,
1, &g_array_index(newspaper.articles, NewsPaperArticle, i),
2, NULL, -1);
} }
} }
} }
@ -654,7 +672,7 @@ treeview2_set_up_news(GtkTreeView *treeview)
renderer = treeview_helper_cell_renderer_text_new(); renderer = treeview_helper_cell_renderer_text_new();
gtk_tree_view_column_pack_start(col, renderer, TRUE); gtk_tree_view_column_pack_start(col, renderer, TRUE);
gtk_tree_view_column_add_attribute(col, renderer, gtk_tree_view_column_add_attribute(col, renderer,
"markup", 0); "markup", 0);
col = gtk_tree_view_column_new(); col = gtk_tree_view_column_new();
gtk_tree_view_append_column(treeview, col); gtk_tree_view_append_column(treeview, col);
renderer = treeview_helper_cell_renderer_text_new(); renderer = treeview_helper_cell_renderer_text_new();
@ -663,7 +681,16 @@ treeview2_set_up_news(GtkTreeView *treeview)
gtk_tree_view_column_pack_start(col, renderer, TRUE); gtk_tree_view_column_pack_start(col, renderer, TRUE);
gtk_tree_view_column_set_cell_data_func(col, renderer, gtk_tree_view_column_set_cell_data_func(col, renderer,
treeview_helper_news, treeview_helper_news,
NULL, NULL); NULL, NULL);
col = gtk_tree_view_column_new();
gtk_tree_view_append_column(treeview, col);
renderer = treeview_helper_cell_renderer_text_new();
g_object_set(renderer, "wrap-mode", PANGO_WRAP_WORD, NULL);
g_object_set(renderer, "wrap-width", 400, NULL);
gtk_tree_view_column_pack_start(col, renderer, TRUE);
gtk_tree_view_column_set_cell_data_func(col, renderer,
treeview_helper_news_additional,
NULL, NULL);
} }
/** Show the news in the news treeview. */ /** Show the news in the news treeview. */
@ -677,7 +704,7 @@ treeview2_show_news(void)
GtkTreeView *treeview = GtkTreeView *treeview =
GTK_TREE_VIEW(lookup_widget(window.news, "treeview_news")); GTK_TREE_VIEW(lookup_widget(window.news, "treeview_news"));
GtkListStore *model = GtkListStore *model =
gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_POINTER);
treeview_helper_clear(treeview); treeview_helper_clear(treeview);

View File

@ -1,26 +1,26 @@
/* /*
treeview_helper.c treeview_helper.c
Bygfoot Football Manager -- a small and simple GTK2-based Bygfoot Football Manager -- a small and simple GTK2-based
football management game. football management game.
http://bygfoot.sourceforge.net http://bygfoot.sourceforge.net
Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com) Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com)
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include "bet.h" #include "bet.h"
@ -305,31 +305,31 @@ treeview_helper_get_user_history_icon(gint history_type)
switch(history_type) switch(history_type)
{ {
default: default:
g_warning("treeview_helper_get_user_history_icon: unknown type %d.\n", history_type); g_warning("treeview_helper_get_user_history_icon: unknown type %d.\n", history_type);
return NULL; return NULL;
case USER_HISTORY_START_GAME: case USER_HISTORY_START_GAME:
return const_app("string_treeview_helper_user_history_symbol_start_game_icon"); return const_app("string_treeview_helper_user_history_symbol_start_game_icon");
case USER_HISTORY_FIRE_FINANCE: case USER_HISTORY_FIRE_FINANCE:
return const_app("string_treeview_helper_user_history_symbol_fire_finances_icon"); return const_app("string_treeview_helper_user_history_symbol_fire_finances_icon");
case USER_HISTORY_FIRE_FAILURE: case USER_HISTORY_FIRE_FAILURE:
return const_app("string_treeview_helper_user_history_symbol_fire_failure_icon"); return const_app("string_treeview_helper_user_history_symbol_fire_failure_icon");
case USER_HISTORY_JOB_OFFER_ACCEPTED: case USER_HISTORY_JOB_OFFER_ACCEPTED:
return const_app("string_treeview_helper_user_history_symbol_job_offer_accepted_icon"); return const_app("string_treeview_helper_user_history_symbol_job_offer_accepted_icon");
case USER_HISTORY_END_SEASON: case USER_HISTORY_END_SEASON:
return const_app("string_treeview_helper_user_history_symbol_end_season_icon"); return const_app("string_treeview_helper_user_history_symbol_end_season_icon");
case USER_HISTORY_WIN_FINAL: case USER_HISTORY_WIN_FINAL:
return const_app("string_treeview_helper_user_history_symbol_win_final_icon"); return const_app("string_treeview_helper_user_history_symbol_win_final_icon");
case USER_HISTORY_LOSE_FINAL: case USER_HISTORY_LOSE_FINAL:
return const_app("string_treeview_helper_user_history_symbol_lose_final_icon"); return const_app("string_treeview_helper_user_history_symbol_lose_final_icon");
case USER_HISTORY_PROMOTED: case USER_HISTORY_PROMOTED:
return const_app("string_treeview_helper_user_history_symbol_promoted_icon"); return const_app("string_treeview_helper_user_history_symbol_promoted_icon");
case USER_HISTORY_RELEGATED: case USER_HISTORY_RELEGATED:
return const_app("string_treeview_helper_user_history_symbol_relegated_icon"); return const_app("string_treeview_helper_user_history_symbol_relegated_icon");
case USER_HISTORY_REACH_CUP_ROUND: case USER_HISTORY_REACH_CUP_ROUND:
return const_app("string_treeview_helper_user_history_symbol_reach_cup_round_icon"); return const_app("string_treeview_helper_user_history_symbol_reach_cup_round_icon");
case USER_HISTORY_CHAMPION: case USER_HISTORY_CHAMPION:
return const_app("string_treeview_helper_user_history_symbol_champion_icon"); return const_app("string_treeview_helper_user_history_symbol_champion_icon");
} }
return NULL; return NULL;
@ -399,9 +399,9 @@ treeview_helper_insert_icon(GtkTreeModel *ls, GtkTreeIter *iter, gint column_nr,
/** Function comparing two teams in a team list treeview. */ /** Function comparing two teams in a team list treeview. */
gint gint
treeview_helper_team_compare(GtkTreeModel *model, treeview_helper_team_compare(GtkTreeModel *model,
GtkTreeIter *a, GtkTreeIter *a,
GtkTreeIter *b, GtkTreeIter *b,
gpointer user_data) gpointer user_data)
{ {
#ifdef DEBUG #ifdef DEBUG
printf("treeview_helper_team_compare\n"); printf("treeview_helper_team_compare\n");
@ -416,13 +416,13 @@ treeview_helper_team_compare(GtkTreeModel *model,
switch(type) switch(type)
{ {
default: default:
g_warning("treeview_team_compare: unknown type %d.\n", type); g_warning("treeview_team_compare: unknown type %d.\n", type);
break; break;
case TEAM_COMPARE_AV_SKILL: case TEAM_COMPARE_AV_SKILL:
return_value = misc_float_compare(team_get_average_skill(tm1, FALSE), return_value = misc_float_compare(team_get_average_skill(tm1, FALSE),
team_get_average_skill(tm2, FALSE)); team_get_average_skill(tm2, FALSE));
break; break;
} }
return return_value; return return_value;
@ -456,46 +456,46 @@ treeview_helper_player_compare(GtkTreeModel *model,
{ {
switch(type) switch(type)
{ {
default: default:
g_warning("treeview_player_compare: unknown type %d.\n", type); g_warning("treeview_player_compare: unknown type %d.\n", type);
break; break;
case PLAYER_LIST_ATTRIBUTE_POS: case PLAYER_LIST_ATTRIBUTE_POS:
return_value = misc_int_compare(pl1->pos, pl2->pos); return_value = misc_int_compare(pl1->pos, pl2->pos);
break; break;
case PLAYER_LIST_ATTRIBUTE_GOALS: case PLAYER_LIST_ATTRIBUTE_GOALS:
if(pl1->pos == 0 && pl2->pos == 0) if(pl1->pos == 0 && pl2->pos == 0)
return_value = misc_int_compare(player_games_goals_get(pl2, pl2->team->clid, PLAYER_VALUE_GOALS), return_value = misc_int_compare(player_games_goals_get(pl2, pl2->team->clid, PLAYER_VALUE_GOALS),
player_games_goals_get(pl1, pl1->team->clid, PLAYER_VALUE_GOALS)); player_games_goals_get(pl1, pl1->team->clid, PLAYER_VALUE_GOALS));
else if(pl1->pos == 0 || pl2->pos == 0) else if(pl1->pos == 0 || pl2->pos == 0)
return_value = (pl1->pos == 0) ? 1 : -1; return_value = (pl1->pos == 0) ? 1 : -1;
else else
return_value = misc_int_compare(player_games_goals_get(pl1, pl1->team->clid, PLAYER_VALUE_GOALS), return_value = misc_int_compare(player_games_goals_get(pl1, pl1->team->clid, PLAYER_VALUE_GOALS),
player_games_goals_get(pl2, pl2->team->clid, PLAYER_VALUE_GOALS)); player_games_goals_get(pl2, pl2->team->clid, PLAYER_VALUE_GOALS));
break; break;
case PLAYER_LIST_ATTRIBUTE_SHOTS: case PLAYER_LIST_ATTRIBUTE_SHOTS:
return_value = misc_int_compare(player_games_goals_get(pl1, pl1->team->clid, PLAYER_VALUE_SHOTS), return_value = misc_int_compare(player_games_goals_get(pl1, pl1->team->clid, PLAYER_VALUE_SHOTS),
player_games_goals_get(pl2, pl2->team->clid, PLAYER_VALUE_SHOTS)); player_games_goals_get(pl2, pl2->team->clid, PLAYER_VALUE_SHOTS));
break; break;
case PLAYER_LIST_ATTRIBUTE_GAMES: case PLAYER_LIST_ATTRIBUTE_GAMES:
return_value = misc_int_compare(player_games_goals_get(pl1, pl1->team->clid, PLAYER_VALUE_GAMES), return_value = misc_int_compare(player_games_goals_get(pl1, pl1->team->clid, PLAYER_VALUE_GAMES),
player_games_goals_get(pl2, pl2->team->clid, PLAYER_VALUE_GAMES)); player_games_goals_get(pl2, pl2->team->clid, PLAYER_VALUE_GAMES));
break; break;
case PLAYER_LIST_ATTRIBUTE_SKILL: case PLAYER_LIST_ATTRIBUTE_SKILL:
return_value = misc_float_compare(pl1->skill, pl2->skill); return_value = misc_float_compare(pl1->skill, pl2->skill);
break; break;
case PLAYER_LIST_ATTRIBUTE_AGE: case PLAYER_LIST_ATTRIBUTE_AGE:
return_value = misc_float_compare(pl1->age, pl2->age); return_value = misc_float_compare(pl1->age, pl2->age);
break; break;
case PLAYER_LIST_ATTRIBUTE_ETAL: case PLAYER_LIST_ATTRIBUTE_ETAL:
return_value = misc_float_compare(pl1->etal[current_user.scout % 10], return_value = misc_float_compare(pl1->etal[current_user.scout % 10],
pl2->etal[current_user.scout % 10]); pl2->etal[current_user.scout % 10]);
break; break;
case PLAYER_LIST_ATTRIBUTE_VALUE: case PLAYER_LIST_ATTRIBUTE_VALUE:
return_value = misc_int_compare(pl1->value, pl2->value); return_value = misc_int_compare(pl1->value, pl2->value);
break; break;
case PLAYER_LIST_ATTRIBUTE_WAGE: case PLAYER_LIST_ATTRIBUTE_WAGE:
return_value = misc_int_compare(pl1->wage, pl2->wage); return_value = misc_int_compare(pl1->wage, pl2->wage);
break; break;
} }
} }
@ -532,9 +532,9 @@ treeview_helper_get_table_element_colour_cups(const League *league, gint table_i
cup_round = &g_array_index(cp(i).rounds, CupRound, k); cup_round = &g_array_index(cp(i).rounds, CupRound, k);
for(j=0;j<cup_round->choose_teams->len;j++) for(j=0;j<cup_round->choose_teams->len;j++)
if((strcmp(g_array_index(cup_round->choose_teams, if((strcmp(g_array_index(cup_round->choose_teams,
CupChooseTeam, j).sid, buf) == 0 || CupChooseTeam, j).sid, buf) == 0 ||
strcmp(g_array_index(cup_round->choose_teams, strcmp(g_array_index(cup_round->choose_teams,
CupChooseTeam, j).sid, league->sid) == 0) && CupChooseTeam, j).sid, league->sid) == 0) &&
g_array_index(cup_round->choose_teams, g_array_index(cup_round->choose_teams,
CupChooseTeam, j).from_table == table_index) CupChooseTeam, j).from_table == table_index)
{ {
@ -792,10 +792,10 @@ treeview_helper_team_selection(GtkTreeViewColumn *col,
/** Render an integer. This is only so that we know when to draw nothing. */ /** Render an integer. This is only so that we know when to draw nothing. */
void void
treeview_helper_int_to_cell(GtkTreeViewColumn *col, treeview_helper_int_to_cell(GtkTreeViewColumn *col,
GtkCellRenderer *renderer, GtkCellRenderer *renderer,
GtkTreeModel *model, GtkTreeModel *model,
GtkTreeIter *iter, GtkTreeIter *iter,
gpointer user_data) gpointer user_data)
{ {
#ifdef DEBUG #ifdef DEBUG
printf("treeview_helper_int_to_cell\n"); printf("treeview_helper_int_to_cell\n");
@ -818,10 +818,10 @@ treeview_helper_int_to_cell(GtkTreeViewColumn *col,
/** Render a cell in the player info view. */ /** Render a cell in the player info view. */
void void
treeview_helper_player_ext_info_to_cell(GtkTreeViewColumn *col, treeview_helper_player_ext_info_to_cell(GtkTreeViewColumn *col,
GtkCellRenderer *renderer, GtkCellRenderer *renderer,
GtkTreeModel *model, GtkTreeModel *model,
GtkTreeIter *iter, GtkTreeIter *iter,
gpointer user_data) gpointer user_data)
{ {
#ifdef DEBUG #ifdef DEBUG
printf("treeview_helper_player_ext_info_to_cell\n"); printf("treeview_helper_player_ext_info_to_cell\n");
@ -843,78 +843,78 @@ treeview_helper_player_ext_info_to_cell(GtkTreeViewColumn *col,
switch(row_idx) switch(row_idx)
{ {
default: default:
g_warning("treeview_helper_player_ext_info_to_cell: unknown row index %d\n", g_warning("treeview_helper_player_ext_info_to_cell: unknown row index %d\n",
row_idx); row_idx);
break; break;
case PLAYER_INFO_ATTRIBUTE_NAME: case PLAYER_INFO_ATTRIBUTE_NAME:
treeview_helper_player_to_cell(col, renderer, model, treeview_helper_player_to_cell(col, renderer, model,
iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_NAME)); iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_NAME));
break; break;
case PLAYER_INFO_ATTRIBUTE_POS: case PLAYER_INFO_ATTRIBUTE_POS:
treeview_helper_player_to_cell(col, renderer, model, treeview_helper_player_to_cell(col, renderer, model,
iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_POS)); iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_POS));
break; break;
case PLAYER_INFO_ATTRIBUTE_CPOS: case PLAYER_INFO_ATTRIBUTE_CPOS:
treeview_helper_player_to_cell(col, renderer, model, treeview_helper_player_to_cell(col, renderer, model,
iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_CPOS)); iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_CPOS));
break; break;
case PLAYER_INFO_ATTRIBUTE_SKILL: case PLAYER_INFO_ATTRIBUTE_SKILL:
treeview_helper_player_to_cell(col, renderer, model, treeview_helper_player_to_cell(col, renderer, model,
iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_SKILL)); iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_SKILL));
break; break;
case PLAYER_INFO_ATTRIBUTE_CSKILL: case PLAYER_INFO_ATTRIBUTE_CSKILL:
treeview_helper_player_to_cell(col, renderer, model, treeview_helper_player_to_cell(col, renderer, model,
iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_CSKILL)); iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_CSKILL));
break; break;
case PLAYER_INFO_ATTRIBUTE_FITNESS: case PLAYER_INFO_ATTRIBUTE_FITNESS:
treeview_helper_player_to_cell(col, renderer, model, treeview_helper_player_to_cell(col, renderer, model,
iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_FITNESS)); iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_FITNESS));
break; break;
case PLAYER_INFO_ATTRIBUTE_ETAL: case PLAYER_INFO_ATTRIBUTE_ETAL:
treeview_helper_player_to_cell(col, renderer, model, treeview_helper_player_to_cell(col, renderer, model,
iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_ETAL)); iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_ETAL));
break; break;
case PLAYER_INFO_ATTRIBUTE_AGE: case PLAYER_INFO_ATTRIBUTE_AGE:
treeview_helper_player_to_cell(col, renderer, model, treeview_helper_player_to_cell(col, renderer, model,
iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_AGE)); iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_AGE));
break; break;
case PLAYER_INFO_ATTRIBUTE_VALUE: case PLAYER_INFO_ATTRIBUTE_VALUE:
treeview_helper_player_to_cell(col, renderer, model, treeview_helper_player_to_cell(col, renderer, model,
iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_VALUE)); iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_VALUE));
break; break;
case PLAYER_INFO_ATTRIBUTE_WAGE: case PLAYER_INFO_ATTRIBUTE_WAGE:
treeview_helper_player_to_cell(col, renderer, model, treeview_helper_player_to_cell(col, renderer, model,
iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_WAGE)); iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_WAGE));
break; break;
case PLAYER_INFO_ATTRIBUTE_CONTRACT: case PLAYER_INFO_ATTRIBUTE_CONTRACT:
treeview_helper_player_to_cell(col, renderer, model, treeview_helper_player_to_cell(col, renderer, model,
iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_CONTRACT)); iter, GINT_TO_POINTER(PLAYER_LIST_ATTRIBUTE_CONTRACT));
break; break;
case PLAYER_INFO_ATTRIBUTE_HEALTH: case PLAYER_INFO_ATTRIBUTE_HEALTH:
treeview_helper_player_info_health_to_cell(renderer, pl); treeview_helper_player_info_health_to_cell(renderer, pl);
break; break;
case PLAYER_INFO_ATTRIBUTE_GAMES_GOALS: case PLAYER_INFO_ATTRIBUTE_GAMES_GOALS:
treeview_helper_player_info_games_goals_to_cell(renderer, pl->games_goals); treeview_helper_player_info_games_goals_to_cell(renderer, pl->games_goals);
break; break;
case PLAYER_INFO_ATTRIBUTE_YELLOW_CARDS: case PLAYER_INFO_ATTRIBUTE_YELLOW_CARDS:
treeview_helper_player_info_yellow_to_cell(renderer, pl->cards); treeview_helper_player_info_yellow_to_cell(renderer, pl->cards);
break; break;
case PLAYER_INFO_ATTRIBUTE_BANNED: case PLAYER_INFO_ATTRIBUTE_BANNED:
treeview_helper_player_info_banned_to_cell(renderer, pl->cards); treeview_helper_player_info_banned_to_cell(renderer, pl->cards);
break; break;
case PLAYER_INFO_ATTRIBUTE_STREAK: case PLAYER_INFO_ATTRIBUTE_STREAK:
treeview_helper_player_info_streak_to_cell(renderer, pl->streak); treeview_helper_player_info_streak_to_cell(renderer, pl->streak);
break; break;
case PLAYER_INFO_ATTRIBUTE_CAREER: case PLAYER_INFO_ATTRIBUTE_CAREER:
treeview_helper_player_info_career_to_cell(renderer, pl); treeview_helper_player_info_career_to_cell(renderer, pl);
break; break;
case PLAYER_INFO_ATTRIBUTE_OFFERS: case PLAYER_INFO_ATTRIBUTE_OFFERS:
if(pl->offers > 0) if(pl->offers > 0)
g_object_set(renderer, "text", _("Player doesn't negotiate anymore"), NULL); g_object_set(renderer, "text", _("Player doesn't negotiate anymore"), NULL);
else else
g_object_set(renderer, "text", _("Player accepts new offers"), NULL); g_object_set(renderer, "text", _("Player accepts new offers"), NULL);
break; break;
} }
} }
@ -1127,73 +1127,73 @@ treeview_helper_player_to_cell(GtkTreeViewColumn *col,
switch(attribute) switch(attribute)
{ {
default: default:
g_warning("treeview_helper_player_to_cell: unknown attribute %d.\n", attribute); g_warning("treeview_helper_player_to_cell: unknown attribute %d.\n", attribute);
break; break;
case PLAYER_LIST_ATTRIBUTE_NAME: case PLAYER_LIST_ATTRIBUTE_NAME:
treeview_helper_player_name_to_cell(renderer, buf, pl); treeview_helper_player_name_to_cell(renderer, buf, pl);
break; break;
case PLAYER_LIST_ATTRIBUTE_CPOS: case PLAYER_LIST_ATTRIBUTE_CPOS:
treeview_helper_player_pos_to_cell(renderer, buf, pl, treeview_helper_player_pos_to_cell(renderer, buf, pl,
PLAYER_LIST_ATTRIBUTE_CPOS); PLAYER_LIST_ATTRIBUTE_CPOS);
break; break;
case PLAYER_LIST_ATTRIBUTE_POS: case PLAYER_LIST_ATTRIBUTE_POS:
treeview_helper_player_pos_to_cell(renderer, buf, pl, treeview_helper_player_pos_to_cell(renderer, buf, pl,
PLAYER_LIST_ATTRIBUTE_POS); PLAYER_LIST_ATTRIBUTE_POS);
break; break;
case PLAYER_LIST_ATTRIBUTE_CSKILL: case PLAYER_LIST_ATTRIBUTE_CSKILL:
treeview_helper_player_cskill_to_cell(renderer, buf, pl); treeview_helper_player_cskill_to_cell(renderer, buf, pl);
break; break;
case PLAYER_LIST_ATTRIBUTE_SKILL: case PLAYER_LIST_ATTRIBUTE_SKILL:
sprintf(buf, "%.*f", opt_int("int_opt_player_precision"), pl->skill); sprintf(buf, "%.*f", opt_int("int_opt_player_precision"), pl->skill);
break; break;
case PLAYER_LIST_ATTRIBUTE_FITNESS: case PLAYER_LIST_ATTRIBUTE_FITNESS:
treeview_helper_player_fitness_to_cell(renderer, buf, pl->fitness); treeview_helper_player_fitness_to_cell(renderer, buf, pl->fitness);
break; break;
case PLAYER_LIST_ATTRIBUTE_GAMES: case PLAYER_LIST_ATTRIBUTE_GAMES:
treeview_helper_player_games_goals_to_cell(buf, pl, PLAYER_VALUE_GAMES); treeview_helper_player_games_goals_to_cell(buf, pl, PLAYER_VALUE_GAMES);
break; break;
case PLAYER_LIST_ATTRIBUTE_GOALS: case PLAYER_LIST_ATTRIBUTE_GOALS:
treeview_helper_player_games_goals_to_cell(buf, pl, PLAYER_VALUE_GOALS); treeview_helper_player_games_goals_to_cell(buf, pl, PLAYER_VALUE_GOALS);
break; break;
case PLAYER_LIST_ATTRIBUTE_SHOTS: case PLAYER_LIST_ATTRIBUTE_SHOTS:
treeview_helper_player_games_goals_to_cell(buf, pl, PLAYER_VALUE_SHOTS); treeview_helper_player_games_goals_to_cell(buf, pl, PLAYER_VALUE_SHOTS);
break; break;
case PLAYER_LIST_ATTRIBUTE_STATUS: case PLAYER_LIST_ATTRIBUTE_STATUS:
treeview_helper_player_status_to_cell(NULL, renderer, treeview_helper_player_status_to_cell(NULL, renderer,
NULL, NULL, (gpointer)pl); NULL, NULL, (gpointer)pl);
break; break;
case PLAYER_LIST_ATTRIBUTE_CARDS: case PLAYER_LIST_ATTRIBUTE_CARDS:
treeview_helper_player_cards_to_cell(buf, pl); treeview_helper_player_cards_to_cell(buf, pl);
break; break;
case PLAYER_LIST_ATTRIBUTE_AGE: case PLAYER_LIST_ATTRIBUTE_AGE:
sprintf(buf, "%.*f", opt_int("int_opt_player_precision"), pl->age); sprintf(buf, "%.*f", opt_int("int_opt_player_precision"), pl->age);
break; break;
case PLAYER_LIST_ATTRIBUTE_ETAL: case PLAYER_LIST_ATTRIBUTE_ETAL:
sprintf(buf, "%.*f", opt_int("int_opt_player_precision"), sprintf(buf, "%.*f", opt_int("int_opt_player_precision"),
pl->etal[current_user.scout % 10]); pl->etal[current_user.scout % 10]);
break; break;
case PLAYER_LIST_ATTRIBUTE_VALUE: case PLAYER_LIST_ATTRIBUTE_VALUE:
misc_print_grouped_int(pl->value, buf); misc_print_grouped_int(pl->value, buf);
break; break;
case PLAYER_LIST_ATTRIBUTE_WAGE: case PLAYER_LIST_ATTRIBUTE_WAGE:
misc_print_grouped_int(pl->wage, buf); misc_print_grouped_int(pl->wage, buf);
break; break;
case PLAYER_LIST_ATTRIBUTE_CONTRACT: case PLAYER_LIST_ATTRIBUTE_CONTRACT:
treeview_helper_player_contract_to_cell(renderer, buf, pl->contract); treeview_helper_player_contract_to_cell(renderer, buf, pl->contract);
break; break;
case PLAYER_LIST_ATTRIBUTE_TEAM: case PLAYER_LIST_ATTRIBUTE_TEAM:
if(debug < 50) if(debug < 50)
sprintf(buf, "%s", pl->team->name); sprintf(buf, "%s", pl->team->name);
else else
sprintf(buf, "%s (%s)", pl->team->name, pl->team->strategy_sid); sprintf(buf, "%s (%s)", pl->team->name, pl->team->strategy_sid);
break; break;
case PLAYER_LIST_ATTRIBUTE_LEAGUE_CUP: case PLAYER_LIST_ATTRIBUTE_LEAGUE_CUP:
idx = job_team_is_on_list(pl->team->id); idx = job_team_is_on_list(pl->team->id);
strcpy(buf, (idx == -1) ? strcpy(buf, (idx == -1) ?
league_cup_get_name_string(pl->team->clid) : league_cup_get_name_string(pl->team->clid) :
g_array_index(jobs, Job, idx).league_name); g_array_index(jobs, Job, idx).league_name);
break; break;
} }
if(attribute != PLAYER_LIST_ATTRIBUTE_STATUS) if(attribute != PLAYER_LIST_ATTRIBUTE_STATUS)
@ -1238,8 +1238,8 @@ treeview_helper_player_name_to_cell(GtkCellRenderer *renderer, gchar *buf, const
} }
else if(query_transfer_current_team_offer(pl)) else if(query_transfer_current_team_offer(pl))
{ {
colour_bg = const_app("string_treeview_helper_color_transfer_offer_bg"); colour_bg = const_app("string_treeview_helper_color_transfer_offer_bg");
colour_fg = const_app("string_treeview_helper_color_transfer_offer_fg"); colour_fg = const_app("string_treeview_helper_color_transfer_offer_fg");
} }
g_object_set(renderer, "background", colour_bg, NULL); g_object_set(renderer, "background", colour_bg, NULL);
@ -1494,38 +1494,38 @@ treeview_helper_player_pos_to_cell(GtkCellRenderer *renderer, gchar *buf,
switch(pos) switch(pos)
{ {
default: default:
/* Goalie */ /* Goalie */
strcpy(buf, _("G")); strcpy(buf, _("G"));
g_object_set(renderer, "background", g_object_set(renderer, "background",
const_app("string_treeview_helper_color_player_pos_goalie_bg"), const_app("string_treeview_helper_color_player_pos_goalie_bg"),
"foreground", "foreground",
const_app("string_treeview_helper_color_player_pos_goalie_fg"), NULL); const_app("string_treeview_helper_color_player_pos_goalie_fg"), NULL);
break; break;
case PLAYER_POS_DEFENDER: case PLAYER_POS_DEFENDER:
/* Defender */ /* Defender */
strcpy(buf, _("D")); strcpy(buf, _("D"));
g_object_set(renderer, "background", g_object_set(renderer, "background",
const_app("string_treeview_helper_color_player_pos_defender_bg"), const_app("string_treeview_helper_color_player_pos_defender_bg"),
"foreground", "foreground",
const_app("string_treeview_helper_color_player_pos_defender_fg"), NULL); const_app("string_treeview_helper_color_player_pos_defender_fg"), NULL);
break; break;
case PLAYER_POS_MIDFIELDER: case PLAYER_POS_MIDFIELDER:
/* Midfielder */ /* Midfielder */
strcpy(buf, _("M")); strcpy(buf, _("M"));
g_object_set(renderer, "background", g_object_set(renderer, "background",
const_app("string_treeview_helper_color_player_pos_midfielder_bg"), const_app("string_treeview_helper_color_player_pos_midfielder_bg"),
"foreground", "foreground",
const_app("string_treeview_helper_color_player_pos_midfielder_fg"), NULL); const_app("string_treeview_helper_color_player_pos_midfielder_fg"), NULL);
break; break;
case PLAYER_POS_FORWARD: case PLAYER_POS_FORWARD:
/* Forward */ /* Forward */
strcpy(buf, _("F")); strcpy(buf, _("F"));
g_object_set(renderer, "background", g_object_set(renderer, "background",
const_app("string_treeview_helper_color_player_pos_forward_bg"), const_app("string_treeview_helper_color_player_pos_forward_bg"),
"foreground", "foreground",
const_app("string_treeview_helper_color_player_pos_forward_fg"), NULL); const_app("string_treeview_helper_color_player_pos_forward_fg"), NULL);
break; break;
} }
if(pl->cskill == 0) if(pl->cskill == 0)
@ -1838,12 +1838,44 @@ treeview_helper_search_equal(GtkTreeModel *model,
return return_value; return return_value;
} }
void
treeview_helper_news_additional(GtkTreeViewColumn *col,
GtkCellRenderer *renderer,
GtkTreeModel *model,
GtkTreeIter *iter,
gpointer user_data)
{
const NewsPaperArticle *article = NULL;
const gchar *colour_fg;
const gchar *colour_bg;
gchar buf[SMALL];
gtk_tree_model_get(model, iter, 2, &article, -1);
colour_fg = const_app("string_treeview_helper_color_default_foreground");
colour_bg = const_app("string_treeview_helper_color_default_background");
if(article == NULL)
{
g_object_set(renderer, "markup", "",
"background", colour_bg, "foreground", colour_fg, NULL);
return;
}
sprintf(buf, "<span %s>%s</span>",
const_app("string_news_window_league_cup_attribute"),
league_cup_get_name_string(article->clid));
g_object_set(renderer, "markup", buf,
"background", colour_bg, "foreground", colour_fg, NULL);
}
void void
treeview_helper_news(GtkTreeViewColumn *col, treeview_helper_news(GtkTreeViewColumn *col,
GtkCellRenderer *renderer, GtkCellRenderer *renderer,
GtkTreeModel *model, GtkTreeModel *model,
GtkTreeIter *iter, GtkTreeIter *iter,
gpointer user_data) gpointer user_data)
{ {
const NewsPaperArticle *article = NULL; const NewsPaperArticle *article = NULL;
const gchar *colour_fg; const gchar *colour_fg;
@ -1856,7 +1888,7 @@ treeview_helper_news(GtkTreeViewColumn *col,
colour_fg = const_app("string_treeview_helper_color_default_foreground"); colour_fg = const_app("string_treeview_helper_color_default_foreground");
colour_bg = const_app("string_treeview_helper_color_default_background"); colour_bg = const_app("string_treeview_helper_color_default_background");
if(article == NULL) if(article == NULL)
{ {
g_object_set(renderer, "markup", "", g_object_set(renderer, "markup", "",
"background", colour_bg, "foreground", colour_fg, NULL); "background", colour_bg, "foreground", colour_fg, NULL);

View File

@ -236,4 +236,11 @@ treeview_helper_news(GtkTreeViewColumn *col,
GtkTreeIter *iter, GtkTreeIter *iter,
gpointer user_data); gpointer user_data);
void
treeview_helper_news_additional(GtkTreeViewColumn *col,
GtkCellRenderer *renderer,
GtkTreeModel *model,
GtkTreeIter *iter,
gpointer user_data);
#endif #endif

View File

@ -44,6 +44,7 @@ enum
TAG_NEWS_PAPER_ARTICLE_TITLE, TAG_NEWS_PAPER_ARTICLE_TITLE,
TAG_NEWS_PAPER_ARTICLE_SUBTITLE, TAG_NEWS_PAPER_ARTICLE_SUBTITLE,
TAG_NEWS_PAPER_ARTICLE_USER_IDX, TAG_NEWS_PAPER_ARTICLE_USER_IDX,
TAG_NEWS_PAPER_ARTICLE_CLID,
TAG_END TAG_END
}; };
@ -105,6 +106,7 @@ xml_loadsave_newspaper_end_element (GMarkupParseContext *context,
tag == TAG_NEWS_PAPER_ARTICLE_TITLE_ID || tag == TAG_NEWS_PAPER_ARTICLE_TITLE_ID ||
tag == TAG_NEWS_PAPER_ARTICLE_SUBTITLE || tag == TAG_NEWS_PAPER_ARTICLE_SUBTITLE ||
tag == TAG_NEWS_PAPER_ARTICLE_USER_IDX || tag == TAG_NEWS_PAPER_ARTICLE_USER_IDX ||
tag == TAG_NEWS_PAPER_ARTICLE_CLID ||
tag == TAG_NEWS_PAPER_ARTICLE_SUBTITLE_ID) tag == TAG_NEWS_PAPER_ARTICLE_SUBTITLE_ID)
{ {
state = TAG_NEWS_PAPER_ARTICLE; state = TAG_NEWS_PAPER_ARTICLE;
@ -151,6 +153,8 @@ xml_loadsave_newspaper_text (GMarkupParseContext *context,
new_article.subtitle_id = int_value; new_article.subtitle_id = int_value;
else if(state == TAG_NEWS_PAPER_ARTICLE_USER_IDX) else if(state == TAG_NEWS_PAPER_ARTICLE_USER_IDX)
new_article.user_idx = int_value; new_article.user_idx = int_value;
else if(state == TAG_NEWS_PAPER_ARTICLE_CLID)
new_article.clid = int_value;
} }
void void
@ -234,6 +238,8 @@ xml_loadsave_newspaper_write(const gchar *prefix)
TAG_NEWS_PAPER_ARTICLE_SUBTITLE_ID, I1); TAG_NEWS_PAPER_ARTICLE_SUBTITLE_ID, I1);
xml_write_int(fil, g_array_index(newspaper.articles, NewsPaperArticle, i).user_idx, xml_write_int(fil, g_array_index(newspaper.articles, NewsPaperArticle, i).user_idx,
TAG_NEWS_PAPER_ARTICLE_USER_IDX, I1); TAG_NEWS_PAPER_ARTICLE_USER_IDX, I1);
xml_write_int(fil, g_array_index(newspaper.articles, NewsPaperArticle, i).clid,
TAG_NEWS_PAPER_ARTICLE_CLID, I1);
fprintf(fil, "%s</_%d>\n", I0, TAG_NEWS_PAPER_ARTICLE); fprintf(fil, "%s</_%d>\n", I0, TAG_NEWS_PAPER_ARTICLE);
} }

View File

@ -240,4 +240,4 @@ string_news_window_week_number_attribute style='oblique'
string_news_window_title_small_attribute size='small' string_news_window_title_small_attribute size='small'
string_news_window_title_attribute weight='bold' size='large' string_news_window_title_attribute weight='bold' size='large'
string_news_window_subtitle_attribute style='oblique' string_news_window_subtitle_attribute style='oblique'
string_news_window_alternate_background lightgrey string_news_window_league_cup_attribute weight='bold'

View File

@ -1002,3 +1002,6 @@ int_training_camps_week 2
# to avoid news repetitions # to avoid news repetitions
int_news_repetition_min_check_number 3 int_news_repetition_min_check_number 3
int_news_repetition_max_check_number 10 int_news_repetition_max_check_number 10
# how many news articles to keep in memory
int_news_history_length 50

View File

@ -35,7 +35,7 @@ string_token_team_losingn _TLN_ # also for news
string_token_team _TT_ string_token_team _TT_
string_token_team_layer0 _TLAYER0_ # also for news string_token_team_layer0 _TLAYER0_ # also for news
string_token_team_layer1 _TLAYER1_ # also for news string_token_team_layer1 _TLAYER1_ # also for news
string_token_team_layerdiff _LAYERDIFF_ # also for news string_token_team_layerdiff _TLAYERDIFF_ # also for news
string_token_team_avskill0 _TAVSKILL0_ # also for news string_token_team_avskill0 _TAVSKILL0_ # also for news
string_token_team_avskill1 _TAVSKILL1_ # also for news string_token_team_avskill1 _TAVSKILL1_ # also for news
string_token_team_avskilldiff _TAVSKILLDIFF_ # also for news string_token_team_avskilldiff _TAVSKILLDIFF_ # also for news

View File

@ -134,13 +134,15 @@
<subtitle>Faire Punkteteilung nach ausgeglichenem Spiel.</subtitle> <subtitle>Faire Punkteteilung nach ausgeglichenem Spiel.</subtitle>
<subtitle>Das Remis hilft aber keinem der beiden Teams weiter.</subtitle> <subtitle>Das Remis hilft aber keinem der beiden Teams weiter.</subtitle>
<subtitle>Weder _T0_ noch _T1_ können mit einem Unentschieden zufrieden sein.</subtitle> <subtitle>Weder _T0_ noch _T1_ können mit einem Unentschieden zufrieden sein.</subtitle>
<subtitle condition="_GOALS0_ < 2">Zahlreiche der _AT_ Zuschauer sterben an Langeweile während dieses unterirdischen Spiels.</subtitle>
<subtitle condition="_GOALS0_ < 2">Die beiden Teams liefern einen Grottenkick aus der Zeit des Catenaccio.</subtitle>
<subtitle condition="_GOALS0_ > 1">_AT_ werden trotz Unentschieden beim _RE_ gut unterhalten.</subtitle> <subtitle condition="_GOALS0_ > 1">_AT_ werden trotz Unentschieden beim _RE_ gut unterhalten.</subtitle>
<subtitle condition="_GOALS0_ > 2">Trainer von [_T0_|_T1_] will sich in den nächsten Wochen auf die Defensive konzentrieren.</subtitle> <subtitle condition="_GOALS0_ > 2">Trainer von [_T0_|_T1_] will sich in den nächsten Wochen auf die Defensive konzentrieren.</subtitle>
<subtitle condition="_GOALS0_ > 1">Gute Offensivleistung von [_T0_|_T1_] wird durch Leichtsinnsfehler kaputtgemacht.</subtitle> <subtitle condition="_GOALS0_ > 1">Gute Offensivleistung von [_T0_|_T1_] wird durch Leichtsinnsfehler kaputtgemacht.</subtitle>
<subtitle condition="_GOALS0_ > 1">[_T0_|_T1_] verschenkt durch Fehler in der Verteidigung den Sieg.</subtitle> <subtitle condition="_GOALS0_ > 1">[_T0_|_T1_] verschenkt durch Fehler in der Verteidigung den Sieg.</subtitle>
<subtitle condition="_GOALS0_ = 1">Ein Fehler kostet [_T0_|_T1_] den Sieg.</subtitle> <subtitle condition="_GOALS0_ = 1">Ein Fehler kostet [_T0_|_T1_] den Sieg.</subtitle>
<subtitle condition="_GOALS0_ = 0 and _SHOTS0_ > 2">Mangelhafte Chancenverwertung raubt _T0_ die Chance auf den Sieg.</subtitle> <subtitle condition="_GOALS0_ < _SHOTS0_ + 3">Mangelhafte Chancenverwertung raubt _T0_ die Chance auf den Sieg.</subtitle>
<subtitle condition="_GOALS1_ = 0 and _SHOTS1_ > 2">Mangelhafte Chancenverwertung raubt _T1_ die Chance auf den Sieg.</subtitle> <subtitle condition="_GOALS1_ < _SHOTS1_ + 3">Mangelhafte Chancenverwertung raubt _T1_ die Chance auf den Sieg.</subtitle>
<subtitle condition="_GOALS1_ = 0 and _PEN1_ > 0">Ein verschenkter Elfmeter wird den Spielern von _T1_ noch lange den Schlaf rauben.</subtitle> <subtitle condition="_GOALS1_ = 0 and _PEN1_ > 0">Ein verschenkter Elfmeter wird den Spielern von _T1_ noch lange den Schlaf rauben.</subtitle>
<subtitle condition="_GOALS0_ = 0 and _PEN0_ > 0">Ein verschenkter Elfmeter wird den Spielern von _T0_ noch lange den Schlaf rauben.</subtitle> <subtitle condition="_GOALS0_ = 0 and _PEN0_ > 0">Ein verschenkter Elfmeter wird den Spielern von _T0_ noch lange den Schlaf rauben.</subtitle>
<subtitle condition="_UNBEATEN0_ > 3">_T0_ holt nur Unentschieden, ist aber seit _UNBEATEN0_ Matches ungeschlagen.</subtitle> <subtitle condition="_UNBEATEN0_ > 3">_T0_ holt nur Unentschieden, ist aber seit _UNBEATEN0_ Matches ungeschlagen.</subtitle>
@ -175,23 +177,47 @@
<news_article> <news_article>
<type>match</type> <type>match</type>
<condition>_LAYERDIFF_ = 0 and _GD_ != 0 and _TAVSKILLDIFF_ > 7</condition> <condition>_TLAYERDIFF_ = 0 and _GD_ != 0 and _TAVSKILLDIFF_ > 7</condition>
<title condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">_TW_ [besiegt|gewinnt gegen|bezwingt|schlägt] _TL_</title> <title condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">_TW_ [besiegt|gewinnt gegen|bezwingt|schlägt] _TL_</title>
<title condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">Wie erwartet _TW_ [besiegt|bezwingt|schlägt] _TL_</title> <title condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">Wie erwartet [besiegt|bezwingt|schlägt] _TW_ _TL_</title>
<title condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">_TW_ erfüllt Erwartungen der Experten</title> <title condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">_TW_ erfüllt Erwartungen der Experten</title>
<title condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">_TW_ schlägt _TL_ erwartungsgemäß mit _RE_</title> <title condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">_TW_ schlägt _TL_ erwartungsgemäß mit _REW_</title>
<title condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TW_ trotzt den Wettquoten und besiegt _TL_</title> <title condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TW_ trotzt den Wettquoten und besiegt _TL_</title>
<title condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TW_ schafft kleine Sensation gegen _TL_</title> <title condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TW_ schafft kleine Sensation gegen _TL_</title>
<title condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TL_ nominell überlegen, verliert aber _RE_</title> <title condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TL_ nominell überlegen, verliert aber _RE_</title>
<subtitle condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">Gegen _TW_ war nicht mehr drin für _TL_</subtitle> <subtitle condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">Gegen _TW_ war nicht mehr drin für _TL_.</subtitle>
<subtitle condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">_TW_ war auf dem Papier besser als _TL_ - und auf dem Platz auch.</subtitle> <subtitle condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">_TW_ war auf dem Papier besser als _TL_ - und auf dem Platz auch.</subtitle>
<subtitle condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">_TW_ hatte die bessere Mannschaft und nutzte den Vorteil gnadenlos.</subtitle> <subtitle condition="_TAVSKILL_TWN__ > _TAVSKILL_TLN__">_TW_ hatte die bessere Mannschaft und nutzte den Vorteil gnadenlos.</subtitle>
<subtitle condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TW_ stellt die Fussballwelt auf den Kopf mit dem überraschenden Sieg.</subtitle> <subtitle condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TW_ stellt die Fussballwelt auf den Kopf mit dem überraschenden Sieg.</subtitle>
<subtitle condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TW_ wurde schwächer eingeschätzt, macht die nominellen Nachteile aber mit Leidenschaft mehr als wett.</subtitle> <subtitle condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TW_ wurde schwächer eingeschätzt, macht aber alle Nachteile mit Leidenschaft mehr als wett.</subtitle>
<subtitle condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">Dank einer cleveren Taktik gewinnt _TW_ gegen einen höher eingeschätzten Gegner.</subtitle> <subtitle condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">Dank einer cleveren Taktik gewinnt _TW_ gegen einen höher eingeschätzten Gegner.</subtitle>
<subtitle condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TL_ muss sich an den eigenen Kopf fassen nach einer unnötigen Niederlage gegen einen auf dem Papier wesentlich schwächeren Widersacher.</subtitle> <subtitle condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TL_ muss sich an den eigenen Kopf fassen nach einer unnötigen Niederlage gegen einen auf dem Papier wesentlich schwächeren Widersacher.</subtitle>
<subtitle condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TW_ demonstriert eindrucksvoll, wie ein homogen agierendes Team einen Gegner mit den besseren Einzelspielern überwältigen kann.</subtitle> <subtitle condition="_TAVSKILL_TWN__ < _TAVSKILL_TLN__">_TW_ demonstriert eindrucksvoll, wie ein homogen agierendes Team einen Gegner mit den besseren Einzelspielern überwältigen kann.</subtitle>
</news_article> </news_article>
<news_article>
<type>match</type>
<condition>_TLAYERDIFF_ > 0</condition>
<title condition="_GD_ = 0">_T[_TLAYER0_ L _TLAYER1_]_ schafft überraschendes Unentschieden</title>
<title condition="_GD_ = 0">_T[_TLAYER0_ L _TLAYER1_]_ hält _T[_TLAYER0_ G _TLAYER1_]_ stand</title>
<title condition="_GD_ = 0">_LEAGUECUPNAME_: _T[_TLAYER0_ L _TLAYER1_]_ erkämpft Remis</title>
<title condition="_TWN_ = [_TLAYER0_ < _TLAYER1_]">_T[_TLAYER0_ L _TLAYER1_]_ schlägt _T[_TLAYER0_ G _TLAYER1_]_ sensationell</title>
<title condition="_TWN_ = [_TLAYER0_ < _TLAYER1_]">_T[_TLAYER0_ L _TLAYER1_]_ schafft Sensation</title>
<title condition="_TWN_ = [_TLAYER0_ < _TLAYER1_]">_T[_TLAYER0_ L _TLAYER1_]_ siegt trotz Klassenunterschied</title>
<title condition="_TWN_ = [_TLAYER0_ > _TLAYER1_]">_T[_TLAYER0_ L _TLAYER1_]_ muss sich der Übermacht beugen</title>
<title condition="_TWN_ = [_TLAYER0_ > _TLAYER1_]">_T[_TLAYER0_ G _TLAYER1_]_ zu gut für _T[_TLAYER0_ L _TLAYER1_]_</title>
<title condition="_TWN_ = [_TLAYER0_ > _TLAYER1_]">_T[_TLAYER0_ G _TLAYER1_]_ bezwingt tapferen Gegner</title>
<subtitle condition="_GD_ = 0">_T[_TLAYER0_ L _TLAYER1_]_ hält dem Druck des übermächtigen Gegners stand.</subtitle>
<subtitle condition="_GD_ = 0 or _TWN_ = [_TLAYER0_ L _TLAYER1_]">Keiner hätte ein solches Ergebnis erwartet - ausser die Spieler und der Trainer von _T[_TLAYER0_ L _TLAYER1_]_.</subtitle>
<subtitle condition="_GD_ = 0 or _TWN_ = [_TLAYER0_ L _TLAYER1_]">_T[_TLAYER0_ L _TLAYER1_]_ gelingt mit dem _RE_ ein Ergebnis, das kein Experte erwartet hatte.</subtitle>
<subtitle condition="_TWN_ = [_TLAYER0_ > _TLAYER1_]">_T[_TLAYER0_ L _TLAYER1_]_ gibt alles, _T[_TLAYER0_ G _TLAYER1_]_ erweist sich jedoch als zu stark.</subtitle>
<subtitle condition="_TWN_ = [_TLAYER0_ > _TLAYER1_]">_T[_TLAYER0_ G _TLAYER1_]_ erfüllt die Erwartungen und siegt vor _AT_ Zuschauern.</subtitle>
<subtitle condition="_TWN_ = [_TLAYER0_ > _TLAYER1_] and _GD_ > 1">_T[_TLAYER0_ G _TLAYER1_]_ lässt dem unterklassigen Gegner keine Chance.</subtitle>
<subtitle condition="_TWN_ = [_TLAYER0_ < _TLAYER1_]">_T[_TLAYER0_ G _TLAYER1_]_ blamiert sich gegen den unterklassigen Gegner bis auf die Knochen.</subtitle>
<subtitle condition="_TWN_ = [_TLAYER0_ < _TLAYER1_]">Nach der überraschenden Niederlage nimmt die Polizei Ermittlungen wegen des Verdachts auf Manipulation auf.</subtitle>
<subtitle condition="_TWN_ = [_TLAYER0_ < _TLAYER1_]">_T[_TLAYER0_ L _TLAYER1_]_ fügt _T[_TLAYER0_ G _TLAYER1_]_ vor _AT_ Zuschauern eine demütigende Pokalniederlage zu.</subtitle>
<subtitle condition="_TWN_ = [_TLAYER0_ < _TLAYER1_]">_T[_TLAYER0_ L _TLAYER1_]_ lässt sich nicht durch den Klassenunterschied verunsichern und siegt _RE_.</subtitle>
</news_article>
</news> </news>