OSDN Git Service

bump時に一瞬GUIの表示がERRORになるのを修正。
[peercast-im/PeerCastIM.git] / c: / Git / PeerCast.root / PeerCast / ui / win32 / simple / gui.cpp
index d1768b7..82e6e0f 100644 (file)
@@ -366,6 +366,7 @@ int ChannelData::drawChannel(Graphics *g, int x, int y){
        // \83X\83e\81[\83^\83X\95\\8e¦
        Gdiplus::Image *img = NULL;
        unsigned int nowTime = sys->getTime();
+       Channel *ch = chanMgr->findChannelByChannelID(this->channel_id);
        switch(this->getStatus()){
                case Channel::S_IDLE:
                        img = img_idle;
@@ -401,7 +402,14 @@ int ChannelData::drawChannel(Graphics *g, int x, int y){
                        img = img_broad_ok;
                        break;
                case Channel::S_ERROR:
-                       img = img_error;
+                       // bump\8e\9e\82É\83G\83\89\81[\82ª\95\\8e¦\82³\82ê\82é\82Ì\82ð\96h\8e~
+                       if (ch && ch->bumped)
+                       {
+                               img = img_connect;
+                       } else
+                       {
+                               img = img_error;
+                       }
                        break;
                default:
                        img = img_idle;
@@ -968,7 +976,7 @@ THREAD_PROC GUIDataUpdate(ThreadInfo *thread){
                                while(cd){
                                        ServentData *sv = cd->findServentData(s->servent_id);
                                        // ServentData\82ª\82 \82ê\82Î
-                                       if (sv){
+                                       if (sv && cd->getChannelId() == s->channel_id){
                                                // \83f\81[\83^\90Ý\92è
                                                sv->setData(s, &hitData, totalListeners, totalRelays, infoFlg);
                                                sv->setEnableFlg(TRUE);