Index: src/news_gui.cpp =================================================================== --- src/news_gui.cpp 2008-05-29 17:13:28.000000000 +0200 +++ src/news_gui.cpp 2008-05-30 20:49:04.000000000 +0200 @@ -43,6 +43,8 @@ /** Current news item (last item shown regularly). */ static NewsItem *_current_news = NULL; +static unsigned _news_duration; ///< Remaining time for showing current news message + typedef void DrawNewsCallbackProc(struct Window *w, const NewsItem *ni); void DrawNewsNewVehicleAvail(Window *w, const NewsItem *ni); @@ -258,7 +260,7 @@ { switch (widget) { case 1: - this->ni->duration = 0; + _news_duration = 0; delete this; _forced_news = NULL; break; @@ -361,7 +363,7 @@ static void ShowNewspaper(NewsItem *ni) { ni->flags &= ~NF_FORCE_BIG; - ni->duration = 555; + _news_duration = 555; SoundFx sound = _news_type_data[_news_subtype_data[ni->subtype].type].sound; if (sound != 0) SndPlayFx(sound); @@ -438,10 +440,10 @@ if (IsNewsTickerShown()) return false; /* Newspaper message, decrement duration counter */ - if (ni->duration != 0) ni->duration--; + if (_news_duration != 0) _news_duration--; /* neither newsticker nor newspaper are running */ - return (ni->duration == 0 || FindWindowById(WC_NEWS_WINDOW, 0) == NULL); + return (_news_duration == 0 || FindWindowById(WC_NEWS_WINDOW, 0) == NULL); } /** Move to the next news item */ @@ -613,7 +615,7 @@ _forced_news = ni; if (_forced_news != NULL) { - ni->duration = 555; + _news_duration = 555; ni->flags |= NF_FORCE_BIG; DeleteWindowById(WC_NEWS_WINDOW, 0); ShowNewspaper(ni); Index: src/news_type.h =================================================================== --- src/news_type.h 2008-05-28 23:36:16.000000000 +0200 +++ src/news_type.h 2008-05-30 20:40:59.000000000 +0200 @@ -104,7 +104,6 @@ NewsItem *prev; ///< Previous news item NewsItem *next; ///< Next news item StringID string_id; ///< Message text - uint16 duration; ///< Remaining time for showing this news message Date date; ///< Date of the news NewsSubtype subtype; ///< News subtype @see NewsSubtype NewsFlag flags; ///< NewsFlags bits @see NewsFlag