mirror of https://github.com/odrling/Aegisub
Added icons to all dialogs that have one for them.
Originally committed to SVN as r1360.
This commit is contained in:
parent
83d8d48db6
commit
6087d6ec22
|
@ -52,6 +52,9 @@
|
||||||
DialogAttachments::DialogAttachments(wxWindow *parent)
|
DialogAttachments::DialogAttachments(wxWindow *parent)
|
||||||
: wxDialog(parent,-1,_("Attachment List"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE)
|
: wxDialog(parent,-1,_("Attachment List"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE)
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(attach_button)));
|
||||||
|
|
||||||
// List view
|
// List view
|
||||||
listView = new wxListView(this,ATTACHMENT_LIST,wxDefaultPosition,wxSize(500,200));
|
listView = new wxListView(this,ATTACHMENT_LIST,wxDefaultPosition,wxSize(500,200));
|
||||||
UpdateList();
|
UpdateList();
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "dialog_automation.h"
|
#include "dialog_automation.h"
|
||||||
#include "auto4_base.h"
|
#include "auto4_base.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
#include "utils.h"
|
||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
#include <wx/filedlg.h>
|
#include <wx/filedlg.h>
|
||||||
|
|
||||||
|
@ -44,6 +45,9 @@
|
||||||
DialogAutomation::DialogAutomation(wxWindow *parent, Automation4::ScriptManager *_local_manager)
|
DialogAutomation::DialogAutomation(wxWindow *parent, Automation4::ScriptManager *_local_manager)
|
||||||
: wxDialog(parent, -1, _("Automation Manager"), wxDefaultPosition, wxDefaultSize)
|
: wxDialog(parent, -1, _("Automation Manager"), wxDefaultPosition, wxDefaultSize)
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(automation_toolbutton)));
|
||||||
|
|
||||||
local_manager = _local_manager;
|
local_manager = _local_manager;
|
||||||
global_manager = wxGetApp().global_scripts;
|
global_manager = wxGetApp().global_scripts;
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,9 @@ enum IDs {
|
||||||
DialogFontsCollector::DialogFontsCollector(wxWindow *parent)
|
DialogFontsCollector::DialogFontsCollector(wxWindow *parent)
|
||||||
: wxDialog(parent,-1,_("Fonts Collector"),wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
|
: wxDialog(parent,-1,_("Fonts Collector"),wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(font_collector_button)));
|
||||||
|
|
||||||
// Parent
|
// Parent
|
||||||
main = (FrameMain*) parent;
|
main = (FrameMain*) parent;
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include "dialog_jumpto.h"
|
#include "dialog_jumpto.h"
|
||||||
#include "vfr.h"
|
#include "vfr.h"
|
||||||
#include "video_context.h"
|
#include "video_context.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
///////
|
///////
|
||||||
|
@ -54,6 +55,9 @@ enum {
|
||||||
DialogJumpTo::DialogJumpTo (wxWindow *parent)
|
DialogJumpTo::DialogJumpTo (wxWindow *parent)
|
||||||
: wxDialog(parent, -1, _("Jump to"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("JumpTo"))
|
: wxDialog(parent, -1, _("Jump to"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("JumpTo"))
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(jumpto_button)));
|
||||||
|
|
||||||
// Set initial values
|
// Set initial values
|
||||||
ready = false;
|
ready = false;
|
||||||
jumpframe = VideoContext::Get()->GetFrameN();
|
jumpframe = VideoContext::Get()->GetFrameN();
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
#include "subs_grid.h"
|
#include "subs_grid.h"
|
||||||
#include "validators.h"
|
#include "validators.h"
|
||||||
#include "video_context.h"
|
#include "video_context.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
|
@ -59,6 +60,9 @@
|
||||||
DialogKanjiTimer::DialogKanjiTimer(wxWindow *parent, SubtitlesGrid *_grid)
|
DialogKanjiTimer::DialogKanjiTimer(wxWindow *parent, SubtitlesGrid *_grid)
|
||||||
: wxDialog (parent,-1,_("Kanji timing"),wxDefaultPosition)
|
: wxDialog (parent,-1,_("Kanji timing"),wxDefaultPosition)
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(kanji_timer_button)));
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
AssFile *subs = AssFile::top;
|
AssFile *subs = AssFile::top;
|
||||||
grid = _grid;
|
grid = _grid;
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
#include "video_context.h"
|
#include "video_context.h"
|
||||||
#include "browse_button.h"
|
#include "browse_button.h"
|
||||||
#include "tooltip_manager.h"
|
#include "tooltip_manager.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
///////
|
///////
|
||||||
|
@ -77,6 +78,9 @@ enum {
|
||||||
DialogOptions::DialogOptions(wxWindow *parent)
|
DialogOptions::DialogOptions(wxWindow *parent)
|
||||||
: wxDialog(parent, -1, _T("Options"), wxDefaultPosition, wxDefaultSize)
|
: wxDialog(parent, -1, _T("Options"), wxDefaultPosition, wxDefaultSize)
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(options_button)));
|
||||||
|
|
||||||
// Create book
|
// Create book
|
||||||
book = new wxTreebook(this,-1,wxDefaultPosition,wxSize(400,300));
|
book = new wxTreebook(this,-1,wxDefaultPosition,wxSize(400,300));
|
||||||
needsRestart = false;
|
needsRestart = false;
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#include "video_display.h"
|
#include "video_display.h"
|
||||||
#include "validators.h"
|
#include "validators.h"
|
||||||
#include "video_provider.h"
|
#include "video_provider.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
|
@ -49,6 +50,9 @@
|
||||||
DialogProperties::DialogProperties (wxWindow *parent)
|
DialogProperties::DialogProperties (wxWindow *parent)
|
||||||
: wxDialog(parent, -1, _("Script Properties"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
|
: wxDialog(parent, -1, _("Script Properties"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(properties_toolbutton)));
|
||||||
|
|
||||||
// Setup
|
// Setup
|
||||||
AssFile *subs = AssFile::top;
|
AssFile *subs = AssFile::top;
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "subs_grid.h"
|
#include "subs_grid.h"
|
||||||
#include "validators.h"
|
#include "validators.h"
|
||||||
#include "video_context.h"
|
#include "video_context.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
|
@ -51,6 +52,9 @@
|
||||||
DialogResample::DialogResample(wxWindow *parent, SubtitlesGrid *_grid)
|
DialogResample::DialogResample(wxWindow *parent, SubtitlesGrid *_grid)
|
||||||
: wxDialog (parent,-1,_("Resample resolution"),wxDefaultPosition)
|
: wxDialog (parent,-1,_("Resample resolution"),wxDefaultPosition)
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(resample_toolbutton)));
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
AssFile *subs = AssFile::top;
|
AssFile *subs = AssFile::top;
|
||||||
grid = _grid;
|
grid = _grid;
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
#include "ass_time.h"
|
#include "ass_time.h"
|
||||||
#include "ass_dialogue.h"
|
#include "ass_dialogue.h"
|
||||||
#include "subs_edit_box.h"
|
#include "subs_edit_box.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
|
@ -58,6 +59,9 @@
|
||||||
DialogShiftTimes::DialogShiftTimes (wxWindow *parent,SubtitlesGrid *_grid)
|
DialogShiftTimes::DialogShiftTimes (wxWindow *parent,SubtitlesGrid *_grid)
|
||||||
: wxDialog(parent, -1, _("Shift Times"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("JumpTo"))
|
: wxDialog(parent, -1, _("Shift Times"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("JumpTo"))
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(shift_times_toolbutton)));
|
||||||
|
|
||||||
// Set initial values
|
// Set initial values
|
||||||
ready = true;
|
ready = true;
|
||||||
grid = _grid;
|
grid = _grid;
|
||||||
|
|
|
@ -65,6 +65,9 @@ enum {
|
||||||
DialogSpellChecker::DialogSpellChecker(wxFrame *parent)
|
DialogSpellChecker::DialogSpellChecker(wxFrame *parent)
|
||||||
: wxDialog(parent, -1, _("Spell Checker"), wxDefaultPosition, wxDefaultSize)
|
: wxDialog(parent, -1, _("Spell Checker"), wxDefaultPosition, wxDefaultSize)
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(spellcheck_toolbutton)));
|
||||||
|
|
||||||
// Get spell checker
|
// Get spell checker
|
||||||
spellchecker = SpellCheckerFactory::GetSpellChecker();
|
spellchecker = SpellCheckerFactory::GetSpellChecker();
|
||||||
if (!spellchecker) {
|
if (!spellchecker) {
|
||||||
|
|
|
@ -94,6 +94,9 @@ enum {
|
||||||
DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, SubtitlesGrid *_grid)
|
DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, SubtitlesGrid *_grid)
|
||||||
: wxDialog (parent,-1,_("Style Editor"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER,_T("DialogStyleEditor"))
|
: wxDialog (parent,-1,_("Style Editor"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER,_T("DialogStyleEditor"))
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(style_toolbutton)));
|
||||||
|
|
||||||
wxStopWatch performance_timer;
|
wxStopWatch performance_timer;
|
||||||
// Set styles
|
// Set styles
|
||||||
grid = _grid;
|
grid = _grid;
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include "standard_paths.h"
|
#include "standard_paths.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "subs_grid.h"
|
#include "subs_grid.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
|
@ -55,9 +56,7 @@ DialogStyleManager::DialogStyleManager (wxWindow *parent,SubtitlesGrid *_grid)
|
||||||
: wxDialog (parent,-1,_("Styles Manager"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE,_T("DialogStylesManager"))
|
: wxDialog (parent,-1,_("Styles Manager"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE,_T("DialogStylesManager"))
|
||||||
{
|
{
|
||||||
// Set icon
|
// Set icon
|
||||||
wxIcon ico;
|
SetIcon(BitmapToIcon(wxBITMAP(style_toolbutton)));
|
||||||
ico.CopyFromBitmap(wxBITMAP(style_toolbutton));
|
|
||||||
SetIcon(ico);
|
|
||||||
|
|
||||||
// Vars
|
// Vars
|
||||||
grid = _grid;
|
grid = _grid;
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include "audio_display.h"
|
#include "audio_display.h"
|
||||||
#include "audio_box.h"
|
#include "audio_box.h"
|
||||||
#include "hotkeys.h"
|
#include "hotkeys.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
|
@ -55,6 +56,9 @@
|
||||||
DialogStyling::DialogStyling (wxWindow *parent,SubtitlesGrid *_grid) :
|
DialogStyling::DialogStyling (wxWindow *parent,SubtitlesGrid *_grid) :
|
||||||
wxDialog (parent, -1, _("Styling assistant"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxRESIZE_BORDER)
|
wxDialog (parent, -1, _("Styling assistant"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxRESIZE_BORDER)
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(styling_toolbutton)));
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
grid = _grid;
|
grid = _grid;
|
||||||
audio = VideoContext::Get()->audio->box->audioDisplay;
|
audio = VideoContext::Get()->audio->box->audioDisplay;
|
||||||
|
|
|
@ -53,6 +53,9 @@
|
||||||
DialogTimingProcessor::DialogTimingProcessor(wxWindow *parent,SubtitlesGrid *_grid)
|
DialogTimingProcessor::DialogTimingProcessor(wxWindow *parent,SubtitlesGrid *_grid)
|
||||||
: wxDialog(parent,-1,_("Timing Post-Processor"),wxDefaultPosition,wxSize(400,250),wxDEFAULT_DIALOG_STYLE)
|
: wxDialog(parent,-1,_("Timing Post-Processor"),wxDefaultPosition,wxSize(400,250),wxDEFAULT_DIALOG_STYLE)
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(timing_processor_toolbutton)));
|
||||||
|
|
||||||
// Set variables
|
// Set variables
|
||||||
grid = _grid;
|
grid = _grid;
|
||||||
leadInTime = Options.AsText(_T("Audio lead in"));
|
leadInTime = Options.AsText(_T("Audio lead in"));
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include "audio_display.h"
|
#include "audio_display.h"
|
||||||
#include "frame_main.h"
|
#include "frame_main.h"
|
||||||
#include "hotkeys.h"
|
#include "hotkeys.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
|
@ -55,6 +56,9 @@
|
||||||
DialogTranslation::DialogTranslation (wxWindow *parent,AssFile *_subs,SubtitlesGrid *_grid,int startrow,bool preview)
|
DialogTranslation::DialogTranslation (wxWindow *parent,AssFile *_subs,SubtitlesGrid *_grid,int startrow,bool preview)
|
||||||
: wxDialog(parent, -1, _("Translation Assistant"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMINIMIZE_BOX, _T("TranslationAssistant"))
|
: wxDialog(parent, -1, _("Translation Assistant"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMINIMIZE_BOX, _T("TranslationAssistant"))
|
||||||
{
|
{
|
||||||
|
// Set icon
|
||||||
|
SetIcon(BitmapToIcon(wxBITMAP(translation_toolbutton)));
|
||||||
|
|
||||||
// Set variables
|
// Set variables
|
||||||
enablePreview = preview;
|
enablePreview = preview;
|
||||||
main = parent;
|
main = parent;
|
||||||
|
|
|
@ -347,3 +347,28 @@ int StringToFix(const wxString &str,size_t decimalPlaces,size_t start,size_t end
|
||||||
for (size_t i=0;i<decimalPlaces;i++) major *= 10;
|
for (size_t i=0;i<decimalPlaces;i++) major *= 10;
|
||||||
return (major + minor)*sign;
|
return (major + minor)*sign;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
// Convert a wxBitmap to wxIcon
|
||||||
|
// This is needed because wxIcon has to be 16x16 to work properly on win32
|
||||||
|
wxIcon BitmapToIcon(wxBitmap iconBmp) {
|
||||||
|
// Create the icon and background bmp
|
||||||
|
wxIcon ico;
|
||||||
|
wxBitmap bmp(16,16);
|
||||||
|
|
||||||
|
// Blit bitmap into 16x16 one (don't remove brackets)
|
||||||
|
{
|
||||||
|
wxMemoryDC dc;
|
||||||
|
dc.SelectObject(bmp);
|
||||||
|
dc.SetBackground(wxColour(192,192,192));
|
||||||
|
dc.Clear();
|
||||||
|
dc.DrawBitmap(iconBmp,0,0,false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create mask and convert to icon
|
||||||
|
wxMask *mask = new wxMask(bmp,wxColour(192,192,192));
|
||||||
|
bmp.SetMask(mask);
|
||||||
|
ico.CopyFromBitmap(bmp);
|
||||||
|
return ico;
|
||||||
|
}
|
||||||
|
|
|
@ -68,6 +68,7 @@ int SmallestPowerOf2(int x);
|
||||||
void GetWordBoundaries(const wxString text,IntPairVector &results,int start=0,int end=-1);
|
void GetWordBoundaries(const wxString text,IntPairVector &results,int start=0,int end=-1);
|
||||||
int StringToInt(const wxString &str,size_t start=0,size_t end=-1);
|
int StringToInt(const wxString &str,size_t start=0,size_t end=-1);
|
||||||
int StringToFix(const wxString &str,size_t decimalPlaces,size_t start=0,size_t end=-1);
|
int StringToFix(const wxString &str,size_t decimalPlaces,size_t start=0,size_t end=-1);
|
||||||
|
wxIcon BitmapToIcon(wxBitmap bmp);
|
||||||
|
|
||||||
|
|
||||||
//////////
|
//////////
|
||||||
|
|
Loading…
Reference in New Issue