Check-in [82c55878e7]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Simplified settings dialog & saving of working dir in workspace
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:82c55878e78b2d754ce8a91d31f860c4614dbe83
User & Date: isafam 2014-01-18 23:29:54
Context
2014-01-19
22:19
Now showing file tree by using 'fossil ls' callback check-in: b88342d24d user: isafam tags: trunk
2014-01-18
23:29
Simplified settings dialog & saving of working dir in workspace check-in: 82c55878e7 user: isafam tags: trunk
2014-01-16
22:52
Added more files.. check-in: 6c1ccf6a0a user: isafam tags: trunk
Changes

Changes to Fossil/Fossil.project.

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
...
275
276
277
278
279
280
281





282
    <File Name="fossiltreedata.h"/>
    <File Name="commit_dialog.h"/>
    <File Name="fossilcommandhandler.h"/>
    <File Name="fossilcommand.h"/>
    <File Name="fossilstatushandler.h"/>
  </VirtualDirectory>
  <Dependencies/>
  <Dependencies Name="DebugUnicode"/>
  <Dependencies Name="ReleaseUnicode"/>
  <Dependencies Name="WinDebug_29"/>
  <Dependencies Name="WinDebugUnicode"/>
  <Dependencies Name="WinReleaseUnicode"/>
  <Settings Type="Dynamic Library">
    <Configuration Name="DebugUnicode" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
      <Compiler Options="-g;$(shell wx-config --cxxflags --debug=yes --unicode=yes)" Required="yes" PreCompiledHeader="">
        <IncludePath Value="."/>
        <IncludePath Value="../Interfaces"/>
        <IncludePath Value="../CodeLite"/>
        <IncludePath Value="../Plugin"/>
................................................................................
      </Compiler>
      <Linker Options="">
        <LibraryPath Value="."/>
      </Linker>
      <ResourceCompiler Options=""/>
    </GlobalSettings>
  </Settings>





</CodeLite_Project>







<
<
<
<
<







 







>
>
>
>
>

30
31
32
33
34
35
36





37
38
39
40
41
42
43
...
270
271
272
273
274
275
276
277
278
279
280
281
282
    <File Name="fossiltreedata.h"/>
    <File Name="commit_dialog.h"/>
    <File Name="fossilcommandhandler.h"/>
    <File Name="fossilcommand.h"/>
    <File Name="fossilstatushandler.h"/>
  </VirtualDirectory>
  <Dependencies/>





  <Settings Type="Dynamic Library">
    <Configuration Name="DebugUnicode" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
      <Compiler Options="-g;$(shell wx-config --cxxflags --debug=yes --unicode=yes)" Required="yes" PreCompiledHeader="">
        <IncludePath Value="."/>
        <IncludePath Value="../Interfaces"/>
        <IncludePath Value="../CodeLite"/>
        <IncludePath Value="../Plugin"/>
................................................................................
      </Compiler>
      <Linker Options="">
        <LibraryPath Value="."/>
      </Linker>
      <ResourceCompiler Options=""/>
    </GlobalSettings>
  </Settings>
  <Dependencies Name="DebugUnicode"/>
  <Dependencies Name="ReleaseUnicode"/>
  <Dependencies Name="WinDebugUnicode"/>
  <Dependencies Name="WinDebug_29"/>
  <Dependencies Name="WinReleaseUnicode"/>
</CodeLite_Project>

Changes to Fossil/fossil.cpp.

194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
...
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
...
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
...
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
	GetManager()->GetTheApp()->Disconnect(wxEVT_GET_ADDITIONAL_COMPILEFLAGS, wxCommandEventHandler(Fossil::OnGetCompileLine), NULL, this);
*/

	m_fossilView->DisconnectEvents();

	// Remove the tab pinned to the workspace pane
	size_t index(Notebook::npos);
	FossilSettingsData ssd = GetSettings();
	index = m_mgr->GetWorkspacePaneNotebook()->GetPageIndex(m_fossilView);
	if (index != Notebook::npos) {
		m_mgr->GetWorkspacePaneNotebook()->RemovePage(index, false);
	}
	ssd.SetFossilTabIndex(index);
	SetSettings(ssd);

	// Remove the tab pinned to the output pane
	for (size_t i=0; i<m_mgr->GetOutputPaneNotebook()->GetPageCount(); i++) {
		if (m_fossilConsole == m_mgr->GetOutputPaneNotebook()->GetPage(i)) {
			m_mgr->GetOutputPaneNotebook()->RemovePage(i);
			break;
		}
................................................................................
void Fossil::OnPatch(wxCommandEvent& event)
{
	Patch(false, DoGetFileExplorerItemPath(), this, event.GetId());
}

wxString Fossil::GetFossilExeName(bool nonInteractive)
{
	FossilSettingsData ssd = GetSettings();
	wxString executeable;
	bool encloseQuotations = false;
	wxString exeName = ssd.GetExecutable();
	exeName.Trim().Trim(false);
	encloseQuotations = (exeName.Find(wxT(" ")) != wxNOT_FOUND);
	if (encloseQuotations) {
		executeable << wxT("\"") << ssd.GetExecutable() << wxT("\" ");
	} else {
		executeable << ssd.GetExecutable() << wxT(" ");
	}

	if(nonInteractive)
		executeable << wxT(" --non-interactive ");

	// --trust-server-cert was introduced in version >=1.6
	// but it also requires --non-interactive mode enabled
................................................................................
		}
	}
	return true;
}

