Skip to content

Commit 0919d6d

Browse files
committed
Changed dangerous _T()s to _()s
1 parent 6c3d918 commit 0919d6d

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

src/GitBlocks.cpp

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// We are using an anonymous namespace so we don't litter the global one.
2222
namespace
2323
{
24-
PluginRegistrant<GitBlocks> reg(_T("GitBlocks"));
24+
PluginRegistrant<GitBlocks> reg(_("GitBlocks"));
2525
}
2626

2727

@@ -33,9 +33,9 @@ GitBlocks::GitBlocks()
3333
{
3434
#if 0
3535
// Make sure our resources are available.
36-
if(!Manager::LoadResource(_T("GitBlocks.zip")))
36+
if(!Manager::LoadResource(_("GitBlocks.zip")))
3737
{
38-
NotifyMissingFile(_T("GitBlocks.zip"));
38+
NotifyMissingFile(_("GitBlocks.zip"));
3939
}
4040
#endif
4141
}
@@ -47,11 +47,11 @@ GitBlocks::~GitBlocks()
4747

4848
void GitBlocks::OnAttach()
4949
{
50-
git = _T("git");
50+
git = _("git");
5151

5252
Logger *gitBlocksLogger = new TextCtrlLogger();
5353
logSlot = Manager::Get()->GetLogManager()->SetLog(gitBlocksLogger);
54-
Manager::Get()->GetLogManager()->Slot(logSlot).title = _T("GitBlocks");
54+
Manager::Get()->GetLogManager()->Slot(logSlot).title = _("GitBlocks");
5555
CodeBlocksLogEvent evtAdd1(cbEVT_ADD_LOG_WINDOW, gitBlocksLogger, Manager::Get()->GetLogManager()->Slot(logSlot).title);
5656
Manager::Get()->ProcessEvent(evtAdd1);
5757
}
@@ -123,30 +123,30 @@ void GitBlocks::Execute(wxString command, const wxString comment, wxString dir)
123123

124124
void GitBlocks::Init(wxCommandEvent &event)
125125
{
126-
wxString command = git + _T(" init");
127-
Execute(command, _T("Creating an empty git repository ..."));
126+
wxString command = git + _(" init");
127+
Execute(command, _("Creating an empty git repository ..."));
128128
}
129129

130130
void GitBlocks::Clone(wxCommandEvent &event)
131131
{
132132
CloneDialog dialog(Manager::Get()->GetAppWindow());
133133
if(dialog.ShowModal() == wxID_OK)
134134
{
135-
wxString command = git + _T(" clone ") + dialog.Origin->GetValue();
136-
Execute(command, _T("Cloning repository ..."), dialog.Directory->GetValue());
135+
wxString command = git + _(" clone ") + dialog.Origin->GetValue();
136+
Execute(command, _("Cloning repository ..."), dialog.Directory->GetValue());
137137
}
138138
}
139139

140140
void GitBlocks::Destroy(wxCommandEvent &event)
141141
{
142-
if(wxMessageBox(_T("Are you sure you want to destroy the repository?"), _T("Destroy repository"), wxYES_NO) == wxYES)
142+
if(wxMessageBox(_("Are you sure you want to destroy the repository?"), _("Destroy repository"), wxYES_NO) == wxYES)
143143
{
144144
#ifdef __WXMSW__ // Fucking hipster Windows needs some extra code
145-
wxString command = _T("RD /S .git");
145+
wxString command = _("RD /S .git");
146146
#else
147-
wxString command = _T("rm -r .git");
147+
wxString command = _("rm -r .git");
148148
#endif
149-
Execute(command, _T("Destroying the repository ..."));
149+
Execute(command, _("Destroying the repository ..."));
150150
}
151151
}
152152

