public void run() {
ChannelList.completeChannelLoading();
initializeAutomaticDownload();
if (Launch.isOsWindowsNtBranch()) {
try {
RegistryKey desktopSettings = new RegistryKey(
RootKey.HKEY_CURRENT_USER, "Control Panel\\Desktop");
RegistryValue autoEnd = desktopSettings
.getValue("AutoEndTasks");
if (autoEnd.getData().equals("1")) {
RegistryValue killWait = desktopSettings
.getValue("WaitToKillAppTimeout");
int i = Integer.parseInt(killWait.getData().toString());
if (i < 5000) {
JOptionPane pane = new JOptionPane();
String cancel = mLocalizer.msg("registryCancel",
"Close TV-Browser");
String dontDoIt = mLocalizer.msg("registryJumpOver",
"Not this time");
pane.setOptions(new String[] {
Localizer.getLocalization(Localizer.I18N_OK), dontDoIt,
cancel });
pane.setOptionType(JOptionPane.YES_NO_CANCEL_OPTION);
pane.setMessageType(JOptionPane.WARNING_MESSAGE);
pane
.setMessage(mLocalizer
.msg(
"registryWarning",
"The fast shutdown of Windows is activated.\nThe timeout to wait for before Windows is closing an application is too short,\nto give TV-Browser enough time to save all settings.\n\nThe setting hasn't the default value. It was changed by a tool or by you.\nTV-Browser will now try to change the timeout.\n\nIf you don't want to change this timeout select 'Not this time' or 'Close TV-Browser'."));
pane.setInitialValue(mLocalizer.msg("registryCancel",
"Close TV-Browser"));
JDialog d = pane.createDialog(UiUtilities
.getLastModalChildOf(mainFrame), UIManager
.getString("OptionPane.messageDialogTitle"));
d.setModal(true);
UiUtilities.centerAndShow(d);
if (pane.getValue() == null
|| pane.getValue().equals(cancel)) {
mainFrame.quit();
} else if (!pane.getValue().equals(dontDoIt)) {
try {
killWait.setData("5000");
desktopSettings.setValue(killWait);
JOptionPane
.showMessageDialog(
UiUtilities.getLastModalChildOf(mainFrame),
mLocalizer
.msg("registryChanged",