summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-02 15:27:05 +0000
committerrubidium <rubidium@openttd.org>2009-11-02 15:27:05 +0000
commitb1f906e819c753616c5519c7dc8bdfd65b1a1a34 (patch)
treefa0761c00756e6b8251a1904535be63022228d3d
parentda54a01114c45e888af13f80b49510858f5abc17 (diff)
downloadopenttd-b1f906e819c753616c5519c7dc8bdfd65b1a1a34.tar.xz
(svn r17951) -Codechange: simplify making the popup list, remove arbirary limitations and unused code/strings.
-rw-r--r--src/lang/afrikaans.txt1
-rw-r--r--src/lang/arabic_egypt.txt1
-rw-r--r--src/lang/brazilian_portuguese.txt1
-rw-r--r--src/lang/bulgarian.txt1
-rw-r--r--src/lang/catalan.txt1
-rw-r--r--src/lang/croatian.txt1
-rw-r--r--src/lang/czech.txt1
-rw-r--r--src/lang/danish.txt1
-rw-r--r--src/lang/dutch.txt1
-rw-r--r--src/lang/english.txt1
-rw-r--r--src/lang/english_US.txt1
-rw-r--r--src/lang/esperanto.txt1
-rw-r--r--src/lang/estonian.txt1
-rw-r--r--src/lang/finnish.txt1
-rw-r--r--src/lang/french.txt1
-rw-r--r--src/lang/galician.txt1
-rw-r--r--src/lang/german.txt1
-rw-r--r--src/lang/greek.txt1
-rw-r--r--src/lang/hebrew.txt1
-rw-r--r--src/lang/hungarian.txt1
-rw-r--r--src/lang/icelandic.txt1
-rw-r--r--src/lang/indonesian.txt1
-rw-r--r--src/lang/italian.txt1
-rw-r--r--src/lang/japanese.txt1
-rw-r--r--src/lang/korean.txt1
-rw-r--r--src/lang/latvian.txt1
-rw-r--r--src/lang/lithuanian.txt1
-rw-r--r--src/lang/luxembourgish.txt1
-rw-r--r--src/lang/norwegian_bokmal.txt1
-rw-r--r--src/lang/norwegian_nynorsk.txt1
-rw-r--r--src/lang/polish.txt1
-rw-r--r--src/lang/portuguese.txt1
-rw-r--r--src/lang/romanian.txt1
-rw-r--r--src/lang/russian.txt1
-rw-r--r--src/lang/serbian.txt1
-rw-r--r--src/lang/simplified_chinese.txt1
-rw-r--r--src/lang/slovak.txt1
-rw-r--r--src/lang/slovenian.txt1
-rw-r--r--src/lang/spanish.txt1
-rw-r--r--src/lang/swedish.txt1
-rw-r--r--src/lang/traditional_chinese.txt1
-rw-r--r--src/lang/turkish.txt1
-rw-r--r--src/lang/ukrainian.txt1
-rw-r--r--src/lang/welsh.txt1
-rw-r--r--src/network/network_gui.cpp118
45 files changed, 35 insertions, 127 deletions
diff --git a/src/lang/afrikaans.txt b/src/lang/afrikaans.txt
index 50fc787de..0e5f12ce3 100644
--- a/src/lang/afrikaans.txt
+++ b/src/lang/afrikaans.txt
@@ -1620,7 +1620,6 @@ STR_NETWORK_COMPANY_LIST_CLIENT_LIST :{WHITE}Klient L
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nuwe Maatskapy
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(geen)
STR_NETWORK_CLIENTLIST_KICK :Skop
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Gee geld
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Praat met almal
diff --git a/src/lang/arabic_egypt.txt b/src/lang/arabic_egypt.txt
index aa3374213..193d5a40c 100644
--- a/src/lang/arabic_egypt.txt
+++ b/src/lang/arabic_egypt.txt
@@ -1647,7 +1647,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE} شاه
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE} شركة جديدة
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :بدون
STR_NETWORK_CLIENTLIST_KICK :اطرد
STR_NETWORK_CLIENTLIST_GIVE_MONEY :اعط اموال
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :تحدث مع الكل
diff --git a/src/lang/brazilian_portuguese.txt b/src/lang/brazilian_portuguese.txt
index c43422d5a..0f5b7f317 100644
--- a/src/lang/brazilian_portuguese.txt
+++ b/src/lang/brazilian_portuguese.txt
@@ -1650,7 +1650,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Assistir
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nova Companhia
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Nenhum -
STR_NETWORK_CLIENTLIST_KICK :Banir
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Dar dinheiro
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Falar com todos
diff --git a/src/lang/bulgarian.txt b/src/lang/bulgarian.txt
index a461b0cef..eb2591c77 100644
--- a/src/lang/bulgarian.txt
+++ b/src/lang/bulgarian.txt
@@ -1634,7 +1634,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Набл
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Нова фирма
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(никой)
STR_NETWORK_CLIENTLIST_KICK :Изгони
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Дай пари
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Кажи на всички
diff --git a/src/lang/catalan.txt b/src/lang/catalan.txt
index 44e2f4512..c3d60fabf 100644
--- a/src/lang/catalan.txt
+++ b/src/lang/catalan.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Espectad
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nova companyia
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Cap -
STR_NETWORK_CLIENTLIST_KICK :Breu
STR_NETWORK_CLIENTLIST_BAN :Prohibit
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Entrega diners
diff --git a/src/lang/croatian.txt b/src/lang/croatian.txt
index 84b8da577..4a7881e90 100644
--- a/src/lang/croatian.txt
+++ b/src/lang/croatian.txt
@@ -1705,7 +1705,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Promatra
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nova tvrtka
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(nitko)
STR_NETWORK_CLIENTLIST_KICK :Izbaci
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Daj novac
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Razgovaraj sa svima
diff --git a/src/lang/czech.txt b/src/lang/czech.txt
index a31bc225c..c8844e036 100644
--- a/src/lang/czech.txt
+++ b/src/lang/czech.txt
@@ -1712,7 +1712,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Pozorova
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nová společnost
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(nikdo)
STR_NETWORK_CLIENTLIST_KICK :Vyhodit
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Darovat peníze
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Napsat všem
diff --git a/src/lang/danish.txt b/src/lang/danish.txt
index 564ad3bbf..1b03635e2 100644
--- a/src/lang/danish.txt
+++ b/src/lang/danish.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Tilslut
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nyt firma
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Ingen -
STR_NETWORK_CLIENTLIST_KICK :Smid ud
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Giv penge
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Tal til alle
diff --git a/src/lang/dutch.txt b/src/lang/dutch.txt
index 1fc076ce0..18b87151c 100644
--- a/src/lang/dutch.txt
+++ b/src/lang/dutch.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Kijk toe
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nieuw bedrijf
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :Geen
STR_NETWORK_CLIENTLIST_KICK :Schop uit het spel
STR_NETWORK_CLIENTLIST_BAN :Bannen
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Geef geld
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 9933d8e2b..03e64ec9c 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Spectate
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}New company
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- None -
STR_NETWORK_CLIENTLIST_KICK :Kick
STR_NETWORK_CLIENTLIST_BAN :Ban
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Give money
diff --git a/src/lang/english_US.txt b/src/lang/english_US.txt
index 25096ae43..eef6e6137 100644
--- a/src/lang/english_US.txt
+++ b/src/lang/english_US.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Spectate
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}New company
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- None -
STR_NETWORK_CLIENTLIST_KICK :Kick
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Give money
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Speak to all
diff --git a/src/lang/esperanto.txt b/src/lang/esperanto.txt
index c22506c55..c43ebbc2b 100644
--- a/src/lang/esperanto.txt
+++ b/src/lang/esperanto.txt
@@ -1599,7 +1599,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Spekti
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nova Kompanio
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(neniu)
STR_NETWORK_CLIENTLIST_KICK :Forbatu
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Donu monon
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Parolu al ĉiuj
diff --git a/src/lang/estonian.txt b/src/lang/estonian.txt
index 3454742e8..22c5e6157 100644
--- a/src/lang/estonian.txt
+++ b/src/lang/estonian.txt
@@ -1704,7 +1704,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Jälgi
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Uus Ettevõte
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(pole)
STR_NETWORK_CLIENTLIST_KICK :Viska välja
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Anna raha
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Räägi kõigiga
diff --git a/src/lang/finnish.txt b/src/lang/finnish.txt
index 0c5ae480e..f99e4a9dd 100644
--- a/src/lang/finnish.txt
+++ b/src/lang/finnish.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Katsele
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Uusi Yhtiö
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Ei mitään -
STR_NETWORK_CLIENTLIST_KICK :Potkaise
STR_NETWORK_CLIENTLIST_BAN :Kiellä
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Anna rahaa
diff --git a/src/lang/french.txt b/src/lang/french.txt
index 4f238b67c..3333ebc3a 100644
--- a/src/lang/french.txt
+++ b/src/lang/french.txt
@@ -1650,7 +1650,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Spectate
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nouvelle compagnie
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Aucun -
STR_NETWORK_CLIENTLIST_KICK :Exclure
STR_NETWORK_CLIENTLIST_BAN :Bannir
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Donner de l'argent
diff --git a/src/lang/galician.txt b/src/lang/galician.txt
index f3f187a22..1b742258e 100644
--- a/src/lang/galician.txt
+++ b/src/lang/galician.txt
@@ -1621,7 +1621,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Observar
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nova Compañía
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(ningún)
STR_NETWORK_CLIENTLIST_KICK :Patear
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Dar diñeiro
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Falar a todos
diff --git a/src/lang/german.txt b/src/lang/german.txt
index 1093fcb94..9fa6ca16a 100644
--- a/src/lang/german.txt
+++ b/src/lang/german.txt
@@ -1650,7 +1650,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Zuschaue
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Neue Firma
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Keine -
STR_NETWORK_CLIENTLIST_KICK :Hinauswerfen
STR_NETWORK_CLIENTLIST_BAN :Sperren
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Geld schenken
diff --git a/src/lang/greek.txt b/src/lang/greek.txt
index 721de8506..26ad79d56 100644
--- a/src/lang/greek.txt
+++ b/src/lang/greek.txt
@@ -1650,7 +1650,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Παρα
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Νεα εταιρία
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Κανείς -
STR_NETWORK_CLIENTLIST_KICK :Εκδίωξη
STR_NETWORK_CLIENTLIST_BAN :Εκδίωξη
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Δώστε χρήματα
diff --git a/src/lang/hebrew.txt b/src/lang/hebrew.txt
index 441737ead..d18d1ba68 100644
--- a/src/lang/hebrew.txt
+++ b/src/lang/hebrew.txt
@@ -1650,7 +1650,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}צפה
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}חברה חדשה
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- כלום -
STR_NETWORK_CLIENTLIST_KICK :בעט
STR_NETWORK_CLIENTLIST_GIVE_MONEY :נתן כסף
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :דבר לכולם
diff --git a/src/lang/hungarian.txt b/src/lang/hungarian.txt
index da2e81d0d..ff173bdd2 100644
--- a/src/lang/hungarian.txt
+++ b/src/lang/hungarian.txt
@@ -1683,7 +1683,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Megfigye
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Új vállalat
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :---
STR_NETWORK_CLIENTLIST_KICK :Kirúgás
STR_NETWORK_CLIENTLIST_BAN :Kitiltás
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Pénz adományozása
diff --git a/src/lang/icelandic.txt b/src/lang/icelandic.txt
index 98550af2d..9e793595e 100644
--- a/src/lang/icelandic.txt
+++ b/src/lang/icelandic.txt
@@ -1641,7 +1641,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Fylgjast
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nýtt fyrirtæki
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(ekkert)
STR_NETWORK_CLIENTLIST_KICK :Sparka
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Gefa pening
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Tala við alla
diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt
index b52093493..7acfb7f2f 100644
--- a/src/lang/indonesian.txt
+++ b/src/lang/indonesian.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Menonton
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Buat Perusahaan
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- tidak ada -
STR_NETWORK_CLIENTLIST_KICK :Usir
STR_NETWORK_CLIENTLIST_BAN :Larangan
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Kirim uang
diff --git a/src/lang/italian.txt b/src/lang/italian.txt
index 9a3592a7d..09f6bd90a 100644
--- a/src/lang/italian.txt
+++ b/src/lang/italian.txt
@@ -1651,7 +1651,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Diventa
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nuova compagnia
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Nessuno -
STR_NETWORK_CLIENTLIST_KICK :Espelli
STR_NETWORK_CLIENTLIST_BAN :Bandisci
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Dona denaro
diff --git a/src/lang/japanese.txt b/src/lang/japanese.txt
index ffa094115..c522167dd 100644
--- a/src/lang/japanese.txt
+++ b/src/lang/japanese.txt
@@ -1610,7 +1610,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}傍観
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}新会社
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(なし)
STR_NETWORK_CLIENTLIST_KICK :蹴る
STR_NETWORK_CLIENTLIST_GIVE_MONEY :送金
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :全員へ発言
diff --git a/src/lang/korean.txt b/src/lang/korean.txt
index 025c76622..7b7969adc 100644
--- a/src/lang/korean.txt
+++ b/src/lang/korean.txt
@@ -1650,7 +1650,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}관전
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}새 회사
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(없음)
STR_NETWORK_CLIENTLIST_KICK :추방
STR_NETWORK_CLIENTLIST_GIVE_MONEY :돈 보내기
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :모두에게 말하기
diff --git a/src/lang/latvian.txt b/src/lang/latvian.txt
index 82cf8a064..cbe271673 100644
--- a/src/lang/latvian.txt
+++ b/src/lang/latvian.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Skatīt
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Jauna kompānija
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(neviens)
STR_NETWORK_CLIENTLIST_KICK :Izmest
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Iedot naudu
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Runāt ar visiem
diff --git a/src/lang/lithuanian.txt b/src/lang/lithuanian.txt
index a267e3c5e..d20939f72 100644
--- a/src/lang/lithuanian.txt
+++ b/src/lang/lithuanian.txt
@@ -1669,7 +1669,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Stebėti
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nauja kompanija
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(nėra)
STR_NETWORK_CLIENTLIST_KICK :Išmesti (Kick)
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Duoti pinigų
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Sakyti visiems
diff --git a/src/lang/luxembourgish.txt b/src/lang/luxembourgish.txt
index a23874b90..be027df78 100644
--- a/src/lang/luxembourgish.txt
+++ b/src/lang/luxembourgish.txt
@@ -1637,7 +1637,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Nokucken
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nei Firma
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(keng)
STR_NETWORK_CLIENTLIST_KICK :Kick
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Suen ginn
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Jidderengem soen
diff --git a/src/lang/norwegian_bokmal.txt b/src/lang/norwegian_bokmal.txt
index f4354f619..3a21b02bc 100644
--- a/src/lang/norwegian_bokmal.txt
+++ b/src/lang/norwegian_bokmal.txt
@@ -1646,7 +1646,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Vær til
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nytt firma
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(ingen)
STR_NETWORK_CLIENTLIST_KICK :Kast ut
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Gi penger
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Snakk til alle
diff --git a/src/lang/norwegian_nynorsk.txt b/src/lang/norwegian_nynorsk.txt
index f28e55c79..a86961fb5 100644
--- a/src/lang/norwegian_nynorsk.txt
+++ b/src/lang/norwegian_nynorsk.txt
@@ -1621,7 +1621,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Vær til
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nytt firma
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(ingen)
STR_NETWORK_CLIENTLIST_KICK :Kast ut
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Gje pengar
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Snakk til alle
diff --git a/src/lang/polish.txt b/src/lang/polish.txt
index f5190d32f..a5432fab0 100644
--- a/src/lang/polish.txt
+++ b/src/lang/polish.txt
@@ -2029,7 +2029,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Obserwuj
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nowe przedsiębiorstwo
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(brak)
STR_NETWORK_CLIENTLIST_KICK :Wyrzuć
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Przekazanie pieniędzy
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Mów do wszystkich
diff --git a/src/lang/portuguese.txt b/src/lang/portuguese.txt
index b4f0c92ee..da40c1e2f 100644
--- a/src/lang/portuguese.txt
+++ b/src/lang/portuguese.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Assistir
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nova empresa
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Nenhum -
STR_NETWORK_CLIENTLIST_KICK :Banir
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Dar dinheiro
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Falar com todos
diff --git a/src/lang/romanian.txt b/src/lang/romanian.txt
index 5849ea42a..c70f1e0c7 100644
--- a/src/lang/romanian.txt
+++ b/src/lang/romanian.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Observă
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Companie nouă
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Nici unul -
STR_NETWORK_CLIENTLIST_KICK :Kick
STR_NETWORK_CLIENTLIST_BAN :Interzice acces
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Donează bani
diff --git a/src/lang/russian.txt b/src/lang/russian.txt
index ea4d80e9d..1e1ebef18 100644
--- a/src/lang/russian.txt
+++ b/src/lang/russian.txt
@@ -1803,7 +1803,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Набл
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Новая компания
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Нет -
STR_NETWORK_CLIENTLIST_KICK :Выкинуть
STR_NETWORK_CLIENTLIST_BAN :Бан
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Передать денег
diff --git a/src/lang/serbian.txt b/src/lang/serbian.txt
index a5c71c607..b946e336b 100644
--- a/src/lang/serbian.txt
+++ b/src/lang/serbian.txt
@@ -1834,7 +1834,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Praćenj
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Novo preduzeće
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Prazno -
STR_NETWORK_CLIENTLIST_KICK :Izbaci
STR_NETWORK_CLIENTLIST_BAN :Zabrani pristup
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Daj novac
diff --git a/src/lang/simplified_chinese.txt b/src/lang/simplified_chinese.txt
index dc1325a57..16fdd68fe 100644
--- a/src/lang/simplified_chinese.txt
+++ b/src/lang/simplified_chinese.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}旁观
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}新公司
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(没有)
STR_NETWORK_CLIENTLIST_KICK :踢出
STR_NETWORK_CLIENTLIST_GIVE_MONEY :送钱
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :向全体人广播
diff --git a/src/lang/slovak.txt b/src/lang/slovak.txt
index f6b9b0f14..653e7e3f0 100644
--- a/src/lang/slovak.txt
+++ b/src/lang/slovak.txt
@@ -1716,7 +1716,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Pozorova
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nová spoločnosť
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(nikto)
STR_NETWORK_CLIENTLIST_KICK :Vyhodit
STR_NETWORK_CLIENTLIST_BAN :Ban
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Previest peniaze
diff --git a/src/lang/slovenian.txt b/src/lang/slovenian.txt
index afbc5eb8a..d6193e7c0 100644
--- a/src/lang/slovenian.txt
+++ b/src/lang/slovenian.txt
@@ -1682,7 +1682,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Opazuj
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Novo podjetje
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(brez)
STR_NETWORK_CLIENTLIST_KICK :Brcni
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Daj denar
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Pogovor vsem
diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt
index 11918e9ba..e4d423f84 100644
--- a/src/lang/spanish.txt
+++ b/src/lang/spanish.txt
@@ -1650,7 +1650,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Presenci
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nueva compañía
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Ninguno -
STR_NETWORK_CLIENTLIST_KICK :Expulsar
STR_NETWORK_CLIENTLIST_BAN :Banear
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Dar dinero
diff --git a/src/lang/swedish.txt b/src/lang/swedish.txt
index ae76366cb..5fea7d69e 100644
--- a/src/lang/swedish.txt
+++ b/src/lang/swedish.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Åskåda
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Nytt företag
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- Inga -
STR_NETWORK_CLIENTLIST_KICK :Kasta ut
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Ge pengar
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Prata med alla
diff --git a/src/lang/traditional_chinese.txt b/src/lang/traditional_chinese.txt
index 46d2e7cfa..471bfee15 100644
--- a/src/lang/traditional_chinese.txt
+++ b/src/lang/traditional_chinese.txt
@@ -1649,7 +1649,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}旁觀
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}新公司
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- 無 -
STR_NETWORK_CLIENTLIST_KICK :踢除
STR_NETWORK_CLIENTLIST_BAN :封鎖
STR_NETWORK_CLIENTLIST_GIVE_MONEY :給錢
diff --git a/src/lang/turkish.txt b/src/lang/turkish.txt
index 8353f0385..069383538 100644
--- a/src/lang/turkish.txt
+++ b/src/lang/turkish.txt
@@ -1650,7 +1650,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Gözleml
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Yeni Şirket
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(yok)
STR_NETWORK_CLIENTLIST_KICK :At
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Para ver
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Herkesle konuş
diff --git a/src/lang/ukrainian.txt b/src/lang/ukrainian.txt
index 784b02289..e7a196a7e 100644
--- a/src/lang/ukrainian.txt
+++ b/src/lang/ukrainian.txt
@@ -1774,7 +1774,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Спос
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Нова компанія
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :- немає -
STR_NETWORK_CLIENTLIST_KICK :Відключити гравця
STR_NETWORK_CLIENTLIST_BAN :Бан
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Дати грошей
diff --git a/src/lang/welsh.txt b/src/lang/welsh.txt
index 9578979f7..f51679323 100644
--- a/src/lang/welsh.txt
+++ b/src/lang/welsh.txt
@@ -1640,7 +1640,6 @@ STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Gwylio
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}Cwmni Newydd
# Network client list
-STR_NETWORK_CLIENTLIST_NONE :(dim)
STR_NETWORK_CLIENTLIST_KICK :Cicio
STR_NETWORK_CLIENTLIST_GIVE_MONEY :Rhoi arian
STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Siarad â phawb
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 8506ca6b9..f96a72297 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -1757,13 +1757,6 @@ extern void DrawCompanyIcon(CompanyID cid, int x, int y);
/* Every action must be of this form */
typedef void ClientList_Action_Proc(byte client_no);
-/* Max 10 actions per client */
-#define MAX_CLIENTLIST_ACTION 10
-
-enum {
- CLNWND_OFFSET = 16,
-};
-
static const Widget _client_list_popup_widgets[] = {
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 99, 0, 0, 0, STR_NULL},
{ WIDGETS_END},
@@ -1831,67 +1824,60 @@ static void ClientList_SpeakToAll(byte client_no)
ShowNetworkChatQueryWindow(DESTTYPE_BROADCAST, 0);
}
-static void ClientList_None(byte client_no)
-{
- /* No action ;) */
-}
-
-
-
+/** Popup selection window to chose an action to perform */
struct NetworkClientListPopupWindow : Window {
- int sel_index;
+ /** Container for actions that can be executed. */
+ struct ClientListAction {
+ StringID name; ///< Name of the action to execute
+ ClientList_Action_Proc *proc; ///< Action to execute
+ };
+
+ uint sel_index;
int client_no;
- char action[MAX_CLIENTLIST_ACTION][50];
- ClientList_Action_Proc *proc[MAX_CLIENTLIST_ACTION];
+ SmallVector<ClientListAction, 2> actions; ///< Actions to execute
+
+ /**
+ * Add an action to the list of actions to execute.
+ * @param name the name of the action
+ * @param proc the procedure to execute for the action
+ */
+ inline void AddAction(StringID name, ClientList_Action_Proc *proc)
+ {
+ ClientListAction *action = this->actions.Append();
+ action->name = name;
+ action->proc = proc;
+ }
NetworkClientListPopupWindow(int x, int y, const Widget *widgets, int client_no) :
Window(x, y, 150, 100, WC_TOOLBAR_MENU, widgets),
sel_index(0), client_no(client_no)
{
- /*
- * Fill the actions this client has.
- * Watch is, max 50 chars long!
- */
-
const NetworkClientInfo *ci = NetworkFindClientInfo(client_no);
- int i = 0;
if (_network_own_client_id != ci->client_id) {
- GetString(this->action[i], STR_NETWORK_CLIENTLIST_SPEAK_TO_CLIENT, lastof(this->action[i]));
- this->proc[i++] = &ClientList_SpeakToClient;
+ this->AddAction(STR_NETWORK_CLIENTLIST_SPEAK_TO_CLIENT, &ClientList_SpeakToClient);
}
if (Company::IsValidID(ci->client_playas) || ci->client_playas == COMPANY_SPECTATOR) {
- GetString(this->action[i], STR_NETWORK_CLIENTLIST_SPEAK_TO_COMPANY, lastof(this->action[i]));
- this->proc[i++] = &ClientList_SpeakToCompany;
+ this->AddAction(STR_NETWORK_CLIENTLIST_SPEAK_TO_COMPANY, &ClientList_SpeakToCompany);
}
- GetString(this->action[i], STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL, lastof(this->action[i]));
- this->proc[i++] = &ClientList_SpeakToAll;
+ this->AddAction(STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL, &ClientList_SpeakToAll);
if (_network_own_client_id != ci->client_id) {
/* We are no spectator and the company we want to give money to is no spectator and money gifts are allowed */
if (Company::IsValidID(_local_company) && Company::IsValidID(ci->client_playas) && _settings_game.economy.give_money) {
- GetString(this->action[i], STR_NETWORK_CLIENTLIST_GIVE_MONEY, lastof(this->action[i]));
- this->proc[i++] = &ClientList_GiveMoney;
+ this->AddAction(STR_NETWORK_CLIENTLIST_GIVE_MONEY, &ClientList_GiveMoney);
}
}
/* A server can kick clients (but not himself) */
if (_network_server && _network_own_client_id != ci->client_id) {
- GetString(this->action[i], STR_NETWORK_CLIENTLIST_KICK, lastof(this->action[i]));
- this->proc[i++] = &ClientList_Kick;
-
- GetString(this->action[i], STR_NETWORK_CLIENTLIST_BAN, lastof(this->action[i]));
- this->proc[i++] = &ClientList_Ban;
- }
-
- if (i == 0) {
- GetString(this->action[i], STR_NETWORK_CLIENTLIST_NONE, lastof(this->action[i]));
- this->proc[i++] = &ClientList_None;
+ this->AddAction(STR_NETWORK_CLIENTLIST_KICK, &ClientList_Kick);
+ this->AddAction(STR_NETWORK_CLIENTLIST_BAN, &ClientList_Ban);
}
/* Calculate the height */
- int h = ClientListPopupHeight();
+ int h = this->actions.Length() * FONT_HEIGHT_NORMAL + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
/* Allocate the popup */
this->widget[0].bottom = this->widget[0].top + h;
@@ -1902,48 +1888,14 @@ struct NetworkClientListPopupWindow : Window {
this->FindWindowPlacementAndResize(150, h + 1);
}
- /**
- * An action is clicked! What do we do?
- */
- void HandleClientListPopupClick(byte index)
- {
- /* A click on the Popup of the ClientList.. handle the command */
- if (index < MAX_CLIENTLIST_ACTION && this->proc[index] != NULL) {
- this->proc[index](this->client_no);
- }
- }
-
- /**
- * Finds the amount of actions in the popup and set the height correct
- */
- uint ClientListPopupHeight()
- {
- int num = 0;
-
- /* Find the amount of actions */
- for (int i = 0; i < MAX_CLIENTLIST_ACTION; i++) {
- if (this->action[i][0] == '\0') continue;
- if (this->proc[i] == NULL) continue;
- num++;
- }
-
- num *= FONT_HEIGHT_NORMAL;
-
- return num + 1;
- }
-
-
virtual void OnPaint()
{
this->DrawWidgets();
/* Draw the actions */
int sel = this->sel_index;
- int y = 1;
- for (int i = 0; i < MAX_CLIENTLIST_ACTION; i++, y += FONT_HEIGHT_NORMAL) {
- if (this->action[i][0] == '\0') continue;
- if (this->proc[i] == NULL) continue;
-
+ int y = WD_FRAMERECT_TOP;
+ for (const ClientListAction *action = this->actions.Begin(); action != this->actions.End(); action++, y += FONT_HEIGHT_NORMAL) {
TextColour colour;
if (sel-- == 0) { // Selected item, highlight it
GfxFillRect(1, y, 150 - 2, y + FONT_HEIGHT_NORMAL - 1, 0);
@@ -1952,23 +1904,23 @@ struct NetworkClientListPopupWindow : Window {
colour = TC_BLACK;
}
- DrawString(4, this->width - 4, y, this->action[i], colour);
+ DrawString(4, this->width - 4, y, action->name, colour);
}
}
virtual void OnMouseLoop()
{
/* We selected an action */
- int index = (_cursor.pos.y - this->top) / FONT_HEIGHT_NORMAL;
+ uint index = (_cursor.pos.y - this->top - WD_FRAMERECT_TOP) / FONT_HEIGHT_NORMAL;
if (_left_button_down) {
- if (index == -1 || index == this->sel_index) return;
+ if (index == this->sel_index || index >= this->actions.Length()) return;
this->sel_index = index;
this->SetDirty();
} else {
- if (index >= 0 && _cursor.pos.y >= this->top) {
- HandleClientListPopupClick(index);
+ if (index < this->actions.Length() && _cursor.pos.y >= this->top) {
+ this->actions[index].proc(this->client_no);
}
DeleteWindowById(WC_TOOLBAR_MENU, 0);