From: Andrew C. <ac...@us...> - 2004-03-13 23:26:14
|
Update of /cvsroot/planeshift/planeshift/src/client/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26237/src/client/gui Modified Files: pawsignore.cpp pawsignore.h Log Message: Fixed ignore list issues. Index: pawsignore.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/gui/pawsignore.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pawsignore.cpp 13 Mar 2004 08:58:00 -0000 1.3 --- pawsignore.cpp 13 Mar 2004 23:17:17 -0000 1.4 *************** *** 85,89 **** pawsStringPromptWindow::Create(windowManager, "Remove", currentIgnored, ! false, 220, 20, new Action() ); return true; } --- 85,89 ---- pawsStringPromptWindow::Create(windowManager, "Remove", currentIgnored, ! false, 220, 20, new Action(false) ); return true; } *************** *** 93,97 **** csString empty(""); pawsStringPromptWindow::Create(windowManager, "Add", csString(""), ! false, 220, 20, new Action() ); return true; } --- 93,97 ---- csString empty(""); pawsStringPromptWindow::Create(windowManager, "Add", csString(""), ! false, 220, 20, new Action(true) ); return true; } *************** *** 202,205 **** --- 202,207 ---- void pawsIgnoreWindow::RemoveIgnore( csString& name ) { + printf("Removing Ignore\n"); + pawsChatWindow* chat = (pawsChatWindow*)WindowManager()->FindWidget("ChatWindow"); if ( !chat ) Index: pawsignore.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/gui/pawsignore.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pawsignore.h 13 Feb 2004 00:17:30 -0000 1.1 --- pawsignore.h 13 Mar 2004 23:17:17 -0000 1.2 *************** *** 54,66 **** { public: void Execute( const csString& text ) { if ( text.Length() > 0 ) { ! csString command; ! command.Format( "/ignore %s", (const char*)text ); psengine->GetCmdHandler()->Execute(command); } ! } }; --- 54,74 ---- { public: + Action( bool ignore=true ) : doIgnore( ignore ) + {} + void Execute( const csString& text ) { if ( text.Length() > 0 ) { ! csString command; ! if ( doIgnore ) ! command.Format( "/add_ignore %s", (const char*)text ); ! else ! command.Format( "/remove_ignore %s", (const char*)text ); psengine->GetCmdHandler()->Execute(command); } ! } ! private: ! bool doIgnore; }; |