Browse Source

Rename kwin to twin (part 1 of 2)

pull/1/head
Timothy Pearson 11 years ago
parent
commit
cbf01c9f46
  1. 2
      README
  2. 4
      doc/kwin4/index.docbook
  3. 4
      kolf/tutorial.kolf
  4. 6
      kwin4/Makefile.am
  5. 4
      kwin4/README
  6. 2
      kwin4/grafix/Makefile.am
  7. 6
      kwin4/kwin4.desktop
  8. 8
      kwin4/kwin4.kdelnk
  9. 2
      kwin4/kwin4/AboutDlg.kdevdlg
  10. 28
      kwin4/kwin4/Makefile.am
  11. 22
      kwin4/kwin4/kwin4.cpp
  12. 2
      kwin4/kwin4/kwin4.h
  13. 2
      kwin4/kwin4/kwin4.kcfg
  14. 14
      kwin4/kwin4/kwin4doc.cpp
  15. 2
      kwin4/kwin4/kwin4doc.h
  16. 4
      kwin4/kwin4/kwin4player.cpp
  17. 4
      kwin4/kwin4/kwin4proc.cpp
  18. 2
      kwin4/kwin4/kwin4proc.h
  19. 2
      kwin4/kwin4/kwin4ui.rc
  20. 12
      kwin4/kwin4/kwin4view.cpp
  21. 10
      kwin4/kwin4/main.cpp
  22. 2
      kwin4/kwin4/prefs.kcfgc
  23. 2
      kwin4/kwin4/scorewidget.cpp
  24. 2
      libtdegames/kgame/dialogs/kgameconnectdialog.h
  25. 2
      libtdegames/kgame/dialogs/kgamedialogconfig.h
  26. 2
      libtdegames/kgame/kgamenetwork.h

2
README

@ -101,7 +101,7 @@ This is a compilation of various games
* ktuberling
Kids game: make your own potato (NO french fries!)
* kwin4
* twin4
Place 4 pieces in a row.
* libtdegames

4
doc/kwin4/index.docbook

@ -47,7 +47,7 @@
<keyword>four</keyword>
<keyword>four in a row</keyword>
<keyword>win4</keyword>
<keyword>kwin4</keyword>
<keyword>twin4</keyword>
<keyword>connect four</keyword>
<keyword>connect 4</keyword>
</keywordset>
@ -410,7 +410,7 @@ Documentation copyright 2002 &Martin.Heni; &Martin.Heni.mail;
<appendix id="installation">
<title>Installation</title>
<sect1 id="getting-kwin4">
<sect1 id="getting-twin4">
<title>How to obtain &k4wins;</title>
&install.intro.documentation;

4
kolf/tutorial.kolf