@@ -157,14 +157,14 @@ void GitBlocks::Commit(wxCommandEvent &event)
157157
{
158158
wxString command;
159159

160-
command = git + _T(" add");
160+
command = git + _(" add");
161161
for(unsigned int i = 0; i < dialog.FileChoice->GetCount(); i++)
162162
if(dialog.FileChoice->IsChecked(i))
163-
command += _T(" ") + dialog.FileChoice->GetString(i);
164-
Execute(command, _T("Adding files ..."));
163+
command += _(" ") + dialog.FileChoice->GetString(i);
164+
Execute(command, _("Adding files ..."));
165165

166-
command = git + _T(" commit -m \"") + dialog.Comment->GetValue() + _T("\"");
167-
Execute(command, _T("Committing ..."));
166+
command = git + _(" commit -m \"") + dialog.Comment->GetValue() + _("\"");
167+
Execute(command, _("Committing ..."));
168168
}
169169
}
170170

@@ -176,44 +176,44 @@ void GitBlocks::CommitAll(wxCommandEvent &event)
176176
wxString command;
177177
cbProject *project = Manager::Get()->GetProjectManager()->GetActiveProject();
178178

179-
command = git + _T(" add");
179+
command = git + _(" add");
180180
for(unsigned int i=0;i<project->GetFilesCount();i++)
181-
command += _T(" ") + project->GetFile(i)->relativeFilename;
182-
Execute(command, _T("Adding files ..."));
181+
command += _(" ") + project->GetFile(i)->relativeFilename;
182+
Execute(command, _("Adding files ..."));
183183

184-
command = git + _T(" commit -m \"") + dialog.Comment->GetValue() + _T("\"");
185-
Execute(command, _T("Committing ..."));
184+
command = git + _(" commit -m \"") + dialog.Comment->GetValue() + _("\"");
185+
Execute(command, _("Committing ..."));
186186
}
187187
}
188188

189189
void GitBlocks::Push(wxCommandEvent &event)
190190
{
191191
#ifdef __WXMSW__ // Fucking hipster Windows needs some extra code
192-
wxString command = _T("cmd.exe /C \"") + git + _T(" push origin master\"");
192+
wxString command = _("cmd.exe /C \"") + git + _(" push origin master\"");
193193
#else
194-
wxString command = _T("xterm -e \"") + git + _T(" push origin master\"");
194+
wxString command = _("xterm -e \"") + git + _(" push origin master\"");
195195
#endif
196-
Execute(command, _T("Pushing master to origin ..."));
196+
Execute(command, _("Pushing master to origin ..."));
197197
}
198198

199199
void GitBlocks::Pull(wxCommandEvent &event)
200200
{
201201
#ifdef __WXMSW__ // Fucking hipster Windows needs some extra code
202-
wxString command = _T("cmd.exe /C \"") + git + _T(" pull origin\"");
202+
wxString command = _("cmd.exe /C \"") + git + _(" pull origin\"");
203203
#else
204-
wxString command = _T("xterm -e \"") + git + _T(" pull origin\"");
204+
wxString command = _("xterm -e \"") + git + _(" pull origin\"");
205205
#endif
206-
Execute(command, _T("Pulling from origin ..."));
206+
Execute(command, _("Pulling from origin ..."));
207207
}
208208

209209
void GitBlocks::Fetch(wxCommandEvent &event)
210210
{
211211
#ifdef __WXMSW__ // Fucking hipster Windows needs some extra code
212-
wxString command = _T("cmd.exe /C \"") + git + _T(" fetch origin\"");
212+
wxString command = _("cmd.exe /C \"") + git + _(" fetch origin\"");
213213
#else
214-
wxString command = _T("xterm -e \"") + git + _T(" fetch origin\"");
214+
wxString command = _("xterm -e \"") + git + _(" fetch origin\"");
215215
#endif
216-
Execute(command, _T("Fetching from origin ..."));
216+
Execute(command, _("Fetching from origin ..."));
217217
}
218218

