[dasher: 25/217] More cleanup
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher: 25/217] More cleanup
- Date: Sat, 27 Feb 2016 12:02:26 +0000 (UTC)
commit fbea7593e3ee59dac575efe48b373806c06255ef
Author: ipomoena <amajorek google com>
Date: Thu Sep 10 17:46:55 2015 -0700
More cleanup
Src/Win32/Widgets/Edit.cpp | 49 --------------------------------------------
Src/Win32/Widgets/Edit.h | 9 --------
2 files changed, 0 insertions(+), 58 deletions(-)
---
diff --git a/Src/Win32/Widgets/Edit.cpp b/Src/Win32/Widgets/Edit.cpp
index 3e916f0..0f283e0 100644
--- a/Src/Win32/Widgets/Edit.cpp
+++ b/Src/Win32/Widgets/Edit.cpp
@@ -80,32 +80,6 @@ void CEdit::Move(int x, int y, int Width, int Height) {
MoveWindow( x, y, Width, Height, TRUE);
}
-void CEdit::New(const string &filename) {
- Tstring newFilename;
- UTF8string_to_wstring(filename, newFilename);
- TNew(newFilename);
-}
-
-bool CEdit::Open(const string &filename) {
- Tstring openFilename;
- UTF8string_to_wstring(filename, openFilename);
- return TOpen(openFilename);
-}
-
-bool CEdit::OpenAppendMode(const string &filename) {
- // TODO: Check that this works the way it's supposed to (having
- // first figured out what that is!)
- Tstring openFilename;
- UTF8string_to_wstring(filename, openFilename);
- return TOpenAppendMode(openFilename);
-}
-
-bool CEdit::SaveAs(const string &filename) {
- Tstring saveFilename;
- UTF8string_to_wstring(filename, saveFilename);
- return TSaveAs(saveFilename);
-}
-
bool CEdit::Save() {
if(FileHandle == INVALID_HANDLE_VALUE) {
if(m_filename == TEXT(""))
@@ -232,22 +206,6 @@ void CEdit::Open() {
TOpen(m_FilenameGUI->Open());
}
-void CEdit::OpenAppendMode() {
- switch (m_FilenameGUI->QuerySaveFirst()) {
- case IDYES:
- if(!Save())
- if(!TSaveAs(m_FilenameGUI->SaveAs()))
- return;
- break;
- case IDNO:
- break;
- default:
- return;
- break;
- }
- TOpenAppendMode(m_FilenameGUI->Open());
-}
-
void CEdit::SaveAs() {
TSaveAs(m_FilenameGUI->SaveAs());
}
@@ -274,7 +232,6 @@ void CEdit::TNew(const Tstring &filename) {
if(FileHandle != INVALID_HANDLE_VALUE)
CloseHandle(FileHandle);
FileHandle = INVALID_HANDLE_VALUE;
- AppendMode = false;
Clear();
}
@@ -314,18 +271,12 @@ bool CEdit::TOpen(const Tstring &filename) {
UTF8string_to_wstring(text, inserttext);
InsertText(inserttext);
- AppendMode = false;
m_FilenameGUI->SetFilename(m_filename);
m_FilenameGUI->SetDirty(false);
m_dirty = false;
return true;
}
-bool CEdit::TOpenAppendMode(const Tstring &filename) {
- AppendMode = true;
- return true;
-}
-
bool CEdit::TSaveAs(const Tstring &filename) {
HANDLE TmpHandle = CreateFile(filename.c_str(), GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ, (LPSECURITY_ATTRIBUTES) NULL,
diff --git a/Src/Win32/Widgets/Edit.h b/Src/Win32/Widgets/Edit.h
index 740b505..c670d08 100644
--- a/Src/Win32/Widgets/Edit.h
+++ b/Src/Win32/Widgets/Edit.h
@@ -88,17 +88,10 @@ class CEdit : public ATL::CWindowImpl<CEdit> {
int Delete(bool bForwards, Dasher::CControlManager::EditDistance iDist);
void SetKeyboardTarget(HWND hwnd);
- // Overriding file virtual functions
- //void TimeStampNewFiles(bool Value);
- void New(const std::string & filename);
- bool Open(const std::string & filename);
- bool OpenAppendMode(const std::string & filename);
- bool SaveAs(const std::string & filename);
bool Save();
// Functions for Windows GUI to call
void New();
void Open();
- void OpenAppendMode();
void SaveAs();
std::string Import();
void SetDirty(); // Parent window gets notification Edit window has changed.
@@ -146,10 +139,8 @@ class CEdit : public ATL::CWindowImpl<CEdit> {
CFilenameGUI *m_FilenameGUI;
Tstring m_filename;
HWND textwindow;
- bool AppendMode;
void TNew(const Tstring & filename);
bool TOpen(const Tstring & filename);
- bool TOpenAppendMode(const Tstring & filename);
bool TSaveAs(const Tstring & filename);
HFONT m_Font;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]