diff options
Diffstat (limited to 'src/gui/recorder.cpp')
-rw-r--r-- | src/gui/recorder.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/gui/recorder.cpp b/src/gui/recorder.cpp index 9320e020..4f919bef 100644 --- a/src/gui/recorder.cpp +++ b/src/gui/recorder.cpp @@ -2,7 +2,7 @@ * A chat recorder * Copyright (C) 2008 Lloyd Bryant <lloyd_bryant@netzero.net> * - * This file is part of Aethyra. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ #include "recorder.h" #include "windowcontainer.h" +#include "widgets/chattab.h" #include "widgets/layout.h" #include "../utils/stringutils.h" @@ -34,7 +35,7 @@ Recorder::Recorder(ChatWindow *chat, const std::string &title, const std::string &buttonTxt) : Window(title) { - setWindowName(_("Recorder")); + setWindowName("Recorder"); const int offsetX = 2 * getPadding() + 10; const int offsetY = getTitleBarHeight() + getPadding() + 10; @@ -66,7 +67,7 @@ void Recorder::record(const std::string &msg) } } -void Recorder::changeRecordingStatus(const std::string &msg) +void Recorder::setRecordingFile(const std::string &msg) { std::string msgCopy = msg; trim(msgCopy); @@ -82,16 +83,16 @@ void Recorder::changeRecordingStatus(const std::string &msg) * Message should go after mStream is closed so that it isn't * recorded. */ - mChat->chatLog(_("Finishing recording."), BY_SERVER); + localChatTab->chatLog(_("Finishing recording."), BY_SERVER); } else { - mChat->chatLog(_("Not currently recording."), BY_SERVER); + localChatTab->chatLog(_("Not currently recording."), BY_SERVER); } } else if (mStream.is_open()) { - mChat->chatLog(_("Already recording."), BY_SERVER); + localChatTab->chatLog(_("Already recording."), BY_SERVER); } else { @@ -99,19 +100,20 @@ void Recorder::changeRecordingStatus(const std::string &msg) * Message should go before mStream is opened so that it isn't * recorded. */ - mChat->chatLog(_("Starting to record..."), BY_SERVER); - std::string file = std::string(PHYSFS_getUserDir()) + "/.aethyra/" + msgCopy; + localChatTab->chatLog(_("Starting to record..."), BY_SERVER); + const std::string file = + std::string(PHYSFS_getUserDir()) + "/.tmw/" + msgCopy; mStream.open(file.c_str(), std::ios_base::trunc); if (mStream.is_open()) setVisible(true); else - mChat->chatLog(_("Failed to start recording."), BY_SERVER); + localChatTab->chatLog(_("Failed to start recording."), BY_SERVER); } } void Recorder::action(const gcn::ActionEvent &event) { - changeRecordingStatus(""); + setRecordingFile(""); } |