チェンジセット 2651
- コミット日時:
- 2009/05/16 19:37:13 (3 年前)
- ファイル:
-
- air/TLife/trunk/air/TLife.air (更新) (変更前)
- air/TLife/trunk/air/version.xml (更新) (1 diff)
- air/TLife/trunk/application.xml (更新) (1 diff)
- air/TLife/trunk/bin/TLife.swf (更新) (変更前)
- air/TLife/trunk/bin/initial/config.xml (更新) (3 diffs)
- air/TLife/trunk/src/Main.mxml (更新) (4 diffs)
- air/TLife/trunk/src/uwi/db/DBExcite.as (更新) (1 diff)
- air/TLife/trunk/src/uwi/thread/MainThread.as (更新) (1 diff)
- air/TLife/trunk/src/uwi/thread/NotifyNewThread.as (更新) (2 diffs)
- air/TLife/trunk/src/uwi/thread/ReloadThread.as (更新) (1 diff)
- air/TLife/trunk/src/uwi/thread/TimelineThread.as (更新) (1 diff)
- air/TLife/trunk/src/uwi/thread/event/DataGridEventThread.as (更新) (3 diffs)
- air/TLife/trunk/src/uwi/thread/event/PostEventThread.as (更新) (11 diffs)
- air/TLife/trunk/src/uwi/ui/TabSkinUD.as (追加)
- air/TLife/trunk/src/uwi/ui/mainmenu/MainMenu.mxml (更新) (1 diff)
- air/TLife/trunk/src/uwi/ui/multipletabbar/MultipleTabBar.as (更新) (5 diffs)
- air/TLife/trunk/src/uwi/util/CommonData.as (更新) (2 diffs)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
air/TLife/trunk/air/version.xml
r2642 r2651 1 1 <version> 2 <version>alpha1 8/version>2 <version>alpha19/version> 3 3 <url>http://www.libspark.org/svn/air/TLife/trunk/air/TLife.air</url> 4 4 </version> air/TLife/trunk/application.xml
r2642 r2651 3 3 4 4 <id>uwi.TLife</id> 5 <version>alpha1 8</version>5 <version>alpha19</version> 6 6 <filename>TLife</filename> 7 7 <name>TLife</name> air/TLife/trunk/bin/initial/config.xml
r2642 r2651 10 10 <numpageget> 11 11 <recent>1</recent> 12 < reply>1</reply>12 <mention>1</mention> 13 13 </numpageget> 14 14 <numdisplay>1000</numdisplay> … … 40 40 <tabbar> 41 41 <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" /> 43 43 </tabbar> 44 44 <isearch> … … 72 72 <ifilterscreenname>Ctrl+G</ifilterscreenname> 73 73 <jumptotimeline>Ctrl+J</jumptotimeline> 74 <jumptopostarea>J</jumptopostarea> 74 75 <downatpostarea>Ctrl+Down</downatpostarea> 75 76 <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> 78 82 </keybind> 79 83 <search> air/TLife/trunk/src/Main.mxml
r2650 r2651 136 136 public function appendReply(item : Object) : void 137 137 { 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 141 155 postarea.setFocus(); 142 156 postarea.selectionBeginIndex = postarea.text.length; … … 187 201 public function reflectConfigInitially() : void 188 202 { 189 var a : Array = [];190 191 203 // 座標情報の読み込み 192 204 Utility.loadCoordinates(Application.application.nativeWindow, CommonData.configxml.main); … … 209 221 } 210 222 tabbar.titles = new ArrayCollection(ar); 211 a.push(getTimer());212 223 tabbar.changeLayout(); 213 a.push(getTimer());214 224 tabbar.SelectedIndex = 0; 215 225 216 226 reflectConfig(); 217 for each(var x : int in a) trace(x - a[0]);218 227 } 219 228 … … 498 507 499 508 <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 501 525 </mx:WindowedApplication> air/TLife/trunk/src/uwi/db/DBExcite.as
r2634 r2651 40 40 " where userid = '" + StringUtility.escapeSQL(CommonData.configxml.login.userid) + "')"; 41 41 break; 42 case CommonData.LABEL_ REPLY:42 case CommonData.LABEL_MENTION: 43 43 sql = " where content glob '*@" + StringUtility.escapeSQLForLike(CommonData.configxml.login.userid) + "*'"; 44 44 break; air/TLife/trunk/src/uwi/thread/MainThread.as
r2642 r2651 186 186 // setStyles(".timelineheaderstyle", stylexml.timeline.header); 187 187 setStyles(".timelinescrollbarstyle", stylexml.timeline.scrollbar); 188 setStyles(".tabbarstyle", stylexml.tabbar);188 // setStyles(".tabbarstyle", stylexml.tabbar); 189 189 setStyles(".replynamestyle", stylexml.replyname); 190 190 setStyles(".replypoststyle", stylexml.replypost); air/TLife/trunk/src/uwi/thread/NotifyNewThread.as
r2634 r2651 48 48 for each(var tabname : String in tabbar.titles) { 49 49 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) { // 未読管理時のタブ強調の扱い 51 53 var sqlsuffix : String = " order by postid desc limit " + numnotify; 52 54 var sql : String = null; … … 63 65 sqlsuffix; 64 66 break; 65 case CommonData.LABEL_ REPLY:67 case CommonData.LABEL_MENTION: 66 68 sql = sqlprefix + " where content glob '*@" + StringUtility.escapeSQLForLike(CommonData.configxml.login.userid) + "*' and " + condnewer + 67 69 (tabinfo.rule != "" ? (" and (" + tabinfo.rule + ")") : "") + air/TLife/trunk/src/uwi/thread/ReloadThread.as
r2642 r2651 40 40 } 41 41 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 }; 43 43 pep.addThread(CommonData.factory_statusgetter.newInstance()); 44 44 } 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 }; 47 47 pep.addThread(CommonData.factory_statusgetter.newInstance()); 48 48 } air/TLife/trunk/src/uwi/thread/TimelineThread.as
r2650 r2651 92 92 sqlsuffix; 93 93 break; 94 case CommonData.LABEL_ REPLY:94 case CommonData.LABEL_MENTION: 95 95 sql = sqlprefix + " where content glob '*@" + StringUtility.escapeSQLForLike(CommonData.configxml.login.userid) + "*'" + 96 96 (tabinfo.rule != "" ? (" and (" + tabinfo.rule + ")") : "") + air/TLife/trunk/src/uwi/thread/event/DataGridEventThread.as
r2650 r2651 2 2 { 3 3 import flash.events.Event; 4 import flash.events.FocusEvent; 4 5 import flash.events.KeyboardEvent; 5 6 import flash.events.MouseEvent; … … 51 52 event(datagrid, KeyboardEvent.KEY_UP, onKeyUp); 52 53 event(datagrid, ScrollEvent.SCROLL, onScroll); 54 event(datagrid, FocusEvent.FOCUS_OUT, onFocusOut); 53 55 } 54 56 … … 124 126 private function onKeyUp(e : KeyboardEvent) : void 125 127 { 126 trace("keyup"); 128 CommonData.datagridsuspend = false; 129 next(waitEvents); 130 } 131 132 private function onFocusOut(e : FocusEvent) : void 133 { 127 134 CommonData.datagridsuspend = false; 128 135 next(waitEvents); air/TLife/trunk/src/uwi/thread/event/PostEventThread.as
r2650 r2651 2 2 { 3 3 import flash.events.Event; 4 import flash.events.FocusEvent; 4 5 import flash.events.KeyboardEvent; 5 6 import flash.events.MouseEvent; … … 40 41 private var postedtext : String; 41 42 43 private var downatpostarea : Boolean; 44 private var upatpostarea : Boolean; 45 42 46 private static const EVENT_CHANGE : Event = new Event(Event.CHANGE); 43 47 … … 46 50 sub = new EventThread(postarea, Event.CHANGE, onChange); 47 51 uict = new UserIDCompleteThread(postarea, Application.application as Container); 52 downatpostarea = false; 53 upatpostarea = false; 48 54 } 49 55 … … 65 71 event(postbtn, MouseEvent.CLICK, onSubmit); 66 72 event(postarea, KeyboardEvent.KEY_DOWN, onKeyDown); 73 event(postarea, KeyboardEvent.KEY_UP, onKeyUp); 74 event(postarea, FocusEvent.FOCUS_OUT, onFocusOut); 67 75 } 68 76 … … 102 110 if (datagrid.selectedIndex == -1) datagrid.selectedIndex = datagrid.verticalScrollPosition; 103 111 datagrid.dispatchEvent(new KeyboardEvent(KeyboardEvent.KEY_DOWN, true, false, 0, Keyboard.DOWN)); 112 downatpostarea = true; 104 113 } 105 114 … … 107 116 if (datagrid.selectedIndex == -1) datagrid.selectedIndex = datagrid.verticalScrollPosition; 108 117 datagrid.dispatchEvent(new KeyboardEvent(KeyboardEvent.KEY_DOWN, true, false, 0, Keyboard.UP)); 118 upatpostarea = true; 109 119 } 110 120 … … 122 132 123 133 CommonData.datagridsuspend = true; 124 event(postarea, KeyboardEvent.KEY_UP, onKeyUp);125 134 // next(waitEvents); 126 135 } … … 130 139 CommonData.datagridsuspend = false; 131 140 132 if (CommonData.keybindjudgers.downatpostarea.apply(null, [e])){141 if(downatpostarea){ 133 142 datagrid.dispatchEvent(new KeyboardEvent(KeyboardEvent.KEY_UP, true, false, 0, Keyboard.DOWN)); 134 143 } 135 144 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){ 137 161 datagrid.dispatchEvent(new KeyboardEvent(KeyboardEvent.KEY_UP, true, false, 0, Keyboard.UP)); 138 162 } … … 161 185 /* 162 186 // ポスト直前に短縮する 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; 167 194 } 168 195 */ … … 171 198 private static const PTN_URL : RegExp = /https?:\/\/[-_.!~*'()a-zA-Z0-9;\/?:\@&=+\$,%#]+/g; 172 199 173 /*200 /* 174 201 private function shorten() : void 175 202 { … … 194 221 } 195 222 } 196 */223 */ 197 224 198 225 private function post() : void air/TLife/trunk/src/uwi/ui/mainmenu/MainMenu.mxml
r2642 r2651 27 27 private function onLoad() : void 28 28 { 29 trace("onLoad");30 29 var appDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor; 31 30 var ns:Namespace = appDescriptor.namespace(); air/TLife/trunk/src/uwi/ui/multipletabbar/MultipleTabBar.as
r2634 r2651 3 3 import mx.collections.ArrayCollection; 4 4 import mx.containers.VBox; 5 import mx.controls.Button; 5 6 import mx.controls.TabBar; 6 7 import mx.events.CollectionEvent; 7 8 import mx.events.ItemClickEvent; 9 import uwi.ui.TabSkinUD; 8 10 9 11 /** … … 34 36 var tab : TabBar = new TabBar(); // カレントタブバー 35 37 var tabdp : ArrayCollection = new ArrayCollection(); // カレントタブバーにバインドされるデータ 38 tab.setStyle("tabStyleName", "TabUD"); 39 tab.setStyle("selectedTabTextStyleName", null); 36 40 this.addChild(tab); 37 41 tab.dataProvider = tabdp; … … 55 59 tab = new TabBar(); 56 60 tabdp = new ArrayCollection(); 61 tab.setStyle("tabStyleName", "TabUD"); 62 tab.setStyle("selectedTabTextStyleName", null); 57 63 this.addChild(tab); 58 64 tab.height = tabheight; 59 65 tab.dataProvider = tabdp; 60 66 tab.selectedIndex = -1; 61 tab.styleName = ".tabbarstyle";67 // tab.styleName = ".tabbarstyle"; 62 68 this.tablist.push(tab); 63 69 } 64 70 } 71 // tab.validateProperties(); 72 // tab.validateSize(true); 65 73 this.height = tabheight * tablist.length; 66 this.validateNow();67 74 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 }); 71 79 } 72 80 … … 93 101 this.removeAllChildren(); 94 102 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; 95 119 } 96 120 … … 132 156 } 133 157 } 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; 136 160 } 137 161 } air/TLife/trunk/src/uwi/util/CommonData.as
r2650 r2651 33 33 */ 34 34 public class CommonData { 35 // Label Name 35 36 public static const LABEL_RECENT : String = "Recent"; 36 public static const LABEL_ REPLY : String = "Reply";37 public static const LABEL_MENTION : String = "Mention"; 37 38 public static const LABEL_FAVORITES : String = "Favorites"; 38 39 40 // Table Name 39 41 public static const TABLE_STATUS : String = "status"; 40 42 public static const TABLE_POSTER : String = "poster"; 41 43 public static const TABLE_FOLLOWING : String = "following"; 42 44 45 // OAuth 43 46 public static const CONSUMER_KEY : String = "R0y7gsbuYxklTrJEmXsmTg"; 44 47 public static const CONSUMER_SECRET_KEY : String = "1WEmKiVewApDv31lTQNuPF1xSg3vXM1VlkpKT8u9Wo"; … … 46 49 public static var oauth_token : OAuthToken; 47 50 51 // Method for getting timeline 48 52 public static const MAP_STATUSGETTER : Object = { 49 53 "scrape" : TwitterScrapeThread,