void Fossil::IgnoreFiles(const wxArrayString& files, bool pattern)
{
	FossilSettingsData ssd = GetSettings();
	wxArrayString ignorePatternArr = wxStringTokenize(ssd.GetIgnoreFilePattern(), wxT(" \r\n\t\v"), wxTOKEN_STRTOK);

	for(size_t i=0; i<files.GetCount(); i++) {
		wxString entry;
		wxFileName fn(files.Item(i));
		if(pattern) {
			entry << wxT("*.") << fn.GetExt();
................................................................................
	for(size_t i=0; i<ignorePatternArr.GetCount(); i++){
		ignorePatternStr << ignorePatternArr.Item(i) << wxT(" ");
	}
	ignorePatternStr.RemoveLast();
	ssd.SetIgnoreFilePattern(ignorePatternStr);

	// write down the changes
	SetSettings( ssd );

	// update the config file
	RecreateLocalFossilConfigFile();

	// refresh the view
	GetFossilView()->BuildTree();
}







|




|
|







 







|


|





|







 







|







 







|







194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
...
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
...
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
...
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
	GetManager()->GetTheApp()->Disconnect(wxEVT_GET_ADDITIONAL_COMPILEFLAGS, wxCommandEventHandler(Fossil::OnGetCompileLine), NULL, this);
*/

	m_fossilView->DisconnectEvents();

	// Remove the tab pinned to the workspace pane
	size_t index(Notebook::npos);
	FossilSettingsData fsd = GetSettings();
	index = m_mgr->GetWorkspacePaneNotebook()->GetPageIndex(m_fossilView);
	if (index != Notebook::npos) {
		m_mgr->GetWorkspacePaneNotebook()->RemovePage(index, false);
	}
	fsd.SetFossilTabIndex(index);
	SetSettings(fsd);

	// Remove the tab pinned to the output pane
	for (size_t i=0; i<m_mgr->GetOutputPaneNotebook()->GetPageCount(); i++) {
		if (m_fossilConsole == m_mgr->GetOutputPaneNotebook()->GetPage(i)) {
			m_mgr->GetOutputPaneNotebook()->RemovePage(i);
			break;
		}
................................................................................
void Fossil::OnPatch(wxCommandEvent& event)
{
	Patch(false, DoGetFileExplorerItemPath(), this, event.GetId());
}

wxString Fossil::GetFossilExeName(bool nonInteractive)
{
	FossilSettingsData fsd = GetSettings();
	wxString executeable;
	bool encloseQuotations = false;
	wxString exeName = fsd.GetExecutable();
	exeName.Trim().Trim(false);
	encloseQuotations = (exeName.Find(wxT(" ")) != wxNOT_FOUND);
	if (encloseQuotations) {
		executeable << wxT("\"") << ssd.GetExecutable() << wxT("\" ");
	} else {
		executeable << fsd.GetExecutable() << wxT(" ");
	}

	if(nonInteractive)
		executeable << wxT(" --non-interactive ");

	// --trust-server-cert was introduced in version >=1.6
	// but it also requires --non-interactive mode enabled
................................................................................
		}
	}
	return true;
}

void Fossil::IgnoreFiles(const wxArrayString& files, bool pattern)
{
	FossilSettingsData fsd = GetSettings();
	wxArrayString ignorePatternArr = wxStringTokenize(ssd.GetIgnoreFilePattern(), wxT(" \r\n\t\v"), wxTOKEN_STRTOK);

	for(size_t i=0; i<files.GetCount(); i++) {
		wxString entry;
		wxFileName fn(files.Item(i));
		if(pattern) {
			entry << wxT("*.") << fn.GetExt();
................................................................................
	for(size_t i=0; i<ignorePatternArr.GetCount(); i++){
		ignorePatternStr << ignorePatternArr.Item(i) << wxT(" ");
	}
	ignorePatternStr.RemoveLast();
	ssd.SetIgnoreFilePattern(ignorePatternStr);

	// write down the changes
	SetSettings( fsd );

	// update the config file
	RecreateLocalFossilConfigFile();

	// refresh the view
	GetFossilView()->BuildTree();
}

Changes to Fossil/fossil.h.

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
	}

	FossilView *GetFossilView() {
		return m_fossilView;
	}

	FossilSettingsData GetSettings();
	void            SetSettings(FossilSettingsData& ssd);
	wxString        GetFossilExeName(bool nonInteractive = true);
	wxString        GetUserConfigDir();
	void            RecreateLocalFossilConfigFile();
	void            Patch(bool dryRun, const wxString &workingDirectory, wxEvtHandler *owner, int id);
	void            IgnoreFiles(const wxArrayString& files, bool pattern);
	void            Blame(wxCommandEvent& event, const wxArrayString &files);








|







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
	}

	FossilView *GetFossilView() {
		return m_fossilView;
	}

	FossilSettingsData GetSettings();
	void            SetSettings(FossilSettingsData& fsd);
	wxString        GetFossilExeName(bool nonInteractive = true);
	wxString        GetUserConfigDir();
	void            RecreateLocalFossilConfigFile();
	void            Patch(bool dryRun, const wxString &workingDirectory, wxEvtHandler *owner, int id);
	void            IgnoreFiles(const wxArrayString& files, bool pattern);
	void            Blame(wxCommandEvent& event, const wxArrayString &files);

Changes to Fossil/fossil_settings_dialog.cpp.

1
2
3
4
5


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
..
66
67
68
69
70
71
72
73
74
75
76
77
78
79

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116




117



118
119
120







121




#include "fossil_settings_dialog.h"
#include <wx/imaglist.h>
#include "windowattrmanager.h"
#include "imanager.h"
#include "fossil.h"


#include <wx/filedlg.h>
#include <wx/filename.h>

FossilSettingsDialog::FossilSettingsDialog( wxWindow* parent, Fossil *plugin )
		: FossilSettingsDialogBase( parent )
		, m_plugin                ( plugin )
{
	FossilSettingsData fsd;
	fsd = m_plugin->GetSettings();

	m_textCtrlDiffViewer->SetValue(fsd.GetExternalDiffViewer());
	m_textCtrlIgnorePattern->SetValue(fsd.GetIgnoreFilePattern());
	m_textCtrlFossilExecutable->SetValue(fsd.GetExecutable());
	m_textCtrlMacroName->SetValue(fsd.GetRevisionMacroName());

	m_checkBoxAddToFossil->SetValue( fsd.GetFlags() & FossilAddFileToFossil );
	m_checkBoxRetag->SetValue( fsd.GetFlags() & FossilRetagWorkspace );
	m_checkBoxUseExternalDiff->SetValue( fsd.GetFlags() & FossilUseExternalDiff );
	m_checkBoxExposeRevisionMacro->SetValue( fsd.GetFlags() & FossilExposeRevisionMacro );
	m_checkBoxRenameFile->SetValue( fsd.GetFlags() & FossilRenameFileInRepo );

	m_checkBoxUsePosixLocale->SetValue( fsd.GetFlags() & FossilUsePosixLocale );

	WindowAttrManager::Load(this, wxT("FossilSettingsDialog"), m_plugin->GetManager()->GetConfigTool());

	wxImageList *imgList = new wxImageList(32, 32, true);
	imgList->Add(m_plugin->LoadBitmapFile(wxT("svn_settings.png")));
	imgList->Add(m_plugin->LoadBitmapFile(wxT("svn_diff.png")));
	//imgList->Add(m_plugin->LoadBitmapFile(wxT("svn_ssh.png")));
	imgList->Add(m_plugin->LoadBitmapFile(wxT("connect_no.png")));

	m_notebook->AssignImageList( imgList );
	m_notebook->SetPageImage(0, 0);
	m_notebook->SetPageImage(1, 1);
	m_notebook->SetPageImage(2, 2);
	//m_notebook->SetPageImage(3, 3);
	m_notebook->Refresh();

}

FossilSettingsDialog::~FossilSettingsDialog()
{
	WindowAttrManager::Save(this, wxT("FossilSettingsDialog"), m_plugin->GetManager()->GetConfigTool());
}

void FossilSettingsDialog::OnBrowseFossilExe( wxCommandEvent& event )
{
	wxUnusedVar(event);
	wxString path = DoGetExecutable( m_textCtrlFossilExecutable->GetValue() );
	if (path.IsEmpty() == false) {
................................................................................
		}
	}

	wxString newPath = wxFileSelector(wxT("Select Executable:"), path.c_str(), wxT(""), wxT(""), wxT("*"), 0, this);
	return newPath;
}

