Skip to content

Commit c2b0c4a

Browse files
committed
Added RenameDialog (not finished yet) and rebuild RemoveDialog.wxs, which accidentally got deleted.
1 parent b2cbfbf commit c2b0c4a

File tree

6 files changed

+125
-5
lines changed

6 files changed

+125
-5
lines changed

GitBlocks.cbp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<Unit filename="include/GitBlocks.h" />
4646
<Unit filename="include/NewBranchDialog.h" />
4747
<Unit filename="include/RemoveDialog.h" />
48+
<Unit filename="include/RenameDialog.h" />
4849
<Unit filename="include/SwitchBranchDialog.h" />
4950
<Unit filename="manifest.xml" />
5051
<Unit filename="src/CloneDialog.cpp" />
@@ -53,11 +54,14 @@
5354
<Unit filename="src/GitBlocks.cpp" />
5455
<Unit filename="src/NewBranchDialog.cpp" />
5556
<Unit filename="src/RemoveDialog.cpp" />
57+
<Unit filename="src/RenameDialog.cpp" />
5658
<Unit filename="src/SwitchBranchDialog.cpp" />
5759
<Unit filename="wxsmith/CloneDialog.wxs" />
5860
<Unit filename="wxsmith/CommitAllDialog.wxs" />
5961
<Unit filename="wxsmith/CommitDialog.wxs" />
6062
<Unit filename="wxsmith/NewBranchDialog.wxs" />
63+
<Unit filename="wxsmith/RemoveDialog.wxs" />
64+
<Unit filename="wxsmith/RenameDialog.wxs" />
6165
<Extensions>
6266
<envvars />
6367
<code_completion />
@@ -68,6 +72,8 @@
6872
<wxDialog wxs="wxsmith/CloneDialog.wxs" src="src/CloneDialog.cpp" hdr="include/CloneDialog.h" fwddecl="0" i18n="1" name="CloneDialog" language="CPP" />
6973
<wxDialog wxs="wxsmith/CommitDialog.wxs" src="src/CommitDialog.cpp" hdr="include/CommitDialog.h" fwddecl="0" i18n="1" name="CommitDialog" language="CPP" />
7074
<wxDialog wxs="wxsmith/NewBranchDialog.wxs" src="src/NewBranchDialog.cpp" hdr="include/NewBranchDialog.h" fwddecl="0" i18n="1" name="NewBranchDialog" language="CPP" />
75+
<wxDialog wxs="wxsmith/RemoveDialog.wxs" src="src/RemoveDialog.cpp" hdr="include/RemoveDialog.h" fwddecl="0" i18n="1" name="RemoveDialog" language="CPP" />
76+
<wxDialog wxs="wxsmith/RenameDialog.wxs" src="src/RenameDialog.cpp" hdr="include/RenameDialog.h" fwddecl="0" i18n="1" name="RenameDialog" language="CPP" />
7177
</resources>
7278
</wxsmith>
7379
<lib_finder disable_auto="1" />

