[haiku-commits] r39087 - haiku/trunk/src/tools/translation/inspector

  • From: mattmadia@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 23 Oct 2010 22:18:22 +0200 (CEST)

Author: mmadia
Date: 2010-10-23 22:18:22 +0200 (Sat, 23 Oct 2010)
New Revision: 39087
Changeset: http://dev.haiku-os.org/changeset/39087

Modified:
   haiku/trunk/src/tools/translation/inspector/InspectorApp.cpp
   haiku/trunk/src/tools/translation/inspector/InspectorApp.h
   haiku/trunk/src/tools/translation/inspector/Jamfile
Log:
Update for the Catalog API change. Based on r37345. Review appreciated.


Modified: haiku/trunk/src/tools/translation/inspector/InspectorApp.cpp
===================================================================
--- haiku/trunk/src/tools/translation/inspector/InspectorApp.cpp        
2010-10-23 20:14:02 UTC (rev 39086)
+++ haiku/trunk/src/tools/translation/inspector/InspectorApp.cpp        
2010-10-23 20:18:22 UTC (rev 39087)
@@ -4,7 +4,7 @@
 //
 // InspectorApp.cpp
 //
-// BApplication object for the Inspector application.  The purpose of 
+// BApplication object for the Inspector application.  The purpose of
 // Inspector is to provide the user with as much relevant information as
 // possible about the currently open document.
 //
@@ -14,18 +14,18 @@
 // Permission is hereby granted, free of charge, to any person obtaining a
 // copy of this software and associated documentation files (the "Software"),
 // to deal in the Software without restriction, including without limitation
-// the rights to use, copy, modify, merge, publish, distribute, sublicense, 
-// and/or sell copies of the Software, and to permit persons to whom the 
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the
 // Software is furnished to do so, subject to the following conditions:
 //
-// The above copyright notice and this permission notice shall be included 
+// The above copyright notice and this permission notice shall be included
 // in all copies or substantial portions of the Software.
 //
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 /*****************************************************************************/
@@ -49,14 +49,12 @@
 {
        fpActivesWin = NULL;
        fpInfoWin = NULL;
-       
-       be_locale->GetAppCatalog(&fAppCatalog);
-       
+
        AddToTranslatorsList("/system/add-ons/Translators",
                SYSTEM_TRANSLATOR);
        AddToTranslatorsList("/boot/home/config/add-ons/Translators",
                USER_TRANSLATOR);
-       
+
        // Show application window
        BRect rect(100, 100, 500, 400);
        ImageWindow *pwin = new ImageWindow(rect, IMAGEWINDOW_TITLE);
@@ -68,14 +66,14 @@
 {
        BDirectory dir;
        if (dir.SetTo(folder) == B_OK) {
-       
+
                BEntry ent;
                while (dir.GetNextEntry(&ent) == B_OK) {
                        BPath path;
                        if (ent.GetPath(&path) == B_OK)
                                flstTranslators.AddItem(
                                        new BTranslatorItem(path.Leaf(), 
path.Path(), group));
-               }       
+               }
        }
 }
 
@@ -86,24 +84,24 @@
                case M_ACTIVE_TRANSLATORS_WINDOW:
                        if (!fpActivesWin)
                                fpActivesWin = new ActiveTranslatorsWindow(
-                                       BRect(625, 350, 800, 600), 
+                                       BRect(625, 350, 800, 600),
                                        B_TRANSLATE("Active Translators"),
                                        GetTranslatorsList());
                        break;
                case M_ACTIVE_TRANSLATORS_WINDOW_QUIT:
                        fpActivesWin = NULL;
                        break;
-                       
+
                case M_INFO_WINDOW:
                        if (!fpInfoWin)
                                fpInfoWin = new InfoWindow(BRect(625, 50, 800, 
300),
-                                       B_TRANSLATE_COMMENT("Info Win", 
+                                       B_TRANSLATE_COMMENT("Info Win",
                                        "This is a quite narrow info window and 
title 'Info Win' "
                                        "is therefore shortened."), 
fbstrInfo.String());
                        break;
                case M_INFO_WINDOW_QUIT:
                        fpInfoWin = NULL;
-                       break;  
+                       break;
                case M_INFO_WINDOW_TEXT:
                        // If image view is telling me to
                        // update the info window...
@@ -111,7 +109,7 @@
                        if (fpInfoWin)
                                fpInfoWin->PostMessage(pmsg);
                        break;
-                       
+
                default:
                        BApplication::MessageReceived(pmsg);
                        break;
@@ -136,12 +134,12 @@
 int main(int argc, char **argv)
 {
        InspectorApp *papp = new InspectorApp();
-       
+
        papp->Run();
-       
+
        delete papp;
        papp = NULL;
-       
+
        return 0;
 }
 

Modified: haiku/trunk/src/tools/translation/inspector/InspectorApp.h
===================================================================
--- haiku/trunk/src/tools/translation/inspector/InspectorApp.h  2010-10-23 
20:14:02 UTC (rev 39086)
+++ haiku/trunk/src/tools/translation/inspector/InspectorApp.h  2010-10-23 
20:18:22 UTC (rev 39087)
@@ -4,7 +4,7 @@
 //
 // InspectorApp.h
 //
-// BApplication object for the Inspector application.  The purpose of 
+// BApplication object for the Inspector application.  The purpose of
 // Inspector is to provide the user with as much relevant information as
 // possible about the currently open document.
 //
@@ -14,18 +14,18 @@
 // Permission is hereby granted, free of charge, to any person obtaining a
 // copy of this software and associated documentation files (the "Software"),
 // to deal in the Software without restriction, including without limitation
-// the rights to use, copy, modify, merge, publish, distribute, sublicense, 
-// and/or sell copies of the Software, and to permit persons to whom the 
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the
 // Software is furnished to do so, subject to the following conditions:
 //
-// The above copyright notice and this permission notice shall be included 
+// The above copyright notice and this permission notice shall be included
 // in all copies or substantial portions of the Software.
 //
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 /*****************************************************************************/
@@ -47,9 +47,9 @@
        InspectorApp();
        void MessageReceived(BMessage *pmsg);
        void RefsReceived(BMessage *pmsg);
-       
+
        BList *GetTranslatorsList();
-       
+
 private:
        void AddToTranslatorsList(const char *folder, int32 group);
 
@@ -57,7 +57,6 @@
        BList flstTranslators;
        ActiveTranslatorsWindow *fpActivesWin;
        InfoWindow *fpInfoWin;
-       BCatalog fAppCatalog;
 };
 
 #endif // #ifndef INSPECTORAPP_H

Modified: haiku/trunk/src/tools/translation/inspector/Jamfile
===================================================================
--- haiku/trunk/src/tools/translation/inspector/Jamfile 2010-10-23 20:14:02 UTC 
(rev 39086)
+++ haiku/trunk/src/tools/translation/inspector/Jamfile 2010-10-23 20:18:22 UTC 
(rev 39087)
@@ -2,7 +2,7 @@
 
 AddResources Inspector : Inspector.rsrc ;
 
-Application Inspector : 
+Application Inspector :
        TranslatorItem.cpp
        StatusCheck.cpp
        ActiveTranslatorsWindow.cpp
@@ -20,5 +20,6 @@
        ActiveTranslatorsWindow.cpp
 ;
 
-LinkAgainst Inspector : be tracker locale translation $(TARGET_LIBSUPC++) ;
+LinkAgainst Inspector :
+       be tracker translation $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) ;
 


Other related posts: