• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

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

密猟オンラインクライアントプログラム JAVAベース


Commit MetaInfo

Revision12 (tree)
Time2016-01-29 18:34:07
Authormanjihq

Log Message

ウィンドウフォーカスがメールウィンドウを出したときにおかしいのを修正

Change Summary

Incremental Difference

--- trunk/src/hunton/SendTask.java (revision 11)
+++ trunk/src/hunton/SendTask.java (revision 12)
@@ -15,6 +15,7 @@
1515 }
1616
1717 public void send(String s) {
18+ boolean bneed_resetfocus = true;
1819 switch (s.charAt(0)) {
1920 case '/': /* command prefix */
2021
@@ -151,6 +152,7 @@
151152 case 'W':
152153 case 'w': /* write mail : !w user,subject */
153154
155+ bneed_resetfocus = false;
154156 Hunt.doWriteMail(s);
155157 break;
156158
@@ -157,6 +159,7 @@
157159 case 'R':
158160 case 'r': /* read mail : !r number-of-list */
159161
162+ bneed_resetfocus = false;
160163 doReadMail(s);
161164 break;
162165
@@ -181,6 +184,7 @@
181184 case 'P':
182185 case 'p': /* post article */
183186
187+ bneed_resetfocus = false;
184188 Hunt.doPostArticle(s);
185189 break;
186190
@@ -187,6 +191,7 @@
187191 case 'F':
188192 case 'f': /* read article */
189193
194+ bneed_resetfocus = false;
190195 doReadArticle(s);
191196 break;
192197
@@ -226,6 +231,9 @@
226231 doSendMessage(s);
227232 break;
228233 }
234+ if (bneed_resetfocus == true) {
235+ Hunt.getMainView().requestFocus();
236+ }
229237 }
230238
231239 /* say command */
--- trunk/src/hunton/Hunt.java (revision 11)
+++ trunk/src/hunton/Hunt.java (revision 12)
@@ -489,8 +489,6 @@
489489
490490 /* send char or command */
491491 public static void send_message(String s) {
492- mainWnd.toFront();
493- mainView.requestFocus();
494492 if (stask != null && s != null && s.length() > 0) {
495493 stask.send(s);
496494 }
@@ -513,7 +511,6 @@
513511 title += work.toString();
514512 HuntWriteWnd wnd = new HuntWriteWnd(title, false);
515513 wnd.setVisible(true);
516- wnd.toFront();
517514 }
518515 }
519516 }
@@ -528,7 +525,6 @@
528525 if (work.length() > 0) {
529526 HuntWriteWnd wnd = new HuntWriteWnd(work.toString(), true);
530527 wnd.setVisible(true);
531- wnd.toFront();
532528 }
533529 }
534530 }
@@ -570,7 +566,6 @@
570566 }
571567 }
572568 wnd.setVisible(true);
573- wnd.toFront();
574569 }
575570
576571 /* reply article */
@@ -608,7 +603,6 @@
608603 }
609604 }
610605 wnd.setVisible(true);
611- wnd.toFront();
612606 }
613607
614608
@@ -676,7 +670,6 @@
676670 messageView.setVisible(true);
677671
678672 mainWnd.setVisible(true);
679- mainWnd.toFront();
680673 }
681674
682675 /* try to login server */