Implement connection checking (setup name!)

This commit is contained in:
simon.kagstrom 2010-01-02 12:16:35 +00:00
parent 70b0064575
commit e903594921
3 changed files with 22 additions and 1 deletions

View File

@ -15,7 +15,18 @@ const char **exit_dialogue_messages = (const char*[]){
const char **network_port_dialogue_messages = (const char*[]){
/*00*/ "Please supply a number as",
/*01*/ "network port",
/*01*/ "network port.",
/*02*/ "#", /* Empty line */
/*03*/ "#",
/*04*/ "#",
/*05*/ "#",
/*06*/ "^|OK",
NULL
};
const char **network_unset_name_dlg = (const char*[]){
/*00*/ "Please setup a name to use",
/*01*/ "on network connections.",
/*02*/ "#", /* Empty line */
/*03*/ "#",
/*04*/ "#",

View File

@ -11,5 +11,6 @@ extern const char **options_menu_help[];
/* The menu messages are dynamically generated */
extern const char **network_menu_help[];
extern const char **network_port_dialogue_messages;
extern const char **network_unset_name_dlg;
#endif

View File

@ -63,6 +63,15 @@ public:
Gui::gui->kv->activate();
Gui::gui->kv->registerListener(this);
break;
case 4:
if ( strncmp(Gui::gui->np->NetworkName, "Unset", strlen("Unset")) == 0)
Gui::gui->pushDialogueBox(new DialogueBox(network_unset_name_dlg));
else
printf("Connect NYI\n"); // FIXME! Do the actual connect
break;
case 6:
printf("Send message NYI\n"); // FIXME! Send message
break;
default:
break;
}