void FossilSettingsDialog::OnButtonOK(wxCommandEvent& event)
{
	event.Skip();

	FossilSettingsData fsd;
	fsd.SetExternalDiffViewer(m_textCtrlDiffViewer->GetValue());
	fsd.SetIgnoreFilePattern(m_textCtrlIgnorePattern->GetValue());

	fsd.SetExecutable(m_textCtrlFossilExecutable->GetValue());
	fsd.SetRevisionMacroName(m_textCtrlMacroName->GetValue());

	// Link Editor flag is not set via this dialog
	// so read its current value before adding the other
	// flags
	size_t flags(0);
	if(m_plugin->GetSettings().GetFlags() & FossilLinkEditor)
		flags = FossilLinkEditor;

	if (m_checkBoxAddToFossil->IsChecked()) {
		flags |= FossilAddFileToFossil;
	}

	if (m_checkBoxRetag->IsChecked()) {
		flags |= FossilRetagWorkspace;
	}

	if (m_checkBoxUseExternalDiff->IsChecked()) {
		flags |= FossilUseExternalDiff;
	}

	if (m_checkBoxExposeRevisionMacro->IsChecked()) {
		flags |= FossilExposeRevisionMacro;
	}

	if (m_checkBoxRenameFile->IsChecked()) {
		flags |= FossilRenameFileInRepo;
	}

	if (m_checkBoxUsePosixLocale->IsChecked()) {
		flags |= FossilUsePosixLocale;
	}

	fsd.SetFlags(flags);
	m_plugin->SetSettings( fsd );
}








void FossilSettingsDialog::OnAddRevisionMacroUI(wxUpdateUIEvent& event)
{
	event.Enable(m_checkBoxExposeRevisionMacro->IsChecked());







}






<


>
>










<
<
<
<

<
<
<
<
<
>


|
<
<
<
<
<
<
<
<
<
<
<
<
<





|







 







|




<
<
>

<








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






|
>
>
>
>
|
>
>
>
|

<
>
>
>
>
>
>
>
|
>
>
>
>
1
2

3
4
5
6
7
8
9
10
11
12
13
14
15
16




17





18
19
20
21













22
23
24
25
26
27
28
29
30
31
32
33
34
..
46
47
48
49
50
51
52
53
54
55
56
57


58
59

60
61
62
63
64
65
66
67




















68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

85
86
87
88
89
90
91
92
93
94
95
96
#include "fossil_settings_dialog.h"
#include <wx/imaglist.h>

#include "imanager.h"
#include "fossil.h"
#include "fossil_view.h"
#include "xmlutils.h"
#include <wx/filedlg.h>
#include <wx/filename.h>

FossilSettingsDialog::FossilSettingsDialog( wxWindow* parent, Fossil *plugin )
		: FossilSettingsDialogBase( parent )
		, m_plugin                ( plugin )
{
	FossilSettingsData fsd;
	fsd = m_plugin->GetSettings();











	m_textCtrlFossilExecutable->SetValue(fsd.GetExecutable());
	m_checkBoxUsePosixLocale->SetValue( fsd.GetFlags() & FossilUsePosixLocale );

	//WindowAttrManager::Load(this, wxT("FossilSettingsDialog"), m_plugin->GetManager()->GetConfigTool());














}

FossilSettingsDialog::~FossilSettingsDialog()
{
	//WindowAttrManager::Save(this, wxT("FossilSettingsDialog"), m_plugin->GetManager()->GetConfigTool());
}

void FossilSettingsDialog::OnBrowseFossilExe( wxCommandEvent& event )
{
	wxUnusedVar(event);
	wxString path = DoGetExecutable( m_textCtrlFossilExecutable->GetValue() );
	if (path.IsEmpty() == false) {
................................................................................
		}
	}

	wxString newPath = wxFileSelector(wxT("Select Executable:"), path.c_str(), wxT(""), wxT(""), wxT("*"), 0, this);
	return newPath;
}

void FossilSettingsDialog::OnButtonSave(wxCommandEvent& event)
{
	event.Skip();

	FossilSettingsData fsd;



	fsd.SetExecutable(m_textCtrlFossilExecutable->GetValue());


	// Link Editor flag is not set via this dialog
	// so read its current value before adding the other
	// flags
	size_t flags(0);
	if(m_plugin->GetSettings().GetFlags() & FossilLinkEditor)
		flags = FossilLinkEditor;





















	if (m_checkBoxUsePosixLocale->IsChecked()) {
		flags |= FossilUsePosixLocale;
	}

	fsd.SetFlags(flags);
	m_plugin->SetSettings( fsd );

	Workspace *workspace = m_plugin->GetManager()->GetWorkspace();
	if(m_plugin->GetManager()->IsWorkspaceOpen() && workspace) {
		wxXmlNode *fosnode = m_plugin->GetFossilView()->GetFosNode(workspace);
		XmlUtils::UpdateProperty(fosnode, wxT("repo"), m_textCtrlFileName->GetValue());
	}
	EndModal(wxID_OK);
}