@ -1008,7 +1008,7 @@ Comment[ta]=<h3>சமட(தண)</h3>ச
Comment[tg]=<h3>Кӯлмак (Об)</h3>Агар тӯбча ба кӯлак афтад (кабуд) шумо соҳиби задани ҷаримавӣ мегардед ва тӯбча дар канори кӯлмак ҷойгир карда мешавад.
Comment[tr]= <h3>Birikinti (Su)</h3>Bir birikintiye (mavi) çarpmak skorunuza bir penaltı puanı eklenmesine yol açar, ve topunuz birikinti dışına çıkartılır.
Comment[uk]=<h3>Калюжі (Вода)</h3>Якщо м'ячик попадає в калюжу (синя), вам нараховується штрафний удар і ваш м'ячик поміщається поза калюжею.
Comment[xh]=<h3>Ichityana (Amanzi)</h3>Bethela kwi chityana (bhlowu) yongeza umvumbo wesohlwayo kwinqaku lakho, nebhola yakho ibekwe ngaphandle kwechityana.
Comment[xh]=<h3>Ichityana (Amanzi)</h3>Bethela kwi chityana (bhlowu) yongeza umvumbo wesohlwayo twinqaku lakho, nebhola yakho ibekwe ngaphandle kwechityana.
Comment[xx]=xx<h3>Puddles (Water)</h3>Hitting into a puddle (blue) adds a penalty stroke to your score, and your ball is placed outside the puddle.xx
Comment[zh_CN]=<h3>水坑(水)</h3>打到水坑里(蓝色)会在您的成绩中记一次惩罚,然后您的球会被放在水坑的外边。
Comment[zh_TW]=<h3>水坑(水)</h3>將球擊入水坑(藍色)會在您的分數中增加懲罰性的桿數,而您的球會被放在水坑外面。
@ -1148,7 +1148,7 @@ Comment[sv]=<h3>Svarta hål</h3>Svarta hål transporterar bollen till sina utgå
Comment[ta]=<h3>கர ஓடகள</h3>கர ஓடகள பநிறதிிி பந எநத வகதி வரிறத அதகதிி. த <u>ஓட-></u> எநத கர ஓட எநத வழிக விிறத எனபத பநிிபதற தகவலடவ.
Comment[tr]= <h3>Karadelikler</h3>Kara delikler topu çıkışlarına taşırlar ve topuzun hızı ile orantılı bir hız ile dışarı atarlar. <u>Delik->Bilgi Göster</u> seçerek hangi karadeliğin hangi çıkışa sahip olduğunu ve topun çıkış yönünü öğrenebilirsiniz.
Comment[uk]=<h3>Чорні діри</h3>Чорні діри переносять м'ячик до їх виходу і викидають його із швидкість прямо залежною від його власної. Виберіть <u>Лунка->Показати інформацію</u>, щоб подивитись яка чорна діра веде до якого виходу і в якому напрямку вилетить м'ячик.
Comment[xh]=<h3>Imingxuma Emnyama</h3>Imingxuma Emnyama ihambisa ibhola iyokutsho kwindawo yazo yokuphuma, ize iyikhuphe ngqo ngesantya esihlobene kwisantya ibihamba ngaso ibhola yakho. Khetha <u>Umngxuma->Bonisa Ulwazi</u> ze bone ukuba ngowuphi Umngxuma Omnyama ohamba ayokutsho kweliphi icala lendlela nakweyiphi indawo yokuphuma eza kuza kulo ibhola yakho.
Comment[xh]=<h3>Imingxuma Emnyama</h3>Imingxuma Emnyama ihambisa ibhola iyokutsho twindawo yazo yokuphuma, ize iyikhuphe ngqo ngesantya esihlobene kwisantya ibihamba ngaso ibhola yakho. Khetha <u>Umngxuma->Bonisa Ulwazi</u> ze bone ukuba ngowuphi Umngxuma Omnyama ohamba ayokutsho kweliphi icala lendlela nakweyiphi indawo yokuphuma eza kuza kulo ibhola yakho.
Comment[xx]=xx<h3>Black Holes</h3>Black Holes transport the ball to their exit, and eject it at a speed directly relational to the speed your ball was going. Choose <u>Hole->Show Info</u> to see which Black Hole goes to which exit and the direction the ball will come out at.xx
Comment[zh_CN]=<h3>黑洞</h3>黑洞将球运送到出口处,并根据您的球速按成比例的速度将其弹出。选择<u>球洞->显示信息</u>可查看哪个黑洞对应哪个出口,以及球从出口弹出的方向。
Comment[zh_TW]=<h3>黑洞</h3>黑洞會將球傳送到它們的出口,而將它們射出的速度與您的球進入的速度有直接關係。選擇<u>洞->顯示資訊</u>來看看從哪個黑洞進入會從從哪裡出來以及球出現的方向。

6
kwin4/Makefile.am

@ -1,7 +1,7 @@
SUBDIRS = kwin4 grafix
SUBDIRS = twin4 grafix
AUTOMAKE_OPTIONS = foreign
KDE_ICON = kwin4
KDE_ICON = twin4
xdg_apps_DATA = kwin4.desktop
xdg_apps_DATA = twin4.desktop

4
kwin4/README

