• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得windowscocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Virtual machine Management Terminal User Interface


Commit MetaInfo

Révision1f89ee612f7c90f4831a8278244103cc7ec84688 (tree)
l'heure2022-07-18 20:30:02
AuteurKoine Yuusuke(koinec) <koinec@user...>
CommiterKoine Yuusuke(koinec)

Message de Log

Support HyperVisor Connecting Animation.

Change Summary

Modification

--- a/src/tuisys.c
+++ b/src/tuisys.c
@@ -85,11 +85,12 @@ int
8585 if( has_colors() ) {
8686 start_color();
8787 // init_pair( 0, COLOR_WHITE, COLOR_BLACK ); // VMList Guest
88- init_pair( 1, COLOR_WHITE, COLOR_BLACK ); // VMList Guest
89- init_pair( 2, COLOR_GREEN, COLOR_BLACK ); // VMList HVisor (Running)
90- init_pair( 3, COLOR_CYAN, COLOR_BLACK ); // VMList Guest (Running)
91- init_pair( 4, COLOR_YELLOW, COLOR_BLACK ); // VMList Guest (Others)
92- init_pair( 5, COLOR_RED, COLOR_BLACK ); // VMList HVisor (Not Running)
88+ init_pair( 1, COLOR_WHITE, COLOR_BLACK ); // VMList Guest
89+ init_pair( 2, COLOR_GREEN, COLOR_BLACK ); // VMList HVisor (Running)
90+ init_pair( 3, COLOR_CYAN, COLOR_BLACK ); // VMList Guest (Running)
91+ init_pair( 4, COLOR_YELLOW, COLOR_BLACK ); // VMList Guest (Others)
92+ init_pair( 5, COLOR_RED, COLOR_BLACK ); // VMList HVisor (Not Running)
93+ init_pair( 6, COLOR_MAGENTA, COLOR_BLACK ); // VMList HVisor (Connecting)
9394 init_pair( 10, COLOR_YELLOW, COLOR_BLUE ); // VmTui Title Line
9495 init_pair( 11, COLOR_WHITE, COLOR_BLUE ); // Guest Info Title Line
9596 init_pair( 12, COLOR_GREEN, COLOR_BLUE ); // HVisor Info Title Line
--- a/src/tuivmlist.c
+++ b/src/tuivmlist.c
@@ -219,6 +219,16 @@ int
219219 strncpy( str_stat, "* ONLINE", 15 );
220220 i_attr = COLOR_PAIR(2); // Green-Black
221221 }
222+ else if( HVISOR_STATUS_CONNECTING & p_hvisor->dw_status ) {
223+ if( 2 < p_item->i_animation ) { p_item->i_animation = 0; }
224+ str_stat[0] = ((0 == p_item->i_animation) ? '-' :
225+ ((1 == p_item->i_animation) ? '\\' : '/'));
226+ str_stat[1] = '\0';
227+ strncat( str_stat, " Connecting.", 15 );
228+ p_item->i_animation++;
229+
230+ i_attr = COLOR_PAIR(6); // Green-Black
231+ }
222232 else {
223233 strncpy( str_stat, "X NotConnect", 15 );
224234 i_attr = COLOR_PAIR(5); // Red-Black
--- a/src/tuivmlist.h
+++ b/src/tuivmlist.h
@@ -37,6 +37,7 @@ typedef struct {
3737 int i_hvisor;
3838 int i_guest;
3939 int i_subitems;
40+ int i_animation;
4041 } VmList_Item;
4142
4243