void FossilSettingsDialog::OnSelectFile( wxCommandEvent& event )
{

        // open file selection
        wxFileDialog *dlg = new wxFileDialog(this, wxT("Choose a file:"));
        if(dlg->ShowModal() == wxID_OK)
        {
                // Get the dirname
                wxString path = dlg->GetPath();
                m_textCtrlFileName->SetValue(path);
        }
        dlg->Destroy();
}


Changes to Fossil/fossil_settings_dialog.h.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/** Implementing FossilSettingsDialogBase */
class FossilSettingsDialog : public FossilSettingsDialogBase
{
	Fossil *m_plugin;
protected:
	// Handlers for FossilSettingsDialogBase events.
	void OnBrowseFossilExe    ( wxCommandEvent& event );
	void OnButtonOK        ( wxCommandEvent &event );
	void OnAddRevisionMacroUI( wxUpdateUIEvent& event );

protected:
	wxString DoGetExecutable(const wxString &basePath);

public:
	/** Constructor */
	FossilSettingsDialog( wxWindow* parent, Fossil *plugin );
	virtual ~FossilSettingsDialog();
};

#endif // __fossil_settings_dialog__







|
|











12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/** Implementing FossilSettingsDialogBase */
class FossilSettingsDialog : public FossilSettingsDialogBase
{
	Fossil *m_plugin;
protected:
	// Handlers for FossilSettingsDialogBase events.
	void OnBrowseFossilExe    ( wxCommandEvent& event );
	void OnButtonSave        ( wxCommandEvent &event );
	void OnSelectFile		( wxCommandEvent& event );

protected:
	wxString DoGetExecutable(const wxString &basePath);

public:
	/** Constructor */
	FossilSettingsDialog( wxWindow* parent, Fossil *plugin );
	virtual ~FossilSettingsDialog();
};

#endif // __fossil_settings_dialog__

Changes to Fossil/fossil_ui.cpp.

260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301

302
303

304
305
306



307
308
309

310
311
312


313
314
315



316
317

318

319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334

335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397

398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436

FossilLoginDialogBase::~FossilLoginDialogBase()
{
}