@ -12,10 +12,10 @@ GENERAL NOTE:
INSTALLATION:
# unpack the archive
tar xzf kwin4-0.9.tar.gz
tar xzf twin4-0.9.tar.gz
# build the package
cd kwin4-0.9
cd twin4-0.9
./configure
# or if KDE is in /opt/kde2
./configure --prefix=/opt/kde2

2
kwin4/grafix/Makefile.am

@ -1,6 +1,6 @@
GRAFIXDIRS = default
grafixdir = $(kde_datadir)/kwin4/grafix
grafixdir = $(kde_datadir)/twin4/grafix
uninstall-local:
rm -rf $(DESTDIR)$(grafixdir)

6
kwin4/kwin4.desktop

@ -85,10 +85,10 @@ GenericName[xh]=Indlela yokudlala umdlalo
GenericName[zh_CN]=策略游戏
GenericName[zh_TW]=策略遊戲
GenericName[zu]=Umdlalo wamaqhinga
Exec=kwin4
Icon=kwin4
Exec=twin4
Icon=twin4
MimeType=
Terminal=false
Type=Application
DocPath=kwin4/index.html
DocPath=twin4/index.html
Categories=Qt;KDE;Game;BoardGame;

8
kwin4/kwin4.kdelnk

@ -1,10 +1,10 @@
# KDE Config File
[KDE Desktop Entry]
Type=Application
Exec=kwin4 -caption "%c" %i %m
Icon=kwin4.xpm
MiniIcon=kwin4.xpm
DocPath=kwin4/index.html
Exec=twin4 -caption "%c" %i %m
Icon=twin4.xpm
MiniIcon=twin4.xpm
DocPath=twin4/index.html
Comment=
Terminal=0
Name=Kwin4

2
kwin4/kwin4/AboutDlg.kdevdlg

