A few minor API fixes, and a fix for the '-pedantic' argument in GCC.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1548 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2008-08-04 20:12:23 +00:00
parent 54b5b79414
commit 6ba918320a
3 changed files with 11 additions and 11 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: CheatCodeDialog.cxx,v 1.19 2008-06-19 19:15:44 stephena Exp $
// $Id: CheatCodeDialog.cxx,v 1.20 2008-08-04 20:12:23 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -217,8 +217,8 @@ void CheatCodeDialog::handleCommand(CommandSender* sender, int cmd,
const string& code = myCheatInput->getResult(1);
if(instance().cheat().isValidCode(code))
{
myCheatInput->close();
instance().cheat().add(name, code);
parent().removeDialog();
loadConfig(); // show changes onscreen
}
else
@ -234,8 +234,8 @@ void CheatCodeDialog::handleCommand(CommandSender* sender, int cmd,
int idx = myCheatList->getSelected();
if(instance().cheat().isValidCode(code))
{
myCheatInput->close();
instance().cheat().add(name, code, enable, idx);
parent().removeDialog();
loadConfig(); // show changes onscreen
}
else
@ -257,8 +257,8 @@ void CheatCodeDialog::handleCommand(CommandSender* sender, int cmd,
const string& code = myCheatInput->getResult(1);
if(instance().cheat().isValidCode(code))
{
myCheatInput->close();
instance().cheat().addOneShot(name, code);
parent().removeDialog();
}
else
myCheatInput->setTitle("Invalid code");

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: ContextMenu.cxx,v 1.5 2008-07-25 12:41:41 stephena Exp $
// $Id: ContextMenu.cxx,v 1.6 2008-08-04 20:12:23 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -194,7 +194,7 @@ void ContextMenu::handleMouseDown(int x, int y, int button, int clickCount)
if(x >= _x && x <= _x+_w && y >= _y && y <= _y+_h)
sendSelection();
else
parent().removeDialog();
close();
}
}
@ -268,7 +268,7 @@ void ContextMenu::handleEvent(Event::Type e)
drawCurrentSelection(_entries.size()-1);
break;
case Event::UICancel:
parent().removeDialog();
close();
break;
default:
break;
@ -304,7 +304,7 @@ void ContextMenu::drawCurrentSelection(int item)
{
// Change selection
_currentItem = item;
setDirty(); draw();
setDirty();
}
}
@ -315,7 +315,7 @@ void ContextMenu::sendSelection()
// Make sure the dialog is removed before sending any commands,
// since one consequence of sending a command may be to add another
// dialog/menu
parent().removeDialog();
close();
// Send any command associated with the selection
_selectedItem = _currentItem;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: YaccParser.hxx,v 1.9 2008-02-06 13:45:24 stephena Exp $
// $Id: YaccParser.hxx,v 1.10 2008-08-04 20:12:23 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -32,7 +32,7 @@ namespace YaccParser {
int parse(const char *);
Expression *getResult();
const string& errorMessage();
};
}
//#ifdef __cplusplus
//}