FossilSettingsDialogBase::FossilSettingsDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer12;
	bSizer12 = new wxBoxSizer( wxVERTICAL );
	
	m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	wxSize m_notebookImageSize = wxSize( 32,32 );
	//int m_notebookIndex = 0;
	wxImageList* m_notebookImages = new wxImageList( m_notebookImageSize.GetWidth(), m_notebookImageSize.GetHeight() );
	m_notebook->AssignImageList( m_notebookImages );
	wxBitmap m_notebookBitmap;
	wxImage m_notebookImage;
	m_panel3 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer15;
	bSizer15 = new wxBoxSizer( wxVERTICAL );
	
	wxFlexGridSizer* fgSizer3;
	fgSizer3 = new wxFlexGridSizer( 2, 3, 0, 0 );
	fgSizer3->AddGrowableCol( 1 );
	fgSizer3->SetFlexibleDirection( wxBOTH );
	fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticTextExe = new wxStaticText( m_panel3, wxID_ANY, _("Executable:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextExe->Wrap( -1 );
	fgSizer3->Add( m_staticTextExe, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_textCtrlFossilExecutable = new wxTextCtrl( m_panel3, wxID_ANY, _("fossil"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer3->Add( m_textCtrlFossilExecutable, 0, wxALL|wxEXPAND, 5 );
	
	m_buttonBrowse = new wxButton( m_panel3, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer3->Add( m_buttonBrowse, 0, wxALL, 5 );
	
	bSizer15->Add( fgSizer3, 0, wxEXPAND|wxALL, 5 );
	
	m_staticText9 = new wxStaticText( m_panel3, wxID_ANY, _("Ignore the following file patterns:"), wxDefaultPosition, wxDefaultSize, 0 );

	m_staticText9->Wrap( -1 );
	bSizer15->Add( m_staticText9, 0, wxALL, 5 );

	
	m_textCtrlIgnorePattern = new wxTextCtrl( m_panel3, wxID_ANY, _("*.o *.obj *.exe *.lib *.so *.dll *.a *.dynlib *.exp *.ilk *.pdb *.d *.tags *.suo *.ncb *.bak *.orig *.dll *.mine *.o.d *.session Debug Release DebugUnicode ReleaseUnicode"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH2 );
	bSizer15->Add( m_textCtrlIgnorePattern, 1, wxALL|wxEXPAND, 5 );



	
	wxStaticBoxSizer* sbSizer1;
	sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_panel3, wxID_ANY, wxEmptyString ), wxVERTICAL );


	m_checkBoxAddToFossil = new wxCheckBox( m_panel3, wxID_ANY, _("When adding file(s) to project, add it to fossil as well"), wxDefaultPosition, wxDefaultSize, 0 );
	sbSizer1->Add( m_checkBoxAddToFossil, 0, wxALL|wxEXPAND, 5 );



	m_checkBoxRetag = new wxCheckBox( m_panel3, wxID_ANY, _("Retag workspace after fossil update, revert or applying patch"), wxDefaultPosition, wxDefaultSize, 0 );
	sbSizer1->Add( m_checkBoxRetag, 0, wxALL|wxEXPAND, 5 );




	m_checkBoxRenameFile = new wxCheckBox( m_panel3, wxID_ANY, _("When renaming a file in the project, rename it in the repository as well"), wxDefaultPosition, wxDefaultSize, 0 );

	sbSizer1->Add( m_checkBoxRenameFile, 0, wxALL|wxEXPAND, 5 );

	
	m_checkBoxUsePosixLocale = new wxCheckBox( m_panel3, wxID_ANY, _("Use POSIX Locale"), wxDefaultPosition, wxDefaultSize, 0 );
	m_checkBoxUsePosixLocale->SetValue(true); 
	m_checkBoxUsePosixLocale->SetToolTip( _("When checked, CodeLite will use the default \"C\" locale instead of the current locale. This will ensure that fossil command line output is parsed properly.") );
	
	sbSizer1->Add( m_checkBoxUsePosixLocale, 0, wxALL|wxEXPAND, 5 );
	
	bSizer15->Add( sbSizer1, 0, wxALL|wxEXPAND, 5 );
	
	m_panel3->SetSizer( bSizer15 );
	m_panel3->Layout();
	bSizer15->Fit( m_panel3 );
	m_notebook->AddPage( m_panel3, _("General"), true );
	m_panel4 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer16;
	bSizer16 = new wxBoxSizer( wxVERTICAL );

	
	m_checkBoxUseExternalDiff = new wxCheckBox( m_panel4, wxID_ANY, _("Use external diff tool"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer16->Add( m_checkBoxUseExternalDiff, 0, wxALL|wxEXPAND, 5 );
	
	wxFlexGridSizer* fgSizer5;
	fgSizer5 = new wxFlexGridSizer( 1, 3, 0, 0 );
	fgSizer5->AddGrowableCol( 1 );
	fgSizer5->SetFlexibleDirection( wxBOTH );
	fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText10 = new wxStaticText( m_panel4, wxID_ANY, _("External Diff Viewer:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText10->Wrap( -1 );
	fgSizer5->Add( m_staticText10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_textCtrlDiffViewer = new wxTextCtrl( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer5->Add( m_textCtrlDiffViewer, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_buttonBrowseExtDiff = new wxButton( m_panel4, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer5->Add( m_buttonBrowseExtDiff, 0, wxALL, 5 );
	
	bSizer16->Add( fgSizer5, 0, wxEXPAND|wxALL, 5 );
	
	m_panel4->SetSizer( bSizer16 );
	m_panel4->Layout();
	bSizer16->Fit( m_panel4 );
	m_notebook->AddPage( m_panel4, _("External Diff"), false );
/////////////////////////////////////////////////////

	m_panel6 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer23;
	bSizer23 = new wxBoxSizer( wxVERTICAL );
	
	m_checkBoxExposeRevisionMacro = new wxCheckBox( m_panel6, wxID_ANY, _("Add revision number as preprocessor definition in the compilation line"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer23->Add( m_checkBoxExposeRevisionMacro, 0, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer24;
	bSizer24 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText29 = new wxStaticText( m_panel6, wxID_ANY, _("Preprocessor name:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText29->Wrap( -1 );
	bSizer24->Add( m_staticText29, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_textCtrlMacroName = new wxTextCtrl( m_panel6, wxID_ANY, _("FOSSIL_REVISION"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer24->Add( m_textCtrlMacroName, 1, wxALL|wxEXPAND, 5 );
	
	bSizer23->Add( bSizer24, 0, wxEXPAND|wxALL, 5 );
	
	m_panel6->SetSizer( bSizer23 );
	m_panel6->Layout();
	bSizer23->Fit( m_panel6 );
	m_notebook->AddPage( m_panel6, _("Integration"), false );
	
	bSizer12->Add( m_notebook, 1, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer13;
	bSizer13 = new wxBoxSizer( wxHORIZONTAL );
	
	m_button8 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
	m_button8->SetDefault(); 
	bSizer13->Add( m_button8, 0, wxALL, 5 );
	
	m_button9 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer13->Add( m_button9, 0, wxALL, 5 );

	
	bSizer12->Add( bSizer13, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
	
	this->SetSizer( bSizer12 );
	this->Layout();
	bSizer12->Fit( this );
	
	this->Centre( wxBOTH );
	
	// Connect Events
	m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FossilSettingsDialogBase::OnBrowseFossilExe ), NULL, this );
	m_staticText10->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FossilSettingsDialogBase::OnUseExternalDiffUI ), NULL, this );
	m_textCtrlDiffViewer->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FossilSettingsDialogBase::OnUseExternalDiffUI ), NULL, this );
	m_buttonBrowseExtDiff->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FossilSettingsDialogBase::OnBrowseDiffViewer ), NULL, this );
	m_buttonBrowseExtDiff->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FossilSettingsDialogBase::OnUseExternalDiffUI ), NULL, this );
	m_staticText29->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FossilSettingsDialogBase::OnAddRevisionMacroUI ), NULL, this );
	m_textCtrlMacroName->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FossilSettingsDialogBase::OnAddRevisionMacroUI ), NULL, this );
	m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FossilSettingsDialogBase::OnButtonOK ), NULL, this );
}

FossilSettingsDialogBase::~FossilSettingsDialogBase()
{
	// Disconnect Events
	m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FossilSettingsDialogBase::OnBrowseFossilExe ), NULL, this );
	m_staticText10->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FossilSettingsDialogBase::OnUseExternalDiffUI ), NULL, this );
	m_textCtrlDiffViewer->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FossilSettingsDialogBase::OnUseExternalDiffUI ), NULL, this );
	m_buttonBrowseExtDiff->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FossilSettingsDialogBase::OnBrowseDiffViewer ), NULL, this );
	m_buttonBrowseExtDiff->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FossilSettingsDialogBase::OnUseExternalDiffUI ), NULL, this );
	m_staticText29->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FossilSettingsDialogBase::OnAddRevisionMacroUI ), NULL, this );
	m_textCtrlMacroName->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FossilSettingsDialogBase::OnAddRevisionMacroUI ), NULL, this );
	m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FossilSettingsDialogBase::OnButtonOK ), NULL, this );
	
}

FossilInfoDialog::FossilInfoDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer17;







|

|
|

<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|
|
|

|

|
|

|
|
|
<
<
<
>
|
<
>

<
<
>
>
>

<
<
>
|
<
<
>
>
|
<
<
>
>
>
|
<
>
|
>
|
|
|
<

|

<

<
<
<
<
<
<
<
>

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

|
|

|
|
|

|
<
>

|

|

|




|
<
<
|
<
<
<
|





|
<
<
|
<
<
<
|
<







260
261
262
263
264
265
266
267
268
269
270
271











272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287



288
289

290
291


292
293
294
295


296
297


298
299
300


301
302
303
304

305
306
307
308
309
310

311
312
313

314







315
316



















317
318






319























320
321
322
323
324
325
326
327
328
329

330
331
332
333
334
335
336
337
338
339
340
341


342



343
344
345
346
347
348
349


350



351

352
353
354
355
356
357
358

FossilLoginDialogBase::~FossilLoginDialogBase()
{
}

