Ticket #7247: update-statusbar-when-theme-changes.patch
File update-statusbar-when-theme-changes.patch, 2.0 KB (added by , 10 years ago) |
---|
-
src/interface/Mainfrm.cpp
304 304 // so that contextchange events can be processed in the right order. 305 305 m_pContextControl = new CContextControl(this); 306 306 307 m_pStatusBar = new CStatusBar(this); 308 if (m_pStatusBar) 309 { 310 m_pActivityLed[0] = new CLed(m_pStatusBar, 0); 311 m_pActivityLed[1] = new CLed(m_pStatusBar, 1); 307 CreateStatusBar(); 312 308 313 m_pStatusBar->AddField(-1, widget_led_recv, m_pActivityLed[1]);314 m_pStatusBar->AddField(-1, widget_led_send, m_pActivityLed[0]);315 316 SetStatusBar(m_pStatusBar);317 }318 319 309 m_closeEventTimer.SetOwner(this); 320 310 321 311 if (CFilterManager::HasActiveFilters(true)) … … 531 521 #endif 532 522 } 533 523 524 bool CMainFrame::CreateStatusBar() { 525 526 wxGetApp().AddStartupProfileRecord(_T("CMainFrame::CreateMenus")); 527 if (m_pStatusBar) 528 { 529 SetStatusBar(0); 530 delete m_pStatusBar; 531 m_pStatusBar = 0; 532 } 533 534 m_pStatusBar = new CStatusBar(this); 535 if (m_pStatusBar) 536 { 537 m_pActivityLed[0] = new CLed(m_pStatusBar, 0); 538 m_pActivityLed[1] = new CLed(m_pStatusBar, 1); 539 540 m_pStatusBar->AddField(-1, widget_led_recv, m_pActivityLed[1]); 541 m_pStatusBar->AddField(-1, widget_led_send, m_pActivityLed[0]); 542 543 SetStatusBar(m_pStatusBar); 544 } 545 546 return true; 547 } 548 534 549 bool CMainFrame::CreateMenus() 535 550 { 536 551 wxGetApp().AddStartupProfileRecord(_T("CMainFrame::CreateMenus")); … … 1574 1589 CreateMainToolBar(); 1575 1590 if (m_pToolBar) 1576 1591 m_pToolBar->UpdateToolbarState(); 1592 CreateStatusBar(); 1577 1593 } 1578 1594 1579 1595 if (oldLang != newLang || -
src/interface/Mainfrm.h
74 74 void FixTabOrder(); 75 75 76 76 bool CloseDialogsAndQuit(wxCloseEvent &event); 77 bool CreateStatusBar(); 77 78 bool CreateMenus(); 78 79 bool CreateQuickconnectBar(); 79 80 bool CreateMainToolBar();