チェンジセット 2752: air/TLife/branches

差分発生行の前後
無視リスト:
コミット日時:
2009/05/29 20:45:29 (3 年前)
コミッタ:
uwi
ログメッセージ:

fixed bugs

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • air/TLife/branches/ULife/application.xml

    r2751 r2752  
    33         
    44        <id>ULife</id>  
    5         <version>1.0</version>  
     5        <version>1.0.1</version>  
    66        <filename>ULife</filename>  
    77         
  • air/TLife/branches/ULife/src/Main.mxml

    r2751 r2752  
    2121        statusBarFactory="{new ClassFactory(uwi.ui.mainstatusbar.MainStatusBar)}" 
    2222        > 
    23 <!--   <jx:AirAutoUpdater url="http://www.libspark.org/svn/air/TLife/branches/ULife/air/version.xml" /> --
     23       <jx:AirAutoUpdater url="http://www.libspark.org/svn/air/TLife/branches/ULife/air/version.xml" /
    2424         
    2525        <mx:Script> 
     
    106106                                //postvalidator.maxLength = CommonData.LIMLEN_POST; 
    107107                                //postvalidator.tooLongError = "長すぎですよー"; 
    108         MainStatusBar(statusBar).setStateOAuth(0); 
    109108                                 
    110109                                new MainThread().start(); 
     
    114113                        { 
    115114        postarea.callLater(function() : void { 
    116           postbtn.enabled = (postarea.length != 0); 
     115          validatePostButton(); 
    117116           
    118117          var left : int = CommonData.LIMLEN_POST - postarea.length; 
     
    168167                                } 
    169168                        } 
     169       
     170      public function validatePostButton() : void 
     171      { 
     172        postbtn.enabled = CommonData.state_oauth == 1 && postarea.length != 0; 
     173      } 
    170174                ]]> 
    171175        </mx:Script> 
  • air/TLife/branches/ULife/src/uwi/thread/MainThread.as

    r2751 r2752  
    1414  import uwi.thread.event.PostEventThread; 
    1515  import uwi.thread.event.UndoThread; 
     16  import uwi.ui.mainstatusbar.MainStatusBar; 
    1617  import uwi.util.CommonData; 
    1718  import uwi.util.FileIO; 
     
    6667      // OAuth 
    6768      // 現状では正しく認証されているか確認する術はない 
    68       if (CommonData.configxml.login.oauth_token != "" && CommonData.configxml.login.oauth_token_secret != "") { 
     69      if (CommonData.configxml.login.oauth_token == "" || CommonData.configxml.login.oauth_token_secret == "") { 
    6970        Alert.show("右下のOAuthアイコンを右クリックしてログインしてね!", "ULife"); 
    7071      } 
    7172       
    72       CommonData.state_oauth = (CommonData.configxml.login.oauth_token != "" && CommonData.configxml.login.oauth_token_secret != "") 
    73         ? 1 : 0
     73      MainStatusBar(Application.application.statusBar).setStateOAuth((CommonData.configxml.login.oauth_token != "" && CommonData.configxml.login.oauth_token_secret != "") 
     74        ? 1 : 0)
    7475    } 
    7576     
  • air/TLife/branches/ULife/src/uwi/thread/event/PostEventThread.as

    r2751 r2752  
    6868    private function onKeyDown(e : KeyboardEvent) : void 
    6969    { 
    70 //      e.stopImmediatePropagation(); // インクリメンタルサーチ阻止 
    71 //      e.stopPropagation(); 
    72        
    7370      if (e.altKey == true) { 
    7471        e.preventDefault(); 
  • air/TLife/branches/ULife/src/uwi/ui/mainstatusbar/MainStatusBar.mxml

    r2751 r2752  
    77    <![CDATA[ 
    88      import mx.containers.TitleWindow; 
     9      import mx.core.Application; 
    910      import mx.events.CloseEvent; 
    1011      import mx.managers.PopUpManager; 
     
    6162          default: break; 
    6263        } 
     64        Application.application.validatePostButton(); 
    6365        return; 
    6466      } 
  • air/TLife/branches/ULife/src/uwi/util/Utility.as

    r2751 r2752  
    4444      for each(var header : URLRequestHeader in headers) { 
    4545        trace(header.name + "  " + header.value); 
    46       } 
    47     } 
    48      
    49     /** 
    50      * colにstrを追加する。重複していた場合、ラベルをつけて再度追加を試みる。 
    51      * @param col 
    52      * @param str 
    53      * @return 
    54      */ 
    55     public static function addAvoidingOverlap(col : ListCollectionView, str : String) : String 
    56     { 
    57       if (col.contains(str)) { 
    58         for (var i : int = 2;; i++) { 
    59           var item : String = str + "(" + i + ")"; 
    60           if (!col.contains(item)) break; 
    61         } 
    62         col.addItem(item); 
    63         return item; 
    64       }else { 
    65         col.addItem(str); 
    66         return str; 
    6746      } 
    6847    } 
     
    153132    } 
    154133     
    155     public static function searchSamePoster(col : ListCollectionView, index : int, dir : int) : int 
    156     { 
    157       var oid : String = col.getItemAt(index).posterid; 
    158       var i : int = index + dir; 
    159       for (;; i += dir) { 
    160         if (i >= col.length) i = 0; 
    161         if (i < 0) i = col.length - 1; 
    162         if (col.getItemAt(i).posterid == oid) break; 
    163       } 
    164       return i; 
    165     } 
    166      
    167134  } 
    168135