FossilSettingsDialogBase::FossilSettingsDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
	
	wxBoxSizer* bSizer1;
	bSizer1 = new wxBoxSizer( wxVERTICAL );
	











	wxFlexGridSizer* fgSizer1;
	fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
	fgSizer1->AddGrowableCol( 1 );
	fgSizer1->SetFlexibleDirection( wxBOTH );
	fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );

	m_staticTextExe = new wxStaticText( this, wxID_ANY, _("Executable:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextExe->Wrap( -1 );
	fgSizer1->Add( m_staticTextExe, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_textCtrlFossilExecutable = new wxTextCtrl( this, wxID_ANY, _("fossil"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_textCtrlFossilExecutable, 0, wxALL|wxEXPAND, 5 );
	
	m_buttonBrowse1 = new wxButton( this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_buttonBrowse1, 0, wxALL, 5 );




	m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Repository File Path:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1->Wrap( -1 );

	fgSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	


	m_textCtrlFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_textCtrlFileName->SetToolTip( wxT("Select the path to the file containing the template header to be prepended to the source files") );
	m_textCtrlFileName->SetMinSize( wxSize( 300,-1 ) );
	


	fgSizer1->Add( m_textCtrlFileName, 0, wxALL|wxEXPAND, 5 );
	


	m_buttonBrowse2 = new wxButton( this, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_buttonBrowse2, 0, wxALL, 5 );
	


	m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("File Masking:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText2->Wrap( -1 );
	fgSizer1->Add( m_staticText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	

	m_textCtrlFileMaksing = new wxTextCtrl( this, wxID_ANY, wxT("*.hpp;*.h;*.hxx;*.inl;*.h++"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_textCtrlFileMaksing, 0, wxALL|wxEXPAND, 5 );
	fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );

	m_checkBoxUsePosixLocale = new wxCheckBox( this, wxID_ANY, wxT("Use POSIX Locale"), wxDefaultPosition, wxDefaultSize, 0 );
	m_checkBoxUsePosixLocale->SetValue(true);

	
	fgSizer1->Add( m_checkBoxUsePosixLocale, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	

	







	fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
	



















	bSizer1->Add( fgSizer1, 0, wxEXPAND|wxALL, 5 );
	






	m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );























	bSizer1->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer2;
	bSizer2 = new wxBoxSizer( wxHORIZONTAL );
	
	m_buttonSave = new wxButton( this, wxID_OK, wxT("&Save"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonSave->SetDefault(); 
	bSizer2->Add( m_buttonSave, 0, wxALL, 5 );
	
	m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );

	bSizer2->Add( m_buttonCancel, 0, wxALL, 5 );
	
	bSizer1->Add( bSizer2, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
	
	this->SetSizer( bSizer1 );
	this->Layout();
	bSizer1->Fit( this );
	
	this->Centre( wxBOTH );
	
	// Connect Events
	m_buttonBrowse1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FossilSettingsDialogBase::OnBrowseFossilExe ), NULL, this );


	m_buttonBrowse2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FossilSettingsDialogBase::OnSelectFile ), NULL, this );



	m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FossilSettingsDialogBase::OnButtonSave ), NULL, this );
}

FossilSettingsDialogBase::~FossilSettingsDialogBase()
{
	// Disconnect Events
	m_buttonBrowse1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FossilSettingsDialogBase::OnBrowseFossilExe ), NULL, this );


	m_buttonBrowse2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FossilSettingsDialogBase::OnSelectFile ), NULL, this );



	m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FossilSettingsDialogBase::OnButtonSave ), NULL, this );

}

FossilInfoDialog::FossilInfoDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer17;

Changes to Fossil/fossil_ui.h.

165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195

196
197
198


199
200
201
202
203
204
205
206
207
208

209
210
211
212
213
214
215
216
217
218
219
220
/// Class FossilSettingsDialogBase
///////////////////////////////////////////////////////////////////////////////
class FossilSettingsDialogBase : public wxDialog 
{
	private:
	
	protected:
		wxNotebook* m_notebook;
		wxPanel* m_panel3;
		wxStaticText* m_staticTextExe;
		wxTextCtrl* m_textCtrlFossilExecutable;
		wxButton* m_buttonBrowse;
		wxStaticText* m_staticText9;
		wxTextCtrl* m_textCtrlIgnorePattern;
		wxCheckBox* m_checkBoxAddToFossil;
		wxCheckBox* m_checkBoxRetag;
		wxCheckBox* m_checkBoxRenameFile;
		wxCheckBox* m_checkBoxUsePosixLocale;
		wxPanel* m_panel4;
		wxCheckBox* m_checkBoxUseExternalDiff;
		wxStaticText* m_staticText10;
		wxTextCtrl* m_textCtrlDiffViewer;
		wxButton* m_buttonBrowseExtDiff;
		wxPanel* m_panel5;
		wxStaticText* m_staticText20;
		wxTextCtrl* m_textCtrlSSHClient;
		wxButton* m_button12;
		wxStaticText* m_staticText21;
		wxTextCtrl* m_textCtrlSshClientArgs;
		wxStaticText* m_staticText22;
		wxPanel* m_panel6;

		wxCheckBox* m_checkBoxExposeRevisionMacro;
		wxStaticText* m_staticText29;
		wxTextCtrl* m_textCtrlMacroName;


		wxButton* m_button8;
		wxButton* m_button9;
		
		// Virtual event handlers, overide them in your derived class
		virtual void OnBrowseFossilExe( wxCommandEvent& event ) { event.Skip(); }
		virtual void OnUseExternalDiffUI( wxUpdateUIEvent& event ) { event.Skip(); }
		virtual void OnBrowseDiffViewer( wxCommandEvent& event ) { event.Skip(); }
		virtual void OnBrowseSSHClient( wxCommandEvent& event ) { event.Skip(); }
		virtual void OnAddRevisionMacroUI( wxUpdateUIEvent& event ) { event.Skip(); }
		virtual void OnButtonOK( wxCommandEvent& event ) { event.Skip(); }

		
	
	public:
		
		FossilSettingsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Fossil Preferences"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
		~FossilSettingsDialogBase();
	
};

///////////////////////////////////////////////////////////////////////////////
/// Class FossilInfoDialog
///////////////////////////////////////////////////////////////////////////////







