diff --git a/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj b/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj
index 6caeef519..4c0c273c9 100644
--- a/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj
+++ b/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj
@@ -1836,18 +1836,34 @@
>
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
diff --git a/aegisub/src/audio_box.cpp b/aegisub/src/audio_box.cpp
index b007e6494..5a8f595ad 100644
--- a/aegisub/src/audio_box.cpp
+++ b/aegisub/src/audio_box.cpp
@@ -52,6 +52,8 @@
#include "hotkeys.h"
#include "tooltip_manager.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
+#include "libresrc/icons.h"
//#ifdef __WXMAC__
//#include "bevelButton.h"
@@ -99,7 +101,7 @@ wxPanel(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL|wxBORDER_RAISE
VolumeBar->SetValue(VerticalZoom->GetValue());
VolumeBar->Enable(false);
}
- VerticalLink = new ToggleBitmap(this,Audio_Vertical_Link,wxBitmap(toggle_audio_link_xpm));
+ VerticalLink = new ToggleBitmap(this,Audio_Vertical_Link,GETIMAGE(toggle_audio_link_24));
VerticalLink->SetToolTip(_("Link vertical zoom and volume sliders"));
VerticalLink->SetValue(link);
@@ -126,69 +128,69 @@ wxPanel(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL|wxBORDER_RAISE
// Buttons sizer
wxSizer *ButtonSizer = new wxBoxSizer(wxHORIZONTAL);
wxButton *temp;
- temp = new wxBitmapButton(this,Audio_Button_Prev,wxBitmap(button_prev_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Prev,GETIMAGE(button_prev_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Previous line or syllable (%KEY%/%KEY%)"),_T("Audio Prev Line"),_T("Audio Prev Line Alt"));
ButtonSizer->Add(temp,0,wxRIGHT,0);
- temp = new wxBitmapButton(this,Audio_Button_Next,wxBitmap(button_next_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Next,GETIMAGE(button_next_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Next line/syllable (%KEY%/%KEY%)"),_T("Audio Next Line"),_T("Audio Next Line Alt"));
ButtonSizer->Add(temp,0,wxRIGHT,0);
- temp = new wxBitmapButton(this,Audio_Button_Play,wxBitmap(button_playsel_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Play,GETIMAGE(button_playsel_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Play selection (%KEY%/%KEY%)"),_T("Audio Play"),_T("Audio Play Alt"));
ButtonSizer->Add(temp,0,wxRIGHT,0);
- temp = new wxBitmapButton(this,Audio_Button_Play_Row,wxBitmap(button_playline_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Play_Row,GETIMAGE(button_playline_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Play current line (%KEY%)"),_T("Audio Play Original Line"));
ButtonSizer->Add(temp,0,wxRIGHT,0);
- temp = new wxBitmapButton(this,Audio_Button_Stop,wxBitmap(button_stop_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Stop,GETIMAGE(button_stop_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Stop (%KEY%)"),_T("Audio Stop"));
ButtonSizer->Add(temp,0,wxRIGHT,10);
- temp = new wxBitmapButton(this,Audio_Button_Play_500ms_Before,wxBitmap(button_playfivehbefore_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Play_500ms_Before,GETIMAGE(button_playfivehbefore_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Play 500 ms before selection (%KEY%)"),_T("Audio Play 500ms Before"));
ButtonSizer->Add(temp,0,wxRIGHT,0);
- temp = new wxBitmapButton(this,Audio_Button_Play_500ms_After,wxBitmap(button_playfivehafter_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Play_500ms_After,GETIMAGE(button_playfivehafter_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Play 500 ms after selection (%KEY%)"),_T("Audio Play 500ms after"));
ButtonSizer->Add(temp,0,wxRIGHT,0);
- temp = new wxBitmapButton(this,Audio_Button_Play_500ms_First,wxBitmap(button_playfirstfiveh_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Play_500ms_First,GETIMAGE(button_playfirstfiveh_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Play first 500ms of selection (%KEY%)"),_T("Audio Play First 500ms"));
ButtonSizer->Add(temp,0,wxRIGHT,0);
- temp = new wxBitmapButton(this,Audio_Button_Play_500ms_Last,wxBitmap(button_playlastfiveh_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Play_500ms_Last,GETIMAGE(button_playlastfiveh_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Play last 500ms of selection (%KEY%)"),_T("Audio Play Last 500ms"));
ButtonSizer->Add(temp,0,wxRIGHT,0);
- temp = new wxBitmapButton(this,Audio_Button_Play_To_End,wxBitmap(button_playtoend_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Play_To_End,GETIMAGE(button_playtoend_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Play from selection start to end of file (%KEY%)"),_T("Audio Play To End"));
ButtonSizer->Add(temp,0,wxRIGHT,10);
- temp = new wxBitmapButton(this,Audio_Button_Leadin,wxBitmap(button_leadin_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Leadin,GETIMAGE(button_leadin_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Add lead in (%KEY%)"),_T("Audio Add Lead In"));
ButtonSizer->Add(temp,0,wxRIGHT,0);
- temp = new wxBitmapButton(this,Audio_Button_Leadout,wxBitmap(button_leadout_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Leadout,GETIMAGE(button_leadout_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Add lead out (%KEY%)"),_T("Audio Add Lead Out"));
ButtonSizer->Add(temp,0,wxRIGHT,10);
- temp = new wxBitmapButton(this,Audio_Button_Commit,wxBitmap(button_audio_commit_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Commit,GETIMAGE(button_audio_commit_24),wxDefaultPosition,wxSize(30,-1));
ToolTipManager::Bind(temp,_("Commit changes (%KEY%/%KEY%)"),_T("Audio Commit (Stay)"),_T("Audio Commit Alt"));
ButtonSizer->Add(temp,0,wxRIGHT,0);
- temp = new wxBitmapButton(this,Audio_Button_Goto,wxBitmap(button_audio_goto_xpm),wxDefaultPosition,wxSize(30,-1));
+ temp = new wxBitmapButton(this,Audio_Button_Goto,GETIMAGE(button_audio_goto_24),wxDefaultPosition,wxSize(30,-1));
temp->SetToolTip(_("Go to selection"));
ButtonSizer->Add(temp,0,wxRIGHT,10);
- AutoCommit = new ToggleBitmap(this,Audio_Check_AutoCommit,wxBitmap(toggle_audio_autocommit_xpm),wxSize(30,-1));
+ AutoCommit = new ToggleBitmap(this,Audio_Check_AutoCommit,GETIMAGE(toggle_audio_autocommit_24),wxSize(30,-1));
AutoCommit->SetToolTip(_("Automatically commit all changes"));
AutoCommit->SetValue(Options.AsBool(_T("Audio Autocommit")));
ButtonSizer->Add(AutoCommit,0,wxRIGHT | wxALIGN_CENTER | wxEXPAND,0);
- NextCommit = new ToggleBitmap(this,Audio_Check_NextCommit,wxBitmap(toggle_audio_nextcommit_xpm),wxSize(30,-1));
+ NextCommit = new ToggleBitmap(this,Audio_Check_NextCommit,GETIMAGE(toggle_audio_nextcommit_24),wxSize(30,-1));
NextCommit->SetToolTip(_("Auto goes to next line on commit"));
NextCommit->SetValue(Options.AsBool(_T("Audio Next Line on Commit")));
ButtonSizer->Add(NextCommit,0,wxRIGHT | wxALIGN_CENTER | wxEXPAND,0);
- AutoScroll = new ToggleBitmap(this,Audio_Check_AutoGoto,wxBitmap(toggle_audio_autoscroll_xpm),wxSize(30,-1));
+ AutoScroll = new ToggleBitmap(this,Audio_Check_AutoGoto,GETIMAGE(toggle_audio_autoscroll_24),wxSize(30,-1));
AutoScroll->SetToolTip(_("Auto scrolls audio display to selected line"));
AutoScroll->SetValue(Options.AsBool(_T("Audio Autoscroll")));
ButtonSizer->Add(AutoScroll,0,wxRIGHT | wxALIGN_CENTER | wxEXPAND,0);
- SpectrumMode = new ToggleBitmap(this,Audio_Check_Spectrum,wxBitmap(toggle_audio_spectrum_xpm),wxSize(30,-1));
+ SpectrumMode = new ToggleBitmap(this,Audio_Check_Spectrum,GETIMAGE(toggle_audio_spectrum_24),wxSize(30,-1));
SpectrumMode->SetToolTip(_("Spectrum analyzer mode"));
SpectrumMode->SetValue(Options.AsBool(_T("Audio Spectrum")));
ButtonSizer->Add(SpectrumMode,0,wxRIGHT | wxALIGN_CENTER | wxEXPAND,0);
- MedusaMode = new ToggleBitmap(this,Audio_Check_Medusa,wxBitmap(toggle_audio_medusa_xpm),wxSize(30,-1));
+ MedusaMode = new ToggleBitmap(this,Audio_Check_Medusa,GETIMAGE(toggle_audio_medusa_24),wxSize(30,-1));
MedusaMode->SetToolTip(_("Enable Medusa-Style Timing Shortcuts"));
MedusaMode->SetValue(Options.AsBool(_T("Audio Medusa Timing Hotkeys")));
ButtonSizer->Add(MedusaMode,0,wxRIGHT | wxALIGN_CENTER | wxEXPAND,0);
diff --git a/aegisub/src/dialog_about.cpp b/aegisub/src/dialog_about.cpp
index bbb503a2e..b602b6ac3 100644
--- a/aegisub/src/dialog_about.cpp
+++ b/aegisub/src/dialog_about.cpp
@@ -46,6 +46,7 @@
#include "version.h"
#include "options.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////////////
@@ -54,7 +55,7 @@ AboutScreen::AboutScreen(wxWindow *parent)
: wxDialog (parent, -1, _("About Aegisub"), wxDefaultPosition, wxSize(300,240), wxCAPTION | wxCLOSE_BOX , _("About Aegisub"))
{
// Get splash
- wxBitmap splash = wxBitmap(splash_xpm);
+ wxBitmap splash = GETIMAGE(splash_misc);
SetOwnBackgroundColour(wxColour(255,255,255));
SetForegroundColour(wxColour(0,0,0));
diff --git a/aegisub/src/dialog_attachments.cpp b/aegisub/src/dialog_attachments.cpp
index 36e8a29fd..eb77b08e5 100644
--- a/aegisub/src/dialog_attachments.cpp
+++ b/aegisub/src/dialog_attachments.cpp
@@ -51,6 +51,7 @@
#include "options.h"
#include "help_button.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////////////
@@ -59,7 +60,7 @@ DialogAttachments::DialogAttachments(wxWindow *parent)
: wxDialog(parent,-1,_("Attachment List"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE)
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(attach_button_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(attach_button_24)));
// List view
listView = new wxListView(this,ATTACHMENT_LIST,wxDefaultPosition,wxSize(500,200));
diff --git a/aegisub/src/dialog_automation.cpp b/aegisub/src/dialog_automation.cpp
index d9ad09467..2cf39f311 100644
--- a/aegisub/src/dialog_automation.cpp
+++ b/aegisub/src/dialog_automation.cpp
@@ -49,13 +49,14 @@
#include
#include
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
DialogAutomation::DialogAutomation(wxWindow *parent, Automation4::ScriptManager *_local_manager)
: wxDialog(parent, -1, _("Automation Manager"), wxDefaultPosition, wxDefaultSize)
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(automation_toolbutton_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(automation_toolbutton_24)));
local_manager = _local_manager;
global_manager = wxGetApp().global_scripts;
diff --git a/aegisub/src/dialog_colorpicker.cpp b/aegisub/src/dialog_colorpicker.cpp
index 08c3cc829..effebca97 100644
--- a/aegisub/src/dialog_colorpicker.cpp
+++ b/aegisub/src/dialog_colorpicker.cpp
@@ -54,6 +54,7 @@
#include "help_button.h"
#include "utils.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
#include
@@ -550,7 +551,7 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, wxColour initial_color)
recent_box = new ColorPickerRecent(this, SELECTOR_RECENT, 8, 4, 16);
#ifdef __WXMSW__
- eyedropper_bitmap = wxBitmap(eyedropper_tool_xpm);
+ eyedropper_bitmap = GETIMAGE(eyedropper_tool_24);
eyedropper_bitmap.SetMask(new wxMask(eyedropper_bitmap, wxColour(255, 0, 255)));
screen_dropper_icon = new wxStaticBitmap(this, SELECTOR_DROPPER, eyedropper_bitmap, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER);
screen_dropper = new ColorPickerScreenDropper(this, SELECTOR_DROPPER_PICK, 7, 7, 8, false);
diff --git a/aegisub/src/dialog_fonts_collector.cpp b/aegisub/src/dialog_fonts_collector.cpp
index d20e79588..07d0b666b 100644
--- a/aegisub/src/dialog_fonts_collector.cpp
+++ b/aegisub/src/dialog_fonts_collector.cpp
@@ -58,6 +58,7 @@
#include "help_button.h"
#include "scintilla_text_ctrl.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////
@@ -81,7 +82,7 @@ DialogFontsCollector::DialogFontsCollector(wxWindow *parent)
: wxDialog(parent,-1,_("Fonts Collector"),wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(font_collector_button_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(font_collector_button_24)));
// Parent
main = (FrameMain*) parent;
diff --git a/aegisub/src/dialog_jumpto.cpp b/aegisub/src/dialog_jumpto.cpp
index 6001b30eb..d51eca4fa 100644
--- a/aegisub/src/dialog_jumpto.cpp
+++ b/aegisub/src/dialog_jumpto.cpp
@@ -48,6 +48,7 @@
#include "video_context.h"
#include "utils.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////
@@ -64,7 +65,7 @@ DialogJumpTo::DialogJumpTo (wxWindow *parent)
: wxDialog(parent, -1, _("Jump to"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxWANTS_CHARS , _T("JumpTo"))
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(jumpto_button_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(jumpto_button_24)));
// Set initial values
ready = false;
diff --git a/aegisub/src/dialog_kanji_timer.cpp b/aegisub/src/dialog_kanji_timer.cpp
index 4deaa8357..c854d1690 100644
--- a/aegisub/src/dialog_kanji_timer.cpp
+++ b/aegisub/src/dialog_kanji_timer.cpp
@@ -53,6 +53,7 @@
#include "ass_karaoke.h"
#include
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
@@ -696,7 +697,7 @@ DialogKanjiTimer::DialogKanjiTimer(wxWindow *parent, SubtitlesGrid *_grid)
: wxDialog (parent,-1,_("Kanji timing"),wxDefaultPosition)
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(kanji_timer_button_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(kanji_timer_button_24)));
// Variables
subs = AssFile::top;
diff --git a/aegisub/src/dialog_options.cpp b/aegisub/src/dialog_options.cpp
index 0e28e37d3..d9ac9d398 100644
--- a/aegisub/src/dialog_options.cpp
+++ b/aegisub/src/dialog_options.cpp
@@ -67,6 +67,7 @@
#include "utils.h"
#include "help_button.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////
@@ -87,7 +88,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
: wxDialog(parent, -1, _("Options"), wxDefaultPosition, wxDefaultSize)
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(options_button_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(options_button_24)));
// Create book
book = new wxTreebook(this,-1,wxDefaultPosition,wxSize(400,300));
diff --git a/aegisub/src/dialog_properties.cpp b/aegisub/src/dialog_properties.cpp
index a7c8f8366..f486a82af 100644
--- a/aegisub/src/dialog_properties.cpp
+++ b/aegisub/src/dialog_properties.cpp
@@ -51,6 +51,7 @@
#include "utils.h"
#include "help_button.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////////////
@@ -59,7 +60,7 @@ DialogProperties::DialogProperties (wxWindow *parent)
: wxDialog(parent, -1, _("Script Properties"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(properties_toolbutton_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(properties_toolbutton_24)));
// Setup
AssFile *subs = AssFile::top;
diff --git a/aegisub/src/dialog_resample.cpp b/aegisub/src/dialog_resample.cpp
index f768fb8fa..83e09484a 100644
--- a/aegisub/src/dialog_resample.cpp
+++ b/aegisub/src/dialog_resample.cpp
@@ -50,6 +50,7 @@
#include "subs_edit_box.h"
#include "help_button.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////////////
@@ -58,7 +59,7 @@ DialogResample::DialogResample(wxWindow *parent, SubtitlesGrid *_grid)
: wxDialog (parent,-1,_("Resample resolution"),wxDefaultPosition)
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(resample_toolbutton_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(resample_toolbutton_24)));
// Variables
AssFile *subs = AssFile::top;
diff --git a/aegisub/src/dialog_shift_times.cpp b/aegisub/src/dialog_shift_times.cpp
index 6631eebc6..7bcdc358d 100644
--- a/aegisub/src/dialog_shift_times.cpp
+++ b/aegisub/src/dialog_shift_times.cpp
@@ -57,6 +57,7 @@
#include "help_button.h"
#include "charset_conv.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////////////
@@ -65,7 +66,7 @@ DialogShiftTimes::DialogShiftTimes (wxWindow *parent,SubtitlesGrid *_grid)
: wxDialog(parent, -1, _("Shift Times"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("JumpTo"))
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(shift_times_toolbutton_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(shift_times_toolbutton_24)));
// Set initial values
ready = true;
diff --git a/aegisub/src/dialog_spellchecker.cpp b/aegisub/src/dialog_spellchecker.cpp
index d0610d02c..adf3d1a48 100644
--- a/aegisub/src/dialog_spellchecker.cpp
+++ b/aegisub/src/dialog_spellchecker.cpp
@@ -49,6 +49,7 @@
#include "options.h"
#include "help_button.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////
@@ -70,7 +71,7 @@ DialogSpellChecker::DialogSpellChecker(wxFrame *parent)
: wxDialog(parent, -1, _("Spell Checker"), wxDefaultPosition, wxDefaultSize)
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(spellcheck_toolbutton_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(spellcheck_toolbutton_24)));
// Get spell checker
spellchecker = SpellCheckerFactoryManager::GetSpellChecker();
diff --git a/aegisub/src/dialog_splash.cpp b/aegisub/src/dialog_splash.cpp
index 4a77a785d..c8a43d2f5 100644
--- a/aegisub/src/dialog_splash.cpp
+++ b/aegisub/src/dialog_splash.cpp
@@ -45,6 +45,7 @@
#include "options.h"
#include "dialog_tip.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////////////
@@ -56,7 +57,7 @@ SplashScreen::SplashScreen(wxWindow *parent)
par = parent;
// Get splash
- splash = wxBitmap(splash_xpm);
+ splash = GETIMAGE(splash_misc);
#if wxUSE_DISPLAY == 1
// Center on current display
diff --git a/aegisub/src/dialog_style_editor.cpp b/aegisub/src/dialog_style_editor.cpp
index 6d17d8c48..5cb124d15 100644
--- a/aegisub/src/dialog_style_editor.cpp
+++ b/aegisub/src/dialog_style_editor.cpp
@@ -57,6 +57,7 @@
#include "ass_style_storage.h"
#include "help_button.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////
@@ -100,7 +101,7 @@ DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, Subtit
: wxDialog (parent,-1,_("Style Editor"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER,_T("DialogStyleEditor"))
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(style_toolbutton_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(style_toolbutton_24)));
// Set variables
isLocal = local;
diff --git a/aegisub/src/dialog_style_manager.cpp b/aegisub/src/dialog_style_manager.cpp
index 5d420cf3d..c968ba677 100644
--- a/aegisub/src/dialog_style_manager.cpp
+++ b/aegisub/src/dialog_style_manager.cpp
@@ -55,6 +55,7 @@
#include "utils.h"
#include "help_button.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////////////
@@ -63,7 +64,7 @@ DialogStyleManager::DialogStyleManager (wxWindow *parent,SubtitlesGrid *_grid)
: wxDialog (parent,-1,_("Styles Manager"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE,_T("DialogStylesManager"))
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(style_toolbutton_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(style_toolbutton_24)));
// Vars
grid = _grid;
@@ -92,11 +93,11 @@ DialogStyleManager::DialogStyleManager (wxWindow *parent,SubtitlesGrid *_grid)
StorageButtons->Add(StorageEdit,1,wxEXPAND | wxRIGHT,5);
StorageButtons->Add(StorageCopy,1,wxEXPAND | wxRIGHT,5);
StorageButtons->Add(StorageDelete,1,wxEXPAND | wxALL,0);
- StorageMoveUp = new wxBitmapButton(this, BUTTON_STORAGE_UP, wxBitmap(arrow_up_xpm));
- StorageMoveDown = new wxBitmapButton(this, BUTTON_STORAGE_DOWN, wxBitmap(arrow_down_xpm));
- StorageMoveTop = new wxBitmapButton(this, BUTTON_STORAGE_TOP, wxBitmap(arrow_up_stop_xpm));
- StorageMoveBottom = new wxBitmapButton(this, BUTTON_STORAGE_BOTTOM, wxBitmap(arrow_down_stop_xpm));
- StorageSort = new wxBitmapButton(this, BUTTON_STORAGE_SORT, wxBitmap(arrow_sort_xpm));
+ StorageMoveUp = new wxBitmapButton(this, BUTTON_STORAGE_UP, GETIMAGE(arrow_up_24));
+ StorageMoveDown = new wxBitmapButton(this, BUTTON_STORAGE_DOWN, GETIMAGE(arrow_down_24));
+ StorageMoveTop = new wxBitmapButton(this, BUTTON_STORAGE_TOP, GETIMAGE(arrow_up_stop_24));
+ StorageMoveBottom = new wxBitmapButton(this, BUTTON_STORAGE_BOTTOM, GETIMAGE(arrow_down_stop_24));
+ StorageSort = new wxBitmapButton(this, BUTTON_STORAGE_SORT, GETIMAGE(arrow_sort_24));
StorageMoveUp->SetToolTip(_("Move style up."));
StorageMoveDown->SetToolTip(_("Move style down."));
StorageMoveTop->SetToolTip(_("Move style to top."));
@@ -137,11 +138,11 @@ DialogStyleManager::DialogStyleManager (wxWindow *parent,SubtitlesGrid *_grid)
CurrentButtons->Add(CurrentEdit,1,wxEXPAND | wxRIGHT,5);
CurrentButtons->Add(CurrentCopy,1,wxEXPAND | wxRIGHT,5);
CurrentButtons->Add(CurrentDelete,1,wxEXPAND | wxALL,0);
- CurrentMoveUp = new wxBitmapButton(this, BUTTON_CURRENT_UP, wxBitmap(arrow_up_xpm));
- CurrentMoveDown = new wxBitmapButton(this, BUTTON_CURRENT_DOWN, wxBitmap(arrow_down_xpm));
- CurrentMoveTop = new wxBitmapButton(this, BUTTON_CURRENT_TOP, wxBitmap(arrow_up_stop_xpm));
- CurrentMoveBottom = new wxBitmapButton(this, BUTTON_CURRENT_BOTTOM, wxBitmap(arrow_down_stop_xpm));
- CurrentSort = new wxBitmapButton(this, BUTTON_CURRENT_SORT, wxBitmap(arrow_sort_xpm));
+ CurrentMoveUp = new wxBitmapButton(this, BUTTON_CURRENT_UP, GETIMAGE(arrow_up_24));
+ CurrentMoveDown = new wxBitmapButton(this, BUTTON_CURRENT_DOWN, GETIMAGE(arrow_down_24));
+ CurrentMoveTop = new wxBitmapButton(this, BUTTON_CURRENT_TOP, GETIMAGE(arrow_up_stop_24));
+ CurrentMoveBottom = new wxBitmapButton(this, BUTTON_CURRENT_BOTTOM, GETIMAGE(arrow_down_stop_24));
+ CurrentSort = new wxBitmapButton(this, BUTTON_CURRENT_SORT, GETIMAGE(arrow_sort_24));
CurrentMoveUp->SetToolTip(_("Move style up."));
CurrentMoveDown->SetToolTip(_("Move style down."));
CurrentMoveTop->SetToolTip(_("Move style to top."));
diff --git a/aegisub/src/dialog_styling_assistant.cpp b/aegisub/src/dialog_styling_assistant.cpp
index e1615dffb..472f26062 100644
--- a/aegisub/src/dialog_styling_assistant.cpp
+++ b/aegisub/src/dialog_styling_assistant.cpp
@@ -55,6 +55,7 @@
#include "help_button.h"
#include "subs_edit_box.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////////////
@@ -63,7 +64,7 @@ DialogStyling::DialogStyling (wxWindow *parent,SubtitlesGrid *_grid) :
wxDialog (parent, -1, _("Styling assistant"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMINIMIZE_BOX)
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(styling_toolbutton_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(styling_toolbutton_24)));
// Variables
grid = _grid;
diff --git a/aegisub/src/dialog_timing_processor.cpp b/aegisub/src/dialog_timing_processor.cpp
index 529f6cd16..3866d4c7a 100644
--- a/aegisub/src/dialog_timing_processor.cpp
+++ b/aegisub/src/dialog_timing_processor.cpp
@@ -50,6 +50,7 @@
#include "utils.h"
#include "help_button.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////////////
@@ -58,7 +59,7 @@ DialogTimingProcessor::DialogTimingProcessor(wxWindow *parent,SubtitlesGrid *_gr
: wxDialog(parent,-1,_("Timing Post-Processor"),wxDefaultPosition,wxSize(400,250),wxDEFAULT_DIALOG_STYLE)
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(timing_processor_toolbutton_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(timing_processor_toolbutton_24)));
// Set variables
grid = _grid;
diff --git a/aegisub/src/dialog_translation.cpp b/aegisub/src/dialog_translation.cpp
index 6b7bb3e41..033dbe9f5 100644
--- a/aegisub/src/dialog_translation.cpp
+++ b/aegisub/src/dialog_translation.cpp
@@ -54,6 +54,7 @@
#include "utils.h"
#include "help_button.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////////////
@@ -62,7 +63,7 @@ DialogTranslation::DialogTranslation (wxWindow *parent,AssFile *_subs,SubtitlesG
: wxDialog(parent, -1, _("Translation Assistant"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMINIMIZE_BOX, _T("TranslationAssistant"))
{
// Set icon
- SetIcon(BitmapToIcon(wxBitmap(translation_toolbutton_xpm)));
+ SetIcon(BitmapToIcon(GETIMAGE(translation_toolbutton_24)));
// Set variables
enablePreview = preview;
diff --git a/aegisub/src/frame_main.cpp b/aegisub/src/frame_main.cpp
index 7148bd0dd..276686c8c 100644
--- a/aegisub/src/frame_main.cpp
+++ b/aegisub/src/frame_main.cpp
@@ -82,6 +82,7 @@
#endif
#include "charset_conv.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
@@ -236,15 +237,15 @@ void FrameMain::InitToolbar () {
Toolbar = CreateToolBar(wxTB_FLAT | wxTB_HORIZONTAL,-1,_T("Toolbar"));
// Subtitle control buttons
- Toolbar->AddTool(Menu_File_New_Subtitles,_("New"),wxBitmap(new_toolbutton_xpm),_("New subtitles"));
- Toolbar->AddTool(Menu_File_Open_Subtitles,_("Open"),wxBitmap(open_toolbutton_xpm),_("Open subtitles"));
- Toolbar->AddTool(Menu_File_Save_Subtitles,_("Save"),wxBitmap(save_toolbutton_xpm),_("Save subtitles"));
+ Toolbar->AddTool(Menu_File_New_Subtitles,_("New"),GETIMAGE(new_toolbutton_24),_("New subtitles"));
+ Toolbar->AddTool(Menu_File_Open_Subtitles,_("Open"),GETIMAGE(open_toolbutton_24),_("Open subtitles"));
+ Toolbar->AddTool(Menu_File_Save_Subtitles,_("Save"),GETIMAGE(save_toolbutton_24),_("Save subtitles"));
Toolbar->AddSeparator();
// Video zoom controls
- Toolbar->AddTool(Menu_Video_JumpTo,_("Jump To..."),wxBitmap(jumpto_button_xpm),wxNullBitmap,wxITEM_NORMAL,_("Jump video to time/frame"));
- Toolbar->AddTool(Menu_Video_Zoom_In,_("Zoom in"),wxBitmap(zoom_in_button_xpm),wxNullBitmap,wxITEM_NORMAL,_("Zoom video in"));
- Toolbar->AddTool(Menu_Video_Zoom_Out,_("Zoom out"),wxBitmap(zoom_out_button_xpm),wxNullBitmap,wxITEM_NORMAL,_("Zoom video out"));
+ Toolbar->AddTool(Menu_Video_JumpTo,_("Jump To..."),GETIMAGE(jumpto_button_24),wxNullBitmap,wxITEM_NORMAL,_("Jump video to time/frame"));
+ Toolbar->AddTool(Menu_Video_Zoom_In,_("Zoom in"),GETIMAGE(zoom_in_button_24),wxNullBitmap,wxITEM_NORMAL,_("Zoom video in"));
+ Toolbar->AddTool(Menu_Video_Zoom_Out,_("Zoom out"),GETIMAGE(zoom_out_button_24),wxNullBitmap,wxITEM_NORMAL,_("Zoom video out"));
wxArrayString choices;
for (int i=1;i<=16;i++) {
wxString toAdd = wxString::Format(_T("%i"),int(i*12.5));
@@ -257,45 +258,45 @@ void FrameMain::InitToolbar () {
Toolbar->AddSeparator();
// More video buttons
- Toolbar->AddTool(Menu_Subs_Snap_Video_To_Start,_("Jump video to start"),wxBitmap(video_to_substart_xpm),_("Jumps the video to the start frame of current subtitle"));
- Toolbar->AddTool(Menu_Subs_Snap_Video_To_End,_("Jump video to end"),wxBitmap(video_to_subend_xpm),_("Jumps the video to the end frame of current subtitle"));
- Toolbar->AddTool(Menu_Subs_Snap_Start_To_Video,_("Snap start to video"),wxBitmap(substart_to_video_xpm),_("Set start of selected subtitles to current video frame"));
- Toolbar->AddTool(Menu_Subs_Snap_End_To_Video,_("Snap end to video"),wxBitmap(subend_to_video_xpm),_("Set end of selected subtitles to current video frame"));
- Toolbar->AddTool(Menu_Video_Select_Visible,_("Select visible"),wxBitmap(select_visible_button_xpm),_("Selects all lines that are currently visible on video frame"));
- Toolbar->AddTool(Menu_Video_Snap_To_Scene,_("Snap subtitles to scene"),wxBitmap(snap_subs_to_scene_xpm),_("Snap selected subtitles so they match current scene start/end"));
- Toolbar->AddTool(Menu_Video_Shift_To_Frame,_("Shift subtitles to frame"),wxBitmap(shift_to_frame_xpm),_("Shift selected subtitles so first selected starts at this frame"));
+ Toolbar->AddTool(Menu_Subs_Snap_Video_To_Start,_("Jump video to start"),GETIMAGE(video_to_substart_24),_("Jumps the video to the start frame of current subtitle"));
+ Toolbar->AddTool(Menu_Subs_Snap_Video_To_End,_("Jump video to end"),GETIMAGE(video_to_subend_24),_("Jumps the video to the end frame of current subtitle"));
+ Toolbar->AddTool(Menu_Subs_Snap_Start_To_Video,_("Snap start to video"),GETIMAGE(substart_to_video_24),_("Set start of selected subtitles to current video frame"));
+ Toolbar->AddTool(Menu_Subs_Snap_End_To_Video,_("Snap end to video"),GETIMAGE(subend_to_video_24),_("Set end of selected subtitles to current video frame"));
+ Toolbar->AddTool(Menu_Video_Select_Visible,_("Select visible"),GETIMAGE(select_visible_button_24),_("Selects all lines that are currently visible on video frame"));
+ Toolbar->AddTool(Menu_Video_Snap_To_Scene,_("Snap subtitles to scene"),GETIMAGE(snap_subs_to_scene_24),_("Snap selected subtitles so they match current scene start/end"));
+ Toolbar->AddTool(Menu_Video_Shift_To_Frame,_("Shift subtitles to frame"),GETIMAGE(shift_to_frame_24),_("Shift selected subtitles so first selected starts at this frame"));
Toolbar->AddSeparator();
// Property stuff
- Toolbar->AddTool(Menu_Tools_Styles_Manager,_("Styles Manager"),wxBitmap(style_toolbutton_xpm),_("Open Styles Manager"));
- Toolbar->AddTool(Menu_Tools_Properties,_("Properties"),wxBitmap(properties_toolbutton_xpm),_("Open Properties"));
- Toolbar->AddTool(Menu_Tools_Attachments,_("Attachments"),wxBitmap(attach_button_xpm),_("Open Attachment List"));
- Toolbar->AddTool(Menu_Tools_Fonts_Collector,_("Fonts Collector"),wxBitmap(font_collector_button_xpm),_("Open Fonts Collector"));
+ Toolbar->AddTool(Menu_Tools_Styles_Manager,_("Styles Manager"),GETIMAGE(style_toolbutton_24),_("Open Styles Manager"));
+ Toolbar->AddTool(Menu_Tools_Properties,_("Properties"),GETIMAGE(properties_toolbutton_24),_("Open Properties"));
+ Toolbar->AddTool(Menu_Tools_Attachments,_("Attachments"),GETIMAGE(attach_button_24),_("Open Attachment List"));
+ Toolbar->AddTool(Menu_Tools_Fonts_Collector,_("Fonts Collector"),GETIMAGE(font_collector_button_24),_("Open Fonts Collector"));
Toolbar->AddSeparator();
// Automation
#ifdef WITH_AUTOMATION
- Toolbar->AddTool(Menu_Tools_Automation,_("Automation"),wxBitmap(automation_toolbutton_xpm),_("Open Automation manager"));
+ Toolbar->AddTool(Menu_Tools_Automation,_("Automation"),GETIMAGE(automation_toolbutton_24),_("Open Automation manager"));
Toolbar->AddSeparator();
#endif
// Tools
if (HasASSDraw()) {
- Toolbar->AddTool(Menu_Tools_ASSDraw,_T("ASSDraw3"),wxBitmap(assdraw_xpm),_("Launches ai-chan's \"ASSDraw3\" tool for vector drawing."));
+ Toolbar->AddTool(Menu_Tools_ASSDraw,_T("ASSDraw3"),GETIMAGE(assdraw_24),_("Launches ai-chan's \"ASSDraw3\" tool for vector drawing."));
Toolbar->AddSeparator();
}
- Toolbar->AddTool(Menu_Edit_Shift,_("Shift Times"),wxBitmap(shift_times_toolbutton_xpm),_("Open Shift Times Dialogue"));
- Toolbar->AddTool(Menu_Tools_Styling,_("Styling Assistant"),wxBitmap(styling_toolbutton_xpm),_("Open Styling Assistant"));
- Toolbar->AddTool(Menu_Tools_Translation,_("Translation Assistant"),wxBitmap(translation_toolbutton_xpm),_("Open Translation Assistant"));
- Toolbar->AddTool(Menu_Tools_Resample,_("Resample"),wxBitmap(resample_toolbutton_xpm),_("Resample Script Resolution"));
- Toolbar->AddTool(Menu_Tools_Timing_Processor,_("Timing Post-Processor"),wxBitmap(timing_processor_toolbutton_xpm),_("Open Timing Post-processor dialog"));
- Toolbar->AddTool(Menu_Tools_Kanji_Timer,_("Kanji Timer"),wxBitmap(kanji_timer_button_xpm),_("Open Kanji Timer dialog"));
- Toolbar->AddTool(Menu_Tools_SpellCheck,_("Spell Checker"),wxBitmap(spellcheck_toolbutton_xpm),_("Open Spell checker"));
+ Toolbar->AddTool(Menu_Edit_Shift,_("Shift Times"),GETIMAGE(shift_times_toolbutton_24),_("Open Shift Times Dialogue"));
+ Toolbar->AddTool(Menu_Tools_Styling,_("Styling Assistant"),GETIMAGE(styling_toolbutton_24),_("Open Styling Assistant"));
+ Toolbar->AddTool(Menu_Tools_Translation,_("Translation Assistant"),GETIMAGE(translation_toolbutton_24),_("Open Translation Assistant"));
+ Toolbar->AddTool(Menu_Tools_Resample,_("Resample"),GETIMAGE(resample_toolbutton_24),_("Resample Script Resolution"));
+ Toolbar->AddTool(Menu_Tools_Timing_Processor,_("Timing Post-Processor"),GETIMAGE(timing_processor_toolbutton_24),_("Open Timing Post-processor dialog"));
+ Toolbar->AddTool(Menu_Tools_Kanji_Timer,_("Kanji Timer"),GETIMAGE(kanji_timer_button_24),_("Open Kanji Timer dialog"));
+ Toolbar->AddTool(Menu_Tools_SpellCheck,_("Spell Checker"),GETIMAGE(spellcheck_toolbutton_24),_("Open Spell checker"));
Toolbar->AddSeparator();
// Options
- Toolbar->AddTool(Menu_Tools_Options,_("Options"),wxBitmap(options_button_xpm),_("Configure Aegisub"));
- Toolbar->AddTool(Grid_Toggle_Tags,_("Cycle Tag Hidding Mode"),wxBitmap(toggle_tag_hiding_xpm),_("Cycle through tag-hiding modes"));
+ Toolbar->AddTool(Menu_Tools_Options,_("Options"),GETIMAGE(options_button_24),_("Configure Aegisub"));
+ Toolbar->AddTool(Grid_Toggle_Tags,_("Cycle Tag Hidding Mode"),GETIMAGE(toggle_tag_hiding_24),_("Cycle through tag-hiding modes"));
// Update
Toolbar->Realize();
@@ -335,43 +336,43 @@ void FrameMain::InitMenu() {
// Create file menu
fileMenu = new wxMenu();
- AppendBitmapMenuItem(fileMenu,Menu_File_New_Subtitles, MakeHotkeyText(_("&New Subtitles"), _T("New Subtitles")), _("New subtitles"),wxBitmap(new_toolbutton_xpm));
- AppendBitmapMenuItem(fileMenu,Menu_File_Open_Subtitles, MakeHotkeyText(_("&Open Subtitles..."), _T("Open Subtitles")), _("Opens a subtitles file"),wxBitmap(open_toolbutton_xpm));
- AppendBitmapMenuItem(fileMenu,Menu_File_Open_Subtitles_Charset, _("&Open Subtitles with Charset..."), _("Opens a subtitles file with a specific charset"),wxBitmap(open_with_toolbutton_xpm));
- AppendBitmapMenuItem(fileMenu,Menu_File_Save_Subtitles, MakeHotkeyText(_("&Save Subtitles"), _T("Save Subtitles")), _("Saves subtitles"),wxBitmap(save_toolbutton_xpm));
- AppendBitmapMenuItem(fileMenu,Menu_File_Save_Subtitles_As, _("Save Subtitles as..."), _("Saves subtitles with another name"), wxBitmap(save_as_toolbutton_xpm));
- AppendBitmapMenuItem(fileMenu,Menu_File_Export_Subtitles, _("Export Subtitles..."), _("Saves a copy of subtitles with processing applied to it."), wxBitmap(blank_button_xpm));
+ AppendBitmapMenuItem(fileMenu,Menu_File_New_Subtitles, MakeHotkeyText(_("&New Subtitles"), _T("New Subtitles")), _("New subtitles"),GETIMAGE(new_toolbutton_16));
+ AppendBitmapMenuItem(fileMenu,Menu_File_Open_Subtitles, MakeHotkeyText(_("&Open Subtitles..."), _T("Open Subtitles")), _("Opens a subtitles file"),GETIMAGE(open_toolbutton_16));
+ AppendBitmapMenuItem(fileMenu,Menu_File_Open_Subtitles_Charset, _("&Open Subtitles with Charset..."), _("Opens a subtitles file with a specific charset"),GETIMAGE(open_with_toolbutton_16));
+ AppendBitmapMenuItem(fileMenu,Menu_File_Save_Subtitles, MakeHotkeyText(_("&Save Subtitles"), _T("Save Subtitles")), _("Saves subtitles"),GETIMAGE(save_toolbutton_16));
+ AppendBitmapMenuItem(fileMenu,Menu_File_Save_Subtitles_As, _("Save Subtitles as..."), _("Saves subtitles with another name"), GETIMAGE(save_as_toolbutton_16));
+ AppendBitmapMenuItem(fileMenu,Menu_File_Export_Subtitles, _("Export Subtitles..."), _("Saves a copy of subtitles with processing applied to it."), GETIMAGE(blank_button_16));
wxMenuItem *RecentParent = new wxMenuItem(fileMenu, Menu_File_Recent_Subs_Parent, _("Recent"), _T(""), wxITEM_NORMAL, RecentSubs);
#ifndef __APPLE__
- RecentParent->SetBitmap(wxBitmap(blank_button_xpm));
+ RecentParent->SetBitmap(GETIMAGE(blank_button_16));
#endif
fileMenu->Append(RecentParent);
fileMenu->AppendSeparator();
- AppendBitmapMenuItem (fileMenu,Menu_Tools_Properties, _("&Properties..."), _("Open script properties window"),wxBitmap(properties_toolbutton_xpm));
- AppendBitmapMenuItem (fileMenu,Menu_Tools_Attachments, _("&Attachments..."), _("Open the attachment list"), wxBitmap(attach_button_xpm));
- AppendBitmapMenuItem (fileMenu,Menu_Tools_Fonts_Collector, _("&Fonts Collector..."),_("Open fonts collector"), wxBitmap(font_collector_button_xpm));
+ AppendBitmapMenuItem (fileMenu,Menu_Tools_Properties, _("&Properties..."), _("Open script properties window"),GETIMAGE(properties_toolbutton_16));
+ AppendBitmapMenuItem (fileMenu,Menu_Tools_Attachments, _("&Attachments..."), _("Open the attachment list"), GETIMAGE(attach_button_16));
+ AppendBitmapMenuItem (fileMenu,Menu_Tools_Fonts_Collector, _("&Fonts Collector..."),_("Open fonts collector"), GETIMAGE(font_collector_button_16));
fileMenu->AppendSeparator();
#ifndef __APPLE__
// Doesn't work on Mac, only one instance is ever allowed there from OS side
- AppendBitmapMenuItem(fileMenu,Menu_File_New_Window, _("New Window"), _("Open a new application window"),wxBitmap(blank_button_xpm));
+ AppendBitmapMenuItem(fileMenu,Menu_File_New_Window, _("New Window"), _("Open a new application window"),GETIMAGE(blank_button_16));
#endif
- AppendBitmapMenuItem(fileMenu,Menu_File_Exit, MakeHotkeyText(_("E&xit"), _T("Exit")), _("Exit the application"),wxBitmap(exit_button_xpm));
+ AppendBitmapMenuItem(fileMenu,Menu_File_Exit, MakeHotkeyText(_("E&xit"), _T("Exit")), _("Exit the application"),GETIMAGE(exit_button_16));
MenuBar->Append(fileMenu, _("&File"));
// Create Edit menu
// NOTE: Undo and Redo are actually controlled in frame_main_events, OnMenuOpen(). They will always be the first two items.
editMenu = new wxMenu();
- AppendBitmapMenuItem(editMenu,Menu_Edit_Undo, MakeHotkeyText(_("&Undo"), _T("Undo")), _("Undoes last action"),wxBitmap(undo_button_xpm));
- AppendBitmapMenuItem(editMenu,Menu_Edit_Redo, MakeHotkeyText(_("&Redo"), _T("Redo")), _("Redoes last action"),wxBitmap(redo_button_xpm));
+ AppendBitmapMenuItem(editMenu,Menu_Edit_Undo, MakeHotkeyText(_("&Undo"), _T("Undo")), _("Undoes last action"),GETIMAGE(undo_button_16));
+ AppendBitmapMenuItem(editMenu,Menu_Edit_Redo, MakeHotkeyText(_("&Redo"), _T("Redo")), _("Redoes last action"),GETIMAGE(redo_button_16));
editMenu->AppendSeparator();
- AppendBitmapMenuItem(editMenu,Menu_Edit_Cut, MakeHotkeyText(_("Cut Lines"), _T("Cut")), _("Cut subtitles"), wxBitmap(cut_button_xpm));
- AppendBitmapMenuItem(editMenu,Menu_Edit_Copy, MakeHotkeyText(_("Copy Lines"), _T("Copy")), _("Copy subtitles"), wxBitmap(copy_button_xpm));
- AppendBitmapMenuItem(editMenu,Menu_Edit_Paste, MakeHotkeyText(_("Paste Lines"), _T("Paste")), _("Paste subtitles"), wxBitmap(paste_button_xpm));
- AppendBitmapMenuItem(editMenu,Menu_Edit_Paste_Over, MakeHotkeyText(_("Paste Lines Over..."), _T("Paste Over")) , _("Paste subtitles over others"),wxBitmap(paste_over_button_xpm));
+ AppendBitmapMenuItem(editMenu,Menu_Edit_Cut, MakeHotkeyText(_("Cut Lines"), _T("Cut")), _("Cut subtitles"), GETIMAGE(cut_button_16));
+ AppendBitmapMenuItem(editMenu,Menu_Edit_Copy, MakeHotkeyText(_("Copy Lines"), _T("Copy")), _("Copy subtitles"), GETIMAGE(copy_button_16));
+ AppendBitmapMenuItem(editMenu,Menu_Edit_Paste, MakeHotkeyText(_("Paste Lines"), _T("Paste")), _("Paste subtitles"), GETIMAGE(paste_button_16));
+ AppendBitmapMenuItem(editMenu,Menu_Edit_Paste_Over, MakeHotkeyText(_("Paste Lines Over..."), _T("Paste Over")) , _("Paste subtitles over others"),GETIMAGE(paste_over_button_16));
editMenu->AppendSeparator();
- AppendBitmapMenuItem(editMenu,Menu_Edit_Find, MakeHotkeyText(_("&Find..."), _T("Find")), _("Find words in subtitles"),wxBitmap(find_button_xpm));
- AppendBitmapMenuItem(editMenu,Menu_Edit_Find_Next, MakeHotkeyText(_("Find Next"), _T("Find Next")), _("Find next match of last word"),wxBitmap(find_next_button_xpm));
- AppendBitmapMenuItem(editMenu,Menu_Edit_Replace, MakeHotkeyText(_("Search and &Replace..."), _T("Replace")) , _("Find and replace words in subtitles"),wxBitmap(replace_button_xpm));
+ AppendBitmapMenuItem(editMenu,Menu_Edit_Find, MakeHotkeyText(_("&Find..."), _T("Find")), _("Find words in subtitles"),GETIMAGE(find_button_16));
+ AppendBitmapMenuItem(editMenu,Menu_Edit_Find_Next, MakeHotkeyText(_("Find Next"), _T("Find Next")), _("Find next match of last word"),GETIMAGE(find_next_button_16));
+ AppendBitmapMenuItem(editMenu,Menu_Edit_Replace, MakeHotkeyText(_("Search and &Replace..."), _T("Replace")) , _("Find and replace words in subtitles"),GETIMAGE(replace_button_16));
MenuBar->Append(editMenu, _("&Edit"));
// Create subtitles menu
@@ -379,62 +380,62 @@ void FrameMain::InitMenu() {
wxMenu *InsertMenu = new wxMenu;
wxMenuItem *InsertParent = new wxMenuItem(subtitlesMenu,Menu_Subtitles_Insert,_("&Insert Lines"),_T(""),wxITEM_NORMAL,InsertMenu);
#ifndef __APPLE__
- InsertParent->SetBitmap(wxBitmap(blank_button_xpm));
+ InsertParent->SetBitmap(GETIMAGE(blank_button_16));
#endif
- AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Styles_Manager, _("&Styles Manager..."), _("Open styles manager"), wxBitmap(style_toolbutton_xpm));
- AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Styling, _("St&yling Assistant..."), _("Open styling assistant"), wxBitmap(styling_toolbutton_xpm));
- AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Translation, _("&Translation Assistant..."),_("Open translation assistant"), wxBitmap(translation_toolbutton_xpm));
- AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Resample,_("Resample Resolution..."), _("Changes resolution and modifies subtitles to conform to change"), wxBitmap(resample_toolbutton_xpm));
- AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_SpellCheck, _("Spe&ll Checker..."),_("Open spell checker"), wxBitmap(spellcheck_toolbutton_xpm));
+ AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Styles_Manager, _("&Styles Manager..."), _("Open styles manager"), GETIMAGE(style_toolbutton_16));
+ AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Styling, _("St&yling Assistant..."), _("Open styling assistant"), GETIMAGE(styling_toolbutton_16));
+ AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Translation, _("&Translation Assistant..."),_("Open translation assistant"), GETIMAGE(translation_toolbutton_16));
+ AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Resample,_("Resample Resolution..."), _("Changes resolution and modifies subtitles to conform to change"), GETIMAGE(resample_toolbutton_16));
+ AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_SpellCheck, _("Spe&ll Checker..."),_("Open spell checker"), GETIMAGE(spellcheck_toolbutton_16));
if (HasASSDraw()) {
subtitlesMenu->AppendSeparator();
- AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_ASSDraw,_T("ASSDraw3..."),_("Launches ai-chan's \"ASSDraw3\" tool for vector drawing."), wxBitmap(assdraw_xpm));
+ AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_ASSDraw,_T("ASSDraw3..."),_("Launches ai-chan's \"ASSDraw3\" tool for vector drawing."), GETIMAGE(assdraw_16));
}
subtitlesMenu->AppendSeparator();
- AppendBitmapMenuItem(InsertMenu,MENU_INSERT_BEFORE,_("&Before Current"),_("Inserts a line before current"),wxBitmap(blank_button_xpm));
- AppendBitmapMenuItem(InsertMenu,MENU_INSERT_AFTER,_("&After Current"),_("Inserts a line after current"),wxBitmap(blank_button_xpm));
- AppendBitmapMenuItem(InsertMenu,MENU_INSERT_BEFORE_VIDEO,_("Before Current, at Video Time"),_("Inserts a line before current, starting at video time"),wxBitmap(blank_button_xpm));
- AppendBitmapMenuItem(InsertMenu,MENU_INSERT_AFTER_VIDEO,_("After Current, at Video Time"),_("Inserts a line after current, starting at video time"),wxBitmap(blank_button_xpm));
+ AppendBitmapMenuItem(InsertMenu,MENU_INSERT_BEFORE,_("&Before Current"),_("Inserts a line before current"),GETIMAGE(blank_button_16));
+ AppendBitmapMenuItem(InsertMenu,MENU_INSERT_AFTER,_("&After Current"),_("Inserts a line after current"),GETIMAGE(blank_button_16));
+ AppendBitmapMenuItem(InsertMenu,MENU_INSERT_BEFORE_VIDEO,_("Before Current, at Video Time"),_("Inserts a line before current, starting at video time"),GETIMAGE(blank_button_16));
+ AppendBitmapMenuItem(InsertMenu,MENU_INSERT_AFTER_VIDEO,_("After Current, at Video Time"),_("Inserts a line after current, starting at video time"),GETIMAGE(blank_button_16));
subtitlesMenu->Append(InsertParent);
- AppendBitmapMenuItem(subtitlesMenu,MENU_DUPLICATE,MakeHotkeyText(_("&Duplicate Lines"), _T("Grid duplicate rows")),_("Duplicate the selected lines"),wxBitmap(blank_button_xpm));
- AppendBitmapMenuItem(subtitlesMenu,MENU_DUPLICATE_NEXT_FRAME,MakeHotkeyText(_("&Duplicate and Shift by 1 Frame"), _T("Grid duplicate and shift one frame")),_("Duplicate lines and shift by one frame"),wxBitmap(blank_button_xpm));
- AppendBitmapMenuItem(subtitlesMenu,MENU_DELETE,MakeHotkeyText(_("Delete Lines"), _T("Grid delete rows")),_("Delete currently selected lines"),wxBitmap(delete_button_xpm));
+ AppendBitmapMenuItem(subtitlesMenu,MENU_DUPLICATE,MakeHotkeyText(_("&Duplicate Lines"), _T("Grid duplicate rows")),_("Duplicate the selected lines"),GETIMAGE(blank_button_16));
+ AppendBitmapMenuItem(subtitlesMenu,MENU_DUPLICATE_NEXT_FRAME,MakeHotkeyText(_("&Duplicate and Shift by 1 Frame"), _T("Grid duplicate and shift one frame")),_("Duplicate lines and shift by one frame"),GETIMAGE(blank_button_16));
+ AppendBitmapMenuItem(subtitlesMenu,MENU_DELETE,MakeHotkeyText(_("Delete Lines"), _T("Grid delete rows")),_("Delete currently selected lines"),GETIMAGE(delete_button_16));
subtitlesMenu->AppendSeparator();
wxMenu *JoinMenu = new wxMenu;
wxMenuItem *JoinParent = new wxMenuItem(subtitlesMenu,Menu_Subtitles_Join,_("Join Lines"),_T(""),wxITEM_NORMAL,JoinMenu);
#ifndef __APPLE__
- JoinParent->SetBitmap(wxBitmap(blank_button_xpm));
+ JoinParent->SetBitmap(GETIMAGE(blank_button_16));
#endif
- AppendBitmapMenuItem(JoinMenu,MENU_JOIN_CONCAT,_("&Concatenate"),_("Joins selected lines in a single one, concatenating text together"),wxBitmap(blank_button_xpm));
- AppendBitmapMenuItem(JoinMenu,MENU_JOIN_REPLACE,_("Keep &First"),_("Joins selected lines in a single one, keeping text of first and discarding remaining"),wxBitmap(blank_button_xpm));
- AppendBitmapMenuItem(JoinMenu,MENU_JOIN_AS_KARAOKE,_("As &Karaoke"),_("Joins selected lines in a single one, as karaoke"),wxBitmap(blank_button_xpm));
+ AppendBitmapMenuItem(JoinMenu,MENU_JOIN_CONCAT,_("&Concatenate"),_("Joins selected lines in a single one, concatenating text together"),GETIMAGE(blank_button_16));
+ AppendBitmapMenuItem(JoinMenu,MENU_JOIN_REPLACE,_("Keep &First"),_("Joins selected lines in a single one, keeping text of first and discarding remaining"),GETIMAGE(blank_button_16));
+ AppendBitmapMenuItem(JoinMenu,MENU_JOIN_AS_KARAOKE,_("As &Karaoke"),_("Joins selected lines in a single one, as karaoke"),GETIMAGE(blank_button_16));
subtitlesMenu->Append(JoinParent);
- AppendBitmapMenuItem(subtitlesMenu,MENU_RECOMBINE,_("Recombine Lines"),_("Recombine subtitles when they have been split and merged"),wxBitmap(blank_button_xpm));
- AppendBitmapMenuItem(subtitlesMenu,MENU_SPLIT_BY_KARAOKE,_("Split Lines (by karaoke)"),_("Uses karaoke timing to split line into multiple smaller lines"),wxBitmap(blank_button_xpm));
+ AppendBitmapMenuItem(subtitlesMenu,MENU_RECOMBINE,_("Recombine Lines"),_("Recombine subtitles when they have been split and merged"),GETIMAGE(blank_button_16));
+ AppendBitmapMenuItem(subtitlesMenu,MENU_SPLIT_BY_KARAOKE,_("Split Lines (by karaoke)"),_("Uses karaoke timing to split line into multiple smaller lines"),GETIMAGE(blank_button_16));
subtitlesMenu->AppendSeparator();
- AppendBitmapMenuItem(subtitlesMenu,MENU_SWAP,_("Swap Lines"),_("Swaps the two selected lines"),wxBitmap(arrow_sort_xpm));
- AppendBitmapMenuItem (subtitlesMenu,Menu_Edit_Select, MakeHotkeyText(_("Select Lines..."), _T("Select lines")), _("Selects lines based on defined criterea"),wxBitmap(select_lines_button_xpm));
+ AppendBitmapMenuItem(subtitlesMenu,MENU_SWAP,_("Swap Lines"),_("Swaps the two selected lines"),GETIMAGE(arrow_sort_16));
+ AppendBitmapMenuItem (subtitlesMenu,Menu_Edit_Select, MakeHotkeyText(_("Select Lines..."), _T("Select lines")), _("Selects lines based on defined criterea"),GETIMAGE(select_lines_button_16));
MenuBar->Append(subtitlesMenu, _("&Subtitles"));
// Create timing menu
timingMenu = new wxMenu();
- AppendBitmapMenuItem(timingMenu,Menu_Edit_Shift, MakeHotkeyText(_("S&hift Times..."), _T("Shift times")), _("Shift subtitles by time or frames"),wxBitmap(shift_times_toolbutton_xpm));
- AppendBitmapMenuItem(timingMenu,Menu_Edit_Sort, _("Sort by Time"), _("Sort all subtitles by their start times"),wxBitmap(sort_times_button_xpm));
- AppendBitmapMenuItem(timingMenu,Menu_Tools_Timing_Processor,_("Timing Post-Processor..."), _("Runs a post-processor for timing to deal with lead-ins, lead-outs, scene timing and etc."), wxBitmap(timing_processor_toolbutton_xpm));
- AppendBitmapMenuItem (timingMenu,Menu_Tools_Kanji_Timer,_("Kanji Timer..."),_("Open Kanji timer"),wxBitmap(kanji_timer_button_xpm));
+ AppendBitmapMenuItem(timingMenu,Menu_Edit_Shift, MakeHotkeyText(_("S&hift Times..."), _T("Shift times")), _("Shift subtitles by time or frames"),GETIMAGE(shift_times_toolbutton_16));
+ AppendBitmapMenuItem(timingMenu,Menu_Edit_Sort, _("Sort by Time"), _("Sort all subtitles by their start times"),GETIMAGE(sort_times_button_16));
+ AppendBitmapMenuItem(timingMenu,Menu_Tools_Timing_Processor,_("Timing Post-Processor..."), _("Runs a post-processor for timing to deal with lead-ins, lead-outs, scene timing and etc."), GETIMAGE(timing_processor_toolbutton_16));
+ AppendBitmapMenuItem (timingMenu,Menu_Tools_Kanji_Timer,_("Kanji Timer..."),_("Open Kanji timer"),GETIMAGE(kanji_timer_button_16));
timingMenu->AppendSeparator();
- AppendBitmapMenuItem(timingMenu,Menu_Subs_Snap_Start_To_Video, MakeHotkeyText(_("Snap Start to Video"), _T("Set Start To Video")), _("Set start of selected subtitles to current video frame"), wxBitmap(substart_to_video_xpm));
- AppendBitmapMenuItem(timingMenu,Menu_Subs_Snap_End_To_Video, MakeHotkeyText(_("Snap End to Video"), _T("Set End to Video")), _("Set end of selected subtitles to current video frame"), wxBitmap(subend_to_video_xpm));
- AppendBitmapMenuItem(timingMenu,Menu_Video_Snap_To_Scene, MakeHotkeyText(_("Snap to Scene"), _T("Snap to Scene")), _("Set start and end of subtitles to the keyframes around current video frame"), wxBitmap(snap_subs_to_scene_xpm));
- AppendBitmapMenuItem(timingMenu,Menu_Video_Shift_To_Frame, MakeHotkeyText(_("Shift to Current Frame"), _T("Shift by Current Time")), _("Shift selection so first selected line starts at current frame"), wxBitmap(shift_to_frame_xpm));
+ AppendBitmapMenuItem(timingMenu,Menu_Subs_Snap_Start_To_Video, MakeHotkeyText(_("Snap Start to Video"), _T("Set Start To Video")), _("Set start of selected subtitles to current video frame"), GETIMAGE(substart_to_video_16));
+ AppendBitmapMenuItem(timingMenu,Menu_Subs_Snap_End_To_Video, MakeHotkeyText(_("Snap End to Video"), _T("Set End to Video")), _("Set end of selected subtitles to current video frame"), GETIMAGE(subend_to_video_16));
+ AppendBitmapMenuItem(timingMenu,Menu_Video_Snap_To_Scene, MakeHotkeyText(_("Snap to Scene"), _T("Snap to Scene")), _("Set start and end of subtitles to the keyframes around current video frame"), GETIMAGE(snap_subs_to_scene_16));
+ AppendBitmapMenuItem(timingMenu,Menu_Video_Shift_To_Frame, MakeHotkeyText(_("Shift to Current Frame"), _T("Shift by Current Time")), _("Shift selection so first selected line starts at current frame"), GETIMAGE(shift_to_frame_16));
timingMenu->AppendSeparator();
wxMenu *ContinuousMenu = new wxMenu;
wxMenuItem *ContinuousParent = new wxMenuItem(subtitlesMenu,-1,_("Make Times Continuous"),_T(""),wxITEM_NORMAL,ContinuousMenu);
#ifndef __APPLE__
- ContinuousParent->SetBitmap(wxBitmap(blank_button_xpm));
+ ContinuousParent->SetBitmap(GETIMAGE(blank_button_16));
#endif
- AppendBitmapMenuItem(ContinuousMenu,MENU_ADJOIN,_("Change &Start"),_("Changes times of subs so start times begin on previous's end time"),wxBitmap(blank_button_xpm));
- AppendBitmapMenuItem(ContinuousMenu,MENU_ADJOIN2,_("Change &End"),_("Changes times of subs so end times begin on next's start time"),wxBitmap(blank_button_xpm));
+ AppendBitmapMenuItem(ContinuousMenu,MENU_ADJOIN,_("Change &Start"),_("Changes times of subs so start times begin on previous's end time"),GETIMAGE(blank_button_16));
+ AppendBitmapMenuItem(ContinuousMenu,MENU_ADJOIN2,_("Change &End"),_("Changes times of subs so end times begin on next's start time"),GETIMAGE(blank_button_16));
timingMenu->Append(ContinuousParent);
MenuBar->Append(timingMenu, _("&Timing"));
@@ -463,7 +464,7 @@ void FrameMain::InitMenu() {
wxMenu *ZoomMenu = new wxMenu;
wxMenuItem *ZoomParent = new wxMenuItem(subtitlesMenu,Menu_View_Zoom,_("Set Zoom"),_T(""),wxITEM_NORMAL,ZoomMenu);
#ifndef __APPLE__
- ZoomParent->SetBitmap(wxBitmap(blank_button_xpm));
+ ZoomParent->SetBitmap(GETIMAGE(blank_button_16));
#endif
ZoomMenu->Append(Menu_View_Zoom_50, MakeHotkeyText(_T("&50%"), _T("Zoom 50%")), _("Set zoom to 50%"));
ZoomMenu->Append(Menu_View_Zoom_100, MakeHotkeyText(_T("&100%"), _T("Zoom 100%")), _("Set zoom to 100%"));
@@ -472,7 +473,7 @@ void FrameMain::InitMenu() {
wxMenu *AspectMenu = new wxMenu;
wxMenuItem *AspectParent = new wxMenuItem(subtitlesMenu,Menu_Video_AR,_("Override Aspect Ratio"),_T(""),wxITEM_NORMAL,AspectMenu);
#ifndef __APPLE__
- AspectParent->SetBitmap(wxBitmap(blank_button_xpm));
+ AspectParent->SetBitmap(GETIMAGE(blank_button_16));
#endif
AspectMenu->AppendCheckItem(Menu_Video_AR_Default, _("&Default"), _("Leave video on original aspect ratio"));
AspectMenu->AppendCheckItem(Menu_Video_AR_Full, _("&Fullscreen (4:3)"), _("Forces video to 4:3 aspect ratio"));
@@ -482,9 +483,9 @@ void FrameMain::InitMenu() {
videoMenu->Append(AspectParent);
videoMenu->AppendCheckItem(Menu_Video_Overscan, _("Show Overscan Mask"), _("Show a mask over the video, indicating areas that might get cropped off by overscan on televisions."));
videoMenu->AppendSeparator();
- AppendBitmapMenuItem(videoMenu,Menu_Video_JumpTo, MakeHotkeyText(_("&Jump to..."), _T("Video Jump")), _("Jump to frame or time"), wxBitmap(jumpto_button_xpm));
- AppendBitmapMenuItem(videoMenu,Menu_Subs_Snap_Video_To_Start, MakeHotkeyText(_("Jump Video to Start"), _T("Jump Video To Start")), _("Jumps the video to the start frame of current subtitle"), wxBitmap(video_to_substart_xpm));
- AppendBitmapMenuItem(videoMenu,Menu_Subs_Snap_Video_To_End, MakeHotkeyText(_("Jump Video to End"), _T("Jump Video To End")), _("Jumps the video to the end frame of current subtitle"), wxBitmap(video_to_subend_xpm));
+ AppendBitmapMenuItem(videoMenu,Menu_Video_JumpTo, MakeHotkeyText(_("&Jump to..."), _T("Video Jump")), _("Jump to frame or time"), GETIMAGE(jumpto_button_16));
+ AppendBitmapMenuItem(videoMenu,Menu_Subs_Snap_Video_To_Start, MakeHotkeyText(_("Jump Video to Start"), _T("Jump Video To Start")), _("Jumps the video to the start frame of current subtitle"), GETIMAGE(video_to_substart_16));
+ AppendBitmapMenuItem(videoMenu,Menu_Subs_Snap_Video_To_End, MakeHotkeyText(_("Jump Video to End"), _T("Jump Video To End")), _("Jumps the video to the end frame of current subtitle"), GETIMAGE(video_to_subend_16));
MenuBar->Append(videoMenu, _("&Video"));
// Create audio menu
@@ -504,20 +505,20 @@ void FrameMain::InitMenu() {
// Create Automation menu
#ifdef WITH_AUTOMATION
automationMenu = new wxMenu();
- AppendBitmapMenuItem (automationMenu,Menu_Tools_Automation, _("&Automation..."),_("Open automation manager"), wxBitmap(automation_toolbutton_xpm));
+ AppendBitmapMenuItem (automationMenu,Menu_Tools_Automation, _("&Automation..."),_("Open automation manager"), GETIMAGE(automation_toolbutton_16));
automationMenu->AppendSeparator();
MenuBar->Append(automationMenu, _("&Automation"));
#endif
// Create view menu
viewMenu = new wxMenu();
- AppendBitmapMenuItem(viewMenu,Menu_View_Language, _T("&Language..."), _("Select Aegisub interface language"), wxBitmap(blank_button_xpm));
- AppendBitmapMenuItem(viewMenu,Menu_Tools_Options, MakeHotkeyText(_("&Options..."), _T("Options")), _("Configure Aegisub"), wxBitmap(options_button_xpm));
+ AppendBitmapMenuItem(viewMenu,Menu_View_Language, _T("&Language..."), _("Select Aegisub interface language"), GETIMAGE(blank_button_16));
+ AppendBitmapMenuItem(viewMenu,Menu_Tools_Options, MakeHotkeyText(_("&Options..."), _T("Options")), _("Configure Aegisub"), GETIMAGE(options_button_16));
#ifdef WIN32
- AppendBitmapMenuItem(viewMenu,Menu_View_Associations, _("&Associations..."), _("Associate file types with Aegisub"), wxBitmap(blank_button_xpm));
+ AppendBitmapMenuItem(viewMenu,Menu_View_Associations, _("&Associations..."), _("Associate file types with Aegisub"), GETIMAGE(blank_button_16));
#endif
#ifdef __WXDEBUG__
- AppendBitmapMenuItem(viewMenu,Menu_Tools_Log, _("Lo&g Window..."), _("Open log window"), wxBitmap(blank_button_xpm));
+ AppendBitmapMenuItem(viewMenu,Menu_Tools_Log, _("Lo&g Window..."), _("Open log window"), GETIMAGE(blank_button_16));
#endif
viewMenu->AppendSeparator();
viewMenu->AppendRadioItem(Menu_View_Subs, _("Subs Only View"), _("Display subtitles only"));
@@ -528,19 +529,19 @@ void FrameMain::InitMenu() {
// Create help menu
helpMenu = new wxMenu();
- AppendBitmapMenuItem (helpMenu,Menu_Help_Contents, MakeHotkeyText(_("&Contents..."), _T("Help")), _("Help topics"), wxBitmap(contents_button_xpm));
+ AppendBitmapMenuItem (helpMenu,Menu_Help_Contents, MakeHotkeyText(_("&Contents..."), _T("Help")), _("Help topics"), GETIMAGE(contents_button_16));
helpMenu->AppendSeparator();
- AppendBitmapMenuItem(helpMenu,Menu_Help_Website, _("&Website..."), _("Visit Aegisub's official website"),wxBitmap(website_button_xpm));
- AppendBitmapMenuItem(helpMenu,Menu_Help_Forums, _("&Forums..."), _("Visit Aegisub's forums"),wxBitmap(forums_button_xpm));
- AppendBitmapMenuItem(helpMenu,Menu_Help_BugTracker, _("&Bug Tracker..."), _("Visit Aegisub's bug tracker to report bugs and request new features"),wxBitmap(bugtracker_button_xpm));
- AppendBitmapMenuItem (helpMenu,Menu_Help_IRCChannel, _("&IRC Channel..."), _("Visit Aegisub's official IRC channel"), wxBitmap(irc_button_xpm));
+ AppendBitmapMenuItem(helpMenu,Menu_Help_Website, _("&Website..."), _("Visit Aegisub's official website"),GETIMAGE(website_button_16));
+ AppendBitmapMenuItem(helpMenu,Menu_Help_Forums, _("&Forums..."), _("Visit Aegisub's forums"),GETIMAGE(forums_button_16));
+ AppendBitmapMenuItem(helpMenu,Menu_Help_BugTracker, _("&Bug Tracker..."), _("Visit Aegisub's bug tracker to report bugs and request new features"),GETIMAGE(bugtracker_button_16));
+ AppendBitmapMenuItem (helpMenu,Menu_Help_IRCChannel, _("&IRC Channel..."), _("Visit Aegisub's official IRC channel"), GETIMAGE(irc_button_16));
#ifndef __WXMAC__
helpMenu->AppendSeparator();
#endif
#ifdef __WXMSW__
- AppendBitmapMenuItem(helpMenu,Menu_Help_Check_Updates, _("&Check for Updates..."), _("Check to see if there is a new version of Aegisub available"),wxBitmap(blank_button_xpm));
+ AppendBitmapMenuItem(helpMenu,Menu_Help_Check_Updates, _("&Check for Updates..."), _("Check to see if there is a new version of Aegisub available"),GETIMAGE(blank_button_16));
#endif
- AppendBitmapMenuItem(helpMenu,Menu_Help_About, _("&About..."), _("About Aegisub"),wxBitmap(about_button_xpm));
+ AppendBitmapMenuItem(helpMenu,Menu_Help_About, _("&About..."), _("About Aegisub"),GETIMAGE(about_button_16));
MenuBar->Append(helpMenu, _("&Help"));
// Set the bar as this frame's
diff --git a/aegisub/src/frame_main_events.cpp b/aegisub/src/frame_main_events.cpp
index bafec2156..cf7086f7d 100644
--- a/aegisub/src/frame_main_events.cpp
+++ b/aegisub/src/frame_main_events.cpp
@@ -90,6 +90,7 @@
#include "keyframe.h"
#include "charset_conv.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
////////////////////
@@ -423,8 +424,8 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
// Undo state
editMenu->Remove(Menu_Edit_Undo);
editMenu->Remove(Menu_Edit_Redo);
- AppendBitmapMenuItem(editMenu,Menu_Edit_Undo, wxString::Format(_T("%s %s\t%s"), _("&Undo"), AssFile::GetUndoDescription().c_str(), Hotkeys.GetText(_T("Undo")).c_str()), _("Undoes last action"),wxBitmap(undo_button_xpm),0)->Enable(!AssFile::IsUndoStackEmpty());
- AppendBitmapMenuItem(editMenu,Menu_Edit_Redo, wxString::Format(_T("%s %s\t%s"), _("&Redo"), AssFile::GetRedoDescription().c_str(), Hotkeys.GetText(_T("Redo")).c_str()), _("Redoes last action"),wxBitmap(redo_button_xpm),1)->Enable(!AssFile::IsRedoStackEmpty());
+ AppendBitmapMenuItem(editMenu,Menu_Edit_Undo, wxString::Format(_T("%s %s\t%s"), _("&Undo"), AssFile::GetUndoDescription().c_str(), Hotkeys.GetText(_T("Undo")).c_str()), _("Undoes last action"),GETIMAGE(undo_button_16),0)->Enable(!AssFile::IsUndoStackEmpty());
+ AppendBitmapMenuItem(editMenu,Menu_Edit_Redo, wxString::Format(_T("%s %s\t%s"), _("&Redo"), AssFile::GetRedoDescription().c_str(), Hotkeys.GetText(_T("Redo")).c_str()), _("Redoes last action"),GETIMAGE(redo_button_16),1)->Enable(!AssFile::IsRedoStackEmpty());
// Copy/cut/paste
wxArrayInt sels = SubsBox->GetSelection();
diff --git a/aegisub/src/subs_edit_box.cpp b/aegisub/src/subs_edit_box.cpp
index 6a06f5da1..a22e5a750 100644
--- a/aegisub/src/subs_edit_box.cpp
+++ b/aegisub/src/subs_edit_box.cpp
@@ -63,6 +63,7 @@
#include "tooltip_manager.h"
#include "osx_bevelButton.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////////////
@@ -117,23 +118,23 @@ SubsEditBox::SubsEditBox (wxWindow *parent,SubtitlesGrid *gridp) : wxPanel(paren
MarginV->SetMaxLength(4);
// Middle-bottom controls
- Bold = new wxBitmapButton(this,BUTTON_BOLD,wxBitmap(button_bold_xpm),wxDefaultPosition,wxSize(20,20));
+ Bold = new wxBitmapButton(this,BUTTON_BOLD,GETIMAGE(button_bold_24),wxDefaultPosition,wxSize(20,20));
Bold->SetToolTip(_("Bold"));
- Italics = new wxBitmapButton(this,BUTTON_ITALICS,wxBitmap(button_italics_xpm),wxDefaultPosition,wxSize(20,20));
+ Italics = new wxBitmapButton(this,BUTTON_ITALICS,GETIMAGE(button_italics_24),wxDefaultPosition,wxSize(20,20));
Italics->SetToolTip(_("Italics"));
- Underline = new wxBitmapButton(this,BUTTON_UNDERLINE,wxBitmap(button_underline_xpm),wxDefaultPosition,wxSize(20,20));
+ Underline = new wxBitmapButton(this,BUTTON_UNDERLINE,GETIMAGE(button_underline_24),wxDefaultPosition,wxSize(20,20));
Underline->SetToolTip(_("Underline"));
- Strikeout = new wxBitmapButton(this,BUTTON_STRIKEOUT,wxBitmap(button_strikeout_xpm),wxDefaultPosition,wxSize(20,20));
+ Strikeout = new wxBitmapButton(this,BUTTON_STRIKEOUT,GETIMAGE(button_strikeout_24),wxDefaultPosition,wxSize(20,20));
Strikeout->SetToolTip(_("Strikeout"));
- FontName = new wxBitmapButton(this,BUTTON_FONT_NAME,wxBitmap(button_fontname_xpm),wxDefaultPosition,wxSize(30,20));
+ FontName = new wxBitmapButton(this,BUTTON_FONT_NAME,GETIMAGE(button_fontname_24),wxDefaultPosition,wxSize(30,20));
FontName->SetToolTip(_("Font Face Name"));
- Color1 = new wxBitmapButton(this,BUTTON_COLOR1,wxBitmap(button_color_one_xpm),wxDefaultPosition,wxSize(30,20));
+ Color1 = new wxBitmapButton(this,BUTTON_COLOR1,GETIMAGE(button_color_one_24),wxDefaultPosition,wxSize(30,20));
Color1->SetToolTip(_("Primary color"));
- Color2 = new wxBitmapButton(this,BUTTON_COLOR2,wxBitmap(button_color_two_xpm),wxDefaultPosition,wxSize(30,20));
+ Color2 = new wxBitmapButton(this,BUTTON_COLOR2,GETIMAGE(button_color_two_24),wxDefaultPosition,wxSize(30,20));
Color2->SetToolTip(_("Secondary color"));
- Color3 = new wxBitmapButton(this,BUTTON_COLOR3,wxBitmap(button_color_three_xpm),wxDefaultPosition,wxSize(30,20));
+ Color3 = new wxBitmapButton(this,BUTTON_COLOR3,GETIMAGE(button_color_three_24),wxDefaultPosition,wxSize(30,20));
Color3->SetToolTip(_("Outline color"));
- Color4 = new wxBitmapButton(this,BUTTON_COLOR4,wxBitmap(button_color_four_xpm),wxDefaultPosition,wxSize(30,20));
+ Color4 = new wxBitmapButton(this,BUTTON_COLOR4,GETIMAGE(button_color_four_24),wxDefaultPosition,wxSize(30,20));
Color4->SetToolTip(_("Shadow color"));
#ifdef __WXMAC__
CommitButton = new wxBevelButton(this,BUTTON_COMMIT,_("Commit"),wxDefaultPosition,wxDefaultSize);
diff --git a/aegisub/src/video_box.cpp b/aegisub/src/video_box.cpp
index 11ed8e5d9..088a9759f 100644
--- a/aegisub/src/video_box.cpp
+++ b/aegisub/src/video_box.cpp
@@ -62,6 +62,7 @@
#include "visual_tool.h"
#include "help_button.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////////////
@@ -76,13 +77,13 @@ VideoBox::VideoBox(wxWindow *parent, bool isDetached)
visualSubToolBar = new wxToolBar(videoPage,-1,wxDefaultPosition,wxDefaultSize,wxTB_HORIZONTAL | wxTB_BOTTOM | wxTB_FLAT);
// Buttons
- wxBitmapButton *VideoPlayButton = new wxBitmapButton(videoPage,Video_Play,wxBitmap(button_play_xpm),wxDefaultPosition,wxSize(25,-1));
+ wxBitmapButton *VideoPlayButton = new wxBitmapButton(videoPage,Video_Play,GETIMAGE(button_play_24),wxDefaultPosition,wxSize(25,-1));
VideoPlayButton->SetToolTip(_("Play video starting on this position"));
- wxBitmapButton *VideoPlayLineButton = new wxBitmapButton(videoPage,Video_Play_Line,wxBitmap(button_playline_xpm),wxDefaultPosition,wxSize(25,-1));
+ wxBitmapButton *VideoPlayLineButton = new wxBitmapButton(videoPage,Video_Play_Line,GETIMAGE(button_playline_24),wxDefaultPosition,wxSize(25,-1));
VideoPlayLineButton->SetToolTip(_("Play current line"));
- wxBitmapButton *VideoStopButton = new wxBitmapButton(videoPage,Video_Stop,wxBitmap(button_pause_xpm),wxDefaultPosition,wxSize(25,-1));
+ wxBitmapButton *VideoStopButton = new wxBitmapButton(videoPage,Video_Stop,GETIMAGE(button_pause_24),wxDefaultPosition,wxSize(25,-1));
VideoStopButton->SetToolTip(_("Stop video playback"));
- AutoScroll = new ToggleBitmap(videoPage,Video_Auto_Scroll,wxBitmap(toggle_video_autoscroll_xpm),wxSize(30,-1));
+ AutoScroll = new ToggleBitmap(videoPage,Video_Auto_Scroll,GETIMAGE(toggle_video_autoscroll_24),wxSize(30,-1));
AutoScroll->SetToolTip(_("Toggle autoscroll of video"));
AutoScroll->SetValue(Options.AsBool(_T("Sync video with subs")));
@@ -112,17 +113,17 @@ VideoBox::VideoBox(wxWindow *parent, bool isDetached)
// Typesetting buttons
visualToolBar = new wxToolBar(videoPage,-1,wxDefaultPosition,wxDefaultSize,wxTB_VERTICAL|wxTB_FLAT|wxTB_NODIVIDER);
- visualToolBar->AddTool(Video_Mode_Standard,_("Standard"),wxBitmap(visual_standard_xpm),_("Standard mode, double click sets position."),wxITEM_RADIO);
- visualToolBar->AddTool(Video_Mode_Drag,_("Drag"),wxBitmap(visual_move_xpm),_("Drag subtitles."),wxITEM_RADIO);
- visualToolBar->AddTool(Video_Mode_Rotate_Z,_("Rotate Z"),wxBitmap(visual_rotatez_xpm),_("Rotate subtitles on their Z axis."),wxITEM_RADIO);
- visualToolBar->AddTool(Video_Mode_Rotate_XY,_("Rotate XY"),wxBitmap(visual_rotatexy_xpm),_("Rotate subtitles on their X and Y axes."),wxITEM_RADIO);
- visualToolBar->AddTool(Video_Mode_Scale,_("Scale"),wxBitmap(visual_scale_xpm),_("Scale subtitles on X and Y axes."),wxITEM_RADIO);
- visualToolBar->AddTool(Video_Mode_Clip,_("Clip"),wxBitmap(visual_clip_xpm),_("Clip subtitles to a rectangle."),wxITEM_RADIO);
- visualToolBar->AddTool(Video_Mode_Vector_Clip,_("Vector Clip"),wxBitmap(visual_vector_clip_xpm),_("Clip subtitles to a vectorial area."),wxITEM_RADIO);
+ visualToolBar->AddTool(Video_Mode_Standard,_("Standard"),GETIMAGE(visual_standard_24),_("Standard mode, double click sets position."),wxITEM_RADIO);
+ visualToolBar->AddTool(Video_Mode_Drag,_("Drag"),GETIMAGE(visual_move_24),_("Drag subtitles."),wxITEM_RADIO);
+ visualToolBar->AddTool(Video_Mode_Rotate_Z,_("Rotate Z"),GETIMAGE(visual_rotatez_24),_("Rotate subtitles on their Z axis."),wxITEM_RADIO);
+ visualToolBar->AddTool(Video_Mode_Rotate_XY,_("Rotate XY"),GETIMAGE(visual_rotatexy_24),_("Rotate subtitles on their X and Y axes."),wxITEM_RADIO);
+ visualToolBar->AddTool(Video_Mode_Scale,_("Scale"),GETIMAGE(visual_scale_24),_("Scale subtitles on X and Y axes."),wxITEM_RADIO);
+ visualToolBar->AddTool(Video_Mode_Clip,_("Clip"),GETIMAGE(visual_clip_24),_("Clip subtitles to a rectangle."),wxITEM_RADIO);
+ visualToolBar->AddTool(Video_Mode_Vector_Clip,_("Vector Clip"),GETIMAGE(visual_vector_clip_24),_("Clip subtitles to a vectorial area."),wxITEM_RADIO);
visualToolBar->AddSeparator();
- visualToolBar->AddTool(Video_Mode_Realtime,_("Realtime"),wxBitmap(visual_realtime_xpm),_("Toggle realtime display of changes."),wxITEM_CHECK);
+ visualToolBar->AddTool(Video_Mode_Realtime,_("Realtime"),GETIMAGE(visual_realtime_24),_("Toggle realtime display of changes."),wxITEM_CHECK);
visualToolBar->ToggleTool(Video_Mode_Realtime,Options.AsBool(_T("Video Visual Realtime")));
- visualToolBar->AddTool(Video_Mode_Help,_("Help"),wxBitmap(visual_help_xpm),_("Open the manual page for Visual Typesetting."));
+ visualToolBar->AddTool(Video_Mode_Help,_("Help"),GETIMAGE(visual_help_24),_("Open the manual page for Visual Typesetting."));
visualToolBar->Realize();
// Avoid ugly themed background on Vista and possibly also Win7
visualToolBar->SetBackgroundStyle(wxBG_STYLE_COLOUR);
diff --git a/aegisub/src/visual_tool_drag.cpp b/aegisub/src/visual_tool_drag.cpp
index adc83ef21..6f26eb3d6 100644
--- a/aegisub/src/visual_tool_drag.cpp
+++ b/aegisub/src/visual_tool_drag.cpp
@@ -46,6 +46,7 @@
#include "utils.h"
#include "vfr.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////
@@ -61,8 +62,8 @@ VisualToolDrag::VisualToolDrag(VideoDisplay *_parent,wxToolBar *toolBar)
: VisualTool(_parent)
{
_parent->ShowCursor(false);
- //toolBar->AddTool(BUTTON_TOGGLE_MOVE,_T("Toggle Move/Pos"),wxBitmap(visual_move_conv_move_xpm));
- toggleMove = new wxBitmapButton(toolBar,BUTTON_TOGGLE_MOVE,wxBitmap(visual_move_conv_move_xpm),wxDefaultPosition);
+ //toolBar->AddTool(BUTTON_TOGGLE_MOVE,_T("Toggle Move/Pos"),GETIMAGE(visual_move_conv_move_24));
+ toggleMove = new wxBitmapButton(toolBar,BUTTON_TOGGLE_MOVE,GETIMAGE(visual_move_conv_move_24),wxDefaultPosition);
ConnectButton(toggleMove);
toolBar->AddControl(toggleMove);
toggleMoveOnMove = true;
@@ -89,8 +90,8 @@ void VisualToolDrag::UpdateToggleButtons() {
if (toMove == toggleMoveOnMove) return;
// Change bitmap
- if (toMove) toggleMove->SetBitmapLabel(wxBitmap(visual_move_conv_move_xpm));
- else toggleMove->SetBitmapLabel(wxBitmap(visual_move_conv_pos_xpm));
+ if (toMove) toggleMove->SetBitmapLabel(GETIMAGE(visual_move_conv_move_24));
+ else toggleMove->SetBitmapLabel(GETIMAGE(visual_move_conv_pos_24));
toggleMoveOnMove = toMove;
}
diff --git a/aegisub/src/visual_tool_vector_clip.cpp b/aegisub/src/visual_tool_vector_clip.cpp
index 00d4a19b9..78887f65c 100644
--- a/aegisub/src/visual_tool_vector_clip.cpp
+++ b/aegisub/src/visual_tool_vector_clip.cpp
@@ -41,6 +41,7 @@
#include "visual_tool_vector_clip.h"
#include "ass_dialogue.h"
#include "libresrc/libresrc.h"
+#include "libresrc/icons.h"
///////
@@ -68,16 +69,16 @@ VisualToolVectorClip::VisualToolVectorClip(VideoDisplay *parent,wxToolBar *_tool
// Create toolbar
toolBar = _toolBar;
- toolBar->AddTool(BUTTON_DRAG,_("Drag"),wxBitmap(visual_vector_clip_drag_xpm),_("Drag control points."),wxITEM_CHECK);
- toolBar->AddTool(BUTTON_LINE,_("Line"),wxBitmap(visual_vector_clip_line_xpm),_("Appends a line."),wxITEM_CHECK);
- toolBar->AddTool(BUTTON_BICUBIC,_("Bicubic"),wxBitmap(visual_vector_clip_bicubic_xpm),_("Appends a bezier bicubic curve."),wxITEM_CHECK);
+ toolBar->AddTool(BUTTON_DRAG,_("Drag"),GETIMAGE(visual_vector_clip_drag_24),_("Drag control points."),wxITEM_CHECK);
+ toolBar->AddTool(BUTTON_LINE,_("Line"),GETIMAGE(visual_vector_clip_line_24),_("Appends a line."),wxITEM_CHECK);
+ toolBar->AddTool(BUTTON_BICUBIC,_("Bicubic"),GETIMAGE(visual_vector_clip_bicubic_24),_("Appends a bezier bicubic curve."),wxITEM_CHECK);
toolBar->AddSeparator();
- toolBar->AddTool(BUTTON_CONVERT,_("Convert"),wxBitmap(visual_vector_clip_convert_xpm),_("Converts a segment between line and bicubic."),wxITEM_CHECK);
- toolBar->AddTool(BUTTON_INSERT,_("Insert"),wxBitmap(visual_vector_clip_insert_xpm),_("Inserts a control point."),wxITEM_CHECK);
- toolBar->AddTool(BUTTON_REMOVE,_("Remove"),wxBitmap(visual_vector_clip_remove_xpm),_("Removes a control point."),wxITEM_CHECK);
+ toolBar->AddTool(BUTTON_CONVERT,_("Convert"),GETIMAGE(visual_vector_clip_convert_24),_("Converts a segment between line and bicubic."),wxITEM_CHECK);
+ toolBar->AddTool(BUTTON_INSERT,_("Insert"),GETIMAGE(visual_vector_clip_insert_24),_("Inserts a control point."),wxITEM_CHECK);
+ toolBar->AddTool(BUTTON_REMOVE,_("Remove"),GETIMAGE(visual_vector_clip_remove_24),_("Removes a control point."),wxITEM_CHECK);
toolBar->AddSeparator();
- toolBar->AddTool(BUTTON_FREEHAND,_("Freehand"),wxBitmap(visual_vector_clip_freehand_xpm),_("Draws a freehand shape."),wxITEM_CHECK);
- toolBar->AddTool(BUTTON_FREEHAND_SMOOTH,_("Freehand smooth"),wxBitmap(visual_vector_clip_freehand_smooth_xpm),_("Draws a smoothed freehand shape."),wxITEM_CHECK);
+ toolBar->AddTool(BUTTON_FREEHAND,_("Freehand"),GETIMAGE(visual_vector_clip_freehand_24),_("Draws a freehand shape."),wxITEM_CHECK);
+ toolBar->AddTool(BUTTON_FREEHAND_SMOOTH,_("Freehand smooth"),GETIMAGE(visual_vector_clip_freehand_smooth_24),_("Draws a smoothed freehand shape."),wxITEM_CHECK);
toolBar->ToggleTool(BUTTON_DRAG,true);
toolBar->Realize();
toolBar->Show(true);
diff --git a/aegisub/tools/common-respack.cpp b/aegisub/tools/common-respack.cpp
new file mode 100644
index 000000000..11b114f80
--- /dev/null
+++ b/aegisub/tools/common-respack.cpp
@@ -0,0 +1,150 @@
+// Copyright (c) 2009, Thomas Goyne
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of the Aegisub Group nor the names of its contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// -----------------------------------------------------------------------------
+//
+// AEGISUB
+//
+// Website: http://aegisub.cellosoft.com
+// Contact: mailto:zeratul@cellosoft.com
+//
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+using namespace std;
+
+class FileIterator {
+private:
+ unsigned int currentItem;
+ bool inDir;
+ wxDir currentDir;
+ wxArrayString items;
+public:
+ FileIterator(int argc, const char **argv);
+ bool Next(wxString *filename);
+};
+
+FileIterator::FileIterator(int argc, const char **argv)
+ : currentItem(2), inDir(false), currentDir(), items(argc, argv) {
+ if (argc == 2) {
+ // No names passed on the command line, so read them from stdin
+ char buffer[1024];
+ while (cin.getline(buffer, 1024), cin.good()) {
+ items.Add(buffer);
+ }
+ }
+}
+
+bool FileIterator::Next(wxString *filename) {
+ // Currently iterating through a directory, just return the next file in that directory (if any)
+ if (inDir) {
+ if (currentDir.GetNext(filename)) {
+ wxString path = currentDir.GetName();
+ *filename = wxFileName(path, *filename).GetFullPath();
+ return true;
+ }
+ inDir = false;
+ }
+
+ // No more items
+ if (currentItem >= items.GetCount()) return false;
+
+ wxFileName next;
+ // Test if it's a directory
+ if (wxFileName::DirExists(items[currentItem])) {
+ currentDir.Open(items[currentItem]);
+ currentItem++;
+ if (currentDir.GetFirst(filename, "", wxDIR_FILES)) {
+ wxString path = currentDir.GetName();
+ *filename = wxFileName(path, *filename).GetFullPath();
+ inDir = true;
+ return true;
+ }
+ // dir is empty, process next item instead
+ return Next(filename);
+ }
+ // Test if it's a file
+ if (wxFileName::FileExists(items[currentItem])) {
+ *filename = items[currentItem];
+ currentItem++;
+ return true;
+ }
+
+ // Entry is neither a file nor a directory, just skip it
+ return Next(filename);
+}
+
+int main(int argc, const char *argv[]) {
+ if (argc < 2) {
+ return 1;
+ }
+ wxFileName headerFileName(argv[1]);
+ headerFileName.SetExt(L"h");
+ ofstream outH(headerFileName.GetFullPath().wc_str());
+ ofstream outC(argv[1]);
+
+ outC << "/* This is an automatically generated file and should not be modified directly */" << endl;
+ outC << "#include \"" << headerFileName.GetFullName() << "\"" << endl;
+
+ outH << "/* This is an automatically generated file and should not be modified directly */" << endl;
+ outH << "#include " << endl;
+ outH << "#include " << endl;
+ outH << "#include " << endl;
+ outH << "#define GETIMAGE(a) wxBitmap(wxImage(wxMemoryInputStream(a, sizeof(a))))" << endl;
+
+ wxRegEx nameCleaner("[^A-Za-z_0-9]");
+ wxString filename;
+ FileIterator iter(argc, argv);
+
+ while (iter.Next(&filename)) {
+ ifstream infile(filename.wc_str(), ios::binary);
+ wxFileName file(filename);
+ wxString identifier = file.GetName() + "_" + file.GetDirs().Last();
+ nameCleaner.ReplaceAll(&identifier, "_");
+
+ outC << "const unsigned char " << identifier << "[] = {";
+ bool first = true;
+ char c[1];
+ while (infile.read(c, 1).gcount() > 0) {
+ if (!first) outC << ",";
+ outC << (int)*(unsigned char *)c;
+ first = false;
+ }
+ outC << "};" << endl;
+ infile.seekg(ios_base::end);
+ outH << "extern const unsigned char " << identifier << "[" << infile.tellg() << "];" << endl;
+ }
+
+ return 0;
+}
+
diff --git a/aegisub/tools/common-respack.vcproj b/aegisub/tools/common-respack.vcproj
new file mode 100644
index 000000000..9dabe211b
--- /dev/null
+++ b/aegisub/tools/common-respack.vcproj
@@ -0,0 +1,329 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+