21
21
// We are using an anonymous namespace so we don't litter the global one.
22
22
namespace
23
23
{
24
- PluginRegistrant<GitBlocks> reg (_T (" GitBlocks" ));
24
+ PluginRegistrant<GitBlocks> reg (_ (" GitBlocks" ));
25
25
}
26
26
27
27
@@ -33,9 +33,9 @@ GitBlocks::GitBlocks()
33
33
{
34
34
#if 0
35
35
// Make sure our resources are available.
36
- if(!Manager::LoadResource(_T ("GitBlocks.zip")))
36
+ if(!Manager::LoadResource(_ ("GitBlocks.zip")))
37
37
{
38
- NotifyMissingFile(_T ("GitBlocks.zip"));
38
+ NotifyMissingFile(_ ("GitBlocks.zip"));
39
39
}
40
40
#endif
41
41
}
@@ -47,11 +47,11 @@ GitBlocks::~GitBlocks()
47
47
48
48
void GitBlocks::OnAttach ()
49
49
{
50
- git = _T (" git" );
50
+ git = _ (" git" );
51
51
52
52
Logger *gitBlocksLogger = new TextCtrlLogger ();
53
53
logSlot = Manager::Get ()->GetLogManager ()->SetLog (gitBlocksLogger);
54
- Manager::Get ()->GetLogManager ()->Slot (logSlot).title = _T (" GitBlocks" );
54
+ Manager::Get ()->GetLogManager ()->Slot (logSlot).title = _ (" GitBlocks" );
55
55
CodeBlocksLogEvent evtAdd1 (cbEVT_ADD_LOG_WINDOW, gitBlocksLogger, Manager::Get ()->GetLogManager ()->Slot (logSlot).title );
56
56
Manager::Get ()->ProcessEvent (evtAdd1);
57
57
}
@@ -123,30 +123,30 @@ void GitBlocks::Execute(wxString command, const wxString comment, wxString dir)
123
123
124
124
void GitBlocks::Init (wxCommandEvent &event)
125
125
{
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 ..." ));
128
128
}
129
129
130
130
void GitBlocks::Clone (wxCommandEvent &event)
131
131
{
132
132
CloneDialog dialog (Manager::Get ()->GetAppWindow ());
133
133
if (dialog.ShowModal () == wxID_OK)
134
134
{
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 ());
137
137
}
138
138
}
139
139
140
140
void GitBlocks::Destroy (wxCommandEvent &event)
141
141
{
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)
143
143
{
144
144
#ifdef __WXMSW__ // Fucking hipster Windows needs some extra code
145
- wxString command = _T (" RD /S .git" );
145
+ wxString command = _ (" RD /S .git" );
146
146
#else
147
- wxString command = _T (" rm -r .git" );
147
+ wxString command = _ (" rm -r .git" );
148
148
#endif
149
- Execute (command, _T (" Destroying the repository ..." ));
149
+ Execute (command, _ (" Destroying the repository ..." ));
150
150
}
151
151
}
152
152
@@ -157,14 +157,14 @@ void GitBlocks::Commit(wxCommandEvent &event)
157
157
{
158
158
wxString command;
159
159
160
- command = git + _T (" add" );
160
+ command = git + _ (" add" );
161
161
for (unsigned int i = 0 ; i < dialog.FileChoice ->GetCount (); i++)
162
162
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 ..." ));
165
165
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 ..." ));
168
168
}
169
169
}
170
170
@@ -176,44 +176,44 @@ void GitBlocks::CommitAll(wxCommandEvent &event)
176
176
wxString command;
177
177
cbProject *project = Manager::Get ()->GetProjectManager ()->GetActiveProject ();
178
178
179
- command = git + _T (" add" );
179
+ command = git + _ (" add" );
180
180
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 ..." ));
183
183
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 ..." ));
186
186
}
187
187
}
188
188
189
189
void GitBlocks::Push (wxCommandEvent &event)
190
190
{
191
191
#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\" " );
193
193
#else
194
- wxString command = _T (" xterm -e \" " ) + git + _T (" push origin master\" " );
194
+ wxString command = _ (" xterm -e \" " ) + git + _ (" push origin master\" " );
195
195
#endif
196
- Execute (command, _T (" Pushing master to origin ..." ));
196
+ Execute (command, _ (" Pushing master to origin ..." ));
197
197
}
198
198
199
199
void GitBlocks::Pull (wxCommandEvent &event)
200
200
{
201
201
#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\" " );
203
203
#else
204
- wxString command = _T (" xterm -e \" " ) + git + _T (" pull origin\" " );
204
+ wxString command = _ (" xterm -e \" " ) + git + _ (" pull origin\" " );
205
205
#endif
206
- Execute (command, _T (" Pulling from origin ..." ));
206
+ Execute (command, _ (" Pulling from origin ..." ));
207
207
}
208
208
209
209
void GitBlocks::Fetch (wxCommandEvent &event)
210
210
{
211
211
#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\" " );
213
213
#else
214
- wxString command = _T (" xterm -e \" " ) + git + _T (" fetch origin\" " );
214
+ wxString command = _ (" xterm -e \" " ) + git + _ (" fetch origin\" " );
215
215
#endif
216
- Execute (command, _T (" Fetching from origin ..." ));
216
+ Execute (command, _ (" Fetching from origin ..." ));
217
217
}
218
218
219
219
void GitBlocks::NewBranch (wxCommandEvent &event)
@@ -229,8 +229,8 @@ void GitBlocks::NewBranch(wxCommandEvent &event)
229
229
230
230
void GitBlocks::DiffToIndex (wxCommandEvent &event)
231
231
{
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 ..." );
234
234
wxString dir = Manager::Get ()->GetProjectManager ()->GetActiveProject ()->GetBasePath ();
235
235
236
236
wxArrayString output;
@@ -243,19 +243,19 @@ void GitBlocks::DiffToIndex(wxCommandEvent &event)
243
243
wxExecute (command, output);
244
244
wxSetWorkingDirectory (ocwd);
245
245
246
- cbEditor *editor = Manager::Get ()->GetEditorManager ()->New (_T (" GitBlocks: Diff to index" ));
246
+ cbEditor *editor = Manager::Get ()->GetEditorManager ()->New (_ (" GitBlocks: Diff to index" ));
247
247
cbStyledTextCtrl *ctrl = editor->GetControl ();
248
248
249
249
for (unsigned int i=0 ;i<output.size ();i++)
250
- ctrl->AppendText (output[i] + _T (" \n " ));
250
+ ctrl->AppendText (output[i] + _ (" \n " ));
251
251
252
252
editor->SetModified (false );
253
253
}
254
254
255
255
void GitBlocks::Log (wxCommandEvent &event)
256
256
{
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 ..." );
259
259
wxString dir = Manager::Get ()->GetProjectManager ()->GetActiveProject ()->GetBasePath ();
260
260
261
261
wxArrayString output;
@@ -268,19 +268,19 @@ void GitBlocks::Log(wxCommandEvent &event)
268
268
wxExecute (command, output);
269
269
wxSetWorkingDirectory (ocwd);
270
270
271
- cbEditor *editor = Manager::Get ()->GetEditorManager ()->New (_T (" GitBlocks: Log" ));
271
+ cbEditor *editor = Manager::Get ()->GetEditorManager ()->New (_ (" GitBlocks: Log" ));
272
272
cbStyledTextCtrl *ctrl = editor->GetControl ();
273
273
274
274
for (unsigned int i=0 ;i<output.size ();i++)
275
- ctrl->AppendText (output[i] + _T (" \n " ));
275
+ ctrl->AppendText (output[i] + _ (" \n " ));
276
276
277
277
editor->SetModified (false );
278
278
}
279
279
280
280
void GitBlocks::Status (wxCommandEvent &event)
281
281
{
282
- wxString command = git + _T (" status" );
283
- wxString comment = _T (" Fetching status ..." );
282
+ wxString command = git + _ (" status" );
283
+ wxString comment = _ (" Fetching status ..." );
284
284
wxString dir = Manager::Get ()->GetProjectManager ()->GetActiveProject ()->GetBasePath ();
285
285
286
286
wxArrayString output;
@@ -293,11 +293,11 @@ void GitBlocks::Status(wxCommandEvent &event)
293
293
wxExecute (command, output);
294
294
wxSetWorkingDirectory (ocwd);
295
295
296
- cbEditor *editor = Manager::Get ()->GetEditorManager ()->New (_T (" GitBlocks: Status" ));
296
+ cbEditor *editor = Manager::Get ()->GetEditorManager ()->New (_ (" GitBlocks: Status" ));
297
297
cbStyledTextCtrl *ctrl = editor->GetControl ();
298
298
299
299
for (unsigned int i=0 ;i<output.size ();i++)
300
- ctrl->AppendText (output[i] + _T (" \n " ));
300
+ ctrl->AppendText (output[i] + _ (" \n " ));
301
301
302
302
editor->SetModified (false );
303
303
}
0 commit comments