@ -5,7 +5,7 @@
//
data Information
{
Filename="/home/martin/mgames/kwin4/kwin4/AboutDlg.kdevdlg"
Filename="/home/martin/mgames/twin4/twin4/AboutDlg.kdevdlg"
KDevelopVersion="1.1"
DlgEditVersion="0.1alpha"
LastChanged="Mon Apr 17 09:29:55 2000"

28
kwin4/kwin4/Makefile.am

@ -1,28 +1,28 @@
bin_PROGRAMS = kwin4 kwin4proc
kwin4_SOURCES = main.cpp kwin4.cpp kwin4view.cpp kwin4doc.cpp \
kwin4player.cpp kspritecache.cpp \
bin_PROGRAMS = twin4 twin4proc
twin4_SOURCES = main.cpp twin4.cpp twin4view.cpp twin4doc.cpp \
twin4player.cpp kspritecache.cpp \
scorewidget.cpp prefs.kcfgc settings.ui statistics.ui statuswidget.ui
kwin4_LDADD = $(LIB_KFILE) $(LIB_TDEGAMES)
kwin4_DEPENDENCIES = $(LIB_TDEGAMES_DEP)
twin4_LDADD = $(LIB_KFILE) $(LIB_TDEGAMES)
twin4_DEPENDENCIES = $(LIB_TDEGAMES_DEP)
kwin4proc_SOURCES = kwin4proc.cpp
kwin4proc_LDADD = $(LIB_KFILE) $(LIB_TDEGAMES)
kwin4proc_DEPENDENCIES = $(LIB_TDEGAMES_DEP)
twin4proc_SOURCES = twin4proc.cpp
twin4proc_LDADD = $(LIB_KFILE) $(LIB_TDEGAMES)
twin4proc_DEPENDENCIES = $(LIB_TDEGAMES_DEP)
INCLUDES = -I$(top_srcdir)/libtdegames -I$(top_srcdir)/libtdegames/kgame $(all_includes)
METASOURCES = AUTO
rcdir = $(kde_datadir)/kwin4
rc_DATA = kwin4ui.rc
rcdir = $(kde_datadir)/twin4
rc_DATA = twin4ui.rc
kwin4_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
kwin4proc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
twin4_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
twin4proc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
kde_kcfg_DATA = kwin4.kcfg
kde_kcfg_DATA = twin4.kcfg
messages: rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/kwin4.pot
$(XGETTEXT) *.cpp -o $(podir)/twin4.pot

22
kwin4/kwin4/kwin4.cpp

@ -1,5 +1,5 @@
/***************************************************************************
kwin4 - Boardgame for KDE
twin4 - Boardgame for KDE
-------------------
begin : Sun Mar 26 12:50:12 CEST 2000
copyright : (C) |1995-2000 by Martin Heni
@ -48,9 +48,9 @@
#include <dialogs/kgamedebugdialog.h>
// application specific includes
#include "kwin4.h"
#include "kwin4view.h"
#include "kwin4doc.h"
#include "twin4.h"
#include "twin4view.h"
#include "twin4doc.h"
#include "prefs.h"
#include "settings.h"
#include "statistics.h"
@ -290,7 +290,7 @@ void Kwin4App::changeAction(const char *action, bool enable){
*/
void Kwin4App::saveProperties(KConfig *cfg)
{
TQString tempfile = kapp->tempSaveName(TQDir::currentDirPath()+"kwin4");
TQString tempfile = kapp->tempSaveName(TQDir::currentDirPath()+"twin4");
cfg->writePathEntry("filename", tempfile );
doc->save(tempfile);
}
@ -310,9 +310,9 @@ void Kwin4App::readProperties(KConfig* cfg)
*/
void Kwin4App::slotOpenGame()
{
TQString dir(":<kwin4>");
TQString dir(":<twin4>");
TQString filter("*");
TQString file("/tmp/kwin.save");
TQString file("/tmp/twin.save");
if (global_debug < 10)
file=KFileDialog::getOpenFileName(dir,filter,this);
doc->load(file,true);
@ -324,9 +324,9 @@ void Kwin4App::slotOpenGame()
*/
void Kwin4App::slotSaveGame()
{
TQString dir(":<kwin4>");
TQString dir(":<twin4>");
TQString filter("*");
TQString file("/tmp/kwin.save");
TQString file("/tmp/twin.save");
if (global_debug < 10)
file=KFileDialog::getSaveFileName(dir,filter,this);
doc->save(file);
@ -536,7 +536,7 @@ void Kwin4App::slotInitNetwork()
KGameDialog dlg(doc, 0, i18n("Network Configuration"), this,
KGameDialog::NetworkConfig, 20000, true);
dlg.networkConfig()->setDefaultNetworkInfo(host, port);
dlg.networkConfig()->setDiscoveryInfo("_kwin4._tcp",Prefs::gamename());
dlg.networkConfig()->setDiscoveryInfo("_twin4._tcp",Prefs::gamename());
TQVBox *box=dlg.configPage(KGameDialog::NetworkConfig);
TQVBoxLayout *l=(TQVBoxLayout *)(box->tqlayout());
@ -623,4 +623,4 @@ void Kwin4App::showSettings(){
dialog->show();
}
#include "kwin4.moc"
#include "twin4.moc"

2
kwin4/kwin4/kwin4.h

@ -20,7 +20,7 @@
#include <kmainwindow.h>
#include <kdialogbase.h>
#include "kwin4doc.h"
#include "twin4doc.h"
#include <kdemacros.h>
class Kwin4Player;
class KGameChat;

2
kwin4/kwin4/kwin4.kcfg

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name="kwin4rc"/>
<kcfgfile name="twin4rc"/>
<group name="Parameter">
<entry name="port" type="Int">
<label>Network connection port</label>

14
kwin4/kwin4/kwin4doc.cpp

@ -1,5 +1,5 @@
/***************************************************************************
kwin4doc.cpp - Boardgame for KDE
twin4doc.cpp - Boardgame for KDE
-------------------
begin : Sun Mar 26 12:50:12 CEST 2000
copyright : (C) |1995-2000 by Martin Heni
@ -15,7 +15,7 @@
* *
***************************************************************************/
#include "kwin4doc.h"
#include "twin4doc.h"
// include files for TQt
#include <tqdir.h>
@ -31,7 +31,7 @@
// application specific includes
#include "kspritecache.h"
#include "kwin4view.h"
#include "twin4view.h"
#include "scorewidget.h"
#include "prefs.h"
#include "statuswidget.h"
@ -781,14 +781,14 @@ TQString Kwin4Doc::QueryProcessName()
{
// First try a local dir override
TQDir dir;
TQString filename=dir.path()+TQString("/kwin4/kwin4proc");
TQString filename=dir.path()+TQString("/twin4/twin4proc");
TQFile flocal(filename);
if (flocal.exists())
{
if (global_debug>1) kdDebug(12010) << " Found local process " << filename << endl;
return filename;
}
TQString path=kapp->dirs()->findExe("kwin4proc");
TQString path=kapp->dirs()->findExe("twin4proc");
if (!path.isNull())
{
if (global_debug>1) kdDebug(12010) << " Found system process " << path << endl;
@ -858,7 +858,7 @@ bool Kwin4Doc::Move(int x,int id)
int Kwin4Doc::checkGameOver(KPlayer *p)
{
if (global_debug>1)
kdDebug(12010) <<"kwin4doc::checkGameOver::"<<p->userId()<<endl;
kdDebug(12010) <<"twin4doc::checkGameOver::"<<p->userId()<<endl;
return CheckGameOver(QueryLastcolumn(),QueryLastcolour());
}
@ -1319,4 +1319,4 @@ void Kwin4Doc::newPlayersJoin(KGamePlayerList * /*oldList*/,KGamePlayerList *new
kdDebug(12010) << "newPlayersJoin: DONE"<<endl;
}
#include "kwin4doc.moc"
#include "twin4doc.moc"

2
kwin4/kwin4/kwin4doc.h

@ -22,7 +22,7 @@
#include <kgameio.h>
#include <kgamepropertyarray.h>
#include "kwin4player.h"
#include "twin4player.h"
class Kwin4View;
class TQCanvasItem;

4
kwin4/kwin4/kwin4player.cpp

@ -21,7 +21,7 @@
#include <kconfig.h>
#include <kgamepropertyhandler.h>
#include "kwin4player.h"
#include "twin4player.h"
#include "statuswidget.h"
Kwin4Player::Kwin4Player() : KPlayer(), sWidget(0)
@ -154,7 +154,7 @@ void Kwin4Player::resetStats(bool all)
}
}
#include "kwin4player.moc"
#include "twin4player.moc"

4
kwin4/kwin4/kwin4proc.cpp

@ -15,7 +15,7 @@
* *
***************************************************************************/
#include "kwin4proc.h"
#include "twin4proc.h"
#include <stdio.h>
#include <stdlib.h>
@ -429,4 +429,4 @@ int main(int argc ,char * argv[])
fprintf(stderr,"nach exec\n");
return 1;
}
#include "kwin4proc.moc"
#include "twin4proc.moc"

2
kwin4/kwin4/kwin4proc.h

@ -20,7 +20,7 @@
#include <kgameprocess.h>
// TODO match up with what is in kwin4doc.h
// TODO match up with what is in twin4doc.h
typedef enum e_farbe {Niemand=0,Gelb=1,Rot=2,Tip=3,Rand=4} Farbe;
typedef char FARBE;

2
kwin4/kwin4/kwin4ui.rc

@ -1,5 +1,5 @@
<!DOCTYPE kpartgui>
<kpartgui name="kwin4" version="1">
<kpartgui name="twin4" version="1">
<MenuBar>
<Menu name="game"><text>&amp;Game</text>

12
kwin4/kwin4/kwin4view.cpp

@ -1,5 +1,5 @@
/***************************************************************************
kwin4view.cpp - View of the kwin4 program
twin4view.cpp - View of the twin4 program
-------------------
begin : Sun Mar 26 12:50:12 CEST 2000
copyright : (C) |1995-2000 by Martin Heni
@ -15,7 +15,7 @@
* *
***************************************************************************/
#include "kwin4view.h"
#include "twin4view.h"
#include <stdio.h>
#include <math.h>
@ -25,7 +25,7 @@
#include <kapplication.h>
#include <kstandarddirs.h>
#include "kwin4doc.h"
#include "twin4doc.h"
#include "scorewidget.h"
#include "statuswidget.h"
#include "kspritecache.h"
@ -108,12 +108,12 @@ Kwin4View::Kwin4View(Kwin4Doc *theDoc, TQWidget *parent, const char *name)
// localise data file
TQString file="kwin4/grafix/default/grafix.rc";
TQString file="twin4/grafix/default/grafix.rc";
TQString mGrafix=kapp->dirs()->findResourceDir("data",file);
if (mGrafix.isNull())
mGrafix="grafix/default/";
else
mGrafix+="kwin4/grafix/default/";
mGrafix+="twin4/grafix/default/";
if (global_debug>3)
kdDebug(12010) << "Localised grafix dir " << mGrafix << endl;
@ -726,4 +726,4 @@ void Kwin4View::resizeEvent(TQResizeEvent *e)
if (mCanvas) mCanvas->resize(e->size().width(),e->size().height());
}
#include "kwin4view.moc"
#include "twin4view.moc"

10
kwin4/kwin4/main.cpp

@ -20,7 +20,7 @@
#include <kdebug.h>
#include <kaboutdata.h>
#include "kwin4.h"
#include "twin4.h"
#define KWIN4_VERSION "v1.10"
@ -36,7 +36,7 @@ int global_debug;
int main(int argc, char *argv[])
{
global_debug=0;
KAboutData aboutData( "kwin4", I18N_NOOP("KWin4"),
KAboutData aboutData( "twin4", I18N_NOOP("KWin4"),
KWIN4_VERSION,
I18N_NOOP("KWin4: Two player network game"),
KAboutData::License_GPL,
@ -65,9 +65,9 @@ int main(int argc, char *argv[])
}
else
{
Kwin4App *kwin4 = new Kwin4App();
app.setMainWidget(kwin4);
kwin4->show();
Kwin4App *twin4 = new Kwin4App();
app.setMainWidget(twin4);
twin4->show();
}
return app.exec();

2
kwin4/kwin4/prefs.kcfgc

@ -1,5 +1,5 @@
# Code generation options for kconfig_compiler
File=kwin4.kcfg
File=twin4.kcfg
#IncludeFiles=defines.h
ClassName=Prefs
Singleton=true

2
kwin4/kwin4/scorewidget.cpp

@ -1,5 +1,5 @@
/***************************************************************************
kwin4 program
twin4 program
-------------------
begin : Sun Mar 26 12:50:12 CEST 2000
copyright : (C) |1995-2000 by Martin Heni

2
libtdegames/kgame/dialogs/kgameconnectdialog.h

@ -63,7 +63,7 @@ public:
/**
* Sets DNS-SD service type, both for publishing and browsing
* @param type Service type (something like _kwin4._tcp).
* @param type Service type (something like _twin4._tcp).
* It should be unique for application.
* @since 3.4
**/

2
libtdegames/kgame/dialogs/kgamedialogconfig.h

@ -248,7 +248,7 @@ public:
* server browser. Without this publishing and discovery of LAN servers will not be enabled.
* @param name Game name. Important only for server mode. If not
* set hostname will be used. In case of name conflict -2, -3 and so on will be added to name.
* @param type Service type (something like _kwin4._tcp). It should be unique for application.
* @param type Service type (something like _twin4._tcp). It should be unique for application.
* @since 3.4
**/
void setDiscoveryInfo(const TQString& type, const TQString& name=TQString());

2
libtdegames/kgame/kgamenetwork.h

@ -115,7 +115,7 @@ public:
* Announces game MASTER on network using DNS-SD. Clients then can discover it using
* DNSSD::ServiceBrowser (or KGameConnectWidget) instead of manually entering
* IP address.
* @param type service type (something like _kwin4._tcp).
* @param type service type (something like _twin4._tcp).
* It should be unique for application.
* @param name game name that will be displayed by clients. If not
* set hostname will be used. In case of name conflict -2, -3 and so on will be added to name.

Loading…
Cancel
Save