Skip to content

Commit a0345c7

Browse files
committed
Windows compilation for new features
interface, form.fpb ~ elevated menuReveal to Protected ~ enabled NoHeader on some list controls interface_derived.cpp + append column to some list controls + menuReveal shows platform's file browser open_with_dlg.cpp + append column for correct Windows drawing windows.vcxproj + added interface.h, open_with_dlg.cpp to solution
1 parent 99edcac commit a0345c7

File tree

7 files changed

+27
-8
lines changed

7 files changed

+27
-8
lines changed

source/form.fbp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@
627627
<object class="notebookpage" expanded="0">
628628
<property name="bitmap"></property>
629629
<property name="label">Editor Versions</property>
630-
<property name="select">0</property>
630+
<property name="select">1</property>
631631
<object class="wxPanel" expanded="0">
632632
<property name="BottomDockable">1</property>
633633
<property name="LeftDockable">1</property>
@@ -935,7 +935,7 @@
935935
<property name="resize">Resizable</property>
936936
<property name="show">1</property>
937937
<property name="size"></property>
938-
<property name="style">wxLC_LIST|wxLC_SINGLE_SEL</property>
938+
<property name="style">wxLC_LIST|wxLC_NO_HEADER|wxLC_SINGLE_SEL</property>
939939
<property name="subclass">; ; forward_declare</property>
940940
<property name="toolbar_pane">0</property>
941941
<property name="tooltip"></property>
@@ -1344,7 +1344,7 @@
13441344
<property name="kind">wxITEM_NORMAL</property>
13451345
<property name="label">Reveal</property>
13461346
<property name="name">menuReveal</property>
1347-
<property name="permission">none</property>
1347+
<property name="permission">protected</property>
13481348
<property name="shortcut">Ctrl-F</property>
13491349
<property name="unchecked_bitmap"></property>
13501350
</object>
@@ -2291,7 +2291,7 @@
22912291
<property name="resize">Resizable</property>
22922292
<property name="show">1</property>
22932293
<property name="size"></property>
2294-
<property name="style">wxLC_ICON</property>
2294+
<property name="style">wxLC_NO_HEADER|wxLC_REPORT</property>
22952295
<property name="subclass">; ; forward_declare</property>
22962296
<property name="toolbar_pane">0</property>
22972297
<property name="tooltip"></property>

