+static int menu_sysinfo_execute(struct pmenu_item *item)
+{
+ cui_show_sysinfo(cui_from_item(item));
+ return 0;
+}
+
+static int menu_config_execute(struct pmenu_item *item)
+{
+ cui_show_config(cui_from_item(item));
+ return 0;
+}
+
+static int menu_lang_execute(struct pmenu_item *item)
+{
+ cui_show_lang(cui_from_item(item));
+ return 0;
+}
+
+static int menu_statuslog_execute(struct pmenu_item *item)
+{
+ cui_show_statuslog(cui_from_item(item));
+ return 0;
+}
+
+static void menu_reinit_cb(struct nc_scr *scr)
+{
+ struct pmenu *menu = pmenu_from_scr(scr);
+
+ cui_send_reinit(cui_from_pmenu(menu));
+}
+
+static int menu_reinit_execute(struct pmenu_item *item)
+{
+ struct cui *cui = cui_from_item(item);
+
+ if (!cui->client)
+ return 0;
+
+ /* If we don't need to authenticate, send the reinit immediately */
+ if (discover_client_authenticated(cui->client)) {
+ cui_send_reinit(cui);
+ return 0;
+ }
+
+ if (!cui->current)
+ return 0;
+
+ if (cui->auth_screen)
+ return 0;
+
+ cui->auth_screen = auth_screen_init(cui, cui->current->main_ncw,
+ false, menu_reinit_cb, cui_auth_exit);
+
+ if (cui->auth_screen)
+ cui_set_current(cui, auth_screen_scr(cui->auth_screen));
+
+ return 0;
+}
+
+static int menu_add_url_execute(struct pmenu_item *item)
+{
+ if (cui_from_item(item)->client)
+ cui_show_add_url(cui_from_item(item));
+ return 0;
+}
+
+static int menu_plugin_execute(struct pmenu_item *item)
+{
+ if (cui_from_item(item)->client)
+ cui_show_plugin_menu(cui_from_item(item));
+ return 0;
+}
+
+static void cui_boot_cb(struct nc_scr *scr)
+{
+ struct pmenu *menu = pmenu_from_scr(scr);
+
+ if (pmenu_find_selected(menu))
+ cui_boot(pmenu_find_selected(menu));
+}
+
+static int cui_boot_check(struct pmenu_item *item)
+{
+ struct cui_opt_data *cod = cod_from_item(item);
+ struct cui *cui = cui_from_item(item);
+
+ if (discover_client_authenticated(cui->client))
+ return cui_boot(item);
+
+ /* Client doesn't need authentication to boot the default option */
+ if (cui->default_item == cod->opt_hash)
+ return cui_boot(item);
+
+ cui_show_auth(cui, item->pmenu->scr.main_ncw, false, cui_boot_cb);
+
+ return 0;
+}
+