Major cleanup to dynamic menu code, fixed menu flickering/slowness and replaced old hack to use wxWidgets 2.8.3's fixed handling of bitmaps in menus, which means that all the _disable bitmaps are now obsolete.
Originally committed to SVN as r1025.
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
|
@ -289,8 +289,9 @@ void FrameMain::InitMenu() {
|
||||||
|
|
||||||
// Create Edit menu
|
// Create Edit menu
|
||||||
editMenu = new wxMenu();
|
editMenu = new wxMenu();
|
||||||
AppendBitmapMenuItem(editMenu,Menu_Edit_Undo, _("&Undo\t") + Hotkeys.GetText(_T("Undo")), _("Undoes last action"),wxBITMAP(undo_button));
|
wxMenuItem *item;
|
||||||
AppendBitmapMenuItem(editMenu,Menu_Edit_Redo, _("&Redo\t") + Hotkeys.GetText(_T("Redo")), _("Redoes last action"),wxBITMAP(redo_button));
|
item = AppendBitmapMenuItem(editMenu,Menu_Edit_Undo, _("-") + wxString(_T("\t")) + Hotkeys.GetText(_T("Undo")), _("Undoes last action"),wxBITMAP(undo_button));
|
||||||
|
item = AppendBitmapMenuItem(editMenu,Menu_Edit_Redo, _("-") + wxString(_T("\t")) + Hotkeys.GetText(_T("Redo")), _("Redoes last action"),wxBITMAP(redo_button));
|
||||||
editMenu->AppendSeparator();
|
editMenu->AppendSeparator();
|
||||||
AppendBitmapMenuItem(editMenu,Menu_Edit_Cut, _("Cut Lines\t") + Hotkeys.GetText(_T("Cut")), _("Cut subtitles"), wxBITMAP(cut_button));
|
AppendBitmapMenuItem(editMenu,Menu_Edit_Cut, _("Cut Lines\t") + Hotkeys.GetText(_T("Cut")), _("Cut subtitles"), wxBITMAP(cut_button));
|
||||||
AppendBitmapMenuItem(editMenu,Menu_Edit_Copy, _("Copy Lines\t") + Hotkeys.GetText(_T("Copy")), _("Copy subtitles"), wxBITMAP(copy_button));
|
AppendBitmapMenuItem(editMenu,Menu_Edit_Copy, _("Copy Lines\t") + Hotkeys.GetText(_T("Copy")), _("Copy subtitles"), wxBITMAP(copy_button));
|
||||||
|
@ -538,55 +539,6 @@ void FrameMain::UpdateToolbar() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////
|
|
||||||
// Menu item enable/disable
|
|
||||||
void FrameMain::MenuItemEnable (int id, bool state,wxBitmap &bmp1,wxBitmap &bmp2) {
|
|
||||||
wxMenuItem *item = MenuBar->FindItem(id);
|
|
||||||
wxBitmap bmp = item->GetBitmap();
|
|
||||||
|
|
||||||
// No image
|
|
||||||
if (bmp.GetWidth() == 0) {
|
|
||||||
item->Enable(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Has image
|
|
||||||
else {
|
|
||||||
RebuildMenuItem(item->GetMenu(),id,bmp1,bmp2,state);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////
|
|
||||||
// Helper to rebuild menu items
|
|
||||||
wxMenuItem *FrameMain::RebuildMenuItem(wxMenu *menu,int findId,wxBitmap bmp1,wxBitmap bmp2,bool state) {
|
|
||||||
// Find pos
|
|
||||||
wxMenuItemList &items = menu->GetMenuItems();
|
|
||||||
int pos = -1;
|
|
||||||
for (size_t i=0;i<items.GetCount();i++) {
|
|
||||||
if (items[i]->GetId() == findId) {
|
|
||||||
pos = (int)i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (pos == -1) return NULL;
|
|
||||||
|
|
||||||
// Get ID and pointer
|
|
||||||
wxMenuItem *cur = items[pos];
|
|
||||||
int id = cur->GetId();
|
|
||||||
|
|
||||||
// Rebuild
|
|
||||||
wxMenuItem *newItem = new wxMenuItem(menu,id,cur->GetText(),cur->GetHelp(),cur->GetKind(),cur->GetSubMenu());
|
|
||||||
if (state) newItem->SetBitmap(bmp1);
|
|
||||||
else newItem->SetBitmap(bmp2);
|
|
||||||
|
|
||||||
// Swap them
|
|
||||||
menu->Destroy(id);
|
|
||||||
menu->Insert(pos,newItem);
|
|
||||||
menu->Enable(id,state);
|
|
||||||
return cur;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////
|
//////////////////
|
||||||
// Open subtitles
|
// Open subtitles
|
||||||
void FrameMain::LoadSubtitles (wxString filename,wxString charset) {
|
void FrameMain::LoadSubtitles (wxString filename,wxString charset) {
|
||||||
|
|
|
@ -237,8 +237,7 @@ private:
|
||||||
bool SaveSubtitles(bool saveas=false,bool withCharset=false);
|
bool SaveSubtitles(bool saveas=false,bool withCharset=false);
|
||||||
int TryToCloseSubs(bool enableCancel=true);
|
int TryToCloseSubs(bool enableCancel=true);
|
||||||
|
|
||||||
wxMenuItem *RebuildMenuItem(wxMenu *menu,int id,wxBitmap bmp1,wxBitmap bmp2,bool state);
|
void RebuildRecentList(wxString listName,wxMenu *menu,int startID);
|
||||||
void MenuItemEnable(int id,bool state,wxBitmap &bmp1,wxBitmap &bmp2);
|
|
||||||
void SynchronizeProject(bool FromSubs=false);
|
void SynchronizeProject(bool FromSubs=false);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -227,34 +227,44 @@ void FrameMain::OnGridEvent (wxCommandEvent &event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////
|
||||||
|
// Rebuild recent list
|
||||||
|
void FrameMain::RebuildRecentList(wxString listName,wxMenu *menu,int startID) {
|
||||||
|
// Wipe previous list
|
||||||
|
int count = (int)menu->GetMenuItemCount();
|
||||||
|
for (int i=count;--i>=0;) {
|
||||||
|
menu->Destroy(menu->FindItemByPosition(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rebuild
|
||||||
|
int added = 0;
|
||||||
|
wxString n;
|
||||||
|
wxArrayString entries = Options.GetRecentList(listName);
|
||||||
|
for (size_t i=0;i<entries.Count();i++) {
|
||||||
|
n = wxString::Format(_T("%i"),i+1);
|
||||||
|
if (i < 9) n = _T("&") + n;
|
||||||
|
wxFileName shortname(entries[i]);
|
||||||
|
wxString filename = shortname.GetFullName();
|
||||||
|
menu->Append(startID+i,n + _T(" ") + filename);
|
||||||
|
added++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Nothing added, add an empty placeholder
|
||||||
|
if (added == 0) menu->Append(startID,_("Empty"))->Enable(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////
|
////////////////////////
|
||||||
// Menu is being opened
|
// Menu is being opened
|
||||||
void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
||||||
// Get menu
|
// Get menu
|
||||||
//Freeze();
|
MenuBar->Freeze();
|
||||||
wxMenu *curMenu = event.GetMenu();
|
wxMenu *curMenu = event.GetMenu();
|
||||||
|
|
||||||
// File menu
|
// File menu
|
||||||
if (curMenu == fileMenu) {
|
if (curMenu == fileMenu) {
|
||||||
// Wipe recent
|
|
||||||
int count = (int)RecentSubs->GetMenuItemCount();
|
|
||||||
for (int i=count;--i>=0;) {
|
|
||||||
RecentSubs->Destroy(RecentSubs->FindItemByPosition(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rebuild recent
|
// Rebuild recent
|
||||||
int added = 0;
|
RebuildRecentList(_T("Recent sub"),RecentSubs,Menu_File_Recent);
|
||||||
wxString n;
|
|
||||||
wxArrayString entries = Options.GetRecentList(_T("Recent sub"));
|
|
||||||
for (size_t i=0;i<entries.Count();i++) {
|
|
||||||
n = wxString::Format(_T("%i"),i+1);
|
|
||||||
if (i < 9) n = _T("&") + n;
|
|
||||||
wxFileName shortname(entries[i]);
|
|
||||||
wxString filename = shortname.GetFullName();
|
|
||||||
RecentSubs->Append(Menu_File_Recent+i,n + _T(" ") + filename);
|
|
||||||
added++;
|
|
||||||
}
|
|
||||||
if (added == 0) RecentSubs->Append(Menu_File_Recent,_T("Empty"))->Enable(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// View menu
|
// View menu
|
||||||
|
@ -279,12 +289,10 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
||||||
else if (curMenu == videoMenu) {
|
else if (curMenu == videoMenu) {
|
||||||
bool state = VideoContext::Get()->IsLoaded();
|
bool state = VideoContext::Get()->IsLoaded();
|
||||||
|
|
||||||
// Rebuild icons
|
|
||||||
RebuildMenuItem(videoMenu,Menu_Video_JumpTo,wxBITMAP(jumpto_button),wxBITMAP(jumpto_disable_button),state);
|
|
||||||
RebuildMenuItem(videoMenu,Menu_Subs_Snap_Video_To_Start,wxBITMAP(video_to_substart),wxBITMAP(video_to_substart_disable),state);
|
|
||||||
RebuildMenuItem(videoMenu,Menu_Subs_Snap_Video_To_End,wxBITMAP(video_to_subend),wxBITMAP(video_to_subend_disable),state);
|
|
||||||
|
|
||||||
// Set states
|
// Set states
|
||||||
|
MenuBar->Enable(Menu_Video_JumpTo,state);
|
||||||
|
MenuBar->Enable(Menu_Subs_Snap_Video_To_Start,state);
|
||||||
|
MenuBar->Enable(Menu_Subs_Snap_Video_To_End,state);
|
||||||
MenuBar->Enable(Menu_View_Zoom,state);
|
MenuBar->Enable(Menu_View_Zoom,state);
|
||||||
MenuBar->Enable(Menu_View_Zoom_50,state);
|
MenuBar->Enable(Menu_View_Zoom_50,state);
|
||||||
MenuBar->Enable(Menu_View_Zoom_100,state);
|
MenuBar->Enable(Menu_View_Zoom_100,state);
|
||||||
|
@ -316,59 +324,10 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
||||||
case 4: MenuBar->Check(Menu_Video_AR_Custom,true); break;
|
case 4: MenuBar->Check(Menu_Video_AR_Custom,true); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wipe recent
|
// Rebuild recent lists
|
||||||
int count = (int)RecentVids->GetMenuItemCount();
|
RebuildRecentList(_T("Recent vid"),RecentVids,Menu_Video_Recent);
|
||||||
for (int i=count;--i>=0;) {
|
RebuildRecentList(_T("Recent timecodes"),RecentTimecodes,Menu_Timecodes_Recent);
|
||||||
RecentVids->Destroy(RecentVids->FindItemByPosition(i));
|
RebuildRecentList(_T("Recent Keyframes"),RecentKeyframes,Menu_Keyframes_Recent);
|
||||||
}
|
|
||||||
count = (int)RecentTimecodes->GetMenuItemCount();
|
|
||||||
for (int i=count;--i>=0;) {
|
|
||||||
RecentTimecodes->Destroy(RecentTimecodes->FindItemByPosition(i));
|
|
||||||
}
|
|
||||||
count = (int)RecentKeyframes->GetMenuItemCount();
|
|
||||||
for (int i=count;--i>=0;) {
|
|
||||||
RecentKeyframes->Destroy(RecentKeyframes->FindItemByPosition(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rebuild recent videos
|
|
||||||
int added = 0;
|
|
||||||
wxString n;
|
|
||||||
wxArrayString entries = Options.GetRecentList(_T("Recent vid"));
|
|
||||||
for (size_t i=0;i<entries.Count();i++) {
|
|
||||||
n = wxString::Format(_T("%i"),i+1);
|
|
||||||
if (i < 9) n = _T("&") + n;
|
|
||||||
wxFileName shortname(entries[i]);
|
|
||||||
wxString filename = shortname.GetFullName();
|
|
||||||
RecentVids->Append(Menu_Video_Recent+i,n + _T(" ") + filename);
|
|
||||||
added++;
|
|
||||||
}
|
|
||||||
if (added == 0) RecentVids->Append(Menu_Video_Recent,_T("Empty"))->Enable(false);
|
|
||||||
|
|
||||||
// Rebuild recent timecodes
|
|
||||||
added = 0;
|
|
||||||
entries = Options.GetRecentList(_T("Recent timecodes"));
|
|
||||||
for (size_t i=0;i<entries.Count();i++) {
|
|
||||||
n = wxString::Format(_T("%i"),i+1);
|
|
||||||
if (i < 9) n = _T("&") + n;
|
|
||||||
wxFileName shortname(entries[i]);
|
|
||||||
wxString filename = shortname.GetFullName();
|
|
||||||
RecentTimecodes->Append(Menu_Timecodes_Recent+i,n + _T(" ") + filename);
|
|
||||||
added++;
|
|
||||||
}
|
|
||||||
if (added == 0) RecentTimecodes->Append(Menu_Timecodes_Recent,_T("Empty"))->Enable(false);
|
|
||||||
|
|
||||||
// Rebuild recent Keyframes
|
|
||||||
added = 0;
|
|
||||||
entries = Options.GetRecentList(_T("Recent Keyframes"));
|
|
||||||
for (size_t i=0;i<entries.Count();i++) {
|
|
||||||
n = wxString::Format(_T("%i"),i+1);
|
|
||||||
if (i < 9) n = _T("&") + n;
|
|
||||||
wxFileName shortname(entries[i]);
|
|
||||||
wxString filename = shortname.GetFullName();
|
|
||||||
RecentKeyframes->Append(Menu_Keyframes_Recent+i,n + _T(" ") + filename);
|
|
||||||
added++;
|
|
||||||
}
|
|
||||||
if (added == 0) RecentKeyframes->Append(Menu_Keyframes_Recent,_T("Empty"))->Enable(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Audio menu
|
// Audio menu
|
||||||
|
@ -379,25 +338,8 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
||||||
MenuBar->Enable(Menu_Audio_Open_From_Video,vidstate);
|
MenuBar->Enable(Menu_Audio_Open_From_Video,vidstate);
|
||||||
MenuBar->Enable(Menu_Audio_Close,state);
|
MenuBar->Enable(Menu_Audio_Close,state);
|
||||||
|
|
||||||
// Wipe recent
|
|
||||||
int count = (int)RecentAuds->GetMenuItemCount();
|
|
||||||
for (int i=count;--i>=0;) {
|
|
||||||
RecentAuds->Destroy(RecentAuds->FindItemByPosition(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rebuild recent
|
// Rebuild recent
|
||||||
int added = 0;
|
RebuildRecentList(_T("Recent aud"),RecentAuds,Menu_Audio_Recent);
|
||||||
wxString n;
|
|
||||||
wxArrayString entries = Options.GetRecentList(_T("Recent aud"));
|
|
||||||
for (size_t i=0;i<entries.Count();i++) {
|
|
||||||
n = wxString::Format(_T("%i"),i+1);
|
|
||||||
if (i < 9) n = _T("&") + n;
|
|
||||||
wxFileName shortname(entries[i]);
|
|
||||||
wxString filename = shortname.GetFullName();
|
|
||||||
RecentAuds->Append(Menu_Audio_Recent+i,n + _T(" ") + filename);
|
|
||||||
added++;
|
|
||||||
}
|
|
||||||
if (added == 0) RecentAuds->Append(Menu_Audio_Recent,_T("Empty"))->Enable(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Subtitles menu
|
// Subtitles menu
|
||||||
|
@ -413,7 +355,7 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
||||||
MenuBar->Enable(MENU_INSERT_BEFORE,state);
|
MenuBar->Enable(MENU_INSERT_BEFORE,state);
|
||||||
MenuBar->Enable(MENU_INSERT_AFTER,state);
|
MenuBar->Enable(MENU_INSERT_AFTER,state);
|
||||||
MenuBar->Enable(MENU_SPLIT_BY_KARAOKE,state);
|
MenuBar->Enable(MENU_SPLIT_BY_KARAOKE,state);
|
||||||
RebuildMenuItem(subtitlesMenu,MENU_DELETE,wxBITMAP(delete_button),wxBITMAP(delete_disable_button),state);
|
MenuBar->Enable(MENU_DELETE,state);
|
||||||
state2 = count > 0 && VideoContext::Get()->IsLoaded();
|
state2 = count > 0 && VideoContext::Get()->IsLoaded();
|
||||||
MenuBar->Enable(MENU_INSERT_BEFORE_VIDEO,state2);
|
MenuBar->Enable(MENU_INSERT_BEFORE_VIDEO,state2);
|
||||||
MenuBar->Enable(MENU_INSERT_AFTER_VIDEO,state2);
|
MenuBar->Enable(MENU_INSERT_AFTER_VIDEO,state2);
|
||||||
|
@ -442,10 +384,10 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
||||||
|
|
||||||
// Video related
|
// Video related
|
||||||
bool state = VideoContext::Get()->IsLoaded();
|
bool state = VideoContext::Get()->IsLoaded();
|
||||||
RebuildMenuItem(timingMenu,Menu_Subs_Snap_Start_To_Video,wxBITMAP(substart_to_video),wxBITMAP(substart_to_video_disable),state);
|
MenuBar->Enable(Menu_Subs_Snap_Start_To_Video,state);
|
||||||
RebuildMenuItem(timingMenu,Menu_Subs_Snap_End_To_Video,wxBITMAP(subend_to_video),wxBITMAP(subend_to_video_disable),state);
|
MenuBar->Enable(Menu_Subs_Snap_End_To_Video,state);
|
||||||
RebuildMenuItem(timingMenu,Menu_Video_Snap_To_Scene,wxBITMAP(snap_subs_to_scene),wxBITMAP(snap_subs_to_scene_disable),state);
|
MenuBar->Enable(Menu_Video_Snap_To_Scene,state);
|
||||||
RebuildMenuItem(timingMenu,Menu_Video_Shift_To_Frame,wxBITMAP(shift_to_frame),wxBITMAP(shift_to_frame_disable),state);
|
MenuBar->Enable(Menu_Video_Shift_To_Frame,state);
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
state = count >= 2 && continuous;
|
state = count >= 2 && continuous;
|
||||||
|
@ -456,18 +398,22 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
||||||
// Edit menu
|
// Edit menu
|
||||||
else if (curMenu == editMenu) {
|
else if (curMenu == editMenu) {
|
||||||
// Undo state
|
// Undo state
|
||||||
curMenu->FindItemByPosition(0)->SetText(_("Undo ")+AssFile::GetUndoDescription()+_T("\t")+Hotkeys.GetText(_T("Undo")));
|
wxMenuItem *item;
|
||||||
curMenu->FindItemByPosition(1)->SetText(_("Redo ")+AssFile::GetRedoDescription()+_T("\t")+Hotkeys.GetText(_T("Redo")));
|
item = MenuBar->FindItem(Menu_Edit_Undo);
|
||||||
RebuildMenuItem(editMenu,Menu_Edit_Undo,wxBITMAP(undo_button),wxBITMAP(undo_disable_button),!AssFile::IsUndoStackEmpty());
|
item->SetText(_("&Undo")+wxString(_T(" "))+AssFile::GetUndoDescription()+_T("\t")+Hotkeys.GetText(_T("Undo")));
|
||||||
RebuildMenuItem(editMenu,Menu_Edit_Redo,wxBITMAP(redo_button),wxBITMAP(redo_disable_button),!AssFile::IsRedoStackEmpty());
|
item->SetBitmap(wxBITMAP(undo_button));
|
||||||
|
item->Enable(!AssFile::IsUndoStackEmpty());
|
||||||
|
item = MenuBar->FindItem(Menu_Edit_Redo);
|
||||||
|
item->SetText(_("&Redo")+wxString(_T(" "))+AssFile::GetRedoDescription()+_T("\t")+Hotkeys.GetText(_T("Redo")));
|
||||||
|
item->SetBitmap(wxBITMAP(redo_button));
|
||||||
|
item->Enable(!AssFile::IsRedoStackEmpty());
|
||||||
|
|
||||||
// Copy/cut/paste
|
// Copy/cut/paste
|
||||||
wxArrayInt sels = SubsBox->GetSelection();
|
wxArrayInt sels = SubsBox->GetSelection();
|
||||||
bool state = (sels.Count() > 0);
|
bool state = (sels.Count() > 0);
|
||||||
RebuildMenuItem(editMenu,Menu_Edit_Cut,wxBITMAP(cut_button),wxBITMAP(cut_disable_button),state);
|
MenuBar->Enable(Menu_Edit_Cut,state);
|
||||||
RebuildMenuItem(editMenu,Menu_Edit_Copy,wxBITMAP(copy_button),wxBITMAP(copy_disable_button),state);
|
MenuBar->Enable(Menu_Edit_Copy,state);
|
||||||
RebuildMenuItem(editMenu,Menu_Edit_Paste,wxBITMAP(paste_button),wxBITMAP(paste_disable_button),state);
|
MenuBar->Enable(Menu_Edit_Paste,state);
|
||||||
MenuBar->Enable(Menu_Edit_Paste_Over,state);
|
MenuBar->Enable(Menu_Edit_Paste_Over,state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -494,7 +440,7 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Thaw();
|
MenuBar->Thaw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,6 @@ resample_toolbutton BITMAP "bitmaps/resample.bmp"
|
||||||
timing_processor_toolbutton BITMAP "bitmaps/timing_processor.bmp"
|
timing_processor_toolbutton BITMAP "bitmaps/timing_processor.bmp"
|
||||||
shift_times_toolbutton BITMAP "bitmaps/shift_times.bmp"
|
shift_times_toolbutton BITMAP "bitmaps/shift_times.bmp"
|
||||||
jumpto_button BITMAP "bitmaps/jumpto.bmp"
|
jumpto_button BITMAP "bitmaps/jumpto.bmp"
|
||||||
jumpto_disable_button BITMAP "bitmaps/jumpto_disable.bmp"
|
|
||||||
contents_button BITMAP "bitmaps/contents.bmp"
|
contents_button BITMAP "bitmaps/contents.bmp"
|
||||||
zoom_in_button BITMAP "bitmaps/zoom_in.bmp"
|
zoom_in_button BITMAP "bitmaps/zoom_in.bmp"
|
||||||
zoom_out_button BITMAP "bitmaps/zoom_out.bmp"
|
zoom_out_button BITMAP "bitmaps/zoom_out.bmp"
|
||||||
|
@ -62,34 +61,22 @@ substart_to_video BITMAP "bitmaps/substart_to_video.bmp"
|
||||||
subend_to_video BITMAP "bitmaps/subend_to_video.bmp"
|
subend_to_video BITMAP "bitmaps/subend_to_video.bmp"
|
||||||
video_to_substart BITMAP "bitmaps/video_to_substart.bmp"
|
video_to_substart BITMAP "bitmaps/video_to_substart.bmp"
|
||||||
video_to_subend BITMAP "bitmaps/video_to_subend.bmp"
|
video_to_subend BITMAP "bitmaps/video_to_subend.bmp"
|
||||||
substart_to_video_disable BITMAP "bitmaps/substart_to_video_disable.bmp"
|
|
||||||
subend_to_video_disable BITMAP "bitmaps/subend_to_video_disable.bmp"
|
|
||||||
video_to_substart_disable BITMAP "bitmaps/video_to_substart_disable.bmp"
|
|
||||||
video_to_subend_disable BITMAP "bitmaps/video_to_subend_disable.bmp"
|
|
||||||
snap_subs_to_scene BITMAP "bitmaps/snap_to_scene.bmp"
|
snap_subs_to_scene BITMAP "bitmaps/snap_to_scene.bmp"
|
||||||
snap_subs_to_scene_disable BITMAP "bitmaps/snap_to_scene_disable.bmp"
|
|
||||||
copy_button BITMAP "bitmaps/copy.bmp"
|
copy_button BITMAP "bitmaps/copy.bmp"
|
||||||
paste_button BITMAP "bitmaps/paste.bmp"
|
paste_button BITMAP "bitmaps/paste.bmp"
|
||||||
paste_over_button BITMAP "bitmaps/paste_over.bmp"
|
paste_over_button BITMAP "bitmaps/paste_over.bmp"
|
||||||
cut_button BITMAP "bitmaps/cut.bmp"
|
cut_button BITMAP "bitmaps/cut.bmp"
|
||||||
undo_button BITMAP "bitmaps/undo.bmp"
|
undo_button BITMAP "bitmaps/undo.bmp"
|
||||||
redo_button BITMAP "bitmaps/redo.bmp"
|
redo_button BITMAP "bitmaps/redo.bmp"
|
||||||
copy_disable_button BITMAP "bitmaps/copy_disable.bmp"
|
|
||||||
paste_disable_button BITMAP "bitmaps/paste_disable.bmp"
|
|
||||||
cut_disable_button BITMAP "bitmaps/cut_disable.bmp"
|
|
||||||
undo_disable_button BITMAP "bitmaps/undo_disable.bmp"
|
|
||||||
redo_disable_button BITMAP "bitmaps/redo_disable.bmp"
|
|
||||||
irc_button BITMAP "bitmaps/irc.bmp"
|
irc_button BITMAP "bitmaps/irc.bmp"
|
||||||
find_button BITMAP "bitmaps/find.bmp"
|
find_button BITMAP "bitmaps/find.bmp"
|
||||||
find_next_button BITMAP "bitmaps/find_next.bmp"
|
find_next_button BITMAP "bitmaps/find_next.bmp"
|
||||||
replace_button BITMAP "bitmaps/replace.bmp"
|
replace_button BITMAP "bitmaps/replace.bmp"
|
||||||
delete_button BITMAP "bitmaps/delete.bmp"
|
delete_button BITMAP "bitmaps/delete.bmp"
|
||||||
delete_disable_button BITMAP "bitmaps/delete_disable.bmp"
|
|
||||||
null_button BITMAP "bitmaps/null_button.bmp"
|
null_button BITMAP "bitmaps/null_button.bmp"
|
||||||
select_visible_button BITMAP "bitmaps/select_visible.bmp"
|
select_visible_button BITMAP "bitmaps/select_visible.bmp"
|
||||||
toggle_tag_hiding BITMAP "bitmaps/toggle_tag_hiding.bmp"
|
toggle_tag_hiding BITMAP "bitmaps/toggle_tag_hiding.bmp"
|
||||||
shift_to_frame BITMAP "bitmaps/shift_to_frame.bmp"
|
shift_to_frame BITMAP "bitmaps/shift_to_frame.bmp"
|
||||||
shift_to_frame_disable BITMAP "bitmaps/shift_to_frame_disable.bmp"
|
|
||||||
bugtracker_button BITMAP "bitmaps/bugtracker.bmp"
|
bugtracker_button BITMAP "bitmaps/bugtracker.bmp"
|
||||||
website_button BITMAP "bitmaps/website.bmp"
|
website_button BITMAP "bitmaps/website.bmp"
|
||||||
forums_button BITMAP "bitmaps/forums.bmp"
|
forums_button BITMAP "bitmaps/forums.bmp"
|
||||||
|
|
|
@ -190,10 +190,11 @@ wxString PrettySize(int bytes) {
|
||||||
|
|
||||||
//////////////////////////////////
|
//////////////////////////////////
|
||||||
// Append a menu item with bitmap
|
// Append a menu item with bitmap
|
||||||
void AppendBitmapMenuItem (wxMenu* parentMenu,int id,wxString text,wxString help,wxBitmap bmp) {
|
wxMenuItem* AppendBitmapMenuItem (wxMenu* parentMenu,int id,wxString text,wxString help,wxBitmap bmp) {
|
||||||
wxMenuItem *cur = new wxMenuItem(parentMenu,id,text,help);
|
wxMenuItem *cur = new wxMenuItem(parentMenu,id,text,help);
|
||||||
cur->SetBitmap(bmp);
|
cur->SetBitmap(bmp);
|
||||||
parentMenu->Append(cur);
|
parentMenu->Append(cur);
|
||||||
|
return cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ wxString PrettyFloatD(double src);
|
||||||
wxString FloatToString(double value);
|
wxString FloatToString(double value);
|
||||||
wxString IntegerToString(int value);
|
wxString IntegerToString(int value);
|
||||||
wxString PrettySize(int bytes);
|
wxString PrettySize(int bytes);
|
||||||
void AppendBitmapMenuItem (wxMenu* parentMenu,int id,wxString text,wxString help,wxBitmap bmp);
|
wxMenuItem *AppendBitmapMenuItem (wxMenu* parentMenu,int id,wxString text,wxString help,wxBitmap bmp);
|
||||||
int SmallestPowerOf2(int x);
|
int SmallestPowerOf2(int x);
|
||||||
|
|
||||||
|
|
||||||
|
|