<
<
|
<
<
|
|
<
<
<
<
<
<
<
|
|
<
<
<
|
|
|
<
<
>
|
<
<
>
>
|
|



<
<
<
<
|
>



<
|







165
166
167
168
169
170
171


172


173
174







175
176



177
178
179


180
181


182
183
184
185
186
187
188




189
190
191
192
193

194
195
196
197
198
199
200
201
/// Class FossilSettingsDialogBase
///////////////////////////////////////////////////////////////////////////////
class FossilSettingsDialogBase : public wxDialog 
{
	private:
	
	protected:


		wxStaticText* m_staticText1;


		wxStaticText* m_staticTextExe;
		wxTextCtrl* m_textCtrlFileName;







		wxTextCtrl* m_textCtrlFossilExecutable;
		wxButton* m_buttonBrowse1;



		wxButton* m_buttonBrowse2;
		wxStaticText* m_staticText2;
		wxTextCtrl* m_textCtrlFileMaksing;



		wxCheckBox* m_checkBoxUsePosixLocale;


		
		wxStaticLine* m_staticline2;
		wxButton* m_buttonSave;
		wxButton* m_buttonCancel;
		
		// Virtual event handlers, overide them in your derived class
		virtual void OnBrowseFossilExe( wxCommandEvent& event ) { event.Skip(); }




		virtual void OnSelectFile( wxCommandEvent& event ){ event.Skip(); }
		virtual void OnButtonSave( wxCommandEvent& event ){ event.Skip(); }
		
	
	public:

		FossilSettingsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Fossil Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
		~FossilSettingsDialogBase();
	
};

///////////////////////////////////////////////////////////////////////////////
/// Class FossilInfoDialog
///////////////////////////////////////////////////////////////////////////////

Changes to Fossil/fossil_view.cpp.

2
3
4
5
6
7
8

9
10
11
12
13
14
15
..
78
79
80
81
82
83
84





85
86
87
88
89
90
91
...
192
193
194
195
196
197
198
199
200
201
202
203

















204
205
206
207
208
209
210
211
212
213
214
215
216
217
218






219
220
221
222
223
224
225
226
...
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
...
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
//#include "fossil_checkout_dialog.h"
#include "fossil_ui.h"
#include <wx/settings.h>
#include <wx/filedlg.h>
#include <wx/textdlg.h>
#include "plugin.h"
#include "procutils.h"

#include "fossil_login_dialog.h"
//#include "fossil_command_handlers.h"
//#include "fossil_copy_dialog.h"
#include "commit_dialog.h"
//#include "fossil_default_command_handler.h"
#include <wx/menu.h>
#include <wx/dirdlg.h>
................................................................................
void FossilView::OnChangeRootDir( wxCommandEvent& event )
{
	wxUnusedVar(event);
	wxString path(m_textCtrlRootDir->GetValue());
	wxString new_path = wxDirSelector(wxT(""), path, wxDD_DEFAULT_STYLE, wxDefaultPosition, this);
	if (new_path.IsEmpty() == false) {
		m_textCtrlRootDir->SetValue(new_path);





		BuildTree();
	}
}

