チェンジセット 2438
- コミット日時:
- 2009/04/10 01:36:31 (3 年前)
- ファイル:
-
- air/TLife/bin/TLife.swf (更新) (変更前)
- air/TLife/src/Main.mxml (更新) (2 diffs)
- air/TLife/src/uwi/db/DB.as (更新) (1 diff)
- air/TLife/src/uwi/db/DBExcite.as (更新) (3 diffs)
- air/TLife/src/uwi/search/Searcher.as (更新) (1 diff)
- air/TLife/src/uwi/thread/InitialMovementThread.as (更新) (3 diffs)
- air/TLife/src/uwi/thread/MainThread.as (更新) (1 diff)
- air/TLife/src/uwi/thread/NotifyNewThread.as (更新) (2 diffs)
- air/TLife/src/uwi/thread/ReloadThread.as (更新) (3 diffs)
- air/TLife/src/uwi/thread/StatusGetBaseThread.as (更新) (1 diff)
- air/TLife/src/uwi/thread/TimelineThread.as (更新) (6 diffs)
- air/TLife/src/uwi/thread/event/ContextMenuItemEventThread.as (更新) (9 diffs)
- air/TLife/src/uwi/thread/event/DataGridEventThread.as (更新) (1 diff)
- air/TLife/src/uwi/thread/event/DataGridRoutineThread.as (更新) (2 diffs)
- air/TLife/src/uwi/thread/event/PostEventThread.as (更新) (1 diff)
- air/TLife/src/uwi/thread/event/TabBarEventThread.as (更新) (2 diffs)
- air/TLife/src/uwi/twitter/TwitterBitScrapeThread.as (更新) (3 diffs)
- air/TLife/src/uwi/twitter/TwitterBitStatusGetThread.as (更新) (1 diff)
- air/TLife/src/uwi/twitter/TwitterBitUserInfoGetThread.as (更新) (1 diff)
- air/TLife/src/uwi/twitter/TwitterDirectMessageGetThread.as (更新) (1 diff)
- air/TLife/src/uwi/twitter/TwitterFriendsInfoGetThread.as (更新) (1 diff)
- air/TLife/src/uwi/twitter/TwitterRateLimitStatusGetThread.as (更新) (1 diff)
- air/TLife/src/uwi/twitter/TwitterScrapeThread.as (更新) (1 diff)
- air/TLife/src/uwi/twitter/TwitterTimelineGetThread.as (更新) (3 diffs)
- air/TLife/src/uwi/ui/DataGridEx.as (更新) (2 diffs)
- air/TLife/src/uwi/ui/TimelineRenderer.as (更新) (1 diff)
- air/TLife/src/uwi/ui/dbsearch/DBSearchWindow.mxml (更新) (1 diff)
- air/TLife/src/uwi/ui/dbsearch/DBSearchWindowEventThread.as (更新) (3 diffs)
- air/TLife/src/uwi/ui/multipletabbar/MultipleTabBarEventThread.as (更新) (1 diff)
- air/TLife/src/uwi/ui/search/SearchWindow.mxml (更新) (1 diff)
- air/TLife/src/uwi/ui/search/SearchWindowEventThread.as (更新) (1 diff)
- air/TLife/src/uwi/ui/tabconfig/TabConfigEventThread.as (更新) (1 diff)
- air/TLife/src/uwi/util/CommonData.as (更新) (5 diffs)
- air/TLife/src/uwi/util/Utility.as (更新) (1 diff)
- air/TLife/src/uwi/wassr (追加)
- air/TLife/src/uwi/wassr/WassrLoginThread.as (追加)
- air/TLife/src/uwi/wassr/WassrTimelineGetThread.as (追加)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
air/TLife/src/Main.mxml
r2437 r2438 169 169 var ar : Array = []; 170 170 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, 173 175 selectedid : -1, 174 176 scrollposid : -1, 175 177 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) 179 182 }; 180 183 } … … 253 256 tabxml.@name = t; 254 257 tabxml.@notify = tabinfo.notify; 258 tabxml.@numdisplay = tabinfo.numdisplay; 259 tabxml.@manageunread = tabinfo.manageunread; 255 260 CommonData.configxml.main.tabbar.appendChild(tabxml); 256 261 } air/TLife/src/uwi/db/DB.as
r2341 r2438 38 38 "postedtime date not null," + 39 39 "replyid integer not null," + 40 "fav boolean not null" + 40 "fav boolean not null" + 41 41 ")"); 42 42 execute(conn, air/TLife/src/uwi/db/DBExcite.as
r2387 r2438 6 6 import mx.core.Application; 7 7 import uwi.util.CommonData; 8 import uwi.util.Utility; 8 9 9 10 /** … … 13 14 public class DBExcite 14 15 { 15 public static function excite( limit : int) : void16 public static function excite() : void 16 17 { 17 18 var conn : SQLConnection = CommonData.db_memory.conn; … … 28 29 var sqlpre : String = "replace into " + CommonData.TABLE_STATUS + 29 30 " select * from disk." + CommonData.TABLE_STATUS; 30 var sqlsuf : String = " limit " + limit;31 var sqlsuf : String = " limit " + Utility.numDisplay(tabname); 31 32 var sql : String = null; 32 33 switch(tabname) { air/TLife/src/uwi/search/Searcher.as
r2387 r2438 176 176 postid : -1, 177 177 newestid : -1, 178 notify : false,179 178 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) 181 184 } 182 185 Application.application.tabbar.selectTabName(title); air/TLife/src/uwi/thread/InitialMovementThread.as
r2407 r2438 8 8 import uwi.util.CommonData; 9 9 import uwi.util.Utility; 10 import uwi.wassr.WassrLoginThread; 10 11 11 12 /** … … 21 22 } 22 23 23 private var tlt : TwitterLoginThread = null; 24 // private var tlt : TwitterLoginThread = null; 25 private var tlt : WassrLoginThread = null; 24 26 25 27 protected override function finalize() : void … … 36 38 URLRequestDefaults.setLoginCredentialsForHost("twitter.com", CommonData.configxml.userid, password); 37 39 38 tlt = new TwitterLoginThread(CommonData.configxml.userid, password); 40 // tlt = new TwitterLoginThread(CommonData.configxml.userid, password); 41 tlt = new WassrLoginThread(CommonData.configxml.userid, password); 39 42 CommonData.state = 10; 40 43 tlt.start(); air/TLife/src/uwi/thread/MainThread.as
r2437 r2438 95 95 96 96 // 静的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]); 98 101 99 102 // タイムラインの時刻表示の形式 air/TLife/src/uwi/thread/NotifyNewThread.as
r2437 r2438 12 12 import uwi.util.StatusUtility; 13 13 import uwi.util.StringUtility; 14 import uwi.util.Utility; 14 15 15 16 /** … … 45 46 newtimeline = { }; 46 47 for each(var tabname : String in tabbar.titles) { 47 if ( CommonData.tabmap[tabname].notify == true) {48 if (Utility.notify(tabname) == 1) { 48 49 var sql : String = null; 49 50 var condnewer : String = "postid > " + CommonData.tabmap[tabname].newestid; air/TLife/src/uwi/thread/ReloadThread.as
r2437 r2438 10 10 import uwi.twitter.TwitterTimelineGetThread; 11 11 import uwi.util.CommonData; 12 import uwi.util.Utility; 12 13 13 14 /** … … 33 34 if (posterids.length != 0) { 34 35 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()); 36 38 } 37 39 }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()); 40 44 } 41 45 se.addThread(pep); … … 45 49 46 50 var pe : ParallelExecutor = new ParallelExecutor(); 47 pe.addThread(new TimelineThread( CommonData.configxml.numstatusprint.recent));51 pe.addThread(new TimelineThread()); 48 52 pe.addThread(new NotifyNewThread()); 49 53 se.addThread(pe); air/TLife/src/uwi/thread/StatusGetBaseThread.as
r2339 r2438 21 21 protected var mp : MultiProgress; 22 22 protected var fct : FollowingCheckThread; 23 protected var posterid : String = posterid;23 protected var posterid : String; 24 24 protected var response : Boolean; 25 25 protected var check : Boolean; 26 27 public var factory : Boolean = false; 28 public var posterid_ : String; 26 29 27 30 public function StatusGetBaseThread(posterid : String = null, check : Boolean = false, response : Boolean = false) air/TLife/src/uwi/thread/TimelineThread.as
r2437 r2438 18 18 import uwi.util.StatusUtility; 19 19 import uwi.util.StringUtility; 20 import uwi.util.Utility; 20 21 21 22 /** … … 37 38 private var posterdata : Object; // <ID, poster> 38 39 private var tabname : String; 40 private var tabinfo : Object; 39 41 40 42 public function TimelineThread(prefetch : int = -1) { … … 57 59 58 60 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); 59 65 60 66 // 検索結果がキャッシュにある場合、それを取り出す。 61 67 // CHECK 62 if ( CommonData.tabmap[tabname].type == 1 && CommonData.tabmap[tabname].cache) {68 if (tabinfo.type == 1 && tabinfo.cache) { 63 69 clearDataGrid(); 64 timeline.source = ArrayUtil.toArray(ObjectUtil.copy( CommonData.tabmap[tabname].cache));70 timeline.source = ArrayUtil.toArray(ObjectUtil.copy(tabinfo.cache)); 65 71 return; 66 72 } … … 81 87 break; 82 88 default: 83 sql = sqlbase + CommonData.tabmap[tabname].rule + " order by postid desc";89 sql = sqlbase + tabinfo.rule + " order by postid desc"; 84 90 break; 85 91 } … … 106 112 if (ar != null) { 107 113 dbstmap = { }; 114 var manageunread : int = Utility.manageUnread(tabname); 108 115 for each(var obj : * in ar) { 109 116 var timestr : String = "?"; … … 111 118 112 119 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 113 132 timeline.addItem(obj); 114 133 } air/TLife/src/uwi/thread/event/ContextMenuItemEventThread.as
r2388 r2438 7 7 import flash.ui.ContextMenuItem; 8 8 import mx.collections.ArrayCollection; 9 import mx.controls.DataGrid;10 9 import mx.controls.TabBar; 11 10 import mx.controls.TextArea; … … 21 20 import uwi.db.SimpleTransactionThread; 22 21 import uwi.thread.ReloadThread; 23 import uwi.thread.TimelineThread;24 22 import uwi.twitter.TwitterPostThread; 25 23 import uwi.twitter.TwitterAPI; 26 24 import uwi.twitter.TwitterScrapeThread; 25 import uwi.ui.DataGridEx; 27 26 import uwi.ui.multipletabbar.MultipleTabBar; 28 27 import uwi.ui.tabconfig.TabConfig; … … 47 46 private var item_pairTL : ContextMenuItem; 48 47 private var item_reload : ContextMenuItem; 48 private var item_read : ContextMenuItem; 49 private var item_unread : ContextMenuItem; 49 50 50 51 private var item_duptab : ContextMenuItem; … … 54 55 55 56 private var friendpost : TextArea = Application.application.friendpost; 56 private var dg : DataGrid = Application.application.dg;57 private var dg : DataGridEx = Application.application.dg; 57 58 private var tabbar : MultipleTabBar = Application.application.tabbar; 58 59 private var timeline : ArrayCollection = Application.application.timeline; … … 70 71 item_pairTL = new ContextMenuItem("ペアタイムライン"); 71 72 item_reload = new ContextMenuItem("更新"); 73 item_read = new ContextMenuItem("既読にする"); 74 item_unread = new ContextMenuItem("未読にする"); 72 75 item_follow.separatorBefore = true; 73 76 … … 82 85 dgcm.customItems.push(item_pairTL); 83 86 dgcm.customItems.push(item_reload); 87 dgcm.customItems.push(item_read); 88 dgcm.customItems.push(item_unread); 84 89 dg.contextMenu = dgcm; 85 90 … … 120 125 item_pairTL = null; 121 126 item_reload = null; 127 item_read = null; 128 item_unread = null; 122 129 123 130 item_duptab = null; … … 139 146 event(item_pairTL, ContextMenuEvent.MENU_ITEM_SELECT, onPairTL); 140 147 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); 141 150 142 151 event(item_duptab, ContextMenuEvent.MENU_ITEM_SELECT, onDupTab); … … 327 336 } 328 337 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 329 356 private function onDupTab(e : ContextMenuEvent) : void 330 357 { air/TLife/src/uwi/thread/event/DataGridEventThread.as
r2370 r2438 126 126 { 127 127 dgrt.flag |= 3; 128 // flagChange();129 128 next(run); 130 129 } air/TLife/src/uwi/thread/event/DataGridRoutineThread.as
r2370 r2438 15 15 import uwi.util.StatusUtility; 16 16 import uwi.util.StringUtility; 17 import uwi.util.Utility; 17 18 18 19 /** … … 53 54 return; 54 55 } 56 55 57 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 } 56 62 57 63 if ((flag & 2) != 0) { air/TLife/src/uwi/thread/event/PostEventThread.as
r2370 r2438 104 104 "status=" + decodeURI(postarea.text + footer) + 105 105 (CommonData.in_reply_to_status_id != "" ? "&in_reply_to_status_id=" + CommonData.in_reply_to_status_id : "") 106 , " POST");106 , "GET"); 107 107 tpt.start(); 108 108 tpt.join(); air/TLife/src/uwi/thread/event/TabBarEventThread.as
r2388 r2438 9 9 import uwi.util.CommonData; 10 10 import uwi.util.EventThread; 11 import uwi.util.Utility; 11 12 12 13 /** … … 39 40 private function onChange(e : Event) : void 40 41 { 41 var ttt : TimelineThread = new TimelineThread( CommonData.configxml.numstatusprint.recent);42 var ttt : TimelineThread = new TimelineThread(); 42 43 ttt.start(); 43 44 ttt.join(); air/TLife/src/uwi/twitter/TwitterBitScrapeThread.as
r2363 r2438 24 24 25 25 private var s : Status = null; 26 private var fct : FollowingCheckThread = null;27 26 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) 29 35 { 30 this.fct = fct; 36 if (factory) { 37 posterid = posterid_; 38 postid = postid_; 39 } 40 trace("MAP"); 41 42 this.posterid = posterid; 31 43 trace("replyget : " + "https://twitter.com/" + posterid + "/status/" + postid); 32 44 ult = new URLLoaderThread(new URLRequest("https://twitter.com/" + posterid + "/status/" + postid)); … … 35 47 protected override function run() : void 36 48 { 37 if (fct != null && fct.result != 2) {38 return;39 }40 41 49 ult.start(); 42 50 ult.join(); … … 63 71 // protected情報をDBにreplace 64 72 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)); 68 77 pe.start(); 69 78 pe.join(); air/TLife/src/uwi/twitter/TwitterBitStatusGetThread.as
r2339 r2438 26 26 private var posterid : String; 27 27 28 // TODO 基底クラスをつくる 29 public var factory : Boolean = false; 30 public var posterid_ : String; 31 public var postid_ : String; 32 28 33 public function TwitterBitStatusGetThread(posterid : String, postid : String) 29 34 { 35 if (factory) { 36 posterid = posterid_; 37 postid = postid_; 38 } 39 30 40 this.posterid = posterid; 31 41 var req : URLRequest = new URLRequest("http://twitter.com/statuses/show/" + postid + ".xml"); 32 req.method = URLRequestMethod. POST;42 req.method = URLRequestMethod.GET; 33 43 ult = new URLLoaderThread(req); 34 44 } air/TLife/src/uwi/twitter/TwitterBitUserInfoGetThread.as
r2363 r2438 25 25 this.userid = userid; 26 26 var req : URLRequest = new URLRequest("http://twitter.com/users/show/" + userid + ".xml"); 27 req.method = URLRequestMethod. POST;27 req.method = URLRequestMethod.GET; 28 28 ult = new URLLoaderThread(req); 29 29 } air/TLife/src/uwi/twitter/TwitterDirectMessageGetThread.as
r2336 r2438 36 36 for (var i : int = 1; i <= pageend; i++) { 37 37 var req : URLRequest = new URLRequest(baseurl + "?page=" + i); 38 req.method = URLRequestMethod. POST;38 req.method = URLRequestMethod.GET; 39 39 registerRequest(req); 40 40 } air/TLife/src/uwi/twitter/TwitterFriendsInfoGetThread.as
r2363 r2438 57 57 for (var i : int = 1; i <= pageend; i++) { 58 58 var req : URLRequest = new URLRequest(baseurl + "?page=" + i); 59 req.method = URLRequestMethod. POST;59 req.method = URLRequestMethod.GET; 60 60 pe.addThread(new URLLoaderThread(req)); 61 61 } air/TLife/src/uwi/twitter/TwitterRateLimitStatusGetThread.as
r2437 r2438 15 15 { 16 16 var req : URLRequest = new URLRequest("http://twitter.com/account/rate_limit_status.xml"); 17 req.method = URLRequestMethod. POST;17 req.method = URLRequestMethod.GET; 18 18 super(req); 19 19 } air/TLife/src/uwi/twitter/TwitterScrapeThread.as
r2407 r2438 29 29 private var statuses : Vector.<Status>; 30 30 31 public var pageend_ : int; 32 31 33 public function TwitterScrapeThread(posterid : String = null, pageend : int = 1) { 34 if (factory) { 35 posterid = posterid_; 36 pageend = pageend_; 37 } 38 32 39 super(posterid); 33 40 air/TLife/src/uwi/twitter/TwitterTimelineGetThread.as
r2437 r2438 23 23 private var followers : Object; 24 24 25 public var pageend_ : int; 26 25 27 /** 26 28 * … … 33 35 public function TwitterTimelineGetThread(posterid : String = null, count : int = 20, pageend : int = 1) 34 36 { 37 if (factory) { 38 posterid = posterid_; 39 count = 20; 40 pageend = pageend_; 41 } 42 35 43 var reply : Boolean = posterid == ""; 36 44 var baseurl : String; … … 45 53 for (var i : int = 1; i <= pageend; i++) { 46 54 var req : URLRequest = new URLRequest(baseurl + "?count=" + count + "&page=" + i); 47 req.method = URLRequestMethod. POST;55 req.method = URLRequestMethod.GET; 48 56 registerRequest(req); 49 57 } air/TLife/src/uwi/ui/DataGridEx.as
r2370 r2438 3 3 import mx.controls.DataGrid; 4 4 import mx.controls.listClasses.IListItemRenderer; 5 import mx.core.Application; 6 import uwi.util.CommonData; 5 7 6 8 /** … … 26 28 public function get ListItems() : Array { return listItems; } 27 29 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 } 28 38 } 29 39 air/TLife/src/uwi/ui/TimelineRenderer.as
r2370 r2438 29 29 setStyle("color", CommonData.configxml.main.fontcolor.timeline); 30 30 } 31 setStyle("fontWeight", "bold"); 31 32 } 32 33 } air/TLife/src/uwi/ui/dbsearch/DBSearchWindow.mxml
r2370 r2438 51 51 //cond2byte.selected = searchxml.twobyte == "true"; 52 52 53 search.enabled = false;53 condMigemo.enabled = CommonData.migemo != null; 54 54 55 55 swet = new DBSearchWindowEventThread(this); air/TLife/src/uwi/ui/dbsearch/DBSearchWindowEventThread.as
r2387 r2438 24 24 protected override function run() : void 25 25 { 26 event(sw.queryuserid, ListEvent.CHANGE, onQueryChange);27 event(sw.querycontent, ListEvent.CHANGE, onQueryChange);28 26 event(sw.queryuserid, KeyboardEvent.KEY_UP, onKeyUp); 29 27 event(sw.querycontent, KeyboardEvent.KEY_UP, onKeyUp); … … 33 31 private function onKeyUp(e : KeyboardEvent) : void 34 32 { 35 if (e.keyCode == Keyboard.ENTER && sw.search.enabled) {33 if (e.keyCode == Keyboard.ENTER) { 36 34 onSearchClick(null); 37 35 }else { 38 36 next(run); 39 37 } 40 }41 42 private function onQueryChange(e : ListEvent) : void43 {44 var en : Boolean = (sw.queryuserid.text != "" || sw.querycontent.text != "");45 sw.search.enabled = en;46 next(run);47 38 } 48 39 … … 80 71 CommonData.searcher.searchDB(query, { 81 72 dbregexp : sw.condRegexp.selected, 82 migemo : sw.condMigemo.selected ,73 migemo : sw.condMigemo.selected && sw.condMigemo.enabled, 83 74 fav : sw.condFav.selected, 84 75 capital : sw.condCapital.selected air/TLife/src/uwi/ui/multipletabbar/MultipleTabBarEventThread.as
r2387 r2438 6 6 import mx.events.ItemClickEvent; 7 7 import org.libspark.thread.Thread; 8 import uwi.thread.TimelineThread;9 8 import uwi.util.CommonData; 10 9 import uwi.util.EventThread; air/TLife/src/uwi/ui/search/SearchWindow.mxml
r2407 r2438 59 59 //searchForward.enabled = false; 60 60 // 61 condMigemo.enabled = CommonData.migemo != null; 62 61 63 swet = new SearchWindowEventThread(this); 62 64 swet.start(); air/TLife/src/uwi/ui/search/SearchWindowEventThread.as
r2388 r2438 95 95 word : sw.condWord.selected, 96 96 regexp : sw.condRegexp.selected, 97 migemo : sw.condMigemo.selected ,97 migemo : sw.condMigemo.selected && sw.condMigemo.enabled, 98 98 fav : sw.condFav.selected, 99 99 capital : sw.condCapital.selected, air/TLife/src/uwi/ui/tabconfig/TabConfigEventThread.as
r2387 r2438 125 125 { 126 126 // 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 }; 141 139 next(run); 142 140 } air/TLife/src/uwi/util/CommonData.as
r2388 r2438 2 2 import flash.filesystem.File; 3 3 import flash.utils.Dictionary; 4 import mx.core.ClassFactory; 4 5 import mx.formatters.DateFormatter; 5 6 import uwi.bean.TabRule; … … 11 12 import uwi.thread.ReplyGetThread; 12 13 import uwi.tinysegmenter.TinySegmenter; 14 import uwi.twitter.TwitterBitScrapeThread; 15 import uwi.twitter.TwitterBitStatusGetThread; 16 import uwi.twitter.TwitterScrapeThread; 17 import uwi.twitter.TwitterTimelineGetThread; 13 18 import uwi.ui.globalconfig.GlobalConfig; 14 19 import uwi.ui.tabconfig.TabConfig; … … 29 34 public static const TABLE_POSTER : String = "poster"; 30 35 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; 31 47 32 48 public static const LIMLEN_POST : int = 140; … … 62 78 public static var RPprevpos : int = -1; 63 79 64 public static var tabrules : Vector.<TabRule> = new Vector.<TabRule>(); 80 public static var tabrules : Vector.<TabRule> = new Vector.<TabRule>(); // タブの抽出ルール 65 81 66 82 public static var urlcache : Object = {}; // URL解決用のキャッシュ … … 69 85 // postid : String or Number 選択されているpostid 70 86 // newestid : String or Number 最新のpostid 71 // notify : Boolean 新着通知するかどうか -> configxmlへ72 87 // rule : String 抽出ルールを表すSQLクエリ 73 88 // type : int タブの種類(0 : 通常のタブ, 1 : 検索結果タブ) 74 89 // 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未満 : グローバル設定に従う) 76 95 77 96 // 唯一存在するインスタンス。Singletonの手抜き air/TLife/src/uwi/util/Utility.as
r2356 r2438 88 88 } 89 89 } 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 } 90 111 } 91 112

