Show
Ignore:
Timestamp:
11/28/07 09:26:58 (12 months ago)
Author:
eugene
Message:
  • Rectified most paths;
  • Moved gui config file into QTGUI_DIR and named config.ini in order to let advanced editors apply their syntax rules;
  • Tiny CodingStyle update.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/qt-gui_qt4/src/core/licqgui.cpp

    r5887 r5888  
    121121  // We need to catch that here and tell the Xlib that we 
    122122  // ignore it, otherwise Qt's handler will terminate us. :-( 
    123   if(err->error_code == BadDrawable) 
     123  if (err->error_code == BadDrawable) 
    124124    return 0; 
    125125 
     
    191191  char* ptr; 
    192192  char buf[MAX_FILENAME_LEN]; 
    193   snprintf(buf, MAX_FILENAME_LEN, "%s/licq_qt-gui.style", BASE_DIR); 
     193  snprintf(buf, MAX_FILENAME_LEN, "%s%sstyle.ini", BASE_DIR, QTGUI_DIR); 
    194194  buf[MAX_FILENAME_LEN - 1] = '\0'; 
    195195 
     
    265265 
    266266  gLog.Info("%s%s configuration.\n", L_INITxSTR, PLUGIN_NAME); 
    267   snprintf(szTemp, MAX_FILENAME_LEN, "%s/%s", BASE_DIR, QTGUI_CONFIGFILE); 
     267  snprintf(szTemp, MAX_FILENAME_LEN, "%s%s", BASE_DIR, QTGUI_CONFIGFILE); 
    268268  szTemp[MAX_FILENAME_LEN - 1] = '\0'; 
    269269  CIniFile licqConf; 
    270270  if (!licqConf.LoadFile(szTemp)) 
    271271  { 
    272     // File doesn't exist so define sections and write them now so saving won't generate warnings later 
     272    // File doesn't exist so define sections and write them now 
     273    // so saving won't generate warnings later 
    273274    licqConf.SetFlags(INI_FxALLOWxCREATE); 
    274275    licqConf.ReloadFile(); 
     
    308309  licqConf.ReadStr("Emoticons", szTemp, Emoticons::DEFAULT_THEME.toLatin1()); 
    309310  QStringList emoticonsDirs; 
    310   emoticonsDirs += QString::fromLatin1(SHARE_DIR) + QTGUI_DIR + EMOTICONS_DIR; 
    311   emoticonsDirs += QString::fromLatin1(BASE_DIR) + QTGUI_DIR + EMOTICONS_DIR; 
     311  emoticonsDirs += QString::fromLocal8Bit(SHARE_DIR) + QTGUI_DIR + EMOTICONS_DIR; 
     312  emoticonsDirs += QString::fromLocal8Bit(BASE_DIR) + QTGUI_DIR + EMOTICONS_DIR; 
    312313#ifdef USE_KDE 
    313314  // emoticons resource added in KDE 3.4 
     
    352353{ 
    353354  char szTemp[MAX_FILENAME_LEN]; 
    354   snprintf(szTemp, MAX_FILENAME_LEN, "%s/%s", BASE_DIR, QTGUI_CONFIGFILE); 
     355  snprintf(szTemp, MAX_FILENAME_LEN, "%s%s", BASE_DIR, QTGUI_CONFIGFILE); 
    355356  szTemp[MAX_FILENAME_LEN - 1] = '\0'; 
    356357  CIniFile licqConf; 
     
    387388  // Save all our options 
    388389  char filename[MAX_FILENAME_LEN]; 
    389   snprintf(filename, MAX_FILENAME_LEN, "%s/%s", BASE_DIR, QTGUI_CONFIGFILE); 
     390  snprintf(filename, MAX_FILENAME_LEN, "%s%s", BASE_DIR, QTGUI_CONFIGFILE); 
    390391  filename[MAX_FILENAME_LEN - 1] = '\0'; 
    391392  CIniFile licqConf(INI_FxERROR | INI_FxALLOWxCREATE); 
    392   if (!licqConf.LoadFile(filename)) return; 
     393 
     394  if (!licqConf.LoadFile(filename)) 
     395    return; 
    393396 
    394397  Config::General::instance()->saveConfiguration(licqConf); 
     
    10721075  { 
    10731076    if (!myLicqDaemon->ViewUrl(url.toLocal8Bit().data())) 
    1074       WarnUser(parent, tr("Licq is unable to start your browser and open the URL.\nYou will need to start the browser and open the URL manually.")); 
     1077      WarnUser(parent, 
     1078          tr("Licq is unable to start your browser and open the URL.\n" 
     1079            "You will need to start the browser and open the URL manually.")); 
    10751080  } 
    10761081}