source/interface.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co
7676
installsList = new wxListCtrl( installs_pane, wxID_FLOPPY, wxDefaultPosition, wxDefaultSize, wxLC_LIST|wxLC_SINGLE_SEL );
7777
iManSizer->Add( installsList, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
7878

79-
installsPathsList = new wxListCtrl( installs_pane, wxID_HOME, wxDefaultPosition, wxDefaultSize, wxLC_LIST|wxLC_SINGLE_SEL );
79+
installsPathsList = new wxListCtrl( installs_pane, wxID_HOME, wxDefaultPosition, wxDefaultSize, wxLC_LIST|wxLC_NO_HEADER|wxLC_SINGLE_SEL );
8080
iManSizer->Add( installsPathsList, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
8181

8282
wxBoxSizer* bSizer4;
@@ -111,7 +111,7 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co
111111
installs_pane->SetSizer( iManSizer );
112112
installs_pane->Layout();
113113
iManSizer->Fit( installs_pane );
114-
notebook->AddPage( installs_pane, wxT("Editor Versions"), false );
114+
notebook->AddPage( installs_pane, wxT("Editor Versions"), true );
115115

116116
main_sizer->Add( notebook, 1, wxEXPAND | wxALL, 5 );
117117

@@ -132,7 +132,6 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co
132132
menuRemove = new wxMenuItem( menuProject, wxID_DELETE, wxString( wxT("Remove Project From List") ) + wxT('\t') + wxT("Ctrl--"), wxEmptyString, wxITEM_NORMAL );
133133
menuProject->Append( menuRemove );
134134

135-
wxMenuItem* menuReveal;
136135
menuReveal = new wxMenuItem( menuProject, wxID_FIND, wxString( wxT("Reveal") ) + wxT('\t') + wxT("Ctrl-F"), wxEmptyString, wxITEM_NORMAL );
137136
menuProject->Append( menuReveal );
138137

@@ -254,7 +253,7 @@ OpenWithEditorDlgBase::OpenWithEditorDlgBase( wxWindow* parent, wxWindowID id, c
254253
m_staticText7->Wrap( -1 );
255254
gbSizer4->Add( m_staticText7, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
256255

257-
editorsListCtrl = new wxListCtrl( this, VERSIONS_LIST, wxDefaultPosition, wxDefaultSize, wxLC_ICON );
256+
editorsListCtrl = new wxListCtrl( this, VERSIONS_LIST, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT );
258257
gbSizer4->Add( editorsListCtrl, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxALL|wxEXPAND, 5 );
259258

260259
dlgCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );

source/interface.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class MainFrame : public wxFrame
6666
wxButton* reloadInstalls;
6767
wxMenuBar* menubar;
6868
wxMenu* menuProject;
69+
wxMenuItem* menuReveal;
6970
wxMenu* menuWindow;
7071

7172
public:

source/interface_derived.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,22 @@ MainFrameDerived::MainFrameDerived() : MainFrame(NULL){
4848
for (string& str : cols){
4949
projectsList->AppendColumn(str,wxLIST_FORMAT_CENTER);
5050
}
51+
52+
installsList->AppendColumn("", wxLIST_FORMAT_CENTER, wxLIST_AUTOSIZE_USEHEADER);
53+
installsPathsList->AppendColumn("", wxLIST_FORMAT_CENTER, wxLIST_AUTOSIZE_USEHEADER);
5154
}
5255
//make the data folder if it does not already exist (with readwrite for all groups)
5356
#if defined __APPLE__ || defined __linux__
5457
int status = mkdir(datapath.c_str(),S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
58+
menuReveal->SetItemLabel("Reveal In Finder\tCtrl-R");
5559
#elif defined _WIN32
5660
int status = mkdir(datapath.c_str());
5761
//on windows also make the main window background white
5862
this->SetBackgroundColour(*wxWHITE);
5963
//high DPI scaling fixes
6064
dpi_scale(this);
65+
//set reveal label
66+
menuReveal->SetItemLabel("Reveal In File Explorer\tCtrl-R");
6167
#endif
6268
if (status != 0){
6369
ReloadData();
@@ -172,6 +178,7 @@ void MainFrameDerived::LoadEditorPath(const string& path){
172178

173179
//add to the UI
174180
wxListItem i;
181+
i.SetColumn(0);
175182
i.SetId(0);
176183
i.SetText(path);
177184

source/open_with_dlg.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ OpenWithDlg::OpenWithDlg(wxWindow* parent, const project& project, const vector<
1818
//fix window size
1919
fitWindowMinSize(this);
2020

21+
//add column
22+
editorsListCtrl->AppendColumn("", wxLIST_FORMAT_CENTER, wxLIST_AUTOSIZE_USEHEADER);
23+
2124
//populate list ctrl in reverse so ids match
2225
for (long x = versions.size()-1; x >= 0; x--){
2326
editor e = versions[x];
2427
wxListItem i;
2528
i.SetId(0);
29+
i.SetColumn(0);
2630
string label = e.name + " - " + e.path;
2731
i.SetText(label);
2832

windows.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,12 @@
166166
<ClCompile Include="source\interface.cpp" />
167167
<ClCompile Include="source\interface_derived.cpp" />
168168
<ClCompile Include="source\main.cpp" />
169+
<ClCompile Include="source\open_with_dlg.cpp" />
169170
</ItemGroup>
170171
<ItemGroup>
171172
<ClInclude Include="resource.h" />
172173
<ClInclude Include="source\dirent.h" />
174+
<ClInclude Include="source\interface.h" />
173175
<ClInclude Include="source\interface_derived.hpp" />
174176
</ItemGroup>
175177
<ItemGroup>

windows.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
<ClCompile Include="source\create_dialog_derived.cpp">
3131
<Filter>Source Files</Filter>
3232
</ClCompile>
33+
<ClCompile Include="source\open_with_dlg.cpp">
34+
<Filter>Source Files</Filter>
35+
</ClCompile>
3336
</ItemGroup>
3437
<ItemGroup>
3538
<ClInclude Include="resource.h">
@@ -41,6 +44,9 @@
4144
<ClInclude Include="source\dirent.h">
4245
<Filter>Header Files</Filter>
4346
</ClInclude>
47+
<ClInclude Include="source\interface.h">
48+
<Filter>Header Files</Filter>
49+
</ClInclude>
4450
</ItemGroup>
4551
<ItemGroup>
4652
<ResourceCompile Include="windows.rc">

0 commit comments

Comments
 (0)