• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Virtual machine Management Terminal User Interface


Commit MetaInfo

Révision576b2cfeebcb0397a69ce514ead3f94957bf06fa (tree)
l'heure2022-07-24 20:31:02
AuteurKoine Yuusuke(koinec) <koinec@user...>
CommiterKoine Yuusuke(koinec)

Message de Log

Implement Check Yes/No for system quit.

Change Summary

Modification

--- a/src/tuicmd.c
+++ b/src/tuicmd.c
@@ -46,19 +46,18 @@ int
4646
4747 pstr_prompt = TuiKey_GetPromptString();
4848
49+ mvwprintw( gp_cmd_win, 0, 0, "%s", pstr_prompt );
50+
4951 i_mode = TuiKey_GetMode();
5052 if( TUIKEY_MODE_INPUTSTR == i_mode ) {
5153 pstr_input = TuiKey_GetInputStringAndPasswd( NULL );
52- mvwprintw( gp_cmd_win, 0, 0, "%s => %s", pstr_prompt, pstr_input );
54+ wprintw( gp_cmd_win, " => %s", pstr_input );
5355 }
5456 else if( TUIKEY_MODE_INPUTPASSWD == i_mode ) {
5557 pstr_input = TuiKey_GetInputStringAndPasswd( &i_len );
5658 str_pass[ i_len-- ] = '\0';
5759 for( ; 0 <= i_len; i_len-- ) { str_pass[ i_len ] = '*'; }
58- mvwprintw( gp_cmd_win, 0, 0, "%s => %s", pstr_prompt, str_pass );
59- }
60- if( TUIKEY_MODE_VMLIST == i_mode ) {
61- mvwprintw( gp_cmd_win, 0, 0, "%s :", pstr_prompt );
60+ wprintw( gp_cmd_win, " => %s", str_pass );
6261 }
6362
6463 touchwin( gp_cmd_win );
--- a/src/tuikey.c
+++ b/src/tuikey.c
@@ -159,13 +159,13 @@ int
159159 strncpy( gt_input.str_msg, "Input 'Y'/'y'(YES) or OtherKey(No) ? ", sizeof( gt_input.str_msg ) );
160160 }
161161 else {
162- gi_keymode = TUIKEY_MODE_VMLIST;
162+ gi_keymode = TUIKEY_MODE_VMLIST;
163163
164- gt_input.b_reqcmd = REQUEST_CMD_NONE;
165- gt_input.i_hvisor = HVISOR_ID_NONE;
166- gt_input.i_guest = GUEST_ID_NONE;
164+ gt_input.b_reqcmd = REQUEST_CMD_NONE;
165+ gt_input.i_hvisor = HVISOR_ID_NONE;
166+ gt_input.i_guest = GUEST_ID_NONE;
167167
168- strncpy( gt_input.str_msg, "Input Command", sizeof( gt_input.str_msg ) );
168+ strncpy( gt_input.str_msg, "Input Command :", sizeof( gt_input.str_msg ) );
169169 }
170170
171171 return 0x00;
@@ -179,6 +179,8 @@ int
179179 {
180180 int i_ret = 0x00;
181181
182+ if( ERR == i_key ) { return i_ret; }
183+
182184 if( isprint( i_key ) ) {
183185 if( gt_input.i_inputlen < sizeof(gt_input.str_input) - 1) {
184186 gt_input.str_input[gt_input.i_inputlen++] = (char)i_key;
@@ -218,8 +220,13 @@ int
218220 {
219221 int i_ret = 0x00;
220222
223+ if( ERR == i_key ) { return i_ret; }
224+
221225 if(( 'Y' == i_key) || ( 'y' == i_key )) {
222- ReqCtl_CreateRequest( gt_input.b_reqcmd, gt_input.i_hvisor, gt_input.i_guest, NULL );
226+ if( REQUEST_CMD_SYS_QUIT != gt_input.b_reqcmd )
227+ { ReqCtl_CreateRequest( gt_input.b_reqcmd, gt_input.i_hvisor, gt_input.i_guest, NULL ); }
228+ else
229+ { i_ret = 0x01; }
223230 }
224231
225232 TuiKey_ChangeMode( TUIKEY_MODE_VMLIST, REQUEST_CMD_NONE, 0x00, 0x00 );
@@ -238,7 +245,7 @@ int
238245 switch( i_key ) {
239246 // Quit VMTUI ----
240247 case 'q':
241- i_ret = 0x01;
248+ TuiKey_ChangeMode( TUIKEY_MODE_YESNO, REQUEST_CMD_SYS_QUIT, HVISOR_ID_NONE, GUEST_ID_NONE );
242249 break;
243250
244251 // PrevPage Info. Window ----
@@ -279,10 +286,6 @@ int
279286 refresh();
280287 break;
281288
282- case 'i':
283- //TuiKey_ChangeMode( TUIKEY_MODE_YESNO, REQUEST_ID_NONE,
284- refresh();
285- break;
286289 /*
287290 case ERR:
288291 break;