Ticket #4236: reload.patch
| File reload.patch, 1.4 KB (added by , 18 years ago) |
|---|
-
programs/mythfrontend/main.cpp
old new 72 72 RunProgramGuide(chanid, channum); 73 73 } 74 74 75 76 77 75 78 void startFinder(void) 76 79 { 77 80 RunProgramFind(); … … 761 764 } 762 765 } 763 766 767 764 768 void InitJumpPoints(void) 765 769 { 766 770 REG_JUMP("Reload Theme", "", "", reloadTheme); … … 784 788 TV::SetEmbedPbbFunc(PlaybackBox::RunPlaybackBox); 785 789 } 786 790 791 792 void signal_USR1_handler(int){ 793 VERBOSE(VB_GENERAL, "SIG USR1 received, reloading theme"); 794 RemoteSendMessage("CLEAR_SETTINGS_CACHE"); 795 gContext->ActivateSettingsCache(false); 796 qApp->processEvents(); 797 GetMythMainWindow()->JumpTo("Reload Theme"); 798 gContext->removeCurrentLocation(); 799 gContext->ActivateSettingsCache(true); 800 } 801 787 802 int internal_media_init() 788 803 { 789 804 REG_MEDIAPLAYER("Internal", "MythTV's native media player.", … … 1411 1426 1412 1427 if (!RunMenu(themedir)) 1413 1428 break; 1414 1429 struct sigaction new_action, old_action; 1430 /* Set up the structure to specify the new action. */ 1431 new_action.sa_handler = signal_USR1_handler; 1432 ::sigemptyset(&new_action.sa_mask); 1433 new_action.sa_flags = 0; 1434 ::sigaction (SIGUSR1, &new_action, &old_action); 1415 1435 qApp->setMainWidget(mainWindow); 1416 1436 qApp->exec(); 1417 1437 } while (!(exitstatus = handleExit()));