void FossilView::OnTreeMenu( wxTreeEvent& event )
{
/*
................................................................................
void FossilView::BuildTree(const wxString& root)
{
	if(root.IsEmpty())
		return;

	m_textCtrlRootDir->SetValue(root);
	wxString command;
	command << m_plugin->GetFossilExeName() << wxT("open ");
	m_simpleCommand.Execute(command, root, new FossilStatusHandler(m_plugin, wxNOT_FOUND, NULL), m_plugin);
	//command << m_plugin->GetFossilExeName() << wxT("--xml -q status");
	//command << m_plugin->GetFossilExeName() << wxT("status");
	//m_simpleCommand.Execute(command, root, new FossilStatusHandler(m_plugin, wxNOT_FOUND, NULL), m_plugin);

















}

void FossilView::OnWorkspaceLoaded(wxCommandEvent& event)
{
	event.Skip();
	Workspace *workspace = m_plugin->GetManager()->GetWorkspace();

////////////////////////////////////
	//__asm__("int $3"); //trace M.Isa
	wxString prop = wxT("Database");
	wxString errMsg;
	wxString wkout = workspace->GetStringProperty(prop, errMsg);
	m_plugin->GetConsole()->AppendText(wxT("mydebug: ") + errMsg + wkout + wxT("\n"));

	if(m_plugin->GetManager()->IsWorkspaceOpen() && workspace) {






		m_textCtrlRootDir->SetValue(workspace->GetWorkspaceFileName().GetPath());
		BuildTree();
	}
}

void FossilView::OnWorkspaceClosed(wxCommandEvent& event)
{
	event.Skip();
................................................................................
	event.Skip();
	BuildTree();
}

void FossilView::OnFileAdded(wxCommandEvent& event)
{
	event.Skip();
	FossilSettingsData ssd = m_plugin->GetSettings();
	if(ssd.GetFlags() & FossilAddFileToFossil) {
		wxArrayString *files = (wxArrayString*)event.GetClientData();
		if(files) {
			bool     addToFossil(false);
			wxString command;
			command << m_plugin->GetFossilExeName() << wxT(" add ");
			for(size_t i=0; i<files->GetCount(); i++) {

................................................................................
	m_plugin->Blame(event, m_selectionInfo.m_paths);
}

#endif

void FossilView::OnLinkEditor(wxCommandEvent& event)
{
	FossilSettingsData ssd = m_plugin->GetSettings();
	if(event.IsChecked())
		ssd.SetFlags(ssd.GetFlags() | FossilLinkEditor);
	else
		ssd.SetFlags(ssd.GetFlags() & ~FossilLinkEditor);

	m_plugin->SetSettings(ssd);

	DoLinkEditor();
}

void FossilView::DoLinkEditor()
{
	if(!(m_plugin->GetSettings().GetFlags() & FossilLinkEditor))







>







 







>
>
>
>
>







 







<
<
<
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>









<
<
<
<


>
>
>
>
>
>
|







 







|
|







 







|

|

|

|







2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
...
198
199
200
201
202
203
204



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232




233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
...
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
...
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
//#include "fossil_checkout_dialog.h"
#include "fossil_ui.h"
#include <wx/settings.h>
#include <wx/filedlg.h>
#include <wx/textdlg.h>
#include "plugin.h"
#include "procutils.h"
#include "xmlutils.h"
#include "fossil_login_dialog.h"
//#include "fossil_command_handlers.h"
//#include "fossil_copy_dialog.h"
#include "commit_dialog.h"
//#include "fossil_default_command_handler.h"
#include <wx/menu.h>
#include <wx/dirdlg.h>
................................................................................
void FossilView::OnChangeRootDir( wxCommandEvent& event )
{
	wxUnusedVar(event);
	wxString path(m_textCtrlRootDir->GetValue());
	wxString new_path = wxDirSelector(wxT(""), path, wxDD_DEFAULT_STYLE, wxDefaultPosition, this);
	if (new_path.IsEmpty() == false) {
		m_textCtrlRootDir->SetValue(new_path);
		Workspace *workspace = m_plugin->GetManager()->GetWorkspace();
		if(m_plugin->GetManager()->IsWorkspaceOpen() && workspace) {
			wxXmlNode *fosnode = GetFosNode(workspace);
			XmlUtils::UpdateProperty(fosnode, wxT("wdir"), new_path);
		}
		BuildTree();
	}
}

void FossilView::OnTreeMenu( wxTreeEvent& event )
{
/*
................................................................................
void FossilView::BuildTree(const wxString& root)
{
	if(root.IsEmpty())
		return;

	m_textCtrlRootDir->SetValue(root);
	wxString command;



	command << m_plugin->GetFossilExeName() << wxT("status ");
	m_simpleCommand.Execute(command, root, new FossilStatusHandler(m_plugin, wxNOT_FOUND, NULL), m_plugin);
}

wxXmlNode* FossilView::GetFosNode(Workspace *workspace)
{
	LocalOptionsConfig conf;
	wxXmlNode *fosnode;
	wxXmlNode *optnode = workspace->GetWorkspaceEditorOptions();
	if(!optnode) {
		workspace->SetWorkspaceEditorOptions(&conf);
		optnode = workspace->GetWorkspaceEditorOptions();
	}
	fosnode = XmlUtils::FindFirstByTagName(optnode, wxT("Fossil"));
	if(!fosnode) {
		fosnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("Fossil"));
		optnode->AddChild( fosnode );
	}
	return fosnode;	
}

void FossilView::OnWorkspaceLoaded(wxCommandEvent& event)
{
	event.Skip();
	Workspace *workspace = m_plugin->GetManager()->GetWorkspace();

////////////////////////////////////
	//__asm__("int $3"); //trace M.Isa





	if(m_plugin->GetManager()->IsWorkspaceOpen() && workspace) {
		wxXmlNode *fosnode = GetFosNode(workspace);
		wxString wdir = fosnode->GetPropVal(wxT("wdir"), wxEmptyString);
		m_plugin->GetConsole()->AppendText(wxT("mydebug: wdir --> ") + wdir + wxT("\n"));
		if (wdir != wxEmptyString)
			m_textCtrlRootDir->SetValue(wdir);
		else
			m_textCtrlRootDir->SetValue(workspace->GetWorkspaceFileName().GetPath());
		BuildTree();
	}
}

void FossilView::OnWorkspaceClosed(wxCommandEvent& event)
{
	event.Skip();
................................................................................
	event.Skip();
	BuildTree();
}

void FossilView::OnFileAdded(wxCommandEvent& event)
{
	event.Skip();
	FossilSettingsData fsd = m_plugin->GetSettings();
	if(fsd.GetFlags() & FossilAddFileToFossil) {
		wxArrayString *files = (wxArrayString*)event.GetClientData();
		if(files) {
			bool     addToFossil(false);
			wxString command;
			command << m_plugin->GetFossilExeName() << wxT(" add ");
			for(size_t i=0; i<files->GetCount(); i++) {

................................................................................
	m_plugin->Blame(event, m_selectionInfo.m_paths);
}

#endif

void FossilView::OnLinkEditor(wxCommandEvent& event)
{
	FossilSettingsData fsd = m_plugin->GetSettings();
	if(event.IsChecked())
		fsd.SetFlags(fsd.GetFlags() | FossilLinkEditor);
	else
		fsd.SetFlags(fsd.GetFlags() & ~FossilLinkEditor);

	m_plugin->SetSettings(fsd);

	DoLinkEditor();
}

void FossilView::DoLinkEditor()
{
	if(!(m_plugin->GetSettings().GetFlags() & FossilLinkEditor))

Changes to Fossil/fossil_view.h.

3
4
5
6
7
8
9


10
11
12
13
14
15
16
...
112
113
114
115
116
117
118

119
120
121
122

/**
@file
Subclass of FossilPageBase
*/

#include "fossil_ui.h"


//#include "fossilinfo.h"
#include "fossilcommand.h"
#include "fossiltreedata.h"

class Fossil;
class wxMenu;

................................................................................
	FossilView( wxWindow* parent, Fossil *plugin);
	virtual ~FossilView();

	void     DisconnectEvents();
	void     UpdateTree(const wxArrayString& modifiedFiles, const wxArrayString &conflictedFiles, const wxArrayString &unversionedFiles, const wxArrayString& newFiles, const wxArrayString& deletedFiles);
	void     BuildTree();
	void     BuildTree(const wxString &root);

	wxString GetRootDir() const {return m_textCtrlRootDir->GetValue();}
};

#endif // __fossil_page__







>
>







 







>




3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
...
114
115
116
117
118
119
120
121
122
123
124
125

/**
@file
Subclass of FossilPageBase
*/

#include "fossil_ui.h"
#include "xmlutils.h"
#include "workspace.h"
//#include "fossilinfo.h"
#include "fossilcommand.h"
#include "fossiltreedata.h"

class Fossil;
class wxMenu;

................................................................................
	FossilView( wxWindow* parent, Fossil *plugin);
	virtual ~FossilView();

	void     DisconnectEvents();
	void     UpdateTree(const wxArrayString& modifiedFiles, const wxArrayString &conflictedFiles, const wxArrayString &unversionedFiles, const wxArrayString& newFiles, const wxArrayString& deletedFiles);
	void     BuildTree();
	void     BuildTree(const wxString &root);
	wxXmlNode* GetFosNode(Workspace *workspace);
	wxString GetRootDir() const {return m_textCtrlRootDir->GetValue();}
};

#endif // __fossil_page__