include/RenameDialog.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#ifndef RENAMEDIALOG_H
2+
#define RENAMEDIALOG_H
3+
4+
//(*Headers(RenameDialog)
5+
#include <wx/dialog.h>
6+
//*)
7+
8+
class RenameDialog: public wxDialog
9+
{
10+
public:
11+
12+
RenameDialog(wxWindow* parent,wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
13+
virtual ~RenameDialog();
14+
15+
//(*Declarations(RenameDialog)
16+
//*)
17+
18+
protected:
19+
20+
//(*Identifiers(RenameDialog)
21+
//*)
22+
23+
private:
24+
25+
//(*Handlers(RenameDialog)
26+
//*)
27+
28+
DECLARE_EVENT_TABLE()
29+
};
30+
31+
#endif

src/RemoveDialog.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,19 @@ RemoveDialog::RemoveDialog(wxWindow* parent,wxWindowID id,const wxPoint& pos,con
2626
wxBoxSizer* BoxSizer1;
2727
wxStdDialogButtonSizer* StdDialogButtonSizer1;
2828

29-
Create(parent, id, _("Remove file"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("id"));
30-
SetClientSize(wxDefaultSize);
31-
Move(wxDefaultPosition);
29+
Create(parent, wxID_ANY, _("Add new branch"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("wxID_ANY"));
3230
BoxSizer1 = new wxBoxSizer(wxVERTICAL);
3331
BoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
3432
StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("File to remove: "), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
3533
BoxSizer2->Add(StaticText1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
3634
FileChoice = new wxChoice(this, ID_CHOICE1, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE1"));
3735
BoxSizer2->Add(FileChoice, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
38-
BoxSizer1->Add(BoxSizer2, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
36+
BoxSizer1->Add(BoxSizer2, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
3937
StdDialogButtonSizer1 = new wxStdDialogButtonSizer();
4038
StdDialogButtonSizer1->AddButton(new wxButton(this, wxID_OK, wxEmptyString));
4139
StdDialogButtonSizer1->AddButton(new wxButton(this, wxID_CANCEL, wxEmptyString));
4240
StdDialogButtonSizer1->Realize();
43-
BoxSizer1->Add(StdDialogButtonSizer1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
41+
BoxSizer1->Add(StdDialogButtonSizer1, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
4442
SetSizer(BoxSizer1);
4543
BoxSizer1->Fit(this);
4644
BoxSizer1->SetSizeHints(this);

src/RenameDialog.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#include "../include/RenameDialog.h"
2+
3+
//(*InternalHeaders(RenameDialog)
4+
#include <wx/string.h>
5+
#include <wx/intl.h>
6+
//*)
7+
8+
//(*IdInit(RenameDialog)
9+
//*)
10+
11+
BEGIN_EVENT_TABLE(RenameDialog,wxDialog)
12+
//(*EventTable(RenameDialog)
13+
//*)
14+
END_EVENT_TABLE()
15+
16+
RenameDialog::RenameDialog(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size)
17+
{
18+
//(*Initialize(RenameDialog)
19+
Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("id"));
20+
SetClientSize(wxDefaultSize);
21+
Move(wxDefaultPosition);
22+
//*)
23+
}
24+
25+
RenameDialog::~RenameDialog()
26+
{
27+
//(*Destroy(RenameDialog)
28+
//*)
29+
}
30+

wxsmith/RemoveDialog.wxs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<wxsmith>
3+
<object class="wxDialog" name="RemoveDialog">
4+
<title>Add new branch</title>
5+
<id_arg>0</id_arg>
6+
<object class="wxBoxSizer" variable="BoxSizer1" member="no">
7+
<orient>wxVERTICAL</orient>
8+
<object class="sizeritem">
9+
<object class="wxBoxSizer" variable="BoxSizer2" member="no">
10+
<object class="sizeritem">
11+
<object class="wxStaticText" name="ID_STATICTEXT1" variable="StaticText1" member="yes">
12+
<label>File to remove: </label>
13+
</object>
14+
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
15+
<border>5</border>
16+
<option>1</option>
17+
</object>
18+
<object class="sizeritem">
19+
<object class="wxChoice" name="ID_CHOICE1" variable="Choice1" member="yes" />
20+
<flag>wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
21+
<border>5</border>
22+
<option>1</option>
23+
</object>
24+
</object>
25+
<flag>wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
26+
<border>5</border>
27+
<option>1</option>
28+
</object>
29+
<object class="sizeritem">
30+
<object class="wxStdDialogButtonSizer" variable="StdDialogButtonSizer1" member="no">
31+
<object class="button">
32+
<object class="wxButton" name="wxID_OK">
33+
<label></label>
34+
</object>
35+
</object>
36+
<object class="button">
37+
<object class="wxButton" name="wxID_CANCEL">
38+
<label></label>
39+
</object>
40+
</object>
41+
</object>
42+
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
43+
<border>5</border>
44+
<option>1</option>
45+
</object>
46+
</object>
47+
</object>
48+
</wxsmith>

wxsmith/RenameDialog.wxs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<wxsmith>
3+
<object class="wxDialog" name="RenameDialog">
4+
<pos_arg>1</pos_arg>
5+
<size_arg>1</size_arg>
6+
</object>
7+
</wxsmith>

0 commit comments

Comments
 (0)