--- programs/mythfrontend/main.cpp 2007-11-13 15:34:40.000000000 +0000 +++ programs/mythfrontend/main.cpp.new 2007-11-13 15:36:15.000000000 +0000 @@ -72,6 +72,9 @@ RunProgramGuide(chanid, channum); } + + + void startFinder(void) { RunProgramFind(); @@ -761,6 +764,7 @@ } } + void InitJumpPoints(void) { REG_JUMP("Reload Theme", "", "", reloadTheme); @@ -784,6 +788,17 @@ TV::SetEmbedPbbFunc(PlaybackBox::RunPlaybackBox); } + +void signal_USR1_handler(int){ + VERBOSE(VB_GENERAL, "SIG USR1 received, reloading theme"); + RemoteSendMessage("CLEAR_SETTINGS_CACHE"); + gContext->ActivateSettingsCache(false); + qApp->processEvents(); + GetMythMainWindow()->JumpTo("Reload Theme"); + gContext->removeCurrentLocation(); + gContext->ActivateSettingsCache(true); +} + int internal_media_init() { REG_MEDIAPLAYER("Internal", "MythTV's native media player.", @@ -1411,7 +1426,12 @@ if (!RunMenu(themedir)) break; - + struct sigaction new_action, old_action; + /* Set up the structure to specify the new action. */ + new_action.sa_handler = signal_USR1_handler; + ::sigemptyset(&new_action.sa_mask); + new_action.sa_flags = 0; + ::sigaction (SIGUSR1, &new_action, &old_action); qApp->setMainWidget(mainWindow); qApp->exec(); } while (!(exitstatus = handleExit()));