[haiku-commits] r40875 - haiku/trunk/src/apps/sudoku

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 8 Mar 2011 18:47:58 +0100 (CET)

Author: axeld
Date: 2011-03-08 18:47:58 +0100 (Tue, 08 Mar 2011)
New Revision: 40875
Changeset: http://dev.haiku-os.org/changeset/40875

Modified:
   haiku/trunk/src/apps/sudoku/ProgressWindow.cpp
   haiku/trunk/src/apps/sudoku/Sudoku.cpp
   haiku/trunk/src/apps/sudoku/SudokuGenerator.cpp
   haiku/trunk/src/apps/sudoku/SudokuWindow.cpp
Log:
* Fixed style violations introduced with the previous patch, and a few more
  that were already present.
* Removed one more case of excessive translating that I missed before.


Modified: haiku/trunk/src/apps/sudoku/ProgressWindow.cpp
===================================================================
--- haiku/trunk/src/apps/sudoku/ProgressWindow.cpp      2011-03-08 17:40:58 UTC 
(rev 40874)
+++ haiku/trunk/src/apps/sudoku/ProgressWindow.cpp      2011-03-08 17:47:58 UTC 
(rev 40875)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx All rights reserved.
+ * Copyright 2007-2011, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx
  * Distributed under the terms of the MIT License.
  */
 
@@ -19,6 +19,7 @@
 #undef B_TRANSLATE_CONTEXT
 #define B_TRANSLATE_CONTEXT "ProgressWindow"
 
+
 static const uint32 kMsgShow = 'show';
 
 

Modified: haiku/trunk/src/apps/sudoku/Sudoku.cpp
===================================================================
--- haiku/trunk/src/apps/sudoku/Sudoku.cpp      2011-03-08 17:40:58 UTC (rev 
40874)
+++ haiku/trunk/src/apps/sudoku/Sudoku.cpp      2011-03-08 17:47:58 UTC (rev 
40875)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx All rights reserved.
+ * Copyright 2007-2011, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx
  * Distributed under the terms of the MIT License.
  */
 
@@ -15,14 +15,17 @@
 #include <Catalog.h>
 #include <TextView.h>
 
+
 #undef B_TRANSLATE_CONTEXT
 #define B_TRANSLATE_CONTEXT "Sudoku"
 
+
 const char* kSignature = "application/x-vnd.Haiku-Sudoku";
 
 
 Sudoku::Sudoku()
-       : BApplication(kSignature)
+       :
+       BApplication(kSignature)
 {
 }
 
@@ -76,7 +79,7 @@
        font.SetSize(18);
        font.SetFace(B_BOLD_FACE);
        view->SetFontAndColor(0, strlen(B_TRANSLATE("Sudoku")), &font);
-       
+
        alert->SetShortcut(0, B_ESCAPE);
        alert->Go();
 }

Modified: haiku/trunk/src/apps/sudoku/SudokuGenerator.cpp
===================================================================
--- haiku/trunk/src/apps/sudoku/SudokuGenerator.cpp     2011-03-08 17:40:58 UTC 
(rev 40874)
+++ haiku/trunk/src/apps/sudoku/SudokuGenerator.cpp     2011-03-08 17:47:58 UTC 
(rev 40875)
@@ -1,24 +1,26 @@
 /*
- * Copyright 2007, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx All rights reserved.
+ * Copyright 2007-2011, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx
  * Distributed under the terms of the MIT License.
  */
 
 
 #include "SudokuGenerator.h"
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <Catalog.h>
+
 #include "ProgressWindow.h"
 #include "SudokuField.h"
 #include "SudokuSolver.h"
 
-#include <Catalog.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #undef B_TRANSLATE_CONTEXT
 #define B_TRANSLATE_CONTEXT "SudokuGenerator"
 
+
 SudokuGenerator::SudokuGenerator()
 {
 }

Modified: haiku/trunk/src/apps/sudoku/SudokuWindow.cpp
===================================================================
--- haiku/trunk/src/apps/sudoku/SudokuWindow.cpp        2011-03-08 17:40:58 UTC 
(rev 40874)
+++ haiku/trunk/src/apps/sudoku/SudokuWindow.cpp        2011-03-08 17:47:58 UTC 
(rev 40875)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007-2010, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx
+ * Copyright 2007-2011, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx
  * Distributed under the terms of the MIT License.
  */
 
@@ -33,6 +33,7 @@
 #undef B_TRANSLATE_CONTEXT
 #define B_TRANSLATE_CONTEXT "SudokuWindow"
 
+
 const uint32 kMsgOpenFilePanel = 'opfp';
 const uint32 kMsgGenerateSudoku = 'gnsu';
 const uint32 kMsgAbortSudokuGenerator = 'asgn';
@@ -115,10 +116,7 @@
 
        bigtime_t start = system_time();
        generator.Generate(&fField, 40 - fLevel * 5, fProgress, &fQuit);
-       printf(B_TRANSLATE_WITH_CONTEXT("generated in %g msecs\n",
-               "When Sudoku is launched from a Terminal window, this message "
-               "is shown there."),
-               (system_time() - start) / 1000.0);
+       printf("generated in %g msecs\n", (system_time() - start) / 1000.0);
 
        BMessage done(kMsgSudokuGenerated);
        if (!fQuit) {
@@ -144,8 +142,9 @@
 
 
 SudokuWindow::SudokuWindow()
-       : BWindow(BRect(100, 100, 500, 520), B_TRANSLATE("Sudoku"),
-       B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE),
+       :
+       BWindow(BRect(100, 100, 500, 520), B_TRANSLATE("Sudoku"),
+               B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | 
B_QUIT_ON_WINDOW_CLOSE),
        fGenerator(NULL),
        fStoredState(NULL),
        fExportFormat(kExportAsText)
@@ -271,16 +270,14 @@
                new BMessage(B_UNDO), 'Z'));
        fUndoItem->SetEnabled(false);
        menu->AddItem(fRedoItem = new BMenuItem(B_TRANSLATE("Redo"),
-               new BMessage(B_REDO), 'Z',
-               B_SHIFT_KEY));
+               new BMessage(B_REDO), 'Z', B_SHIFT_KEY));
        fRedoItem->SetEnabled(false);
        menu->AddSeparatorItem();
 
        menu->AddItem(new BMenuItem(B_TRANSLATE("Snapshot current"),
                new BMessage(kMsgStoreState)));
        menu->AddItem(fRestoreStateItem = new BMenuItem(
-               B_TRANSLATE("Restore snapshot"),
-               new BMessage(kMsgRestoreState)));
+               B_TRANSLATE("Restore snapshot"), new 
BMessage(kMsgRestoreState)));
        fRestoreStateItem->SetEnabled(fStoredState != NULL);
        menu->AddSeparatorItem();
 


Other related posts:

  • » [haiku-commits] r40875 - haiku/trunk/src/apps/sudoku - axeld