チェンジセット 2651

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

臨時コミット

ファイル:

凡例:

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

    r2642 r2651  
    11<version> 
    2         <version>alpha18/version> 
     2        <version>alpha19/version> 
    33        <url>http://www.libspark.org/svn/air/TLife/trunk/air/TLife.air</url> 
    44</version>  
  • air/TLife/trunk/application.xml

    r2642 r2651  
    33   
    44  <id>uwi.TLife</id>  
    5   <version>alpha18</version> 
     5  <version>alpha19</version> 
    66  <filename>TLife</filename> 
    77  <name>TLife</name>  
  • air/TLife/trunk/bin/initial/config.xml

    r2642 r2651  
    1010  <numpageget> 
    1111    <recent>1</recent> 
    12     <reply>1</reply
     12    <mention>1</mention
    1313  </numpageget> 
    1414  <numdisplay>1000</numdisplay> 
     
    4040    <tabbar> 
    4141      <tab name="Recent" numnotify="-1" numdisplay="-1" manageunread="-1" removecosuffix="-1" hammer="-1" /> 
    42       <tab name="Reply" numnotify="-1" numdisplay="-1" manageunread="-1" removecosuffix="-1" hammer="-1" /> 
     42      <tab name="Mention" numnotify="-1" numdisplay="-1" manageunread="-1" removecosuffix="-1" hammer="-1" /> 
    4343    </tabbar> 
    4444    <isearch> 
     
    7272    <ifilterscreenname>Ctrl+G</ifilterscreenname> 
    7373    <jumptotimeline>Ctrl+J</jumptotimeline> 
     74    <jumptopostarea>J</jumptopostarea> 
    7475    <downatpostarea>Ctrl+Down</downatpostarea> 
    7576    <upatpostarea>Ctrl+Up</upatpostarea> 
    76     <leftatpostarea>Ctrl+Left</leftatpostarea> 
    77     <rightatpostarea>Ctrl+Right</rightatpostarea> 
     77    <sameuserbackwardatpostarea>Ctrl+Left</sameuserbackwardatpostarea> 
     78    <sameuserforwardatpostarea>Ctrl+Right</sameuserforwardatpostarea> 
     79    <sameuserbackwardattimeline>Left</sameuserbackwardattimeline> 
     80    <sameuserforwardattimeline>Right</sameuserforwardattimeline> 
     81    <replyatpostarea>Ctrl+R</replyatpostarea> 
    7882  </keybind> 
    7983  <search> 
  • air/TLife/trunk/src/Main.mxml

    r2650 r2651  
    136136                        public function appendReply(item : Object) : void 
    137137                        { 
    138                                 var to : String = item.posterid; 
    139                                 var reply : String = "@" + to + " "; 
    140                                 postarea.text += reply; 
     138                                var reply : String = "@" + item.posterid + " "; 
     139         
     140                                if (postarea.text.length == 0) { 
     141          // 1人だけにreply 
     142                                        postarea.text = reply; 
     143          CommonData.in_reply_to_status_id = item.posterid; 
     144                                }else { 
     145          // 2人以上にreply 
     146          // 先頭に"@@"をつけるかどうか 
     147          if (postarea.text.substring(0, 2) == "@@") { 
     148            postarea.text += " " + reply; 
     149          }else{  
     150            postarea.text = "@" + postarea.text + " " + reply; 
     151          } 
     152          CommonData.in_reply_to_status_id = ""; 
     153        } 
     154         
    141155                                postarea.setFocus(); 
    142156                                postarea.selectionBeginIndex = postarea.text.length; 
     
    187201                        public function reflectConfigInitially() : void 
    188202                        { 
    189                                 var a : Array = []; 
    190                                  
    191203                                // 座標情報の読み込み 
    192204                                Utility.loadCoordinates(Application.application.nativeWindow, CommonData.configxml.main); 
     
    209221                                } 
    210222                                tabbar.titles = new ArrayCollection(ar); 
    211                                 a.push(getTimer()); 
    212223                                tabbar.changeLayout(); 
    213                                 a.push(getTimer()); 
    214224                                tabbar.SelectedIndex = 0; 
    215225                                 
    216226                                reflectConfig(); 
    217                                 for each(var x : int in a) trace(x - a[0]); 
    218227                        } 
    219228                         
     
    498507         
    499508        <mx:StringValidator id="postvalidator" source="{postarea}" property="text" triggerEvent="charleft" /> 
    500                  
     509         
     510  <mx:Style> 
     511    Tab.TabUD 
     512    { 
     513      fontWeight: normal; 
     514      disabledSkin: ClassReference("uwi.ui.TabSkinUD"); 
     515      downSkin: ClassReference("uwi.ui.TabSkinUD"); 
     516      overSkin: ClassReference("uwi.ui.TabSkinUD"); 
     517      selectedDisabledSkin: ClassReference("uwi.ui.TabSkinUD"); 
     518      selectedDownSkin: ClassReference("uwi.ui.TabSkinUD"); 
     519      selectedOverSkin: ClassReference("uwi.ui.TabSkinUD"); 
     520      selectedUpSkin: ClassReference("uwi.ui.TabSkinUD"); 
     521      upSkin: ClassReference("uwi.ui.TabSkinUD"); 
     522    } 
     523  </mx:Style> 
     524   
    501525</mx:WindowedApplication> 
  • air/TLife/trunk/src/uwi/db/DBExcite.as

    r2634 r2651  
    4040                " where userid = '" + StringUtility.escapeSQL(CommonData.configxml.login.userid) + "')"; 
    4141              break; 
    42             case CommonData.LABEL_REPLY
     42            case CommonData.LABEL_MENTION
    4343              sql = " where content glob '*@" + StringUtility.escapeSQLForLike(CommonData.configxml.login.userid) + "*'"; 
    4444              break; 
  • air/TLife/trunk/src/uwi/thread/MainThread.as

    r2642 r2651  
    186186//      setStyles(".timelineheaderstyle", stylexml.timeline.header); 
    187187      setStyles(".timelinescrollbarstyle", stylexml.timeline.scrollbar); 
    188       setStyles(".tabbarstyle", stylexml.tabbar); 
     188//      setStyles(".tabbarstyle", stylexml.tabbar); 
    189189      setStyles(".replynamestyle", stylexml.replyname); 
    190190      setStyles(".replypoststyle", stylexml.replypost); 
  • air/TLife/trunk/src/uwi/thread/NotifyNewThread.as

    r2634 r2651  
    4848      for each(var tabname : String in tabbar.titles) { 
    4949        var numnotify : int = Utility.getNumber("numnotify", tabname); 
    50         if (numnotify > 0) { 
     50//        var manageunread : int = Utility.getNumber("manageunread", tabname); 
     51//        if (numnotify > 0 || manageunread == 1) { 
     52        if (numnotify > 0) { // 未読管理時のタブ強調の扱い 
    5153          var sqlsuffix : String = " order by postid desc limit " + numnotify; 
    5254          var sql : String = null; 
     
    6365              sqlsuffix; 
    6466            break; 
    65           case CommonData.LABEL_REPLY
     67          case CommonData.LABEL_MENTION
    6668            sql = sqlprefix + " where content glob '*@" + StringUtility.escapeSQLForLike(CommonData.configxml.login.userid) + "*' and " + condnewer +  
    6769              (tabinfo.rule != "" ? (" and (" + tabinfo.rule + ")") : "") +  
  • air/TLife/trunk/src/uwi/thread/ReloadThread.as

    r2642 r2651  
    4040          } 
    4141          if (initial && CommonData.configxml.numpageget.hasOwnProperty("favorites")) { 
    42             CommonData.factory_statusgetter.properties = { posterid : " FAVORITES", pageend : CommonData.configxml.numpageget.reply }; 
     42            CommonData.factory_statusgetter.properties = { posterid : " FAVORITES", pageend : CommonData.configxml.numpageget.favorites }; 
    4343            pep.addThread(CommonData.factory_statusgetter.newInstance()); 
    4444          } 
    45           if (CommonData.configxml.numpageget.hasOwnProperty("reply")) { 
    46             CommonData.factory_statusgetter.properties = { posterid : " REPLIES", pageend : CommonData.configxml.numpageget.reply }; 
     45          if (CommonData.configxml.numpageget.hasOwnProperty("mention")) { 
     46            CommonData.factory_statusgetter.properties = { posterid : " REPLIES", pageend : CommonData.configxml.numpageget.mention }; 
    4747            pep.addThread(CommonData.factory_statusgetter.newInstance()); 
    4848          } 
  • air/TLife/trunk/src/uwi/thread/TimelineThread.as

    r2650 r2651  
    9292          sqlsuffix; 
    9393        break; 
    94       case CommonData.LABEL_REPLY
     94      case CommonData.LABEL_MENTION
    9595        sql = sqlprefix + " where content glob '*@" + StringUtility.escapeSQLForLike(CommonData.configxml.login.userid) + "*'" +  
    9696          (tabinfo.rule != "" ? (" and (" + tabinfo.rule + ")") : "") +  
  • air/TLife/trunk/src/uwi/thread/event/DataGridEventThread.as

    r2650 r2651  
    22{ 
    33  import flash.events.Event; 
     4  import flash.events.FocusEvent; 
    45  import flash.events.KeyboardEvent; 
    56  import flash.events.MouseEvent; 
     
    5152      event(datagrid, KeyboardEvent.KEY_UP, onKeyUp); 
    5253      event(datagrid, ScrollEvent.SCROLL, onScroll); 
     54      event(datagrid, FocusEvent.FOCUS_OUT, onFocusOut); 
    5355    } 
    5456     
     
    124126    private function onKeyUp(e : KeyboardEvent) : void 
    125127    { 
    126       trace("keyup"); 
     128      CommonData.datagridsuspend = false; 
     129      next(waitEvents); 
     130    } 
     131     
     132    private function onFocusOut(e : FocusEvent) : void 
     133    { 
    127134      CommonData.datagridsuspend = false; 
    128135      next(waitEvents); 
  • air/TLife/trunk/src/uwi/thread/event/PostEventThread.as

    r2650 r2651  
    22{ 
    33  import flash.events.Event; 
     4  import flash.events.FocusEvent; 
    45  import flash.events.KeyboardEvent; 
    56  import flash.events.MouseEvent; 
     
    4041    private var postedtext : String; 
    4142     
     43    private var downatpostarea : Boolean; 
     44    private var upatpostarea : Boolean; 
     45     
    4246    private static const EVENT_CHANGE : Event = new Event(Event.CHANGE); 
    4347     
     
    4650      sub = new EventThread(postarea, Event.CHANGE, onChange); 
    4751      uict = new UserIDCompleteThread(postarea, Application.application as Container); 
     52      downatpostarea = false; 
     53      upatpostarea = false; 
    4854    }  
    4955     
     
    6571      event(postbtn, MouseEvent.CLICK, onSubmit); 
    6672      event(postarea, KeyboardEvent.KEY_DOWN, onKeyDown); 
     73      event(postarea, KeyboardEvent.KEY_UP, onKeyUp); 
     74      event(postarea, FocusEvent.FOCUS_OUT, onFocusOut); 
    6775    } 
    6876     
     
    102110        if (datagrid.selectedIndex == -1) datagrid.selectedIndex = datagrid.verticalScrollPosition; 
    103111        datagrid.dispatchEvent(new KeyboardEvent(KeyboardEvent.KEY_DOWN, true, false, 0, Keyboard.DOWN)); 
     112        downatpostarea = true; 
    104113      } 
    105114       
     
    107116        if (datagrid.selectedIndex == -1) datagrid.selectedIndex = datagrid.verticalScrollPosition; 
    108117        datagrid.dispatchEvent(new KeyboardEvent(KeyboardEvent.KEY_DOWN, true, false, 0, Keyboard.UP)); 
     118        upatpostarea = true; 
    109119      } 
    110120       
     
    122132       
    123133      CommonData.datagridsuspend = true; 
    124       event(postarea, KeyboardEvent.KEY_UP, onKeyUp); 
    125134//      next(waitEvents); 
    126135    } 
     
    130139      CommonData.datagridsuspend = false; 
    131140       
    132       if (CommonData.keybindjudgers.downatpostarea.apply(null, [e]))
     141      if(downatpostarea)
    133142        datagrid.dispatchEvent(new KeyboardEvent(KeyboardEvent.KEY_UP, true, false, 0, Keyboard.DOWN)); 
    134143      } 
    135144       
    136       if (CommonData.keybindjudgers.upatpostarea.apply(null, [e])) { 
     145      if(upatpostarea){ 
     146        datagrid.dispatchEvent(new KeyboardEvent(KeyboardEvent.KEY_UP, true, false, 0, Keyboard.UP)); 
     147      } 
     148       
     149      next(waitEvents); 
     150    } 
     151     
     152    private function onFocusOut(e : FocusEvent) : void 
     153    { 
     154      CommonData.datagridsuspend = false; 
     155       
     156      if(downatpostarea){ 
     157        datagrid.dispatchEvent(new KeyboardEvent(KeyboardEvent.KEY_UP, true, false, 0, Keyboard.DOWN)); 
     158      } 
     159       
     160      if(upatpostarea){ 
    137161        datagrid.dispatchEvent(new KeyboardEvent(KeyboardEvent.KEY_UP, true, false, 0, Keyboard.UP)); 
    138162      } 
     
    161185      /* 
    162186      // ポスト直前に短縮する 
    163       if (CommonData.configxml.shortening != "") { 
    164         shorten(); 
    165       }else { 
    166         post(); 
     187      switch(CommonData.configxml.urlshotening.policy) { 
     188        case "all" : 
     189        case "smart" : 
     190        case "none" : 
     191        default: 
     192          post(); 
     193        break; 
    167194      } 
    168195      */ 
     
    171198    private static const PTN_URL : RegExp = /https?:\/\/[-_.!~*'()a-zA-Z0-9;\/?:\@&=+\$,%#]+/g; 
    172199     
    173       /* 
     200    /* 
    174201    private function shorten() : void 
    175202    { 
     
    194221      } 
    195222    } 
    196       */ 
     223    */ 
    197224     
    198225    private function post() : void 
  • air/TLife/trunk/src/uwi/ui/mainmenu/MainMenu.mxml

    r2642 r2651  
    2727      private function onLoad() : void 
    2828      { 
    29         trace("onLoad"); 
    3029        var appDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor; 
    3130        var ns:Namespace = appDescriptor.namespace(); 
  • air/TLife/trunk/src/uwi/ui/multipletabbar/MultipleTabBar.as

    r2634 r2651  
    33  import mx.collections.ArrayCollection; 
    44  import mx.containers.VBox; 
     5  import mx.controls.Button; 
    56  import mx.controls.TabBar; 
    67  import mx.events.CollectionEvent; 
    78  import mx.events.ItemClickEvent; 
     9  import uwi.ui.TabSkinUD; 
    810   
    911  /** 
     
    3436      var tab : TabBar = new TabBar(); // カレントタブバー 
    3537      var tabdp : ArrayCollection = new ArrayCollection(); // カレントタブバーにバインドされるデータ 
     38      tab.setStyle("tabStyleName", "TabUD"); 
     39      tab.setStyle("selectedTabTextStyleName", null); 
    3640      this.addChild(tab); 
    3741      tab.dataProvider = tabdp; 
     
    5559          tab = new TabBar(); 
    5660          tabdp = new ArrayCollection(); 
     61          tab.setStyle("tabStyleName", "TabUD"); 
     62          tab.setStyle("selectedTabTextStyleName", null); 
    5763          this.addChild(tab); 
    5864          tab.height = tabheight; 
    5965          tab.dataProvider = tabdp; 
    6066          tab.selectedIndex = -1; 
    61           tab.styleName = ".tabbarstyle"; 
     67//          tab.styleName = ".tabbarstyle"; 
    6268          this.tablist.push(tab); 
    6369        } 
    6470      } 
     71//      tab.validateProperties(); 
     72//      tab.validateSize(true); 
    6573      this.height = tabheight * tablist.length; 
    66       this.validateNow(); 
    6774       
    68       var ind : int = index != -1 ? index : selectedIndex; 
    69       setSelectedIndexCore(ind); 
    70       this.validateNow(); 
     75      this.callLater(function() : void { 
     76        var ind : int = index != -1 ? index : selectedIndex; 
     77        setSelectedIndexCore(ind); 
     78      }); 
    7179    } 
    7280     
     
    93101      this.removeAllChildren(); 
    94102      tablist = new Vector.<TabBar>(); 
     103    } 
     104     
     105    public function getTab(ind : int) : Button 
     106    { 
     107      if (ind < 0) return null; 
     108       
     109      var sum : int = ind; 
     110      for each (var tabbar : TabBar in tablist) { 
     111        sum -= tabbar.numChildren; 
     112        if (sum < 0) { 
     113          return tabbar.getChildAt(sum + tabbar.numChildren) as Button; 
     114          break; 
     115        } 
     116      } 
     117       
     118      return null; 
    95119    } 
    96120     
     
    132156        } 
    133157      } 
    134       for each(var tab : TabBar in tablist) { 
    135         if (tab != targ) tab.selectedIndex = -1; 
     158      for each(var tabbar : TabBar in tablist) { 
     159        if (tabbar != targ) tabbar.selectedIndex = -1; 
    136160      } 
    137161    } 
  • air/TLife/trunk/src/uwi/util/CommonData.as

    r2650 r2651  
    3333   */ 
    3434  public class CommonData { 
     35    // Label Name 
    3536    public static const LABEL_RECENT : String = "Recent"; 
    36     public static const LABEL_REPLY : String = "Reply"; 
     37    public static const LABEL_MENTION : String = "Mention"; 
    3738    public static const LABEL_FAVORITES : String = "Favorites"; 
    3839     
     40    // Table Name 
    3941    public static const TABLE_STATUS : String = "status"; 
    4042    public static const TABLE_POSTER : String = "poster"; 
    4143    public static const TABLE_FOLLOWING : String = "following"; 
    4244     
     45    // OAuth 
    4346    public static const CONSUMER_KEY : String = "R0y7gsbuYxklTrJEmXsmTg"; 
    4447    public static const CONSUMER_SECRET_KEY : String = "1WEmKiVewApDv31lTQNuPF1xSg3vXM1VlkpKT8u9Wo"; 
     
    4649    public static var oauth_token : OAuthToken; 
    4750     
     51    // Method for getting timeline 
    4852    public static const MAP_STATUSGETTER : Object = { 
    4953      "scrape" : TwitterScrapeThread,