/[svn]/qsampler/trunk/src/qsampler.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsampler.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2209 by capela, Sun Jun 5 10:21:53 2011 UTC revision 2210 by persson, Mon Jul 18 08:18:36 2011 UTC
# Line 37  Line 37 
37  #define darker(x)       dark(x)  #define darker(x)       dark(x)
38  #endif  #endif
39    
40    #if WIN32
41    #define RELATIVE_LOCALE_DIR "/share/locale"
42    #elif defined(__APPLE__)
43    #define RELATIVE_LOCALE_DIR "/../Resources"
44    #endif
45    
46    
47  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
48  // Singleton application instance stuff (Qt/X11 only atm.)  // Singleton application instance stuff (Qt/X11 only atm.)
# Line 71  public: Line 77  public:
77                          if (m_pQtTranslator->load(sLocName, sLocPath)) {                          if (m_pQtTranslator->load(sLocName, sLocPath)) {
78                                  QApplication::installTranslator(m_pQtTranslator);                                  QApplication::installTranslator(m_pQtTranslator);
79                          } else {                          } else {
80                  #if WIN32                  #ifdef RELATIVE_LOCALE_DIR
81                                  sLocPath = QApplication::applicationDirPath() + "/share/locale";                                  sLocPath = QApplication::applicationDirPath() + RELATIVE_LOCALE_DIR;
82                                  if (m_pQtTranslator->load(sLocName, sLocPath)) {                                  if (m_pQtTranslator->load(sLocName, sLocPath)) {
83                                          QApplication::installTranslator(m_pQtTranslator);                                          QApplication::installTranslator(m_pQtTranslator);
84                                  } else {                                  } else {
# Line 85  public: Line 91  public:
91                                          sLocPath.toUtf8().constData(),                                          sLocPath.toUtf8().constData(),
92                                          sLocName.toUtf8().constData());                                          sLocName.toUtf8().constData());
93                  #endif                  #endif
94                  #if WIN32                  #ifdef RELATIVE_LOCALE_DIR
95                                  }                                  }
96                  #endif                  #endif
97                          }                          }
# Line 95  public: Line 101  public:
101                          if (m_pMyTranslator->load(sLocName, sLocPath)) {                          if (m_pMyTranslator->load(sLocName, sLocPath)) {
102                                  QApplication::installTranslator(m_pMyTranslator);                                  QApplication::installTranslator(m_pMyTranslator);
103                          } else {                          } else {
104                  #if WIN32                  #ifdef RELATIVE_LOCALE_DIR
105                                  sLocPath = QApplication::applicationDirPath() + "/share/locale";                                  sLocPath = QApplication::applicationDirPath() + RELATIVE_LOCALE_DIR;
106                  #else                  #else
107                                  sLocPath = CONFIG_PREFIX "/share/locale";                                  sLocPath = CONFIG_PREFIX "/share/locale";
108                  #endif                  #endif

Legend:
Removed from v.2209  
changed lines
  Added in v.2210

  ViewVC Help
Powered by ViewVC