• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

タイニー番組ナビゲータ本体


Commit MetaInfo

修订版91e606a70103831c5e3c2775377cce298f04c467 (tree)
时间2017-12-25 13:13:29
作者Masahiko Kimura <mkimura@u01....>
CommiterMasahiko Kimura

Log Message

1. 「2017/12/31 22:00」で予約すると「2018/12/31 22:00」となってしまう問題の対応
2. 日付を指定して過去ログを閲覧するとエラーになる問題の対応

更改概述

差异

--- a/TinyBannavi/src/tainavi/AbsPaperView.java
+++ b/TinyBannavi/src/tainavi/AbsPaperView.java
@@ -338,9 +338,10 @@ public abstract class AbsPaperView extends JPanel implements VWTimerRiseListener
338338 String adate = CommonUtils.getDate(c);
339339 String atime = CommonUtils.getTime(c);
340340 String adate529 = CommonUtils.getDate529(c,true);
341+ boolean hasTime = startdt.length() > 10;
341342
342343 // 指定日付に移動して放送局の位置を確認する
343- TVProgramIterator pli = redrawByDateWithCenter(center,adate529);
344+ TVProgramIterator pli = redrawByDateWithCenter(center, hasTime ? adate529 : adate);
344345 if ( pli == null ) {
345346 // どちらにもない
346347 MWin.appendError(ERRID+"ジャンプ先の日付がみつかりません: "+adate529);
@@ -354,20 +355,22 @@ public abstract class AbsPaperView extends JPanel implements VWTimerRiseListener
354355 }
355356
356357 // 横の列
357- int crindex = pli.getIndex(center);
358- if ( crindex == -1 ) {
359- MWin.appendError(ERRID+"「"+center+"」は有効な放送局ではありません");
360- ringBeep();
361- return false;
362- }
363-
364358 int x = 0;
365- if ( env.isPagerEnabled() ) {
366- int idx = env.getPageIndex(1+crindex);
367- x = (crindex - idx*env.getCenterPerPage()) * bounds.getBangumiColumnWidth();
368- }
369- else {
370- x = crindex * bounds.getBangumiColumnWidth();
359+ if (center != null){
360+ int crindex = pli.getIndex(center);
361+ if ( crindex == -1 ) {
362+ MWin.appendError(ERRID+"「"+center+"」は有効な放送局ではありません");
363+ ringBeep();
364+ return false;
365+ }
366+
367+ if ( env.isPagerEnabled() ) {
368+ int idx = env.getPageIndex(1+crindex);
369+ x = (crindex - idx*env.getCenterPerPage()) * bounds.getBangumiColumnWidth();
370+ }
371+ else {
372+ x = crindex * bounds.getBangumiColumnWidth();
373+ }
371374 }
372375
373376 // 縦の列
@@ -379,7 +382,7 @@ public abstract class AbsPaperView extends JPanel implements VWTimerRiseListener
379382 h = Integer.valueOf(ma.group(1));
380383 m = Integer.valueOf(ma.group(2));
381384 }
382- if (adate529.equals(adate)) {
385+ if (!hasTime || adate529.equals(adate)) {
383386 if (h < TIMEBAR_START) {
384387 h = TIMEBAR_START;
385388 m = 0;
--- a/TinyBannavi/src/tainavi/PlugIn_RecDBR_T2007.java
+++ b/TinyBannavi/src/tainavi/PlugIn_RecDBR_T2007.java
@@ -1025,7 +1025,7 @@ public class PlugIn_RecDBR_T2007 extends HDDRecorderUtils implements HDDRecorder
10251025 Date bdate = new Date(nbsecs*1000L); // 開始日時(Date)
10261026 Date edate = new Date(nesecs*1000L); // 終了日時(Date)
10271027
1028- SimpleDateFormat sfd = new SimpleDateFormat("YYYY/MM/dd(E)");
1028+ SimpleDateFormat sfd = new SimpleDateFormat("yyyy/MM/dd(E)");
10291029 String pattern = sfd.format(bdate);
10301030
10311031 // 繰り返しパターン
@@ -1782,7 +1782,7 @@ public class PlugIn_RecDBR_T2007 extends HDDRecorderUtils implements HDDRecorder
17821782 Date bdate = new Date(nbsecs*1000L); // 開始日時(Date)
17831783 Date edate = new Date(nesecs*1000L); // 終了日時(Date)
17841784
1785- SimpleDateFormat sfd = new SimpleDateFormat("YYYY/MM/dd(E)");
1785+ SimpleDateFormat sfd = new SimpleDateFormat("yyyy/MM/dd(E)");
17861786 String pattern = sfd.format(bdate);
17871787
17881788 // 開始、終了時刻