From f258f6c4ac8454a79e3c670d5164c012c21fbd28 Mon Sep 17 00:00:00 2001 From: Nick Bisby Date: Tue, 19 Mar 2019 09:11:46 -0500 Subject: [PATCH] Clean up some sign out bits --- source/ShowScenes.brs | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/source/ShowScenes.brs b/source/ShowScenes.brs index b57d2679..8a85901a 100644 --- a/source/ShowScenes.brs +++ b/source/ShowScenes.brs @@ -100,6 +100,7 @@ sub ShowLibrarySelect() sidepanel = scene.findNode("options") new_options = [] options_buttons = [ + {"title": "Change server", "id": "change_server"}, {"title": "Sign out", "id": "sign_out"} ] for each opt in options_buttons @@ -119,6 +120,11 @@ sub ShowLibrarySelect() return else if nodeEventQ(msg, "escape") and msg.getNode() = "search" library.setFocus(true) + else if nodeEventQ(msg, "escape") and msg.getNode() = "change_server" + unset_setting("server") + unset_setting("port") + SignOut() + return else if nodeEventQ(msg, "escape") and msg.getNode() = "sign_out" SignOut() return @@ -216,16 +222,6 @@ sub ShowMovieOptions(library) o.value = get_user_setting(opt.key, opt.default) new_options.append([o]) end for - options_buttons = [ - {"title": "Sign out", "id": "sign_out"} - ] - for each opt in options_buttons - o = CreateObject("roSGNode", "OptionsButton") - o.title = opt.title - o.id = opt.id - new_options.append([o]) - o.observeField("escape", port) - end for sidepanel.options = new_options sidepanel.observeField("escape", port) @@ -238,9 +234,6 @@ sub ShowMovieOptions(library) options.setFocus(true) else if nodeEventQ(msg, "escape") and msg.getNode() = "options" options.setFocus(true) - else if nodeEventQ(msg, "escape") and msg.getNode() = "sign_out" - SignOut() - return else if nodeEventQ(msg, "pageSelected") and pager.pageSelected <> invalid pager.pageSelected = invalid page_num = int(val(msg.getData().id))