219219
void GitBlocks::NewBranch(wxCommandEvent &event)
@@ -229,8 +229,8 @@ void GitBlocks::NewBranch(wxCommandEvent &event)
229229

230230
void GitBlocks::DiffToIndex(wxCommandEvent &event)
231231
{
232-
wxString command = git + _T(" diff");
233-
wxString comment = _T("Fetching diff to index ...");
232+
wxString command = git + _(" diff");
233+
wxString comment = _("Fetching diff to index ...");
234234
wxString dir = Manager::Get()->GetProjectManager()->GetActiveProject()->GetBasePath();
235235

236236
wxArrayString output;
@@ -243,19 +243,19 @@ void GitBlocks::DiffToIndex(wxCommandEvent &event)
243243
wxExecute(command, output);
244244
wxSetWorkingDirectory(ocwd);
245245

246-
cbEditor *editor = Manager::Get()->GetEditorManager()->New(_T("GitBlocks: Diff to index"));
246+
cbEditor *editor = Manager::Get()->GetEditorManager()->New(_("GitBlocks: Diff to index"));
247247
cbStyledTextCtrl *ctrl = editor->GetControl();
248248

249249
for(unsigned int i=0;i<output.size();i++)
250-
ctrl->AppendText(output[i] + _T("\n"));
250+
ctrl->AppendText(output[i] + _("\n"));
251251

252252
editor->SetModified(false);
253253
}
254254

255255
void GitBlocks::Log(wxCommandEvent &event)
256256
{
257-
wxString command = git + _T(" log --pretty=format:%h%x09%an%x09%ad%x09%s");
258-
wxString comment = _T("Fetching log ...");
257+
wxString command = git + _(" log --pretty=format:%h%x09%an%x09%ad%x09%s");
258+
wxString comment = _("Fetching log ...");
259259
wxString dir = Manager::Get()->GetProjectManager()->GetActiveProject()->GetBasePath();
260260

261261
wxArrayString output;
@@ -268,19 +268,19 @@ void GitBlocks::Log(wxCommandEvent &event)
268268
wxExecute(command, output);
269269
wxSetWorkingDirectory(ocwd);
270270

271-
cbEditor *editor = Manager::Get()->GetEditorManager()->New(_T("GitBlocks: Log"));
271+
cbEditor *editor = Manager::Get()->GetEditorManager()->New(_("GitBlocks: Log"));
272272
cbStyledTextCtrl *ctrl = editor->GetControl();
273273

274274
for(unsigned int i=0;i<output.size();i++)
275-
ctrl->AppendText(output[i] + _T("\n"));
275+
ctrl->AppendText(output[i] + _("\n"));
276276

277277
editor->SetModified(false);
278278
}
279279

280280
void GitBlocks::Status(wxCommandEvent &event)
281281
{
282-
wxString command = git + _T(" status");
283-
wxString comment = _T("Fetching status ...");
282+
wxString command = git + _(" status");
283+
wxString comment = _("Fetching status ...");
284284
wxString dir = Manager::Get()->GetProjectManager()->GetActiveProject()->GetBasePath();
285285

286286
wxArrayString output;
@@ -293,11 +293,11 @@ void GitBlocks::Status(wxCommandEvent &event)
293293
wxExecute(command, output);
294294
wxSetWorkingDirectory(ocwd);
295295

296-
cbEditor *editor = Manager::Get()->GetEditorManager()->New(_T("GitBlocks: Status"));
296+
cbEditor *editor = Manager::Get()->GetEditorManager()->New(_("GitBlocks: Status"));
297297
cbStyledTextCtrl *ctrl = editor->GetControl();
298298

299299
for(unsigned int i=0;i<output.size();i++)
300-
ctrl->AppendText(output[i] + _T("\n"));
300+
ctrl->AppendText(output[i] + _("\n"));
301301

302302
editor->SetModified(false);
303303
}

0 commit comments

Comments
 (0)