チェンジセット 2438

差分発生行の前後
無視リスト:
コミット日時:
2009/04/10 01:36:31 (3 年前)
コミッタ:
uwi
ログメッセージ:

未読チェック
Twitter新仕様対応
Twitter重いのでWassrAPIを少しいじる

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • air/TLife/src/Main.mxml

    r2437 r2438  
    169169                                var ar : Array = []; 
    170170                                for each(var tab : XML in CommonData.configxml.main.tabbar.tab) { 
    171                                         ar.push(tab.@name.toString()); 
    172                                         CommonData.tabmap[tab.@name.toString()] = { 
     171                                        var tabname : String = tab.@name; 
     172                                        ar.push(tabname); 
     173                                        CommonData.tabmap[tabname] = { 
     174                                                type : 0, 
    173175                                                selectedid : -1,  
    174176                                                scrollposid : -1, 
    175177                                                newestid : -1,  
    176                                                 notify : Boolean(tab.@notify), 
    177                                                 conn : CommonData.db_memory.conn, 
    178                                                 type : 0 
     178                                                unread : {}, 
     179                                                notify : int(tab.@notify), 
     180                                                numdisplay : int(tab.@numdisplay), 
     181                                                manageunread : int(tab.@manageunread) 
    179182                                                }; 
    180183                                } 
     
    253256                                                tabxml.@name = t; 
    254257                                                tabxml.@notify = tabinfo.notify; 
     258                                                tabxml.@numdisplay = tabinfo.numdisplay; 
     259                                                tabxml.@manageunread = tabinfo.manageunread; 
    255260                                                CommonData.configxml.main.tabbar.appendChild(tabxml); 
    256261                                        } 
  • air/TLife/src/uwi/db/DB.as

    r2341 r2438  
    3838                                "postedtime date not null," +  
    3939                                "replyid integer not null," + 
    40                                 "fav boolean not null" +  
     40                                "fav boolean not null" + 
    4141                                ")"); 
    4242                        execute(conn,  
  • air/TLife/src/uwi/db/DBExcite.as

    r2387 r2438  
    66        import mx.core.Application; 
    77        import uwi.util.CommonData; 
     8        import uwi.util.Utility; 
    89         
    910        /** 
     
    1314        public class DBExcite 
    1415        { 
    15                 public static function excite(limit : int) : void 
     16                public static function excite() : void 
    1617                { 
    1718                        var conn : SQLConnection = CommonData.db_memory.conn; 
     
    2829                                        var sqlpre : String = "replace into " + CommonData.TABLE_STATUS +  
    2930                                                " select * from disk." + CommonData.TABLE_STATUS; 
    30                                         var sqlsuf : String = " limit " + limit
     31                                        var sqlsuf : String = " limit " + Utility.numDisplay(tabname)
    3132                                        var sql : String = null; 
    3233                                        switch(tabname) { 
  • air/TLife/src/uwi/search/Searcher.as

    r2387 r2438  
    176176                                postid : -1, 
    177177                                newestid : -1, 
    178                                 notify : false, 
    179178                                rule : " where " + conds.join(" and "), 
    180                                 type : 1 
     179                                type : 1, 
     180                                numdisplay : 0, 
     181                                notify : 0, 
     182                                unread : {}, 
     183                                manageunread : int(CommonData.configxml.manageunread) 
    181184                        } 
    182185                        Application.application.tabbar.selectTabName(title); 
  • air/TLife/src/uwi/thread/InitialMovementThread.as

    r2407 r2438  
    88        import uwi.util.CommonData; 
    99        import uwi.util.Utility; 
     10        import uwi.wassr.WassrLoginThread; 
    1011         
    1112        /** 
     
    2122                } 
    2223                 
    23                 private var tlt : TwitterLoginThread = null; 
     24//              private var tlt : TwitterLoginThread = null; 
     25                private var tlt : WassrLoginThread = null; 
    2426                 
    2527                protected override function finalize() : void 
     
    3638                        URLRequestDefaults.setLoginCredentialsForHost("twitter.com", CommonData.configxml.userid, password); 
    3739                         
    38                         tlt = new TwitterLoginThread(CommonData.configxml.userid, password); 
     40//                      tlt = new TwitterLoginThread(CommonData.configxml.userid, password); 
     41                        tlt = new WassrLoginThread(CommonData.configxml.userid, password); 
    3942                        CommonData.state = 10; 
    4043                        tlt.start(); 
  • air/TLife/src/uwi/thread/MainThread.as

    r2437 r2438  
    9595                         
    9696                        // 静的DBからオンメモリDBにコピー 
    97                         DBExcite.excite(CommonData.configxml.numstatusprint.recent); 
     97                        DBExcite.excite(); 
     98                         
     99                        CommonData.factory_statusgetter = new ClassFactory(CommonData.MAP_STATUSGETTER[CommonData.configxml.method]); 
     100                        CommonData.factory_bitstatusgetter = new ClassFactory(CommonData.MAP_BITSTATUSGETTER[CommonData.configxml.method]); 
    98101                         
    99102                        // タイムラインの時刻表示の形式 
  • air/TLife/src/uwi/thread/NotifyNewThread.as

    r2437 r2438  
    1212        import uwi.util.StatusUtility; 
    1313        import uwi.util.StringUtility; 
     14        import uwi.util.Utility; 
    1415         
    1516        /** 
     
    4546                        newtimeline = { }; 
    4647                        for each(var tabname : String in tabbar.titles) { 
    47                                 if (CommonData.tabmap[tabname].notify == true) { 
     48                                if (Utility.notify(tabname) == 1) { 
    4849                                        var sql : String = null; 
    4950                                        var condnewer : String = "postid > " + CommonData.tabmap[tabname].newestid; 
  • air/TLife/src/uwi/thread/ReloadThread.as

    r2437 r2438  
    1010        import uwi.twitter.TwitterTimelineGetThread; 
    1111        import uwi.util.CommonData; 
     12        import uwi.util.Utility; 
    1213         
    1314        /** 
     
    3334                                if (posterids.length != 0) { 
    3435                                        for each(var posterid : String in posterids){ 
    35                                                 pep.addThread(new TwitterTimelineGetThread(posterid, 20, 1)); 
     36                                                CommonData.factory_statusgetter.properties = { factory : true, posterid_ : posterid, pageend_ : 1}; 
     37                                                pep.addThread(CommonData.factory_statusgetter.newInstance()); 
    3638                                        } 
    3739                                }else { 
    38                                         pep.addThread(new TwitterTimelineGetThread(null)); 
    39                                         pep.addThread(new TwitterTimelineGetThread("")); 
     40                                        CommonData.factory_statusgetter.properties = { factory : true, posterid_ : null, pageend_ : 1}; 
     41                                        pep.addThread(CommonData.factory_statusgetter.newInstance()); 
     42                                        CommonData.factory_statusgetter.properties = { factory : true, posterid_ : "", pageend_ : 1}; 
     43                                        pep.addThread(CommonData.factory_statusgetter.newInstance()); 
    4044                                } 
    4145                                se.addThread(pep); 
     
    4549         
    4650                                var pe : ParallelExecutor = new ParallelExecutor(); 
    47                                 pe.addThread(new TimelineThread(CommonData.configxml.numstatusprint.recent)); 
     51                                pe.addThread(new TimelineThread()); 
    4852                                pe.addThread(new NotifyNewThread()); 
    4953                                se.addThread(pe); 
  • air/TLife/src/uwi/thread/StatusGetBaseThread.as

    r2339 r2438  
    2121                protected var mp : MultiProgress; 
    2222                protected var fct : FollowingCheckThread; 
    23                 protected var posterid : String = posterid
     23                protected var posterid : String
    2424                protected var response : Boolean; 
    2525                protected var check : Boolean; 
     26                 
     27                public var factory : Boolean = false; 
     28                public var posterid_ : String; 
    2629                 
    2730                public function StatusGetBaseThread(posterid : String = null, check : Boolean = false, response : Boolean = false)  
  • air/TLife/src/uwi/thread/TimelineThread.as

    r2437 r2438  
    1818        import uwi.util.StatusUtility; 
    1919        import uwi.util.StringUtility; 
     20        import uwi.util.Utility; 
    2021         
    2122        /** 
     
    3738                private var posterdata : Object; // <ID, poster> 
    3839                private var tabname : String; 
     40                private var tabinfo : Object; 
    3941                 
    4042                public function TimelineThread(prefetch : int = -1) { 
     
    5759                         
    5860                        tabname = tabbar.titles.getItemAt(tabbar.SelectedIndex).toString(); 
     61                        tabinfo = CommonData.tabmap[tabname]; 
     62                         
     63                        // prefetchが設定されていない場合、tabのnumdisplayの値を採用する。 
     64                        if (prefetch == -1) prefetch = Utility.numDisplay(tabname); 
    5965                         
    6066                        // 検索結果がキャッシュにある場合、それを取り出す。 
    6167                        // CHECK 
    62                         if (CommonData.tabmap[tabname].type == 1 && CommonData.tabmap[tabname].cache) { 
     68                        if (tabinfo.type == 1 && tabinfo.cache) { 
    6369                                clearDataGrid(); 
    64                                 timeline.source = ArrayUtil.toArray(ObjectUtil.copy(CommonData.tabmap[tabname].cache)); 
     70                                timeline.source = ArrayUtil.toArray(ObjectUtil.copy(tabinfo.cache)); 
    6571                                return; 
    6672                        } 
     
    8187                                break; 
    8288                        default: 
    83                                 sql = sqlbase + CommonData.tabmap[tabname].rule + " order by postid desc"; 
     89                                sql = sqlbase + tabinfo.rule + " order by postid desc"; 
    8490                                break; 
    8591                        } 
     
    106112                        if (ar != null) { 
    107113                                dbstmap = { }; 
     114                                var manageunread : int = Utility.manageUnread(tabname); 
    108115                                for each(var obj : * in ar) { 
    109116                                        var timestr : String = "?"; 
     
    111118                                         
    112119                                        dbstmap[obj.posterid] = null; 
     120                                         
     121                                        if (manageunread == 1) { 
     122                                                if (tabinfo.unread[obj.postid] != null) { 
     123                                                        // すでに既読未読が設定されていた場合tabinfoに従う 
     124                                                        obj.unread = tabinfo.unread[obj.postid]; 
     125                                                }else { 
     126                                                        // それ以外はすべて未読 
     127                                                        obj.unread = true; 
     128                                                        tabinfo.unread[obj.postid] = true; 
     129                                                } 
     130                                        } 
     131                                         
    113132                                        timeline.addItem(obj); 
    114133                                } 
  • air/TLife/src/uwi/thread/event/ContextMenuItemEventThread.as

    r2388 r2438  
    77        import flash.ui.ContextMenuItem; 
    88        import mx.collections.ArrayCollection; 
    9         import mx.controls.DataGrid; 
    109        import mx.controls.TabBar; 
    1110        import mx.controls.TextArea; 
     
    2120        import uwi.db.SimpleTransactionThread; 
    2221        import uwi.thread.ReloadThread; 
    23         import uwi.thread.TimelineThread; 
    2422        import uwi.twitter.TwitterPostThread; 
    2523        import uwi.twitter.TwitterAPI; 
    2624        import uwi.twitter.TwitterScrapeThread; 
     25        import uwi.ui.DataGridEx; 
    2726        import uwi.ui.multipletabbar.MultipleTabBar; 
    2827        import uwi.ui.tabconfig.TabConfig; 
     
    4746                private var item_pairTL : ContextMenuItem; 
    4847                private var item_reload : ContextMenuItem; 
     48                private var item_read : ContextMenuItem; 
     49                private var item_unread : ContextMenuItem; 
    4950                 
    5051                private var item_duptab : ContextMenuItem; 
     
    5455                 
    5556                private var friendpost : TextArea = Application.application.friendpost; 
    56                 private var dg : DataGrid = Application.application.dg; 
     57                private var dg : DataGridEx = Application.application.dg; 
    5758                private var tabbar : MultipleTabBar = Application.application.tabbar; 
    5859                private var timeline : ArrayCollection = Application.application.timeline; 
     
    7071                        item_pairTL = new ContextMenuItem("ペアタイムライン"); 
    7172                        item_reload = new ContextMenuItem("更新"); 
     73                        item_read = new ContextMenuItem("既読にする"); 
     74                        item_unread = new ContextMenuItem("未読にする"); 
    7275                        item_follow.separatorBefore = true; 
    7376                         
     
    8285                        dgcm.customItems.push(item_pairTL); 
    8386                        dgcm.customItems.push(item_reload); 
     87                        dgcm.customItems.push(item_read); 
     88                        dgcm.customItems.push(item_unread); 
    8489                        dg.contextMenu = dgcm; 
    8590                         
     
    120125                        item_pairTL = null; 
    121126                        item_reload = null; 
     127                        item_read = null; 
     128                        item_unread = null; 
    122129                         
    123130                        item_duptab = null; 
     
    139146                        event(item_pairTL, ContextMenuEvent.MENU_ITEM_SELECT, onPairTL); 
    140147                        event(item_reload, ContextMenuEvent.MENU_ITEM_SELECT, onReload); 
     148                        event(item_read, ContextMenuEvent.MENU_ITEM_SELECT, onRead); 
     149                        event(item_unread, ContextMenuEvent.MENU_ITEM_SELECT, onUnread); 
    141150                         
    142151                        event(item_duptab, ContextMenuEvent.MENU_ITEM_SELECT, onDupTab); 
     
    327336                } 
    328337                 
     338                private function onRead(e : ContextMenuEvent) : void 
     339                { 
     340                        if (dg.selectedIndex != -1) { 
     341                                for each(var ind : int in dg.selectedIndices) { 
     342                                        dg.mark(ind, false); 
     343                                } 
     344                        } 
     345                } 
     346                 
     347                private function onUnread(e : ContextMenuEvent) : void 
     348                { 
     349                        if (dg.selectedIndex != -1) { 
     350                                for each(var ind : int in dg.selectedIndices) { 
     351                                        dg.mark(ind, true); 
     352                                } 
     353                        } 
     354                } 
     355                 
    329356                private function onDupTab(e : ContextMenuEvent) : void 
    330357                { 
  • air/TLife/src/uwi/thread/event/DataGridEventThread.as

    r2370 r2438  
    126126                { 
    127127                        dgrt.flag |= 3; 
    128                         // flagChange(); 
    129128                        next(run); 
    130129                } 
  • air/TLife/src/uwi/thread/event/DataGridRoutineThread.as

    r2370 r2438  
    1515        import uwi.util.StatusUtility; 
    1616        import uwi.util.StringUtility; 
     17        import uwi.util.Utility; 
    1718         
    1819        /** 
     
    5354                                return; 
    5455                        } 
     56                         
    5557                        var index : int = dg.selectedIndex; 
     58                        trace("mu : " + Application.application.tabbar.selectedTabName); 
     59                        if (Utility.manageUnread(Application.application.tabbar.selectedTabName) == 1) { 
     60                                if(index != -1)dg.mark(index, false); 
     61                        } 
    5662                         
    5763                        if ((flag & 2) != 0) { 
  • air/TLife/src/uwi/thread/event/PostEventThread.as

    r2370 r2438  
    104104                                "status=" + decodeURI(postarea.text + footer) +  
    105105                                (CommonData.in_reply_to_status_id != "" ? "&in_reply_to_status_id=" + CommonData.in_reply_to_status_id : "") 
    106                                 , "POST"); 
     106                                , "GET"); 
    107107                        tpt.start(); 
    108108                        tpt.join(); 
  • air/TLife/src/uwi/thread/event/TabBarEventThread.as

    r2388 r2438  
    99        import uwi.util.CommonData; 
    1010        import uwi.util.EventThread; 
     11        import uwi.util.Utility; 
    1112         
    1213        /** 
     
    3940                private function onChange(e : Event) : void 
    4041                { 
    41                         var ttt : TimelineThread = new TimelineThread(CommonData.configxml.numstatusprint.recent); 
     42                        var ttt : TimelineThread = new TimelineThread(); 
    4243                        ttt.start(); 
    4344                        ttt.join(); 
  • air/TLife/src/uwi/twitter/TwitterBitScrapeThread.as

    r2363 r2438  
    2424                 
    2525                private var s : Status = null; 
    26                 private var fct : FollowingCheckThread = null; 
    2726                 
    28                 public function TwitterBitScrapeThread(posterid : String, postid : String, fct : FollowingCheckThread = null)  
     27                // TODO 基底クラスをつくる 
     28                public var factory : Boolean = false; 
     29                public var posterid_ : String; 
     30                public var postid_ : String; 
     31                 
     32                public var posterid : String; 
     33                 
     34                public function TwitterBitScrapeThread(posterid : String, postid : String)  
    2935                { 
    30                         this.fct = fct; 
     36                        if (factory) { 
     37                                posterid = posterid_; 
     38                                postid = postid_; 
     39                        } 
     40                        trace("MAP"); 
     41                         
     42                        this.posterid = posterid; 
    3143                        trace("replyget : " + "https://twitter.com/" + posterid + "/status/" + postid); 
    3244                        ult = new URLLoaderThread(new URLRequest("https://twitter.com/" + posterid + "/status/" + postid)); 
     
    3547                protected override function run() : void 
    3648                { 
    37                         if (fct != null && fct.result != 2) { 
    38                                 return; 
    39                         } 
    40                          
    4149                        ult.start(); 
    4250                        ult.join(); 
     
    6371                                        // protected情報をDBにreplace 
    6472                                        pe = new ParallelExecutor(); 
    65                                         var sql : String = "replace into " + CommonData.TABLE_FOLLOWING + " (userid, posterid, following, protected, lastupdated) values ('" + CommonData.configxml.userid + "', '" + posterid + "', '" + new Date() + "')"; 
    66                                         pe.addThread(new SimpleTransactionThread(CommonData.db_memory.conn, sql)); 
    67                                         pe.addThread(new SimpleTransactionThread(CommonData.db_disk.conn, sql)); 
     73                                        var sql : String = "update " + CommonData.TABLE_POSTER + " set protected = false, lastupdated = :lastupdated where posterid = :posterid"; 
     74                                        var args : Array = [ { posterid : posterid, lastupdated : new Date()} ]; 
     75                                        pe.addThread(new SimpleTransactionThread(CommonData.db_memory.conn, sql, args)); 
     76                                        pe.addThread(new SimpleTransactionThread(CommonData.db_disk.conn, sql, args)); 
    6877                                        pe.start(); 
    6978                                        pe.join(); 
  • air/TLife/src/uwi/twitter/TwitterBitStatusGetThread.as

    r2339 r2438  
    2626                private var posterid : String; 
    2727                 
     28                // TODO 基底クラスをつくる 
     29                public var factory : Boolean = false; 
     30                public var posterid_ : String; 
     31                public var postid_ : String; 
     32                 
    2833                public function TwitterBitStatusGetThread(posterid : String, postid : String)  
    2934                { 
     35                        if (factory) { 
     36                                posterid = posterid_; 
     37                                postid = postid_; 
     38                        } 
     39                         
    3040                        this.posterid = posterid; 
    3141                        var req : URLRequest = new URLRequest("http://twitter.com/statuses/show/" + postid + ".xml"); 
    32                         req.method = URLRequestMethod.POST; 
     42                        req.method = URLRequestMethod.GET; 
    3343                        ult = new URLLoaderThread(req); 
    3444                } 
  • air/TLife/src/uwi/twitter/TwitterBitUserInfoGetThread.as

    r2363 r2438  
    2525                        this.userid = userid; 
    2626                        var req : URLRequest = new URLRequest("http://twitter.com/users/show/" + userid + ".xml"); 
    27                         req.method = URLRequestMethod.POST; 
     27                        req.method = URLRequestMethod.GET; 
    2828                        ult = new URLLoaderThread(req); 
    2929                } 
  • air/TLife/src/uwi/twitter/TwitterDirectMessageGetThread.as

    r2336 r2438  
    3636                        for (var i : int = 1; i <= pageend; i++) { 
    3737                                var req : URLRequest = new URLRequest(baseurl + "?page=" + i); 
    38                                 req.method = URLRequestMethod.POST; 
     38                                req.method = URLRequestMethod.GET; 
    3939                                registerRequest(req); 
    4040                        } 
  • air/TLife/src/uwi/twitter/TwitterFriendsInfoGetThread.as

    r2363 r2438  
    5757                                for (var i : int = 1; i <= pageend; i++) { 
    5858                                        var req : URLRequest = new URLRequest(baseurl + "?page=" + i); 
    59                                         req.method = URLRequestMethod.POST; 
     59                                        req.method = URLRequestMethod.GET; 
    6060                                        pe.addThread(new URLLoaderThread(req)); 
    6161                                } 
  • air/TLife/src/uwi/twitter/TwitterRateLimitStatusGetThread.as

    r2437 r2438  
    1515                { 
    1616                        var req : URLRequest = new URLRequest("http://twitter.com/account/rate_limit_status.xml"); 
    17                         req.method = URLRequestMethod.POST; 
     17                        req.method = URLRequestMethod.GET; 
    1818                        super(req); 
    1919                } 
  • air/TLife/src/uwi/twitter/TwitterScrapeThread.as

    r2407 r2438  
    2929                private var statuses : Vector.<Status>; 
    3030                 
     31                public var pageend_ : int; 
     32                 
    3133                public function TwitterScrapeThread(posterid : String = null, pageend : int = 1) { 
     34                        if (factory) { 
     35                                posterid = posterid_; 
     36                                pageend = pageend_; 
     37                        } 
     38                         
    3239                        super(posterid); 
    3340                         
  • air/TLife/src/uwi/twitter/TwitterTimelineGetThread.as

    r2437 r2438  
    2323                private var followers : Object; 
    2424                 
     25                public var pageend_ : int; 
     26                 
    2527                /** 
    2628                 *  
     
    3335                public function TwitterTimelineGetThread(posterid : String = null, count : int = 20, pageend : int = 1)  
    3436                { 
     37                        if (factory) { 
     38                                posterid = posterid_; 
     39                                count = 20; 
     40                                pageend = pageend_; 
     41                        } 
     42                         
    3543                        var reply : Boolean = posterid == ""; 
    3644                        var baseurl : String; 
     
    4553                        for (var i : int = 1; i <= pageend; i++) { 
    4654                                var req : URLRequest = new URLRequest(baseurl + "?count=" + count + "&page=" + i); 
    47                                 req.method = URLRequestMethod.POST; 
     55                                req.method = URLRequestMethod.GET; 
    4856                                registerRequest(req); 
    4957                        } 
  • air/TLife/src/uwi/ui/DataGridEx.as

    r2370 r2438  
    33        import mx.controls.DataGrid; 
    44        import mx.controls.listClasses.IListItemRenderer; 
     5        import mx.core.Application; 
     6        import uwi.util.CommonData; 
    57         
    68        /** 
     
    2628                public function get ListItems() : Array { return listItems; } 
    2729                 
     30                public function mark(index : int, unread : Boolean) : void 
     31                { 
     32                        // TODO DEBUG 
     33                        var item : Object = Application.application.timeline.getItemAt(index); 
     34                        item.unread = unread; 
     35                        Application.application.timeline.setItemAt(item, index); 
     36                        CommonData.tabmap[Application.application.tabbar.selectedTabName].unread[item.postid] = unread; 
     37                } 
    2838        } 
    2939         
  • air/TLife/src/uwi/ui/TimelineRenderer.as

    r2370 r2438  
    2929                                setStyle("color", CommonData.configxml.main.fontcolor.timeline); 
    3030                        } 
     31                        setStyle("fontWeight", "bold"); 
    3132                } 
    3233        } 
  • air/TLife/src/uwi/ui/dbsearch/DBSearchWindow.mxml

    r2370 r2438  
    5151                                //cond2byte.selected = searchxml.twobyte == "true"; 
    5252                                 
    53                                 search.enabled = false
     53                                condMigemo.enabled = CommonData.migemo != null
    5454                                 
    5555                                swet = new DBSearchWindowEventThread(this); 
  • air/TLife/src/uwi/ui/dbsearch/DBSearchWindowEventThread.as

    r2387 r2438  
    2424                protected override function run() : void 
    2525                { 
    26                         event(sw.queryuserid, ListEvent.CHANGE, onQueryChange); 
    27                         event(sw.querycontent, ListEvent.CHANGE, onQueryChange); 
    2826                        event(sw.queryuserid, KeyboardEvent.KEY_UP, onKeyUp); 
    2927                        event(sw.querycontent, KeyboardEvent.KEY_UP, onKeyUp); 
     
    3331                private function onKeyUp(e : KeyboardEvent) : void 
    3432                { 
    35                         if (e.keyCode == Keyboard.ENTER && sw.search.enabled) { 
     33                        if (e.keyCode == Keyboard.ENTER) { 
    3634                                onSearchClick(null); 
    3735                        }else { 
    3836                                next(run); 
    3937                        } 
    40                 } 
    41                  
    42                 private function onQueryChange(e : ListEvent) : void 
    43                 { 
    44                         var en : Boolean = (sw.queryuserid.text != "" || sw.querycontent.text != ""); 
    45                         sw.search.enabled = en; 
    46                         next(run); 
    4738                } 
    4839                 
     
    8071                        CommonData.searcher.searchDB(query, {  
    8172                                dbregexp : sw.condRegexp.selected, 
    82                                 migemo : sw.condMigemo.selected
     73                                migemo : sw.condMigemo.selected && sw.condMigemo.enabled
    8374                                fav : sw.condFav.selected, 
    8475                                capital : sw.condCapital.selected 
  • air/TLife/src/uwi/ui/multipletabbar/MultipleTabBarEventThread.as

    r2387 r2438  
    66        import mx.events.ItemClickEvent; 
    77        import org.libspark.thread.Thread; 
    8         import uwi.thread.TimelineThread; 
    98        import uwi.util.CommonData; 
    109        import uwi.util.EventThread; 
  • air/TLife/src/uwi/ui/search/SearchWindow.mxml

    r2407 r2438  
    5959                                //searchForward.enabled = false; 
    6060                                // 
     61                                condMigemo.enabled = CommonData.migemo != null; 
     62                                 
    6163                                swet = new SearchWindowEventThread(this); 
    6264                                swet.start(); 
  • air/TLife/src/uwi/ui/search/SearchWindowEventThread.as

    r2388 r2438  
    9595                                word : sw.condWord.selected, 
    9696                                regexp : sw.condRegexp.selected, 
    97                                 migemo : sw.condMigemo.selected
     97                                migemo : sw.condMigemo.selected && sw.condMigemo.enabled
    9898                                fav : sw.condFav.selected, 
    9999                                capital : sw.condCapital.selected, 
  • air/TLife/src/uwi/ui/tabconfig/TabConfigEventThread.as

    r2387 r2438  
    125125                { 
    126126                        // O(tn) 
    127                         for (var i : int = 1;; i++) { 
    128                                 var newlabel : String = "新規タブ" + (i >= 2 ? i : ""); 
    129                                 if (!tc.temptabs.contains(newlabel)) { 
    130                                         tc.temptabs.addItem(newlabel); 
    131                                         tc.tempmap[newlabel] = { 
    132                                                 selectedid : -1,  
    133                                                 scrollposid : -1, 
    134                                                 newestid : -1,  
    135                                                 notify : true, // TODO 
    136                                                 type : 0 
    137                                                 }; 
    138                                         break; 
    139                                 } 
    140                         } 
     127                        var newlabel : String = Utility.addAvoidingOverlap(tc.temptabs, "新規タブ"); 
     128                        tc.temptabs.addItem(newlabel); 
     129                        tc.tempmap[newlabel] = { 
     130                                type : 0, 
     131                                selectedid : -1,  
     132                                scrollposid : -1, 
     133                                newestid : -1,  
     134                                unread : {}, 
     135                                notify : int(CommonData.configxml.notify), 
     136                                manageunread : int(CommonData.configxml.manageunread), 
     137                                numdisplay : int(CommonData.configxml.numdisplay) 
     138                                }; 
    141139                        next(run); 
    142140                } 
  • air/TLife/src/uwi/util/CommonData.as

    r2388 r2438  
    22        import flash.filesystem.File; 
    33        import flash.utils.Dictionary; 
     4        import mx.core.ClassFactory; 
    45        import mx.formatters.DateFormatter; 
    56        import uwi.bean.TabRule; 
     
    1112        import uwi.thread.ReplyGetThread; 
    1213        import uwi.tinysegmenter.TinySegmenter; 
     14        import uwi.twitter.TwitterBitScrapeThread; 
     15        import uwi.twitter.TwitterBitStatusGetThread; 
     16        import uwi.twitter.TwitterScrapeThread; 
     17        import uwi.twitter.TwitterTimelineGetThread; 
    1318        import uwi.ui.globalconfig.GlobalConfig; 
    1419        import uwi.ui.tabconfig.TabConfig; 
     
    2934                public static const TABLE_POSTER : String = "poster"; 
    3035                public static const TABLE_FOLLOWING : String = "following"; 
     36                 
     37                public static const MAP_STATUSGETTER : Object = { 
     38                        "scrape" : TwitterScrapeThread, 
     39                        "api" : TwitterTimelineGetThread 
     40                }; 
     41                public static const MAP_BITSTATUSGETTER : Object = { 
     42                        "scrape" : TwitterBitScrapeThread, 
     43                        "api" : TwitterBitStatusGetThread 
     44                }; 
     45                public static var factory_statusgetter : ClassFactory; 
     46                public static var factory_bitstatusgetter : ClassFactory; 
    3147                 
    3248                public static const LIMLEN_POST : int = 140; 
     
    6278                public static var RPprevpos : int = -1; 
    6379 
    64                 public static var tabrules : Vector.<TabRule> = new Vector.<TabRule>(); 
     80                public static var tabrules : Vector.<TabRule> = new Vector.<TabRule>(); // タブの抽出ルール 
    6581                 
    6682                public static var urlcache : Object = {}; // URL解決用のキャッシュ 
     
    6985                // postid : String or Number    選択されているpostid 
    7086                // newestid : String or Number  最新のpostid 
    71                 // notify : Boolean     新着通知するかどうか -> configxmlへ 
    7287                // rule : String        抽出ルールを表すSQLクエリ 
    7388                // type : int   タブの種類(0 : 通常のタブ, 1 : 検索結果タブ) 
    7489                // cache : Object       検索結果のキャッシュ 
    75                 public static var prevtabname : String = null; 
     90                // unread : Object 未読リスト(set) 
     91                // --------以下はconfigxmlに格納-------- 
     92                // notify : int 新着通知するかどうか(0 : しない, 1 : する, 0未満 : グローバル設定に従う) 
     93                // numdisplay : int     表示件数(0以下 : グローバル設定に従う) 
     94                // manageunread : int   未読を管理するかどうか(0 : しない, 1 : する, 0未満 : グローバル設定に従う) 
    7695                 
    7796                // 唯一存在するインスタンス。Singletonの手抜き 
  • air/TLife/src/uwi/util/Utility.as

    r2356 r2438  
    8888                        } 
    8989                } 
     90                 
     91                public static function numDisplay(tabname : String) : int 
     92                { 
     93                        var ret : int = CommonData.tabmap[tabname].numdisplay; 
     94                        if (ret <= 0) ret = CommonData.configxml.numdisplay; 
     95                        return ret; 
     96                } 
     97                 
     98                public static function manageUnread(tabname : String) : int 
     99                { 
     100                        var ret : int = CommonData.tabmap[tabname].manageunread; 
     101                        if (ret < 0) ret = CommonData.configxml.manageunread; 
     102                        return ret; 
     103                } 
     104                 
     105                public static function notify(tabname : String) : int 
     106                { 
     107                        var ret : int = CommonData.tabmap[tabname].notify; 
     108                        if (ret < 0) ret = CommonData.configxml.notify; 
     109                        return ret; 
     110                } 
    90111        } 
    91112