diff --git a/Makefile b/Makefile
index 87eb92d..8dd34e9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CXX = $(shell wx-config --cxx)
+CXX = $(shell wx-config --cxx) -Wno-c++11-compat-deprecated-writable-strings
TARGET = build/Tyro
LDLIBS = $(shell wx-config --libs all)
WX_CXXFLAGS = -I./src -static $(shell wx-config --cxxflags)
@@ -32,7 +32,7 @@ Tyro.app: all platform/osx/Info.plist
cp platform/osx/Info.plist Tyro.app/Contents/
echo -n 'APPL????' > Tyro.app/Contents/PkgInfo
cp build/Tyro Tyro.app/Contents/MacOS/Tyro
-# cp YourAppMacIcons.icns AnotherResource.txt Tyro.app/Contents/Resources/
+ cp platform/osx/tyro.icns Tyro.app/Contents/Resources/
clean:
rm -f *.o
diff --git a/README.md b/README.md
index 17abf73..157d232 100644
--- a/README.md
+++ b/README.md
@@ -11,4 +11,10 @@ A Cross-platform Code Editor
### Building
* Make sure wxWidgets is installed, version 2.8 or 3
-* Open the Code::Blocks project and compile
+
+#### Mac
+* run `make clean Tyro.app`
+
+#### Linux
+* use the Code::Blocks project to compile
+
diff --git a/platform/msw/tyro.ico b/platform/msw/tyro.ico
new file mode 100644
index 0000000..9372184
Binary files /dev/null and b/platform/msw/tyro.ico differ
diff --git a/platform/osx/Info.plist b/platform/osx/Info.plist
index cb5c366..c74b1ff 100644
--- a/platform/osx/Info.plist
+++ b/platform/osx/Info.plist
@@ -7,6 +7,6 @@
CFBundleName
Tyro
CFBundleIconFile
-
+ tyro.icns
diff --git a/platform/osx/tyro.icns b/platform/osx/tyro.icns
new file mode 100644
index 0000000..7a9832d
Binary files /dev/null and b/platform/osx/tyro.icns differ
diff --git a/src/DocFrame.h b/src/DocFrame.h
index 2372fae..1b98f81 100644
--- a/src/DocFrame.h
+++ b/src/DocFrame.h
@@ -1,9 +1,11 @@
#ifndef TYRODOC_FRAME_H
#define TYRODOC_FRAME_H
-#include "wx/wxprec.h"
+#ifdef WX_PRECOMP
+ #include "wx_pch.h"
+#endif
#ifndef WX_PRECOMP
- #include
+ #include
#endif
#include
diff --git a/src/Main.cpp b/src/Main.cpp
index c9505c5..33d96b4 100644
--- a/src/Main.cpp
+++ b/src/Main.cpp
@@ -28,7 +28,10 @@ MainFrame::MainFrame(wxFrame *frame, const wxString& title)
this->SetupMenu();
// create a status bar with some information about the used wxWidgets version
+ this->SetupStatusBar();
+ // create the main toolbar
+ this->SetupToolbar();
// Set up control layout
wxBoxSizer *base_sizer = new wxBoxSizer(wxVERTICAL);
@@ -53,7 +56,29 @@ void MainFrame::SetupStatusBar()
void MainFrame::SetupToolbar()
{
+ // Icon files
+ #include "../resources/xpm/48/file-empty.xpm"
+ #include "../resources/xpm/48/folder.xpm"
+ #include "../resources/xpm/48/floppy.xpm"
+ #include "../resources/xpm/48/wrench-screwdriver.xpm"
+ CreateToolBar(wxNO_BORDER | wxTB_FLAT | wxTB_HORIZONTAL);
+
+ wxToolBar *toolBar = GetToolBar();
+
+ wxBitmap bitmaps[4];
+
+ bitmaps[0] = wxBitmap(file_empty);
+ bitmaps[1] = wxBitmap(folder);
+ bitmaps[2] = wxBitmap(floppy);
+ bitmaps[3] = wxBitmap(wrench_screwdriver);
+
+ toolBar->AddTool(wxID_NEW, "New", bitmaps[0], "New file");
+ toolBar->AddTool(wxID_OPEN, "Open", bitmaps[1], "Open file");
+ toolBar->AddTool(wxID_SAVE, "Save", bitmaps[2], "Save file");
+ toolBar->AddSeparator();
+ toolBar->AddTool(wxID_ANY, "Settings", bitmaps[3], "Change Settings");
+ toolBar->Realize();
}
void MainFrame::SetupMenu()