Changeset 2949

Show
Ignore:
Timestamp:
11/03/08 10:57:51 (17 months ago)
Author:
kris
Message:

Fixed a number of bugs in the System Utility:

  • Fixed a crash in the port snap tool
  • Fixed a bug which prevented being able to click apply when making changes
  • Fixed a bug with resolving the splash screen language names
  • Fixed a bug when trying to remember which language splash is being used
Location:
pcbsd
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • pcbsd/branches/7.0/kcmPBSystem/PBSystem.pro

    r2613 r2949  
    2424DESTDIR = /usr/local/kde4/lib/kde4/ 
    2525 
    26 TRANSLATIONS = PBSystem_en.ts 
     26TRANSLATIONS = PBSystem_en.ts PBSystem_af.ts PBSystem_ar.ts PBSystem_az.ts PBSystem_bg.ts PBSystem_bn.ts PBSystem_bs.ts PBSystem_ca.ts PBSystem_cs.ts PBSystem_cy.ts PBSystem_da.ts PBSystem_de.ts PBSystem_el.ts PBSystem_es.ts PBSystem_et.ts PBSystem_eu.ts PBSystem_fa.ts PBSystem_fi.ts PBSystem_fr.ts PBSystem_gl.ts PBSystem_he.ts PBSystem_hi.ts PBSystem_hr.ts PBSystem_hu.ts PBSystem_id.ts PBSystem_is.ts PBSystem_it.ts PBSystem_ja.ts PBSystem_ka.ts PBSystem_ko.ts PBSystem_lt.ts PBSystem_lv.ts PBSystem_mk.ts PBSystem_mn.ts PBSystem_ms.ts PBSystem_mt.ts PBSystem_nb.ts PBSystem_nl.ts PBSystem_pa.ts PBSystem_pl.ts PBSystem_pt.ts PBSystem_pt_BR.ts PBSystem_ro.ts PBSystem_ru.ts PBSystem_sk.ts PBSystem_sl.ts PBSystem_sr.ts PBSystem_sv.ts PBSystem_ta.ts PBSystem_tg.ts PBSystem_th.ts PBSystem_tr.ts PBSystem_uk.ts PBSystem_uz.ts PBSystem_vi.ts PBSystem_zh_CN.ts PBSystem_zh_HK.ts PBSystem_zh_TW.ts PBSystem_zu.ts 
    2727 
    2828QMAKE_LIBDIR = /usr/local/kde4/lib /usr/local/lib/qt4 /usr/local/lib 
  • pcbsd/branches/7.0/kcmPBSystem/kcm.cpp

    r2613 r2949  
    3030  systab = new PBSystemTab(); 
    3131  systab->ProgramInit(); 
     32 
     33  connect(systab, SIGNAL(changed() ), this, SLOT(configChanged() ) ); 
    3234   
    3335  if ( checkRoot() ) { systab->reparent(this, QPoint()); } 
  • pcbsd/branches/7.0/kcmPBSystem/pbsystemtab.cpp

    r2671 r2949  
    343343            line = stream.readLine(); // line of text excluding '\n' 
    344344             
    345                // If the KEY is found in the line, continue processing  
    346             if ( line.find(oldKey, 0) != -1 && found == 0 && line.find("#", 0) != 0) 
     345        // If the KEY is found in the line, continue processing  
     346        if ( line.indexOf(oldKey, 0) != -1 && found == 0 && line.indexOf("#") != 0) 
    347347        { 
    348348            SavedFile = SavedFile + newKey + "\n"; 
     
    405405             
    406406               // If the KEY is found in the line, continue processing  
    407         if ( line.find(Key, 0) != -1) 
     407        if ( line.indexOf(Key, 0) != -1 && line.indexOf("#") != 0) 
    408408        { 
    409409            line.remove(line.find(Key, 0), Key.length()); 
     
    439439        return; 
    440440    } 
    441     KUrl url1 = KUrl::fromPath(file); 
    442     KUrl url2 = KUrl::fromPath("/PCBSD/splash-screens/loading-screen-custom.pcx"); 
    443     KIO::file_copy(url1, url2, 0); 
     441 
     442    system("cp '" + file + "' /boot/loading-screen.pcx"); 
    444443    splashSelect->clear(); 
    445444    loadBootData(); 
     
    456455     
    457456    //Move files about 
    458     KUrl url1 = KUrl::fromPath("/PCBSD/splash-screens/loading-screen-" + code + ".pcx"); 
    459     KUrl url2 = KUrl::fromPath("/boot/loading-screen.pcx"); 
    460     KIO::file_copy(url1, url2, 0); 
     457    system("cp /PCBSD/splash-screens/loading-screen-" + code + ".pcx /boot/loading-screen.pcx"); 
     458    system("chmod 644 /boot/loading-screen.pcx"); 
    461459     
    462460    if ( showBootCheck->isChecked() ) 
    463461    { 
    464462        saveValue("/boot/loader.conf", "splash_pcx_load=", "splash_pcx_load=\"YES\"" ); 
     463        saveValue("/boot/loader.conf", "vesa_load=", "vesa_load=\"YES\"" ); 
     464        saveValue("/boot/loader.conf", "bitmap_load=", "bitmap_load=\"YES\"" ); 
     465        saveValue("/boot/loader.conf", "bitmap_name=", "bitmap_name=\"/boot/loading-screen.pcx\"" ); 
    465466     } else { 
    466467        saveValue("/boot/loader.conf", "splash_pcx_load=", "splash_pcx_load=\"NO\"" ); 
     468        saveValue("/boot/loader.conf", "vesa_load=", "vesa_load=\"NO\"" ); 
     469        saveValue("/boot/loader.conf", "bitmap_load=", "bitmap_load=\"NO\"" ); 
    467470     } 
    468471} 
     
    510513            else 
    511514            { 
    512                 QString langName = langResolver.countryCodeToName(code); 
     515                QString langName = langResolver.languageCodeToName(code); 
     516                if ( langName.isEmpty() ) 
     517                { 
     518                    langName = "Splash Screen: " + code; 
     519                } 
    513520                langList += langName; 
    514521                codeMap[langName] = code; 
     
    540547    { 
    541548        //If we don't have a splash for the user's language, default to english 
    542         if (codeMap[selectedLang] == "") selectedLang = "en"; 
    543         selectedLang = langResolver.countryCodeToName(selectedLang); 
     549        QString testLangName = langResolver.languageCodeToName(selectedLang); 
     550        if (codeMap[testLangName] == "") selectedLang = "en"; 
     551 
     552        selectedLang = langResolver.languageCodeToName(selectedLang); 
     553        if ( selectedLang.isEmpty() ) 
     554        { 
     555             selectedLang = "Splash Screen: " + selectedLang; 
     556        } 
     557 
    544558        splashSelect->setCurrentItem(langList.findIndex(selectedLang) + indexMod); 
    545559    } 
  • pcbsd/branches/7.0/kcmPBSystem/portsnapprogress.cpp

    r2757 r2949  
    108108        displayString += output; 
    109109        QStringList outputSplit = QStringList::split(" ", output); 
    110         if (outputSplit[1].toInt() != 0) 
     110        bool ok; 
     111        outputSplit[1].toInt(&ok); 
     112        if (ok) 
    111113        { 
    112114            numberSteps += outputSplit[1].toInt(); 
  • pcbsd/trunk/kcmPBSystem/PBSystem.pro

    r2613 r2949  
    2424DESTDIR = /usr/local/kde4/lib/kde4/ 
    2525 
    26 TRANSLATIONS = PBSystem_en.ts 
     26TRANSLATIONS = PBSystem_en.ts PBSystem_af.ts PBSystem_ar.ts PBSystem_az.ts PBSystem_bg.ts PBSystem_bn.ts PBSystem_bs.ts PBSystem_ca.ts PBSystem_cs.ts PBSystem_cy.ts PBSystem_da.ts PBSystem_de.ts PBSystem_el.ts PBSystem_es.ts PBSystem_et.ts PBSystem_eu.ts PBSystem_fa.ts PBSystem_fi.ts PBSystem_fr.ts PBSystem_gl.ts PBSystem_he.ts PBSystem_hi.ts PBSystem_hr.ts PBSystem_hu.ts PBSystem_id.ts PBSystem_is.ts PBSystem_it.ts PBSystem_ja.ts PBSystem_ka.ts PBSystem_ko.ts PBSystem_lt.ts PBSystem_lv.ts PBSystem_mk.ts PBSystem_mn.ts PBSystem_ms.ts PBSystem_mt.ts PBSystem_nb.ts PBSystem_nl.ts PBSystem_pa.ts PBSystem_pl.ts PBSystem_pt.ts PBSystem_pt_BR.ts PBSystem_ro.ts PBSystem_ru.ts PBSystem_sk.ts PBSystem_sl.ts PBSystem_sr.ts PBSystem_sv.ts PBSystem_ta.ts PBSystem_tg.ts PBSystem_th.ts PBSystem_tr.ts PBSystem_uk.ts PBSystem_uz.ts PBSystem_vi.ts PBSystem_zh_CN.ts PBSystem_zh_HK.ts PBSystem_zh_TW.ts PBSystem_zu.ts 
    2727 
    2828QMAKE_LIBDIR = /usr/local/kde4/lib /usr/local/lib/qt4 /usr/local/lib 
  • pcbsd/trunk/kcmPBSystem/kcm.cpp

    r2613 r2949  
    3030  systab = new PBSystemTab(); 
    3131  systab->ProgramInit(); 
     32 
     33  connect(systab, SIGNAL(changed() ), this, SLOT(configChanged() ) ); 
    3234   
    3335  if ( checkRoot() ) { systab->reparent(this, QPoint()); } 
  • pcbsd/trunk/kcmPBSystem/pbsystemtab.cpp

    r2671 r2949  
    343343            line = stream.readLine(); // line of text excluding '\n' 
    344344             
    345                // If the KEY is found in the line, continue processing  
    346             if ( line.find(oldKey, 0) != -1 && found == 0 && line.find("#", 0) != 0) 
     345        // If the KEY is found in the line, continue processing  
     346        if ( line.indexOf(oldKey, 0) != -1 && found == 0 && line.indexOf("#") != 0) 
    347347        { 
    348348            SavedFile = SavedFile + newKey + "\n"; 
     
    405405             
    406406               // If the KEY is found in the line, continue processing  
    407         if ( line.find(Key, 0) != -1) 
     407        if ( line.indexOf(Key, 0) != -1 && line.indexOf("#") != 0) 
    408408        { 
    409409            line.remove(line.find(Key, 0), Key.length()); 
     
    439439        return; 
    440440    } 
    441     KUrl url1 = KUrl::fromPath(file); 
    442     KUrl url2 = KUrl::fromPath("/PCBSD/splash-screens/loading-screen-custom.pcx"); 
    443     KIO::file_copy(url1, url2, 0); 
     441 
     442    system("cp '" + file + "' /boot/loading-screen.pcx"); 
    444443    splashSelect->clear(); 
    445444    loadBootData(); 
     
    456455     
    457456    //Move files about 
    458     KUrl url1 = KUrl::fromPath("/PCBSD/splash-screens/loading-screen-" + code + ".pcx"); 
    459     KUrl url2 = KUrl::fromPath("/boot/loading-screen.pcx"); 
    460     KIO::file_copy(url1, url2, 0); 
     457    system("cp /PCBSD/splash-screens/loading-screen-" + code + ".pcx /boot/loading-screen.pcx"); 
     458    system("chmod 644 /boot/loading-screen.pcx"); 
    461459     
    462460    if ( showBootCheck->isChecked() ) 
    463461    { 
    464462        saveValue("/boot/loader.conf", "splash_pcx_load=", "splash_pcx_load=\"YES\"" ); 
     463        saveValue("/boot/loader.conf", "vesa_load=", "vesa_load=\"YES\"" ); 
     464        saveValue("/boot/loader.conf", "bitmap_load=", "bitmap_load=\"YES\"" ); 
     465        saveValue("/boot/loader.conf", "bitmap_name=", "bitmap_name=\"/boot/loading-screen.pcx\"" ); 
    465466     } else { 
    466467        saveValue("/boot/loader.conf", "splash_pcx_load=", "splash_pcx_load=\"NO\"" ); 
     468        saveValue("/boot/loader.conf", "vesa_load=", "vesa_load=\"NO\"" ); 
     469        saveValue("/boot/loader.conf", "bitmap_load=", "bitmap_load=\"NO\"" ); 
    467470     } 
    468471} 
     
    510513            else 
    511514            { 
    512                 QString langName = langResolver.countryCodeToName(code); 
     515                QString langName = langResolver.languageCodeToName(code); 
     516                if ( langName.isEmpty() ) 
     517                { 
     518                    langName = "Splash Screen: " + code; 
     519                } 
    513520                langList += langName; 
    514521                codeMap[langName] = code; 
     
    540547    { 
    541548        //If we don't have a splash for the user's language, default to english 
    542         if (codeMap[selectedLang] == "") selectedLang = "en"; 
    543         selectedLang = langResolver.countryCodeToName(selectedLang); 
     549        QString testLangName = langResolver.languageCodeToName(selectedLang); 
     550        if (codeMap[testLangName] == "") selectedLang = "en"; 
     551 
     552        selectedLang = langResolver.languageCodeToName(selectedLang); 
     553        if ( selectedLang.isEmpty() ) 
     554        { 
     555             selectedLang = "Splash Screen: " + selectedLang; 
     556        } 
     557 
    544558        splashSelect->setCurrentItem(langList.findIndex(selectedLang) + indexMod); 
    545559    } 
  • pcbsd/trunk/kcmPBSystem/portsnapprogress.cpp

    r2757 r2949  
    108108        displayString += output; 
    109109        QStringList outputSplit = QStringList::split(" ", output); 
    110         if (outputSplit[1].toInt() != 0) 
     110        bool ok; 
     111        outputSplit[1].toInt(&ok); 
     112        if (ok) 
    111113        { 
    112114            numberSteps += outputSplit[1].toInt();