OSDN Git Service

初回ログイン時に自動ログインが無効だったら、有効化するか確認するメッセージを表示するようにした
authoryuki <kimaira7@gmail.com>
Tue, 10 Sep 2013 05:28:23 +0000 (14:28 +0900)
committeryuki <kimaira7@gmail.com>
Tue, 10 Sep 2013 05:28:23 +0000 (14:28 +0900)
src/cx/fbn/nevernote/NeverNote.java
src/cx/fbn/nevernote/gui/RensoNoteListDock.java

index 11befe2..2c73548 100644 (file)
@@ -3748,6 +3748,7 @@ public class NeverNote extends QMainWindow{
 
                Global.isConnected = syncRunner.isConnected;
                
+               boolean autoLoginMessageFlag = false;
                if (!Global.isConnected) {
                OAuthWindow window = new OAuthWindow(logger);
                if (window.error) {
@@ -3774,6 +3775,7 @@ public class NeverNote extends QMainWindow{
                syncRunner.authToken = tokenizer.oauth_token;
                        syncRunner.enConnect();
                        Global.isConnected = syncRunner.isConnected;
+                       autoLoginMessageFlag = true;
                }
 //             Global.username = syncRunner.username;
                        
@@ -3781,9 +3783,16 @@ public class NeverNote extends QMainWindow{
                        return;
                setupOnlineMenu();
                setupConnectMenuOptions();
+               
+               // 初回ログイン時に自動ログインが無効だったら、有効化するか確認する
+               if (autoLoginMessageFlag && !Global.automaticLogin()) {
+                       if (QMessageBox.question(this, tr("Confirmation"), tr("Are you sure you want to enable the auto-login feature?"), 
+                                       QMessageBox.StandardButton.Yes, QMessageBox.StandardButton.No) == StandardButton.Yes.value()) {
+                               Global.setAutomaticLogin(true);
+                       }
+               }
+               
                logger.log(logger.HIGH, "Leaving NeverNote.remoteConnect");
-
-
     }
     private void setupConnectMenuOptions() {
        logger.log(logger.HIGH, "entering NeverNote.setupConnectMenuOptions");
index bb54812..69d11c3 100644 (file)
@@ -155,7 +155,7 @@ public class RensoNoteListDock extends QDockWidget {
                        
                        // カスタムモードかつアプリ起動時以外なら、メッセージ表示
                        if (mode == PresetMode.Custom) {
-                               QMessageBox.information(this, tr("Custom Mode was Selected"), tr("Custom mode was selected.\nYou can customize weighting manually in the Edit/Preferences/Renso Note List."));
+                               QMessageBox.information(this, tr("Information"), tr("Custom mode was selected.\nYou can customize weighting manually in the Edit/Preferences/Renso Note List."));
                        }
                }
        }
@@ -165,7 +165,7 @@ public class RensoNoteListDock extends QDockWidget {
                logger.log(logger.EXTREME, "RensoNoteListDock.haltLogToggled");
                
                if (checked) {
-                       QMessageBox.information(this, tr("Halt Collectiong Operation Log"), tr("Collecting operation log halted.\nYou can resume, if you press this button again."));
+                       QMessageBox.information(this, tr("Information"), tr("Collecting operation log halted.\nYou can resume, if you press this button again."));
                }
                Global.saveHaltLogButton(checked);
        }