Show
Ignore:
Timestamp:
07/04/08 13:08:13 (5 months ago)
Author:
yamashiro
Message:

自分宛ての@を色変更するというのをマルチサービス対応した。

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/eclipse/sabotter/trunk/jp.xet.sabotter.eclipse/src/jp/xet/sabotter/eclipse/views/listeners/StatusTextModifyListener.java

    r15143 r15144  
    11package jp.xet.sabotter.eclipse.views.listeners; 
    22 
     3import jp.xet.sabotter.core.MiniblogService; 
    34import jp.xet.sabotter.eclipse.SabotterPlugin; 
     5import jp.xet.sabotter.eclipse.manager.MiniblogServiceManager; 
    46import jp.xet.sabotter.eclipse.preferences.PreferColor; 
    57import jp.xet.sabotter.eclipse.preferences.SabotterPreference; 
     
    5355                        Color fg; 
    5456                         
    55                         /* 
    56                          * TODO if (txtStatusText.getText().contains("@" + pref.getUserId() + " ")) { bg = new Color(null, 128, 0, 
    57                          * 128); // TODO テーマ化 fg = new Color(null, 255, 255, 255); } else 
    58                          */if (remain >= 20) { 
     57                        boolean toMyReply = false; 
     58                        for (MiniblogService service : MiniblogServiceManager.getInstance().getMiniblogServices()) { 
     59                                if (txtStatusText.getText().contains("@" + pref.getUserId(service) + " ")) { 
     60                                        toMyReply = true; 
     61                                        break; 
     62                                } 
     63                        } 
     64                         
     65                        if (toMyReply) { 
     66                                bg = new Color(null, 128, 0, 128); // TODO テーマ化 
     67                                fg = new Color(null, 255, 255, 255); 
     68                        } else if (remain >= 20) { 
    5969                                bg = pref.getColor(PreferColor.INPUT_NORMAL_BACKGROUND); 
    6070                                fg = pref.getColor(PreferColor.INPUT_NORMAL_FOREGROUND);