|
|
|
@ -247,7 +247,7 @@ void Knights::initMenus( void )
|
|
|
|
|
matchMenu->insertItem( i18n( "&Draw" ), drawMenu, MENU_DRAW );
|
|
|
|
|
matchMenu->setItemEnabled( MENU_DRAW, FALSE );
|
|
|
|
|
// MENU_RETRACT
|
|
|
|
|
matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("undo"), KIcon::Small ) ),
|
|
|
|
|
matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("undo"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "&Retract Move" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_RETRACT );
|
|
|
|
|
matchMenu->setItemEnabled( MENU_RETRACT, FALSE );
|
|
|
|
|
matchMenu->setWhatsThis( MENU_RETRACT, i18n( "Select this to retract your last move." ) );
|
|
|
|
@ -278,7 +278,7 @@ void Knights::initMenus( void )
|
|
|
|
|
matchMenu->setWhatsThis( MENU_PONDER, i18n( "This toggles your opponent's ability to think while it's your turn." ) );
|
|
|
|
|
matchMenu->insertSeparator();
|
|
|
|
|
// MENU_PAUSE
|
|
|
|
|
matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("player_pause"), KIcon::Small ) ),
|
|
|
|
|
matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("player_pause"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "Pause" ), this, TQT_SLOT( Settings(int) ), Key_F12, MENU_PAUSE );
|
|
|
|
|
matchMenu->setItemEnabled( MENU_PAUSE, FALSE );
|
|
|
|
|
matchMenu->setWhatsThis( MENU_PAUSE, i18n( "Select this to pause the clock for this match." ) );
|
|
|
|
@ -301,38 +301,38 @@ void Knights::initMenus( void )
|
|
|
|
|
fileMenu menu
|
|
|
|
|
*/
|
|
|
|
|
// MENU_NEWGAME
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filenew"), KIcon::Small ) ),
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filenew"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "&New Match..." ), this, TQT_SLOT( openNewMatchDialog() ), CTRL+Key_N, MENU_NEWGAME );
|
|
|
|
|
fileMenu->setWhatsThis( MENU_NEWGAME, i18n( "This allows you to begin a new match." ) );
|
|
|
|
|
// MENU_LOAD
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileopen"), KIcon::Small ) ),
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileopen"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "&Load Match..." ), Core, TQT_SLOT( load() ), CTRL+Key_L, MENU_LOAD );
|
|
|
|
|
fileMenu->setWhatsThis( MENU_LOAD, i18n( "The Load command will allow you to select a previously saved match and play it again." ) );
|
|
|
|
|
fileMenu->insertSeparator();
|
|
|
|
|
// MENU_SAVE
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filesave"), KIcon::Small ) ),
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filesave"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "&Save Match" ), this, TQT_SLOT( SaveGame() ), CTRL+Key_S, MENU_SAVE );
|
|
|
|
|
fileMenu->setItemEnabled( MENU_SAVE, FALSE );
|
|
|
|
|
fileMenu->setWhatsThis( MENU_SAVE, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
|
|
|
|
|
// MENU_SAVEAS
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filesave"), KIcon::Small ) ),
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filesave"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "Save Match &As..." ), this, TQT_SLOT( SaveGameAs() ), CTRL+Key_A, MENU_SAVEAS );
|
|
|
|
|
fileMenu->setItemEnabled( MENU_SAVEAS, FALSE );
|
|
|
|
|
fileMenu->setWhatsThis( MENU_SAVEAS, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
|
|
|
|
|
fileMenu->insertSeparator();
|
|
|
|
|
// MENU_CONNECT
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("connect_creating"), KIcon::Small ) ),
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("connect_creating"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "Connect to Server" ), this, TQT_SLOT( netConnect() ), CTRL+Key_C, MENU_CONNECT );
|
|
|
|
|
fileMenu->setWhatsThis( MENU_CONNECT, i18n( "Clicking this will connect Knights with an internet chess server." ) );
|
|
|
|
|
fileMenu->insertSeparator();
|
|
|
|
|
// MENU_PRINT
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileprint"), KIcon::Small ) ),
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileprint"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "&Print Notation..." ), Core, TQT_SLOT( print() ), CTRL+Key_P, MENU_PRINT );
|
|
|
|
|
fileMenu->setItemEnabled( MENU_PRINT, FALSE );
|
|
|
|
|
fileMenu->setWhatsThis( MENU_PRINT, i18n( "The Print command will allow you to print this game's notation on your printer." ) );
|
|
|
|
|
fileMenu->insertSeparator();
|
|
|
|
|
// MENU_CLOSE
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileclose"), KIcon::Small ) ),
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileclose"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "&Close Match" ), Core, TQT_SLOT( clearMatch() ), CTRL+Key_W, MENU_CLOSE );
|
|
|
|
|
fileMenu->setItemEnabled( MENU_CLOSE, FALSE );
|
|
|
|
|
fileMenu->setWhatsThis( MENU_CLOSE, i18n( "This command removes the current match." ) );
|
|
|
|
@ -342,7 +342,7 @@ void Knights::initMenus( void )
|
|
|
|
|
fileMenu->setWhatsThis( MENU_CLOSEALL, i18n( "This command will remove all matches that are currently loaded." ) );
|
|
|
|
|
fileMenu->insertSeparator();
|
|
|
|
|
// MENU_QUIT
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("exit"), KIcon::Small ) ),
|
|
|
|
|
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("exit"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "&Quit" ), this, TQT_SLOT(menuClose()), CTRL+Key_Q, MENU_QUIT );
|
|
|
|
|
fileMenu->setWhatsThis( MENU_QUIT, i18n( "The Quit command will stop all matches and exit Knights." ) );
|
|
|
|
|
/*
|
|
|
|
@ -352,11 +352,11 @@ void Knights::initMenus( void )
|
|
|
|
|
settingsMenu->insertItem( i18n( "&Install Themes" ), this, TQT_SLOT(installThemes()), 0, MENU_INSTALL_THEMES );
|
|
|
|
|
settingsMenu->setWhatsThis( MENU_INSTALL_THEMES, i18n( "This lets you install downloaded themes into Knights." ) );
|
|
|
|
|
// MENU_BINDINGS_DIALOG
|
|
|
|
|
settingsMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("key_bindings"), KIcon::Small ) ),
|
|
|
|
|
settingsMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("key_bindings"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "Configure &Key Bindings..." ), this, TQT_SLOT(openKeyBindingDialog()), 0, MENU_BINDINGS_DIALOG );
|
|
|
|
|
settingsMenu->setWhatsThis( MENU_BINDINGS_DIALOG, i18n( "Click this if you want to change the keyboard shortcuts that Knights uses." ) );
|
|
|
|
|
// MENU_SETTINGS_DIALOG
|
|
|
|
|
settingsMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("configure"), KIcon::Small ) ),
|
|
|
|
|
settingsMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("configure"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "&Configure Knights..." ), this, TQT_SLOT(openSettingsDialog()), 0, MENU_SETTINGS_DIALOG );
|
|
|
|
|
settingsMenu->setWhatsThis( MENU_SETTINGS_DIALOG, i18n( "This opens a new window which allows you to customize Knights to your particular tastes." ) );
|
|
|
|
|
/*
|
|
|
|
@ -838,14 +838,14 @@ void Knights::netConnect( void )
|
|
|
|
|
if(Core->isOnline())
|
|
|
|
|
{
|
|
|
|
|
fileMenu->changeItem( MENU_CONNECT, TQIconSet( Resource->LoadIcon( TQString("connect_creating"),
|
|
|
|
|
KIcon::Small ) ), i18n( "Connect to Server" ));
|
|
|
|
|
TDEIcon::Small ) ), i18n( "Connect to Server" ));
|
|
|
|
|
Core->goOffline();
|
|
|
|
|
setCursor( Resource->CURSOR_Standard );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
fileMenu->changeItem( MENU_CONNECT, TQIconSet( Resource->LoadIcon( TQString("connect_no"),
|
|
|
|
|
KIcon::Small ) ), i18n( "Disconnect from Server" ) );
|
|
|
|
|
TDEIcon::Small ) ), i18n( "Disconnect from Server" ) );
|
|
|
|
|
/*
|
|
|
|
|
By passing Null as the ID, we're telling core that we're
|
|
|
|
|
creating a new internetio, not reusing an exsisting one.
|
|
|
|
@ -914,13 +914,13 @@ void Knights::Settings(int opt)
|
|
|
|
|
if( Core->paused() )
|
|
|
|
|
{
|
|
|
|
|
matchMenu->changeItem( MENU_PAUSE,
|
|
|
|
|
TQIconSet( Resource->LoadIcon( TQString("player_pause"), KIcon::Small ) ),
|
|
|
|
|
TQIconSet( Resource->LoadIcon( TQString("player_pause"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "Pause" ) );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
matchMenu->changeItem( MENU_PAUSE,
|
|
|
|
|
TQIconSet( Resource->LoadIcon( TQString("1rightarrow"), KIcon::Small ) ),
|
|
|
|
|
TQIconSet( Resource->LoadIcon( TQString("1rightarrow"), TDEIcon::Small ) ),
|
|
|
|
|
i18n( "Resume" ) );
|
|
|
|
|
}
|
|
|
|
|
Core->matchMenu( MENU_PAUSE );
|
|
|
|
|