diff --git a/build/jam/BuildFeatures b/build/jam/BuildFeatures index 625998d159..fa806de919 100644 --- a/build/jam/BuildFeatures +++ b/build/jam/BuildFeatures @@ -230,13 +230,9 @@ if $(TARGET_ARCH) = x86 { # Mesa if $(TARGET_ARCH) = x86 { - local glslObject ; - local galliumObjects ; local zipFile ; if $(HAIKU_GCC_VERSION[1]) >= 4 { - HAIKU_MESA_FILE = mesa-9.0-x86-gcc4-2012-11-17.zip ; - glslObject = lib.haiku/libglsl.a ; - galliumObjects = lib.haiku/libgallium.a ; + HAIKU_MESA_FILE = mesa-9.0.1-x86-gcc4-2012-12-21.zip ; } else { HAIKU_MESA_FILE = mesa-7.8.2-x86-gcc2-2012-01-17.zip ; } @@ -250,19 +246,41 @@ if $(TARGET_ARCH) = x86 { HAIKU_MESA_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_MESA_DIR) : include/ : $(zipFile) : extracted-mesa ] ; - HAIKU_MESA_LIBS = [ ExtractArchive $(HAIKU_MESA_DIR) + HAIKU_GLAPI_LIB = [ ExtractArchive $(HAIKU_MESA_DIR) : - $(galliumObjects) lib.haiku/libglapi.a - $(glslObject) + : $(zipFile) + : extracted-mesa ] ; + HAIKU_GLSL_LIB = [ ExtractArchive $(HAIKU_MESA_DIR) + : + lib.haiku/libglsl.a + : $(zipFile) + : extracted-mesa ] ; + HAIKU_MESA_LIB = [ ExtractArchive $(HAIKU_MESA_DIR) + : lib.haiku/libmesa.a : $(zipFile) : extracted-mesa ] ; + HAIKU_GALLIUM_LIB = [ ExtractArchive $(HAIKU_MESA_DIR) + : + lib.haiku/libgallium.a + : $(zipFile) + : extracted-mesa ] ; + HAIKU_GALLIUM_SOFTPIPE_LIB = [ ExtractArchive $(HAIKU_MESA_DIR) + : + lib.haiku/libsoftpipe.a + : $(zipFile) + : extracted-mesa ] ; + HAIKU_GALLIUM_LLVMPIPE_LIB = [ ExtractArchive $(HAIKU_MESA_DIR) + : + lib.haiku/libllvmpipe.a + : $(zipFile) + : extracted-mesa ] ; HAIKU_MESA_HEADERS = [ FDirName $(HAIKU_MESA_DIR) include ] ; Depends $(HAIKU_MESA_HEADERS_DEPENDENCY) : $(HAIKU_GLU_HEADERS_DEPENDENCY) ; - Depends $(HAIKU_MESA_LIBS) : $(HAIKU_GLU_LIBS) ; + Depends $(HAIKU_GLAPI_LIBS) : $(HAIKU_GLU_LIBS) ; EnableBuildFeatures mesa ; } else { @@ -527,10 +545,13 @@ if [ IsOptionalHaikuImagePackageAdded WebPositive ] { HAIKU_BUILD_FEATURE_WEBKIT = 1 ; } -HAIKU_WEBKIT_FILE = haikuwebkit-1.1.3-x86-gcc4-2012-08-31a.zip ; - +if $(TARGET_ARCH) = x86 { + HAIKU_WEBKIT_FILE = haikuwebkit-1.1.3-x86-gcc4-2012-08-31a.zip ; +} else if $(TARGET_ARCH) = x86_64 { + HAIKU_WEBKIT_FILE = haikuwebkit-1.1.3-x86_64-gcc4-2012-12-22.zip ; +} if $(HAIKU_BUILD_FEATURE_WEBKIT) { - if $(TARGET_ARCH) != x86 { + if $(TARGET_ARCH) != x86 && $(TARGET_ARCH) != x86_64 { Echo "WebKit support not available on $(TARGET_ARCH)" ; } else if $(HAIKU_GCC_VERSION[1]) < 4 { if ! $(isHybridBuild) { diff --git a/build/jam/Haiku64Image b/build/jam/Haiku64Image index abc726e629..7a5e19db21 100644 --- a/build/jam/Haiku64Image +++ b/build/jam/Haiku64Image @@ -23,8 +23,8 @@ SYSTEM_BIN = "[" addattr base64 basename bash beep cal cat catattr checkfs zmore znew ; -SYSTEM_APPS = AboutSystem ActivityMonitor DriveSetup Installer NetworkStatus - ProcessController StyledEdit Terminal +SYSTEM_APPS = AboutSystem ActivityMonitor Debugger DriveSetup Installer + NetworkStatus ProcessController StyledEdit Terminal ; SYSTEM_PREFERENCES = Appearance Backgrounds Deskbar FileTypes diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages index 4036abc0f1..57e6a2ea5b 100644 --- a/build/jam/OptionalPackages +++ b/build/jam/OptionalPackages @@ -446,16 +446,22 @@ if [ IsOptionalHaikuImagePackageAdded CCache ] { # CDRecord if [ IsOptionalHaikuImagePackageAdded CDRecord ] { - if $(TARGET_ARCH) != x86 { - Echo "No optional package CDRecord available for $(TARGET_ARCH)" ; - } else if $(HAIKU_GCC_VERSION[1]) >= 4 { + if $(TARGET_ARCH) = x86 { + if $(HAIKU_GCC_VERSION[1]) >= 4 { + InstallOptionalHaikuImagePackage + cdrtools-3.01a07-r1a4-x86-gcc4-2012-08-30.zip + : $(baseURL)/cdrtools-3.01a07-r1a4-x86-gcc4-2012-08-30.zip ; + } else { + InstallOptionalHaikuImagePackage + cdrtools-3.01a07-r1a4-x86-gcc2-2012-08-28.zip + : $(baseURL)/cdrtools-3.01a07-r1a4-x86-gcc2-2012-08-28.zip ; + } + } else if $(TARGET_ARCH) = x86_64 { InstallOptionalHaikuImagePackage - cdrtools-3.01a07-r1a4-x86-gcc4-2012-08-30.zip - : $(baseURL)/cdrtools-3.01a07-r1a4-x86-gcc4-2012-08-30.zip ; + cdrtools-3.01a07-x86_64-2012-12-17.zip + : $(baseURL)/cdrtools-3.01a07-x86_64-2012-12-17.zip ; } else { - InstallOptionalHaikuImagePackage - cdrtools-3.01a07-r1a4-x86-gcc2-2012-08-28.zip - : $(baseURL)/cdrtools-3.01a07-r1a4-x86-gcc2-2012-08-28.zip ; + Echo "No optional package CDRecord available for $(TARGET_ARCH)" ; } } @@ -576,23 +582,29 @@ if [ IsOptionalHaikuImagePackageAdded Ctags ] { # Curl if [ IsOptionalHaikuImagePackageAdded Curl ] { - if $(TARGET_ARCH) != x86 { - Echo "No optional package Curl available for $(TARGET_ARCH)" ; - } else if $(HAIKU_GCC_VERSION[1]) >= 4 { - InstallOptionalHaikuImagePackage curl-7.26.0-r1a4-x86-gcc4-2012-08-29.zip - : $(baseURL)/curl-7.26.0-r1a4-x86-gcc4-2012-08-29.zip ; + if $(TARGET_ARCH) = x86 { + if $(HAIKU_GCC_VERSION[1]) >= 4 { + InstallOptionalHaikuImagePackage + curl-7.26.0-r1a4-x86-gcc4-2012-08-29.zip + : $(baseURL)/curl-7.26.0-r1a4-x86-gcc4-2012-08-29.zip ; + } else { + InstallOptionalHaikuImagePackage + curl-7.26.0-r1a4-x86-gcc2-2012-08-28.zip + : $(baseURL)/curl-7.26.0-r1a4-x86-gcc2-2012-08-28.zip ; + } + } else if $(TARGET_ARCH) = x86_64 { + InstallOptionalHaikuImagePackage + curl-7.28.1-x86_64-2012-12-18.zip + : $(baseURL)/curl-7.28.1-x86_64-2012-12-18.zip ; } else { - InstallOptionalHaikuImagePackage curl-7.26.0-r1a4-x86-gcc2-2012-08-28.zip - : $(baseURL)/curl-7.26.0-r1a4-x86-gcc2-2012-08-28.zip ; + Echo "No optional package Curl available for $(TARGET_ARCH)" ; } } # CVS if [ IsOptionalHaikuImagePackageAdded CVS ] { - if $(TARGET_ARCH) != x86 { - Echo "No optional package CVS available for $(TARGET_ARCH)" ; - } else { + if $(TARGET_ARCH) = x86 { if $(HAIKU_GCC_VERSION[1]) >= 4 { InstallOptionalHaikuImagePackage cvs-1.12.13.1-r1a4-x86-gcc4-2012-08-30.zip @@ -604,6 +616,13 @@ if [ IsOptionalHaikuImagePackageAdded CVS ] { : $(baseURL)/cvs-1.12.13.1-r1a4-x86-gcc2-2012-08-28.zip : : true ; } + } else if $(TARGET_ARCH) = x86_64 { + InstallOptionalHaikuImagePackage + cvs-1.12.13.1-x86_64-2012-12-18.zip + : $(baseURL)/cvs-1.12.13.1-x86_64-2012-12-18.zip + : : true ; + } else { + Echo "No optional package CVS available for $(TARGET_ARCH)" ; } } @@ -682,6 +701,8 @@ if [ IsOptionalHaikuImagePackageAdded Development ] { : : true ; } } else if $(TARGET_ARCH) = x86_64 { + AddSymlinkToHaikuImage home config settings deskbar Applications + : /boot/system/apps/Debugger : Debugger ; InstallOptionalHaikuImagePackage autoconf-2.69-x86_64-2012-08-17.zip : $(baseURL)/autoconf-2.69-x86_64-2012-08-17.zip @@ -1132,9 +1153,7 @@ if [ IsOptionalHaikuImagePackageAdded Git ] { # GitDoc if [ IsOptionalHaikuImagePackageAdded GitDoc ] { - if $(TARGET_ARCH) != x86 { - Echo "No optional package GitDoc available for $(TARGET_ARCH)" ; - } else { + if $(TARGET_ARCH) = x86 { if $(HAIKU_GCC_VERSION[1]) >= 4 { InstallOptionalHaikuImagePackage gitdoc-1.7.10.2-r1a4-x86-gcc4-2012-09-03.zip @@ -1146,6 +1165,13 @@ if [ IsOptionalHaikuImagePackageAdded GitDoc ] { : $(baseURL)/gitdoc-1.7.10.2-r1a4-x86-gcc2-2012-08-28.zip : : true ; } + } else if $(TARGET_ARCH) = x86_64 { + InstallOptionalHaikuImagePackage + gitdoc-1.8.0-x86_64-2012-12-18.zip + : $(baseURL)/gitdoc-1.8.0-x86_64-2012-12-18.zip + : : true ; + } else { + Echo "No optional package GitDoc available for $(TARGET_ARCH)" ; } } @@ -1336,9 +1362,7 @@ if [ IsOptionalHaikuImagePackageAdded LibEvent ] { # LibIconv if [ IsOptionalHaikuImagePackageAdded LibIconv ] { - if $(TARGET_ARCH) != x86 { - Echo "No optional package LibIconv available for $(TARGET_ARCH)" ; - } else { + if $(TARGET_ARCH) = x86 { if $(HAIKU_GCC_VERSION[1]) >= 4 { InstallOptionalHaikuImagePackage libiconv-1.13.1-r1a4-x86-gcc4-2012-08-30.zip @@ -1348,6 +1372,12 @@ if [ IsOptionalHaikuImagePackageAdded LibIconv ] { libiconv-1.13.1-r1a4-x86-gcc2-2012-08-28.zip : $(baseURL)/libiconv-1.13.1-r1a4-x86-gcc2-2012-08-28.zip ; } + } else if $(TARGET_ARCH) = x86_64 { + InstallOptionalHaikuImagePackage + libiconv-1.13.1-x86_64-2012-12-18.zip + : $(baseURL)/libiconv-1.13.1-x86_64-2012-12-18.zip ; + } else { + Echo "No optional package LibIconv available for $(TARGET_ARCH)" ; } } @@ -1485,9 +1515,7 @@ if [ IsOptionalHaikuImagePackageAdded MandatoryPackages ] { # Mercurial if [ IsOptionalHaikuImagePackageAdded Mercurial ] { - if $(TARGET_ARCH) != x86 { - Echo "No optional package Mercurial available for $(TARGET_ARCH)" ; - } else { + if $(TARGET_ARCH) = x86 { if $(HAIKU_GCC_VERSION[1]) >= 4 { InstallOptionalHaikuImagePackage mercurial-2.2.2-r1a4-x86-gcc4-2012-08-30.zip @@ -1499,6 +1527,13 @@ if [ IsOptionalHaikuImagePackageAdded Mercurial ] { : $(baseURL)/mercurial-2.2.2-r1a4-x86-gcc2-2012-08-27.zip : : true ; } + } else if $(TARGET_ARCH) = x86_64 { + InstallOptionalHaikuImagePackage + mercurial-2.4-x86_64-2012-12-18.zip + : $(baseURL)/mercurial-2.4-x86_64-2012-12-18.zip + : : true ; + } else { + Echo "No optional package Mercurial available for $(TARGET_ARCH)" ; } } @@ -1535,9 +1570,7 @@ if [ IsOptionalHaikuImagePackageAdded Nanumfont ] { # Neon if [ IsOptionalHaikuImagePackageAdded Neon ] { - if $(TARGET_ARCH) != x86 { - Echo "No optional package Neon available for $(TARGET_ARCH)" ; - } else { + if $(TARGET_ARCH) = x86 { if $(HAIKU_GCC_VERSION[1]) >= 4 { InstallOptionalHaikuImagePackage neon-0.29.6-r1a4-x86-gcc4-2012-08-29.zip @@ -1547,6 +1580,12 @@ if [ IsOptionalHaikuImagePackageAdded Neon ] { neon-0.29.6-r1a4-x86-gcc2-2012-08-28.zip : $(baseURL)/neon-0.29.6-r1a4-x86-gcc2-2012-08-28.zip ; } + } else if $(TARGET_ARCH) = x86_64 { + InstallOptionalHaikuImagePackage + neon-0.29.6-x86_64-2012-12-18.zip + : $(baseURL)/neon-0.29.6-x86_64-2012-12-18.zip ; + } else { + Echo "No optional package Neon available for $(TARGET_ARCH)" ; } } @@ -1723,9 +1762,7 @@ if [ IsOptionalHaikuImagePackageAdded Paladin ] { # PCRE regex engine if [ IsOptionalHaikuImagePackageAdded PCRE ] { - if $(TARGET_ARCH) != x86 { - Echo "No optional package PCRE available for $(TARGET_ARCH)" ; - } else { + if $(TARGET_ARCH) = x86 { if $(HAIKU_GCC_VERSION[1]) >= 4 { InstallOptionalHaikuImagePackage libpcre-8.21-r1a4-x86-gcc4-2012-09-03.zip @@ -1735,6 +1772,12 @@ if [ IsOptionalHaikuImagePackageAdded PCRE ] { libpcre-8.21-r1a4-x86-gcc2-2012-08-28.zip : $(baseURL)/libpcre-8.21-r1a4-x86-gcc2-2012-08-28.zip ; } + } else if $(TARGET_ARCH) = x86_64 { + InstallOptionalHaikuImagePackage + libpcre-8.21-x86_64-2012-12-18.zip + : $(baseURL)/libpcre-8.21-x86_64-2012-12-18.zip ; + } else { + Echo "No optional package PCRE available for $(TARGET_ARCH)" ; } } @@ -1909,9 +1952,7 @@ if [ IsOptionalHaikuImagePackageAdded SQLite ] { # Subversion if [ IsOptionalHaikuImagePackageAdded Subversion ] { - if $(TARGET_ARCH) != x86 { - Echo "No optional package Subversion available for $(TARGET_ARCH)" ; - } else { + if $(TARGET_ARCH) = x86 { if $(HAIKU_GCC_VERSION[1]) >= 4 { InstallOptionalHaikuImagePackage subversion-1.6.18-r1a4-x86-gcc4-2012-08-30.zip @@ -1923,6 +1964,13 @@ if [ IsOptionalHaikuImagePackageAdded Subversion ] { : $(baseURL)/subversion-1.6.18-r1a4-x86-gcc2-2012-08-28.zip : : true ; } + } else if $(TARGET_ARCH) = x86_64 { + InstallOptionalHaikuImagePackage + subversion-1.6.18-x86_64-2012-12-18.zip + : $(baseURL)/subversion-1.6.18-x86_64-2012-12-18.zip + : : true ; + } else { + Echo "No optional package Subversion available for $(TARGET_ARCH)" ; } } @@ -2095,7 +2143,7 @@ if [ IsOptionalHaikuImagePackageAdded Vision ] { # WebKit if [ IsOptionalHaikuImagePackageAdded WebKit ] { - if $(TARGET_ARCH) != x86 { + if $(TARGET_ARCH) != x86 && $(TARGET_ARCH) != x86_64 { Echo "No optional package WebKit available for $(TARGET_ARCH)" ; } else if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) { Echo "No optional package WebKit available for gcc2" ; @@ -2109,7 +2157,7 @@ if [ IsOptionalHaikuImagePackageAdded WebKit ] { # WebPositive if [ IsOptionalHaikuImagePackageAdded WebPositive ] { - if $(TARGET_ARCH) != x86 { + if $(TARGET_ARCH) != x86 && $(TARGET_ARCH) != x86_64 { Echo "No optional package WebPositive available for $(TARGET_ARCH)" ; } else if $(HAIKU_GCC_VERSION[1]) < 4 { if ! $(isHybridBuild) { diff --git a/data/bin/installoptionalpackage b/data/bin/installoptionalpackage index 7f576d1b02..22677ae212 100755 --- a/data/bin/installoptionalpackage +++ b/data/bin/installoptionalpackage @@ -383,8 +383,8 @@ function DownloadAllBuildFiles() { # DownloadAllBuildFiles # Retreive the necessary jam files from svn. - local buildFiles="OptionalPackages OptionalPackageDependencies \ - OptionalBuildFeatures OptionalLibPackages" + local buildFiles="BuildFeatures OptionalPackageDependencies \ + OptionalPackages OptionalLibPackages" for file in ${buildFiles} ; do GetBuildFile ${file} done @@ -676,29 +676,32 @@ function ConvertJamToBash() # TODO : add these following variables to the CreateInstallerScript # TODO : parse HAIKU_ICU_GCC_2_PACKAGE #local regExp='/^HAIKU_ICU_GCC_2_PACKAGE/p' - #icuGcc2PkgLine=`sed -n -e "$regExp" ${baseDir}/OptionalBuildFeatures` + #icuGcc2PkgLine=`sed -n -e "$regExp" ${baseDir}/BuildFeatures` #ConvertVariableDeclarationLines "$regExp" 'icuGcc2PkgLine' # TODO : parse HAIKU_ICU_GCC_4_PACKAGE #local regExp='/^HAIKU_ICU_GCC_4_PACKAGE/p' - #icuGcc4PkgLine=`sed -n -e "$regExp" ${baseDir}/OptionalBuildFeatures` + #icuGcc4PkgLine=`sed -n -e "$regExp" ${baseDir}/BuildFeatures` #ConvertVariableDeclarationLines "$regExp" 'icuGcc4PkgLine' # TODO : parse HAIKU_ICU_DEVEL_PACKAGE #local regExp='/^HAIKU_ICU_DEVEL_PACKAGE/p' - #icuDevelPkgLine=`sed -n -e "$regExp" ${baseDir}/OptionalBuildFeatures` + #icuDevelPkgLine=`sed -n -e "$regExp" ${baseDir}/BuildFeatures` #ConvertVariableDeclarationLines "$regExp" 'icuDevelPkgLine' + # TODO : fix the regex local regExp="/^\s*HAIKU_OPENSSL_PACKAGE = .*-gcc${HAIKU_GCC_VERSION[1]}-/p" - sslPkgLine=`sed -n -e "$regExp" ${baseDir}/OptionalBuildFeatures` + sslPkgLine=`sed -n -e "$regExp" ${baseDir}/BuildFeatures` ConvertVariableDeclarationLines "$regExp" 'sslPkgLine' + # TODO : fix the regex local regExp='/^HAIKU_OPENSSL_URL/p' - sslUrlLine=`sed -n -e "$regExp" ${baseDir}/OptionalBuildFeatures` + sslUrlLine=`sed -n -e "$regExp" ${baseDir}/BuildFeatures` ConvertVariableDeclarationLines "$regExp" 'sslUrlLine' + # TODO : fix the regex local regExp='/^HAIKU_WEBKIT_FILE/p' - webkitFileLine=`sed -n -e "$regExp" ${baseDir}/OptionalBuildFeatures` + webkitFileLine=`sed -n -e "$regExp" ${baseDir}/BuildFeatures` ConvertVariableDeclarationLines "$regExp" 'webkitFileLine' local regExp='/^local\ baseURL/p' diff --git a/data/catalogs/apps/bsnow/ja.catkeys b/data/catalogs/apps/bsnow/ja.catkeys index a05530a9f4..813f2995d1 100644 --- a/data/catalogs/apps/bsnow/ja.catkeys +++ b/data/catalogs/apps/bsnow/ja.catkeys @@ -1,3 +1,4 @@ -1 japanese x-vnd.mmu_man.BSnow 2460058908 +1 japanese x-vnd.mmu_man.BSnow 2621406458 Drag me on your desktop… BSnow デスクトップにドラッグしてください… Click me to remove BSnow… BSnow クリックして BSnow を削除してください… +BSnow System name BSnow diff --git a/data/catalogs/apps/deskbar/be.catkeys b/data/catalogs/apps/deskbar/be.catkeys index ac43d9ba09..789a3734ae 100644 --- a/data/catalogs/apps/deskbar/be.catkeys +++ b/data/catalogs/apps/deskbar/be.catkeys @@ -1,21 +1,17 @@ -1 belarusian x-vnd.Be-TSKB 3197510812 +1 belarusian x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu Выключыць -Show day of week PreferencesWindow Паказваць дзень тыдню Edit menu… PreferencesWindow Змяніць меню… Suspend DeskbarMenu Прыпыніць -Applications PreferencesWindow Праграмы Time preferences… TimeView Наладкі Часу… About Haiku DeskbarMenu Пра Haiku Recent documents: PreferencesWindow Нядаўнія дакументы: Recent applications DeskbarMenu Нядаўнія праграмы Sort running applications PreferencesWindow Сартыравать запушчаныя праграмы -Show time Tray Паказваць час Applications B_USER_DESKBAR_DIRECTORY/Applications Праграмы Find… DeskbarMenu Знайсці… Window PreferencesWindow Акно Menu PreferencesWindow Меню Recent documents DeskbarMenu Нядаўнія дакументы -Show seconds PreferencesWindow Паказваць секунды Auto-hide PreferencesWindow Схаваць аўтаматычна Always on top PreferencesWindow Заўсёды наверсе DeskbarMenu <Папка Deskbar-у пустая> @@ -25,7 +21,6 @@ Deskbar System name Дэскбар Restart system DeskbarMenu Перазапусціць сістэму Large PreferencesWindow Вялікі Auto-raise PreferencesWindow Узнікаць аўтаматычна -Hide time TimeView Час на схаванне Recent folders: PreferencesWindow Нядаўнія каталёгі: Show application expander PreferencesWindow Паказваць кнопку спісу праграм Restart Tracker DeskbarMenu Перазапусціць Tracker @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Наладкі Deskbar-у… Expand new applications PreferencesWindow Разгарнуць новыя праграмы Show replicants DeskbarMenu Паказваць дупліканты Hide application names PreferencesWindow Схаваць імёны праграм -Clock PreferencesWindow Гадзіннік Demos B_USER_DESKBAR_DIRECTORY/Demos Прыклады Icon size PreferencesWindow Памер значак Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Праграмкі Дэсктопу diff --git a/data/catalogs/apps/deskbar/de.catkeys b/data/catalogs/apps/deskbar/de.catkeys index 0536d4d719..f1722dff80 100644 --- a/data/catalogs/apps/deskbar/de.catkeys +++ b/data/catalogs/apps/deskbar/de.catkeys @@ -1,21 +1,17 @@ -1 german x-vnd.Be-TSKB 3197510812 +1 german x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu Ausschalten -Show day of week PreferencesWindow Wochentag anzeigen Edit menu… PreferencesWindow Menü bearbeiten… Suspend DeskbarMenu Ruhezustand -Applications PreferencesWindow Anwendungen Time preferences… TimeView Datum & Zeit Einstellungen… About Haiku DeskbarMenu Über Haiku Recent documents: PreferencesWindow Letzte Dokumente: Recent applications DeskbarMenu Letzte Anwendungen Sort running applications PreferencesWindow Laufende Anwendungen sortieren -Show time Tray Uhrzeit anzeigen Applications B_USER_DESKBAR_DIRECTORY/Applications Anwendungen Find… DeskbarMenu Suchen… Window PreferencesWindow Fenster Menu PreferencesWindow Menü Recent documents DeskbarMenu Letzte Dokumente -Show seconds PreferencesWindow Sekunden anzeigen Auto-hide PreferencesWindow Automatisch ausblenden Always on top PreferencesWindow Immer im Vordergrund DeskbarMenu @@ -25,7 +21,6 @@ Deskbar System name Deskbar Restart system DeskbarMenu Neustarten Large PreferencesWindow Groß Auto-raise PreferencesWindow Automatisch nach vorn holen -Hide time TimeView Uhrzeit ausblenden Recent folders: PreferencesWindow Letzte Ordner: Show application expander PreferencesWindow Expander anzeigen Restart Tracker DeskbarMenu Tracker neu starten @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Deskbar-Einstellungen… Expand new applications PreferencesWindow Neue Anwendungen aufklappen Show replicants DeskbarMenu Replikanten einblenden Hide application names PreferencesWindow Anwendungsnamen ausblenden -Clock PreferencesWindow Uhr Demos B_USER_DESKBAR_DIRECTORY/Demos Demos Icon size PreferencesWindow Icon-Größe Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Desktop-Apps diff --git a/data/catalogs/apps/deskbar/el.catkeys b/data/catalogs/apps/deskbar/el.catkeys index d5c65c6b98..d2fc39eae3 100644 --- a/data/catalogs/apps/deskbar/el.catkeys +++ b/data/catalogs/apps/deskbar/el.catkeys @@ -1,7 +1,6 @@ -1 greek, modern (1453-) x-vnd.Be-TSKB 1095421712 +1 greek, modern (1453-) x-vnd.Be-TSKB 1782938413 Power off DeskbarMenu Απενεργοποίηση Edit menu… PreferencesWindow Επεξεργασία μενού... -Applications PreferencesWindow Εφαρμογές Recent documents: PreferencesWindow Πρόσφατα έγγραφα: Recent applications DeskbarMenu Πρόσφατες εφαρμογές Sort running applications PreferencesWindow Ταξινόμησε τις τρέχουσες εφαρμογές @@ -18,7 +17,6 @@ No windows WindowMenu Χωρίς παράθυρα Deskbar System name Deskbar Restart system DeskbarMenu Επανεκκίνηση συστήματος Auto-raise PreferencesWindow Αυτόματη-ανύψωση -Hide time TimeView Απόκρυψη ώρας Recent folders: PreferencesWindow Πρόσφατοι φάκελοι: Show application expander PreferencesWindow Εμφάνιση της εφαρμογής Επεκτατής Restart Tracker DeskbarMenu Επανεκκίνηση Tracker @@ -35,7 +33,6 @@ Show calendar… TimeView Εμφάνιση ημερολογίου… Deskbar preferences… DeskbarMenu Προτιμήσεις Deskbar… Expand new applications PreferencesWindow Επέκταση νέων εφαρμογών Show replicants DeskbarMenu Εμφάνιση αντιγράφων -Clock PreferencesWindow Ρολόϊ Demos B_USER_DESKBAR_DIRECTORY/Demos Επιδείξεις Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Applets επιφάνειας εργασίας Hide all WindowMenu Απόκρυψη όλων diff --git a/data/catalogs/apps/deskbar/fi.catkeys b/data/catalogs/apps/deskbar/fi.catkeys index 9dc0a80348..1cd1b49c60 100644 --- a/data/catalogs/apps/deskbar/fi.catkeys +++ b/data/catalogs/apps/deskbar/fi.catkeys @@ -1,21 +1,17 @@ -1 finnish x-vnd.Be-TSKB 3197510812 +1 finnish x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu Sammuta virta -Show day of week PreferencesWindow Näytä viikonpäivä Edit menu… PreferencesWindow Muokkaa valikkoa... Suspend DeskbarMenu Keskeytystila -Applications PreferencesWindow Sovellukset Time preferences… TimeView Aika-asetukset... About Haiku DeskbarMenu Haikusta Recent documents: PreferencesWindow Äskettäiset asiakirjat: Recent applications DeskbarMenu Äskettäiset sovellukset Sort running applications PreferencesWindow Lajittele suoritettavat sovellukset -Show time Tray Näytä aika Applications B_USER_DESKBAR_DIRECTORY/Applications Sovellukset Find… DeskbarMenu Etsi... Window PreferencesWindow Ikkuna Menu PreferencesWindow Valikko Recent documents DeskbarMenu Äskettäiset asiakirjat -Show seconds PreferencesWindow Näytä sekunnit Auto-hide PreferencesWindow Piilota automaattisesti Always on top PreferencesWindow Aina päällimmäisenä DeskbarMenu @@ -25,7 +21,6 @@ Deskbar System name Työpöytäpalkki Restart system DeskbarMenu Käynnistä järjestelmä uudelleen Large PreferencesWindow Suuri Auto-raise PreferencesWindow Nosta automaattisesti -Hide time TimeView Piilota aika Recent folders: PreferencesWindow Äskettäiset kansiot: Show application expander PreferencesWindow Näytä sovelluslaajentaja Restart Tracker DeskbarMenu Käynnistä Seuraaja uudelleen @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Työpöytäpalkkiasetukset... Expand new applications PreferencesWindow Laajenna uudet sovellukset Show replicants DeskbarMenu Näytä kopiot Hide application names PreferencesWindow Piilota sovellusnimet -Clock PreferencesWindow Kello Demos B_USER_DESKBAR_DIRECTORY/Demos Esittelyohjelmat Icon size PreferencesWindow Kuvakekoko Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Työpöytäsovelmat diff --git a/data/catalogs/apps/deskbar/fr.catkeys b/data/catalogs/apps/deskbar/fr.catkeys index 5d0ba4d1f8..cb018ad9d3 100644 --- a/data/catalogs/apps/deskbar/fr.catkeys +++ b/data/catalogs/apps/deskbar/fr.catkeys @@ -1,21 +1,17 @@ -1 french x-vnd.Be-TSKB 3197510812 +1 french x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu Éteindre -Show day of week PreferencesWindow Afficher le jour de la semaine Edit menu… PreferencesWindow Éditer le menu… Suspend DeskbarMenu Mettre en veille -Applications PreferencesWindow Applications Time preferences… TimeView Préférences de l'heure… About Haiku DeskbarMenu À propos de Haiku Recent documents: PreferencesWindow Documents récents : Recent applications DeskbarMenu Applications récentes Sort running applications PreferencesWindow Trier les applications lancées -Show time Tray Afficher l'heure Applications B_USER_DESKBAR_DIRECTORY/Applications Applications Find… DeskbarMenu Rechercher… Window PreferencesWindow Fenêtre Menu PreferencesWindow Menu Recent documents DeskbarMenu Documents récents -Show seconds PreferencesWindow Afficher les secondes Auto-hide PreferencesWindow Masquer automatiquement Always on top PreferencesWindow Toujours au dessus DeskbarMenu @@ -25,7 +21,6 @@ Deskbar System name Deskbar Restart system DeskbarMenu Redémarrer l'ordinateur Large PreferencesWindow Grande Auto-raise PreferencesWindow Rehausser automatiquement -Hide time TimeView Cacher l'heure Recent folders: PreferencesWindow Dossiers récents : Show application expander PreferencesWindow Montrer le dérouleur d'application Restart Tracker DeskbarMenu Redémarrer le Tracker @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Réglages de la Deskbar… Expand new applications PreferencesWindow Développer les nouvelles applications Show replicants DeskbarMenu Afficher les réplicants Hide application names PreferencesWindow Cacher le nom des applications -Clock PreferencesWindow Horloge Demos B_USER_DESKBAR_DIRECTORY/Demos Démos Icon size PreferencesWindow Taille des icônes Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Gadgets diff --git a/data/catalogs/apps/deskbar/hi.catkeys b/data/catalogs/apps/deskbar/hi.catkeys index dd777a08ae..7b0411d3b0 100644 --- a/data/catalogs/apps/deskbar/hi.catkeys +++ b/data/catalogs/apps/deskbar/hi.catkeys @@ -1,6 +1,5 @@ -1 hindi x-vnd.Be-TSKB 1193384805 +1 hindi x-vnd.Be-TSKB 1880901506 Edit menu… PreferencesWindow मेनू संपादित करें ... -Applications PreferencesWindow आवेदन Recent documents: PreferencesWindow हाल ही में दस्तावेजों: Sort running applications PreferencesWindow क्रमबद्ध अनुप्रयोगों को चलाने Applications B_USER_DESKBAR_DIRECTORY/Applications अनुप्रयोग @@ -12,7 +11,6 @@ Show all WindowMenu सभी दिखाएँ No windows WindowMenu कोई भी विन्दोव्स नहीं है Deskbar System name डेस्कबार Auto-raise PreferencesWindow ऑटो-रेज -Hide time TimeView समय को छिपाओ Recent folders: PreferencesWindow हाल ही में फ़ोल्डर्स: Show application expander PreferencesWindow आवेदन विस्तारक दिखाएँ Close all WindowMenu सभी बंद करें @@ -22,7 +20,6 @@ Tracker always first PreferencesWindow ट्रैकर हमेशा प Preferences B_USER_DESKBAR_DIRECTORY/Preferences प्राथमिकताएं Show calendar… TimeView कैलेंडर दिखाएँ... Expand new applications PreferencesWindow विस्तार कीजिए नए अनुप्रयोगों को -Clock PreferencesWindow घड़ी Demos B_USER_DESKBAR_DIRECTORY/Demos प्रदर्शनों Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets डेस्कटॉप एप्लेट्स Hide all WindowMenu सभी छुपाएँ diff --git a/data/catalogs/apps/deskbar/hu.catkeys b/data/catalogs/apps/deskbar/hu.catkeys index abdb17da38..37a0ef598c 100644 --- a/data/catalogs/apps/deskbar/hu.catkeys +++ b/data/catalogs/apps/deskbar/hu.catkeys @@ -1,21 +1,17 @@ -1 hungarian x-vnd.Be-TSKB 3197510812 +1 hungarian x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu Kikapcsolás -Show day of week PreferencesWindow A hét napjának mutatása Edit menu… PreferencesWindow Menü szerkesztése… Suspend DeskbarMenu Felfüggesztés -Applications PreferencesWindow Programok Time preferences… TimeView Idő beállítása… About Haiku DeskbarMenu Haiku névjegye Recent documents: PreferencesWindow Utolsó dokumentumok: Recent applications DeskbarMenu Legutóbbi programok Sort running applications PreferencesWindow Futó programok rendezése -Show time Tray Idő megjelenítése Applications B_USER_DESKBAR_DIRECTORY/Applications Programok Find… DeskbarMenu Keresés… Window PreferencesWindow Ablak Menu PreferencesWindow Menü Recent documents DeskbarMenu Legutóbbi dokumentumok -Show seconds PreferencesWindow Másodpercek megjelenítése Auto-hide PreferencesWindow Automatikus elrejtés Always on top PreferencesWindow Mindig felül DeskbarMenu @@ -25,7 +21,6 @@ Deskbar System name Asztalsáv Restart system DeskbarMenu Rendszer újraindítása Large PreferencesWindow Nagy Auto-raise PreferencesWindow Automatikus előrehozás -Hide time TimeView Idő elrejtése Recent folders: PreferencesWindow Utolsó mappák: Show application expander PreferencesWindow Programkiterjesztő mutatása Restart Tracker DeskbarMenu Nyomkövető újraindítása @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Asztalsáv-beállítások… Expand new applications PreferencesWindow Új programok kicsomagolása Show replicants DeskbarMenu Replikánsok megjelenítése Hide application names PreferencesWindow Programnevek elrejtése -Clock PreferencesWindow Óra Demos B_USER_DESKBAR_DIRECTORY/Demos Bemutatók Icon size PreferencesWindow Ikon mérete Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Asztali kisalkalmazások diff --git a/data/catalogs/apps/deskbar/ja.catkeys b/data/catalogs/apps/deskbar/ja.catkeys index 6b8ffa1eb8..2b5159aa0c 100644 --- a/data/catalogs/apps/deskbar/ja.catkeys +++ b/data/catalogs/apps/deskbar/ja.catkeys @@ -1,21 +1,17 @@ -1 japanese x-vnd.Be-TSKB 3197510812 +1 japanese x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu 電源を切る -Show day of week PreferencesWindow 曜日を表示する Edit menu… PreferencesWindow メニューの編集… Suspend DeskbarMenu サスペンド -Applications PreferencesWindow アプリケーション Time preferences… TimeView 日付と時刻の設定… About Haiku DeskbarMenu Haiku について Recent documents: PreferencesWindow 最近使ったドキュメント Recent applications DeskbarMenu 最近使ったアプリケーション Sort running applications PreferencesWindow 実行中のアプリケーションを名前順に並び換える -Show time Tray 時刻を表示する Applications B_USER_DESKBAR_DIRECTORY/Applications アプリケーション Find… DeskbarMenu 検索… Window PreferencesWindow ウィンドウ Menu PreferencesWindow メニュー Recent documents DeskbarMenu 最近使ったドキュメント -Show seconds PreferencesWindow 秒を表示する Auto-hide PreferencesWindow 自動的に隠す Always on top PreferencesWindow 常に手前に DeskbarMenu @@ -25,7 +21,6 @@ Deskbar System name Deskbar Restart system DeskbarMenu システムを再起動 Large PreferencesWindow 大 Auto-raise PreferencesWindow マウスオーバーで手前に -Hide time TimeView 時刻を隠す Recent folders: PreferencesWindow 最近開いたフォルダー: Show application expander PreferencesWindow エキスパンダーを表示 Restart Tracker DeskbarMenu Tracker を再起動 @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Deskbar の設定… Expand new applications PreferencesWindow 新しいアプリケーションを展開表示 Show replicants DeskbarMenu レプリカントを表示 Hide application names PreferencesWindow アプリケーション名を隠す -Clock PreferencesWindow 日付と時刻 Demos B_USER_DESKBAR_DIRECTORY/Demos デモ Icon size PreferencesWindow アイコンのサイズ Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets デスクトップアプレット diff --git a/data/catalogs/apps/deskbar/lt.catkeys b/data/catalogs/apps/deskbar/lt.catkeys index 652e75dfec..9f07ab9229 100644 --- a/data/catalogs/apps/deskbar/lt.catkeys +++ b/data/catalogs/apps/deskbar/lt.catkeys @@ -1,21 +1,17 @@ -1 lithuanian x-vnd.Be-TSKB 3197510812 +1 lithuanian x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu Išjungti -Show day of week PreferencesWindow Rodyti savaitės dieną Edit menu… PreferencesWindow Taisyti meniu… Suspend DeskbarMenu Pristabdyti -Applications PreferencesWindow Programos Time preferences… TimeView Laiko nuostatos… About Haiku DeskbarMenu Apie „Haiku“ Recent documents: PreferencesWindow Paskiausi dokumentai: Recent applications DeskbarMenu Paskiausiai leistos programos Sort running applications PreferencesWindow Rikiuoti paleistas programas -Show time Tray Rodyti laiką Applications B_USER_DESKBAR_DIRECTORY/Applications Programos Find… DeskbarMenu Ieškoti… Window PreferencesWindow Langas Menu PreferencesWindow Meniu Recent documents DeskbarMenu Paskiausiai atverti dokumentai -Show seconds PreferencesWindow Rodyti sekundes Auto-hide PreferencesWindow Automatiškai slėpti Always on top PreferencesWindow Visuomet viršuje DeskbarMenu @@ -25,7 +21,6 @@ Deskbar System name Užduočių juosta Restart system DeskbarMenu Paleisti iš naujo Large PreferencesWindow Didelės Auto-raise PreferencesWindow Automatiškai iškilti -Hide time TimeView Nerodyti laikrodžio Recent folders: PreferencesWindow Paskiausi aplankai: Show application expander PreferencesWindow Rodyti programų skleistuką Restart Tracker DeskbarMenu Perleisti Pėdsekį @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Užduočių juostos nuostatos… Expand new applications PreferencesWindow Išskleisti paleidžiamas programas Show replicants DeskbarMenu Rodyti replikavimo rankenėles Hide application names PreferencesWindow Nerodyti programų vardų -Clock PreferencesWindow Laikrodis Demos B_USER_DESKBAR_DIRECTORY/Demos Pavyzdžiai Icon size PreferencesWindow Piktogramų dydis Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Pagalbinės programėlės diff --git a/data/catalogs/apps/deskbar/nl.catkeys b/data/catalogs/apps/deskbar/nl.catkeys index 1c75ed8b25..35fb5bc61d 100644 --- a/data/catalogs/apps/deskbar/nl.catkeys +++ b/data/catalogs/apps/deskbar/nl.catkeys @@ -1,21 +1,17 @@ -1 dutch; flemish x-vnd.Be-TSKB 3197510812 +1 dutch; flemish x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu Uitzetten -Show day of week PreferencesWindow Dag van de week tonen Edit menu… PreferencesWindow Bewerk menu... Suspend DeskbarMenu Opschorten -Applications PreferencesWindow Toepassingen Time preferences… TimeView Tijdsvoorkeuren… About Haiku DeskbarMenu Over Haiku Recent documents: PreferencesWindow Recente documenten: Recent applications DeskbarMenu Recente toepassingen Sort running applications PreferencesWindow Sorteer lopende toepassingen -Show time Tray Tijd tonen Applications B_USER_DESKBAR_DIRECTORY/Applications Toepassingen Find… DeskbarMenu Vind... Window PreferencesWindow Venster Menu PreferencesWindow Menu Recent documents DeskbarMenu Recente documenten -Show seconds PreferencesWindow Seconden tonen Auto-hide PreferencesWindow Automatisch verbergen Always on top PreferencesWindow Altijd bovenop DeskbarMenu @@ -25,7 +21,6 @@ Deskbar System name Deskbar Restart system DeskbarMenu Systeem herstarten Large PreferencesWindow Groot Auto-raise PreferencesWindow Automatisch naar boven -Hide time TimeView Tijd verbergen Recent folders: PreferencesWindow Recente mappen: Show application expander PreferencesWindow Toon toepassing-expander Restart Tracker DeskbarMenu Tracker herstarten @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Deskbar-voorkeuren... Expand new applications PreferencesWindow Toon nieuwe toepassingen Show replicants DeskbarMenu Toon replicants Hide application names PreferencesWindow Programmanamen verbergen -Clock PreferencesWindow Klok Demos B_USER_DESKBAR_DIRECTORY/Demos Demo's Icon size PreferencesWindow Pictogramgrootte Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Bureaubladapplets diff --git a/data/catalogs/apps/deskbar/pl.catkeys b/data/catalogs/apps/deskbar/pl.catkeys index c6c6783989..de58fa1dfa 100644 --- a/data/catalogs/apps/deskbar/pl.catkeys +++ b/data/catalogs/apps/deskbar/pl.catkeys @@ -1,21 +1,17 @@ -1 polish x-vnd.Be-TSKB 3197510812 +1 polish x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu Wyłącz komputer -Show day of week PreferencesWindow Pokaż dzień tygodnia Edit menu… PreferencesWindow Edytuj zawartość menu… Suspend DeskbarMenu Wstrzymaj -Applications PreferencesWindow Lista aplikacji Time preferences… TimeView Ustawienia czasu... About Haiku DeskbarMenu O Haiku Recent documents: PreferencesWindow Ostatnio przeglądane dokumenty: Recent applications DeskbarMenu Ostatnio uruchomione aplikacje Sort running applications PreferencesWindow Sortuj uruchomione aplikacje alfabetycznie -Show time Tray Pokaż czas Applications B_USER_DESKBAR_DIRECTORY/Applications Aplikacje Find… DeskbarMenu Wyszukaj… Window PreferencesWindow Położenie Menu PreferencesWindow Menu Recent documents DeskbarMenu Ostatnio otwarte dokumenty -Show seconds PreferencesWindow Pokaż sekundy Auto-hide PreferencesWindow Autoukrywanie Always on top PreferencesWindow Zawsze na wierzchu DeskbarMenu Folder Paska Pulpitu jest pusty @@ -25,7 +21,6 @@ Deskbar System name Pasek Pulpitu Restart system DeskbarMenu Uruchom ponownie Large PreferencesWindow Duże Auto-raise PreferencesWindow Automatyczne rozszerzanie -Hide time TimeView Ukryj czas Recent folders: PreferencesWindow Ostatnio przeglądane foldery: Show application expander PreferencesWindow Aplikacje jako lista rozwijalna Restart Tracker DeskbarMenu Uruchom ponownie Trackera @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Preferencje Deskbara… Expand new applications PreferencesWindow Uruchamiaj aplikacje rozwinięte Show replicants DeskbarMenu Pokaż replikanty Hide application names PreferencesWindow Ukryj nazwy aplikacji -Clock PreferencesWindow Zegar Demos B_USER_DESKBAR_DIRECTORY/Demos Dema Icon size PreferencesWindow Rozmiar ikon Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Aplety pulpitu diff --git a/data/catalogs/apps/deskbar/pt_BR.catkeys b/data/catalogs/apps/deskbar/pt_BR.catkeys index 9f724dfc8e..163d747871 100644 --- a/data/catalogs/apps/deskbar/pt_BR.catkeys +++ b/data/catalogs/apps/deskbar/pt_BR.catkeys @@ -1,21 +1,17 @@ -1 portuguese (brazil) x-vnd.Be-TSKB 3197510812 +1 portuguese (brazil) x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu Desligar -Show day of week PreferencesWindow Exibir o dia da semana Edit menu… PreferencesWindow Editar menu... Suspend DeskbarMenu Suspender -Applications PreferencesWindow Aplicativos Time preferences… TimeView Preferências de hora… About Haiku DeskbarMenu Sobre o Haiku Recent documents: PreferencesWindow Documentos recentes: Recent applications DeskbarMenu Aplicativos recentes Sort running applications PreferencesWindow Ordenar aplicativos em execução -Show time Tray Exibir hora Applications B_USER_DESKBAR_DIRECTORY/Applications Aplicativos Find… DeskbarMenu Localizar… Window PreferencesWindow Janela Menu PreferencesWindow Menu Recent documents DeskbarMenu Documentos recentes -Show seconds PreferencesWindow Exibir segundos Auto-hide PreferencesWindow Ocultar automaticamente Always on top PreferencesWindow Sempre no topo DeskbarMenu @@ -25,7 +21,6 @@ Deskbar System name Deskbar Restart system DeskbarMenu Reiniciar sistema Large PreferencesWindow Grande Auto-raise PreferencesWindow Auto-levantar -Hide time TimeView Ocultar hora Recent folders: PreferencesWindow Pastas recentes: Show application expander PreferencesWindow Mostrar expansor de aplicativo Restart Tracker DeskbarMenu Reiniciar Rastreador @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Preferências da Deskbar… Expand new applications PreferencesWindow Expandir novos aplicativos Show replicants DeskbarMenu Exibir replicantes Hide application names PreferencesWindow Ocultar nomes de aplicativos -Clock PreferencesWindow Relógio Demos B_USER_DESKBAR_DIRECTORY/Demos Demonstrações Icon size PreferencesWindow Tamanho do ícone Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Miniaplicativos da área de trabalho diff --git a/data/catalogs/apps/deskbar/ro.catkeys b/data/catalogs/apps/deskbar/ro.catkeys index a9464cf457..a25e346b48 100644 --- a/data/catalogs/apps/deskbar/ro.catkeys +++ b/data/catalogs/apps/deskbar/ro.catkeys @@ -1,6 +1,5 @@ -1 romanian x-vnd.Be-TSKB 1193384805 +1 romanian x-vnd.Be-TSKB 1880901506 Edit menu… PreferencesWindow Editează meniu... -Applications PreferencesWindow Aplicații Recent documents: PreferencesWindow Documente recente: Sort running applications PreferencesWindow Sortează aplicațiile pornite Applications B_USER_DESKBAR_DIRECTORY/Applications Aplicații @@ -12,7 +11,6 @@ Show all WindowMenu Afișează tot No windows WindowMenu Fără ferestre Deskbar System name Deskbar Auto-raise PreferencesWindow Auto-montează -Hide time TimeView Ascunde oră Recent folders: PreferencesWindow Dosare recente: Show application expander PreferencesWindow Afișează extensorul de aplicație Close all WindowMenu Închide tot @@ -22,7 +20,6 @@ Tracker always first PreferencesWindow Trackerul întotdeauna primul Preferences B_USER_DESKBAR_DIRECTORY/Preferences Preferințe Show calendar… TimeView Afișează calendar... Expand new applications PreferencesWindow Extinde aplicații noi -Clock PreferencesWindow Ceas Demos B_USER_DESKBAR_DIRECTORY/Demos Demo-uri Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Miniaplicații desktop Hide all WindowMenu Ascunde tot diff --git a/data/catalogs/apps/deskbar/ru.catkeys b/data/catalogs/apps/deskbar/ru.catkeys index db9f25e982..bf5d78479c 100644 --- a/data/catalogs/apps/deskbar/ru.catkeys +++ b/data/catalogs/apps/deskbar/ru.catkeys @@ -1,21 +1,17 @@ -1 russian x-vnd.Be-TSKB 3197510812 +1 russian x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu Выключить компьютер -Show day of week PreferencesWindow Отображать день недели Edit menu… PreferencesWindow Изменить меню… Suspend DeskbarMenu Приостановить -Applications PreferencesWindow Приложения Time preferences… TimeView Настроить часы… About Haiku DeskbarMenu О системе Haiku Recent documents: PreferencesWindow Недавние документы: Recent applications DeskbarMenu Недавние приложения Sort running applications PreferencesWindow Сортировать запущенные приложения -Show time Tray Отображать время Applications B_USER_DESKBAR_DIRECTORY/Applications Приложения Find… DeskbarMenu Найти… Window PreferencesWindow Окно Menu PreferencesWindow Меню Recent documents DeskbarMenu Недавние документы -Show seconds PreferencesWindow Отображать секунды Auto-hide PreferencesWindow Скрывать автоматически Always on top PreferencesWindow Всегда сверху DeskbarMenu <Папка Deskbar пуста> @@ -25,7 +21,6 @@ Deskbar System name Deskbar Restart system DeskbarMenu Перезагрузить компьютер Large PreferencesWindow Крупные Auto-raise PreferencesWindow Всплывать при наведении -Hide time TimeView Скрыть часы Recent folders: PreferencesWindow Недавние папки: Show application expander PreferencesWindow Отображать список окон приложений Restart Tracker DeskbarMenu Перезапустить Tracker @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Настроить Deskbar… Expand new applications PreferencesWindow Раскрывать список окон при запуске Show replicants DeskbarMenu Отображать репликанты Hide application names PreferencesWindow Скрыть имена приложений -Clock PreferencesWindow Часы Demos B_USER_DESKBAR_DIRECTORY/Demos Демо Icon size PreferencesWindow Размер значков Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Апплеты diff --git a/data/catalogs/apps/deskbar/sk.catkeys b/data/catalogs/apps/deskbar/sk.catkeys index 3893f75e41..3554022900 100644 --- a/data/catalogs/apps/deskbar/sk.catkeys +++ b/data/catalogs/apps/deskbar/sk.catkeys @@ -1,21 +1,17 @@ -1 slovak x-vnd.Be-TSKB 3197510812 +1 slovak x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu Vypnúť -Show day of week PreferencesWindow Zobraziť deň v týždni Edit menu… PreferencesWindow Upraviť menu… Suspend DeskbarMenu Režim spánku -Applications PreferencesWindow Aplikácie Time preferences… TimeView Nastavenia času… About Haiku DeskbarMenu O Haiku Recent documents: PreferencesWindow Nedávne dokumenty: Recent applications DeskbarMenu Nedávne aplikácie Sort running applications PreferencesWindow Zoradiť bežiace aplikácie -Show time Tray Zobraziť čas Applications B_USER_DESKBAR_DIRECTORY/Applications Aplikácie Find… DeskbarMenu Nájsť… Window PreferencesWindow Okno Menu PreferencesWindow Menu Recent documents DeskbarMenu Nedávne dokumenty -Show seconds PreferencesWindow Zobraziť sekundy Auto-hide PreferencesWindow Automaticky skrývať Always on top PreferencesWindow Vždy na vrchu DeskbarMenu @@ -25,7 +21,6 @@ Deskbar System name Panel Restart system DeskbarMenu Reštartovať systém Large PreferencesWindow Veľké Auto-raise PreferencesWindow Automaticky aktivovať -Hide time TimeView Skryť čas Recent folders: PreferencesWindow Nedávne priečinky: Show application expander PreferencesWindow Zobraziť výsuvný zoznam aplikácií Restart Tracker DeskbarMenu Reštartovať Tracker @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Nastavenia Panelu… Expand new applications PreferencesWindow Výsuvný zoznam nových aplikácií Show replicants DeskbarMenu Zobraziť replikantov Hide application names PreferencesWindow Skryť názvy aplikácií -Clock PreferencesWindow Hodiny Demos B_USER_DESKBAR_DIRECTORY/Demos Demá Icon size PreferencesWindow Veľkosť ikon Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Aplety plochy diff --git a/data/catalogs/apps/deskbar/sv.catkeys b/data/catalogs/apps/deskbar/sv.catkeys index 9776dd6c3c..f180f64002 100644 --- a/data/catalogs/apps/deskbar/sv.catkeys +++ b/data/catalogs/apps/deskbar/sv.catkeys @@ -1,21 +1,17 @@ -1 swedish x-vnd.Be-TSKB 3197510812 +1 swedish x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu Stäng av -Show day of week PreferencesWindow Visa dag i veckan Edit menu… PreferencesWindow Redigera meny... Suspend DeskbarMenu Vänteläge -Applications PreferencesWindow Program Time preferences… TimeView Tidspreferenser About Haiku DeskbarMenu Om Haiku Recent documents: PreferencesWindow Senaste dokument: Recent applications DeskbarMenu Senaste program Sort running applications PreferencesWindow Sortera aktiva program -Show time Tray Visa tid Applications B_USER_DESKBAR_DIRECTORY/Applications Program Find… DeskbarMenu Sök... Window PreferencesWindow Fönster Menu PreferencesWindow Meny Recent documents DeskbarMenu Senaste dokument -Show seconds PreferencesWindow Visa sekunder Auto-hide PreferencesWindow Dölj automatiskt Always on top PreferencesWindow Alltid överst DeskbarMenu @@ -25,7 +21,6 @@ Deskbar System name Deskbar Restart system DeskbarMenu Starta om systemet Large PreferencesWindow Stor Auto-raise PreferencesWindow Höj vid närkontakt -Hide time TimeView Göm tiden Recent folders: PreferencesWindow Senaste mappar: Show application expander PreferencesWindow Visa program-expanderare Restart Tracker DeskbarMenu Starta om Tracker @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu Deskbar inställningar... Expand new applications PreferencesWindow Expandera nya program Show replicants DeskbarMenu Visa replicants Hide application names PreferencesWindow Göm applikation namnen -Clock PreferencesWindow Klocka Demos B_USER_DESKBAR_DIRECTORY/Demos Exempelprogram Icon size PreferencesWindow Ikonstorlek Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Skrivbordsprogram diff --git a/data/catalogs/apps/deskbar/uk.catkeys b/data/catalogs/apps/deskbar/uk.catkeys index f6d3d64016..19e933c028 100644 --- a/data/catalogs/apps/deskbar/uk.catkeys +++ b/data/catalogs/apps/deskbar/uk.catkeys @@ -1,7 +1,6 @@ -1 ukrainian x-vnd.Be-TSKB 1095421712 +1 ukrainian x-vnd.Be-TSKB 1782938413 Power off DeskbarMenu Вимкнути Edit menu… PreferencesWindow Редагувати меню… -Applications PreferencesWindow Додатки Recent documents: PreferencesWindow Недавні документи: Recent applications DeskbarMenu Останні програми Sort running applications PreferencesWindow Сортувати додатки, що запущені @@ -18,7 +17,6 @@ No windows WindowMenu Немає вікон Deskbar System name Deskbar Restart system DeskbarMenu Перезавантажити систему Auto-raise PreferencesWindow Автоспливання -Hide time TimeView Сховати час Recent folders: PreferencesWindow Недавні папки: Show application expander PreferencesWindow Показувати додаток expander Restart Tracker DeskbarMenu Перезавантажити Tracker @@ -35,7 +33,6 @@ Show calendar… TimeView Показати календар… Deskbar preferences… DeskbarMenu Налаштування Deskbar... Expand new applications PreferencesWindow Розпакувати нові додатки Show replicants DeskbarMenu Показати репліканти -Clock PreferencesWindow Годинник Demos B_USER_DESKBAR_DIRECTORY/Demos Демо Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Аплети екрану Hide all WindowMenu Сховати все diff --git a/data/catalogs/apps/deskbar/zh_Hans.catkeys b/data/catalogs/apps/deskbar/zh_Hans.catkeys index f4d38b278c..e33e982a99 100644 --- a/data/catalogs/apps/deskbar/zh_Hans.catkeys +++ b/data/catalogs/apps/deskbar/zh_Hans.catkeys @@ -1,21 +1,17 @@ -1 english x-vnd.Be-TSKB 3197510812 +1 english x-vnd.Be-TSKB 3155357024 Power off DeskbarMenu 关闭电源 -Show day of week PreferencesWindow 显示星期 Edit menu… PreferencesWindow 编辑菜单 Suspend DeskbarMenu 挂起 -Applications PreferencesWindow 应用程序 Time preferences… TimeView 时间设置... About Haiku DeskbarMenu 关于Haiku Recent documents: PreferencesWindow 最近文档: Recent applications DeskbarMenu 最近程序 Sort running applications PreferencesWindow 运行程序排序 -Show time Tray 显示时间 Applications B_USER_DESKBAR_DIRECTORY/Applications 应用程序 Find… DeskbarMenu 查找... Window PreferencesWindow 窗口 Menu PreferencesWindow 菜单 Recent documents DeskbarMenu 最近文档: -Show seconds PreferencesWindow 显示秒 Auto-hide PreferencesWindow 自动隐藏 Always on top PreferencesWindow 置顶 DeskbarMenu <桌面栏目录为空> @@ -25,7 +21,6 @@ Deskbar System name 桌面栏 Restart system DeskbarMenu 重启系统 Large PreferencesWindow 大 Auto-raise PreferencesWindow 自动 -Hide time TimeView 隐藏时间 Recent folders: PreferencesWindow 最近文件夹: Show application expander PreferencesWindow 显示程序扩展 Restart Tracker DeskbarMenu 重启Tracker @@ -44,7 +39,6 @@ Deskbar preferences… DeskbarMenu 桌面栏首选项... Expand new applications PreferencesWindow 展开新程序 Show replicants DeskbarMenu 显示 replicants Hide application names PreferencesWindow 隐藏应用名称 -Clock PreferencesWindow 时钟 Demos B_USER_DESKBAR_DIRECTORY/Demos 演示程序 Icon size PreferencesWindow 图标尺寸 Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets 桌面插件 diff --git a/data/catalogs/apps/diskusage/fi.catkeys b/data/catalogs/apps/diskusage/fi.catkeys index c81ea9321d..ec06e513c2 100644 --- a/data/catalogs/apps/diskusage/fi.catkeys +++ b/data/catalogs/apps/diskusage/fi.catkeys @@ -1,4 +1,4 @@ -1 finnish x-vnd.Haiku-DiskUsage 1726021626 +1 finnish x-vnd.Haiku-DiskUsage 3848101922 Scanning %refName% Scanner Tutkitaan %refName% Size Info Window Koko Rescan Pie View Tutki uudelleen @@ -9,6 +9,7 @@ no supporting apps Pie View ei tukevia sovelluksia Path Info Window Polku Scan Status View Tutki 9999.99 GB Status View 9999.99 gibitavua +Rescan Status View Tutki uudelleen file unavailable Status View tiedosto ei ole saatavilla Get Info Pie View Hae tiedot DiskUsage System name Levyasemakäyttö @@ -16,6 +17,7 @@ DiskUsage System name Levyasemakäyttö %d files Status View %d tiedostoa Created Info Window Luotu Modified Info Window Muokattu +Abort Status View Keskeytä Open Pie View Avaa Open With Pie View Avaa sovelluksella %a, %d %b %Y, %r Info Window %a, %d. %Bta %Y, %r diff --git a/data/catalogs/apps/expander/fi.catkeys b/data/catalogs/apps/expander/fi.catkeys index 67298b5ba5..e9fccfb4b0 100644 --- a/data/catalogs/apps/expander/fi.catkeys +++ b/data/catalogs/apps/expander/fi.catkeys @@ -1,4 +1,4 @@ -1 finnish x-vnd.Haiku-Expander 282517174 +1 finnish x-vnd.Haiku-Expander 2603318510 Expand ExpanderMenu Laajenna Close window when done expanding ExpanderPreferences Sulje ikkuna kun laajentaminen on tehty Set destination… ExpanderMenu Aseta kohde… @@ -22,6 +22,7 @@ Cancel ExpanderPreferences Peru Expansion ExpanderPreferences Laajentaminen Are you sure you want to stop expanding this\narchive? The expanded items may not be complete. ExpanderWindow Oletko varma, että haluat pysäyttää tämän arkiston\nlaajentamisen? Laajennetut alkiot eivät ehkä ole valmiita. Select DirectoryFilePanel Valitse +Destination folder doesn't exist. Would you like to create it? ExpanderWindow Kohdekansiota ”%s” ei ole olemassa. Haluatko luoda sen? Same directory as source (archive) file ExpanderPreferences Sama hakemisto lähde(arkisto)tiedostona Expanding '%s' ExpanderWindow Laajennetaan ’%s’ Settings ExpanderMenu Asetukset @@ -32,6 +33,8 @@ Show contents ExpanderWindow Näytä sisällöt Automatically show contents listing ExpanderPreferences Näytä sisältöluettelo automaattisesti OK ExpanderPreferences Valmis Leave destination folder path empty ExpanderPreferences Jätä kohdekansiopolku tyhjäksi +Failed to create the destination folder. ExpanderWindow Kohdekansion luominen epäonnistui. +Create ExpanderWindow Luo The folder was either moved, renamed or not\nsupported. ExpanderWindow Kansio on joko siirretty, nimetty uudelleen tai sitä\nei tueta. The file doesn't exist ExpanderWindow Tiedostoa ei ole olemassa Stop ExpanderMenu Pysäytä diff --git a/data/catalogs/apps/stylededit/be.catkeys b/data/catalogs/apps/stylededit/be.catkeys index dcf6605ebf..fcef47d268 100644 --- a/data/catalogs/apps/stylededit/be.catkeys +++ b/data/catalogs/apps/stylededit/be.catkeys @@ -1,4 +1,4 @@ -1 belarusian x-vnd.Haiku-StyledEdit 1508367857 +1 belarusian x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name Стыльны Рэдактар Paste Menus Уставіць OK LoadAlert Так @@ -7,7 +7,6 @@ File Menus Файл Lines: Statistics Радкоў: Italic Menus Нахілены Left Menus Левы -Revert to the last version of \"%s\"? RevertToSavedAlert Вярнуцца да апошняй версіі \"%s\"? Search backwards FindandReplaceWindow Шукаць ў адваротным накірунку Size Menus Памер Save QuitAlert Захаваць @@ -20,7 +19,6 @@ Cancel SaveAlert Адмена Cannot revert, file not found: \"%s\". RevertToSavedAlert Немагчыма вярнуцца, файл \"%s\" ня знойдзены. Case-sensitive FindandReplaceWindow З улікам рэгістру Green Menus Зялёны -Revert to saved… Menus Вярнуцца да захаванага… Yellow Menus Жоўты Replace in all windows FindandReplaceWindow Замяняць ва ўсіх вокнах Wrap lines Menus Пераносіць радкі diff --git a/data/catalogs/apps/stylededit/de.catkeys b/data/catalogs/apps/stylededit/de.catkeys index 50fc2ed611..dd4c4433ad 100644 --- a/data/catalogs/apps/stylededit/de.catkeys +++ b/data/catalogs/apps/stylededit/de.catkeys @@ -1,4 +1,4 @@ -1 german x-vnd.Haiku-StyledEdit 1508367857 +1 german x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name Texteditor Paste Menus Einfügen OK LoadAlert OK @@ -7,7 +7,6 @@ File Menus Datei Lines: Statistics Zeilen: Italic Menus Kursiv Left Menus Links -Revert to the last version of \"%s\"? RevertToSavedAlert Letzte Version von \"%s\" wiederherstellen? Search backwards FindandReplaceWindow Rückwärts suchen Size Menus Größe Save QuitAlert Speichern @@ -20,7 +19,6 @@ Cancel SaveAlert Abbrechen Cannot revert, file not found: \"%s\". RevertToSavedAlert Rückgängig machen unmöglich, die Datei wurde nicht gefunden: \"%s\". Case-sensitive FindandReplaceWindow Groß-/Kleinschreibung beachten Green Menus Grün -Revert to saved… Menus Gespeicherte Version herstellen… Yellow Menus Gelb Replace in all windows FindandReplaceWindow In allen Fenstern ersetzen Wrap lines Menus Zeilenumbruch diff --git a/data/catalogs/apps/stylededit/el.catkeys b/data/catalogs/apps/stylededit/el.catkeys index 067bb7ae11..8c25d6fc41 100644 --- a/data/catalogs/apps/stylededit/el.catkeys +++ b/data/catalogs/apps/stylededit/el.catkeys @@ -1,4 +1,4 @@ -1 greek, modern (1453-) x-vnd.Haiku-StyledEdit 1508367857 +1 greek, modern (1453-) x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name StyledEdit Paste Menus Επικόλληση OK LoadAlert Εντάξει @@ -7,7 +7,6 @@ File Menus Αρχείο Lines: Statistics Γραμμές: Italic Menus Πλάγια Left Menus Αριστερά -Revert to the last version of \"%s\"? RevertToSavedAlert Επαναφορά στην τελευταία έκδοση του \"%s\"; Search backwards FindandReplaceWindow Αναζήτηση προς τα πίσω Size Menus Μέγεθος Save QuitAlert Αποθήκευση @@ -20,7 +19,6 @@ Cancel SaveAlert Άκυρο Cannot revert, file not found: \"%s\". RevertToSavedAlert Δεν μπορεί να γίνει επαναφορά, το αρχείο δεν βρέθηκε: \"%s\". Case-sensitive FindandReplaceWindow Ταίριασμα πεζών/κεφαλαίων Green Menus Πράσινο -Revert to saved… Menus Επαναφορά στο αποθηκευμένο... Yellow Menus Κίτρινο Replace in all windows FindandReplaceWindow Αντικατάσταση σε όλα τα παράθυρα Wrap lines Menus Αναδίπλωση γραμμών diff --git a/data/catalogs/apps/stylededit/fi.catkeys b/data/catalogs/apps/stylededit/fi.catkeys index 7bb24678f1..de337609f3 100644 --- a/data/catalogs/apps/stylededit/fi.catkeys +++ b/data/catalogs/apps/stylededit/fi.catkeys @@ -1,4 +1,4 @@ -1 finnish x-vnd.Haiku-StyledEdit 1508367857 +1 finnish x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name Tyylitetty editori Paste Menus Liitä OK LoadAlert Valmis @@ -7,7 +7,6 @@ File Menus Tiedosto Lines: Statistics Rivejä: Italic Menus Kursivointi Left Menus Vasen -Revert to the last version of \"%s\"? RevertToSavedAlert Palauta viimeinen ”%s”-versio? Search backwards FindandReplaceWindow Etsi taaksepäin Size Menus Koko Save QuitAlert Tallenna @@ -20,7 +19,6 @@ Cancel SaveAlert Peru Cannot revert, file not found: \"%s\". RevertToSavedAlert Ei voi palauttaa, tiedostoa ei löytynyt: ”%s”. Case-sensitive FindandReplaceWindow Kirjainkoosta riippuva Green Menus Vihreä -Revert to saved… Menus Palauta tallennettuun… Yellow Menus Keltainen Replace in all windows FindandReplaceWindow Korvaa kaikissa ikkunoissa Wrap lines Menus Rivitä diff --git a/data/catalogs/apps/stylededit/fr.catkeys b/data/catalogs/apps/stylededit/fr.catkeys index b6260047a3..92cd41341b 100644 --- a/data/catalogs/apps/stylededit/fr.catkeys +++ b/data/catalogs/apps/stylededit/fr.catkeys @@ -1,4 +1,4 @@ -1 french x-vnd.Haiku-StyledEdit 1508367857 +1 french x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name Éditeur stylé Paste Menus Coller OK LoadAlert OK @@ -7,7 +7,6 @@ File Menus Fichier Lines: Statistics Lignes : Italic Menus Italique Left Menus À gauche -Revert to the last version of \"%s\"? RevertToSavedAlert Retourner à la dernière version de « %s » ? Search backwards FindandReplaceWindow Chercher en arrière Size Menus Taille Save QuitAlert Sauvegarder @@ -20,7 +19,6 @@ Cancel SaveAlert Annuler Cannot revert, file not found: \"%s\". RevertToSavedAlert Rétablissement impossible, fichier non trouvé : « %s ». Case-sensitive FindandReplaceWindow Sensible à la casse Green Menus Vert -Revert to saved… Menus Revenir à la dernière version enregistrée… Yellow Menus Jaune Replace in all windows FindandReplaceWindow Remplacer dans toutes les fenêtres Wrap lines Menus Retour à la ligne diff --git a/data/catalogs/apps/stylededit/hi.catkeys b/data/catalogs/apps/stylededit/hi.catkeys index 7fd5770adf..efe28d0b35 100644 --- a/data/catalogs/apps/stylededit/hi.catkeys +++ b/data/catalogs/apps/stylededit/hi.catkeys @@ -1,4 +1,4 @@ -1 hindi x-vnd.Haiku-StyledEdit 1508367857 +1 hindi x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name StyledEdit Paste Menus पेस्ट OK LoadAlert ठीक है @@ -7,7 +7,6 @@ File Menus फ़ाइल Lines: Statistics लाइनें: Italic Menus तिरछे अक्षर Left Menus बाएं -Revert to the last version of \"%s\"? RevertToSavedAlert पिछले संस्करण \"%s\" पर जाए? Search backwards FindandReplaceWindow पीछे ढूँढें Size Menus आकार Save QuitAlert सहेजें @@ -20,7 +19,6 @@ Cancel SaveAlert रद्द Cannot revert, file not found: \"%s\". RevertToSavedAlert वापस नहीं कर सकते, फ़ाइल नहीं मिली : \"%s\". Case-sensitive FindandReplaceWindow केस संवेदी Green Menus हरा -Revert to saved… Menus सहेजी स्थिति पर लौटे Yellow Menus पीला Replace in all windows FindandReplaceWindow सभी विंडो में बदलें Wrap lines Menus रेखाएं लपेटें diff --git a/data/catalogs/apps/stylededit/hu.catkeys b/data/catalogs/apps/stylededit/hu.catkeys index 94d3b1d4f3..4c8960301e 100644 --- a/data/catalogs/apps/stylededit/hu.catkeys +++ b/data/catalogs/apps/stylededit/hu.catkeys @@ -1,4 +1,4 @@ -1 hungarian x-vnd.Haiku-StyledEdit 1508367857 +1 hungarian x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name StyledEdit Paste Menus Beillesztés OK LoadAlert Rendben @@ -7,7 +7,6 @@ File Menus Fájl Lines: Statistics Sor: Italic Menus Dőlt Left Menus Balra -Revert to the last version of \"%s\"? RevertToSavedAlert Visszaállítja legutolsó verzióját: %s? Search backwards FindandReplaceWindow Keresés visszafelé Size Menus Méret Save QuitAlert Mentés @@ -20,7 +19,6 @@ Cancel SaveAlert Mégse Cannot revert, file not found: \"%s\". RevertToSavedAlert Nem vonható vissza, a fájl (%s) nem található. Case-sensitive FindandReplaceWindow Betűérzékeny Green Menus Zöld -Revert to saved… Menus Vissza a mentett állapotra… Yellow Menus Sárga Replace in all windows FindandReplaceWindow Cserélje minden ablakban Wrap lines Menus Sortörés diff --git a/data/catalogs/apps/stylededit/ja.catkeys b/data/catalogs/apps/stylededit/ja.catkeys index 1ad005931d..49d968f955 100644 --- a/data/catalogs/apps/stylededit/ja.catkeys +++ b/data/catalogs/apps/stylededit/ja.catkeys @@ -1,4 +1,4 @@ -1 japanese x-vnd.Haiku-StyledEdit 1508367857 +1 japanese x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name StyledEdit Paste Menus 貼り付け OK LoadAlert OK @@ -7,7 +7,6 @@ File Menus ファイル Lines: Statistics 行数: Italic Menus イタリック Left Menus 左揃え -Revert to the last version of \"%s\"? RevertToSavedAlert \"%s\" を最後に保存した内容へ戻しますか? Search backwards FindandReplaceWindow 逆方向検索 Size Menus サイズ Save QuitAlert 保存 @@ -20,7 +19,6 @@ Cancel SaveAlert 中止 Cannot revert, file not found: \"%s\". RevertToSavedAlert \"%s\" ファイルが存在しないため、読み込めませんでした。 Case-sensitive FindandReplaceWindow 大文字と小文字を区別する Green Menus 緑 -Revert to saved… Menus 最新保存版に戻す… Yellow Menus 黄 Replace in all windows FindandReplaceWindow すべてのウィンドウで置換 Wrap lines Menus ワードラップ diff --git a/data/catalogs/apps/stylededit/lt.catkeys b/data/catalogs/apps/stylededit/lt.catkeys index 5e0deecb56..c9cbeab174 100644 --- a/data/catalogs/apps/stylededit/lt.catkeys +++ b/data/catalogs/apps/stylededit/lt.catkeys @@ -1,4 +1,4 @@ -1 lithuanian x-vnd.Haiku-StyledEdit 1508367857 +1 lithuanian x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name Rašyklė Paste Menus Įdėti OK LoadAlert Gerai @@ -7,7 +7,6 @@ File Menus Failas Lines: Statistics Eilučių: Italic Menus Kursyvas Left Menus Kairinė -Revert to the last version of \"%s\"? RevertToSavedAlert Grįžti prie paskutinės „%s“ versijos? Search backwards FindandReplaceWindow Ieškoti viršun Size Menus Dydis Save QuitAlert Įrašyti @@ -20,7 +19,6 @@ Cancel SaveAlert Atsisakyti Cannot revert, file not found: \"%s\". RevertToSavedAlert Negrįžtama, failas nerastas: „%s“. Case-sensitive FindandReplaceWindow Paisyti raidžių registro Green Menus Žalia -Revert to saved… Menus Grįžti prie įrašyto… Yellow Menus Geltona Replace in all windows FindandReplaceWindow Keisti visuose languose Wrap lines Menus Laužyti eilutes diff --git a/data/catalogs/apps/stylededit/nl.catkeys b/data/catalogs/apps/stylededit/nl.catkeys index fd05d5bd59..0c2d6295b2 100644 --- a/data/catalogs/apps/stylededit/nl.catkeys +++ b/data/catalogs/apps/stylededit/nl.catkeys @@ -1,4 +1,4 @@ -1 dutch; flemish x-vnd.Haiku-StyledEdit 1508367857 +1 dutch; flemish x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name StyledEdit Paste Menus Plakken OK LoadAlert Oké @@ -7,7 +7,6 @@ File Menus Bestand Lines: Statistics Regels: Italic Menus Cursief Left Menus Links -Revert to the last version of \"%s\"? RevertToSavedAlert Herstellen naar laatste versie van \"%s\"? Search backwards FindandReplaceWindow Achteruit zoeken Size Menus Grootte Save QuitAlert Opslaan @@ -20,7 +19,6 @@ Cancel SaveAlert Annuleren Cannot revert, file not found: \"%s\". RevertToSavedAlert Kan niet herstellen, het bestand \"%s\" werd niet gevonden. Case-sensitive FindandReplaceWindow Hoofdlettergevoelig Green Menus Groen -Revert to saved… Menus Herstel naar opgeslagen... Yellow Menus Geel Replace in all windows FindandReplaceWindow Vervang in alle vensters Wrap lines Menus Regels afbreken diff --git a/data/catalogs/apps/stylededit/pl.catkeys b/data/catalogs/apps/stylededit/pl.catkeys index b7845eb435..5a5660858b 100644 --- a/data/catalogs/apps/stylededit/pl.catkeys +++ b/data/catalogs/apps/stylededit/pl.catkeys @@ -1,4 +1,4 @@ -1 polish x-vnd.Haiku-StyledEdit 1508367857 +1 polish x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name StyledEdit Paste Menus Wklej OK LoadAlert OK @@ -7,7 +7,6 @@ File Menus Plik Lines: Statistics Linie: Italic Menus Kursywa Left Menus Lewo -Revert to the last version of \"%s\"? RevertToSavedAlert Przywrócić ostatnią wersję \"%s\"? Search backwards FindandReplaceWindow Szukaj wstecz Size Menus Rozmiar Save QuitAlert Zapisz @@ -20,7 +19,6 @@ Cancel SaveAlert Anuluj Cannot revert, file not found: \"%s\". RevertToSavedAlert Nie można przywrócić, nie znaleziono pliku: \"%s\". Case-sensitive FindandReplaceWindow Wielkość liter brana pod uwagę Green Menus Zielony -Revert to saved… Menus Przywróć zapisane… Yellow Menus Żółty Replace in all windows FindandReplaceWindow Zamień we wszystkich oknach Wrap lines Menus Zawijaj wiersze diff --git a/data/catalogs/apps/stylededit/pt_BR.catkeys b/data/catalogs/apps/stylededit/pt_BR.catkeys index 7a3d860331..3e60448d23 100644 --- a/data/catalogs/apps/stylededit/pt_BR.catkeys +++ b/data/catalogs/apps/stylededit/pt_BR.catkeys @@ -1,4 +1,4 @@ -1 portuguese (brazil) x-vnd.Haiku-StyledEdit 1508367857 +1 portuguese (brazil) x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name Estilo de Edição Paste Menus Colar OK LoadAlert OK @@ -7,7 +7,6 @@ File Menus Arquivo Lines: Statistics Linhas: Italic Menus Itálico Left Menus Esquerda -Revert to the last version of \"%s\"? RevertToSavedAlert Reverter para a última versão de \"%s\"? Search backwards FindandReplaceWindow Pesquisar para trás Size Menus Tamanho Save QuitAlert Salvar @@ -20,7 +19,6 @@ Cancel SaveAlert Cancelar Cannot revert, file not found: \"%s\". RevertToSavedAlert Impossível reverter, arquivo não encontrado: \"%s\". Case-sensitive FindandReplaceWindow Diferenciar maiúsculas/minúsculas Green Menus Verde -Revert to saved… Menus Reverter para arquivo salvo... Yellow Menus Amarelo Replace in all windows FindandReplaceWindow Substituir em todas as janelas Wrap lines Menus Quebrar linhas diff --git a/data/catalogs/apps/stylededit/ro.catkeys b/data/catalogs/apps/stylededit/ro.catkeys index 30b66e0099..225cd6e263 100644 --- a/data/catalogs/apps/stylededit/ro.catkeys +++ b/data/catalogs/apps/stylededit/ro.catkeys @@ -1,4 +1,4 @@ -1 romanian x-vnd.Haiku-StyledEdit 1799001682 +1 romanian x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name EditorText Paste Menus Lipește OK LoadAlert OK @@ -19,7 +19,6 @@ Cancel SaveAlert Anulează Cannot revert, file not found: \"%s\". RevertToSavedAlert Nu se poate reveni, nu s-a găsit fișierul: „%s”. Case-sensitive FindandReplaceWindow Sensibil la majuscule Green Menus Verde -Revert to saved… Menus Revenire la salvat... Yellow Menus Galben Replace in all windows FindandReplaceWindow Înlocuiește în toate ferestrele Wrap lines Menus Încadrează linii diff --git a/data/catalogs/apps/stylededit/ru.catkeys b/data/catalogs/apps/stylededit/ru.catkeys index 8f686b102f..3e44098673 100644 --- a/data/catalogs/apps/stylededit/ru.catkeys +++ b/data/catalogs/apps/stylededit/ru.catkeys @@ -1,4 +1,4 @@ -1 russian x-vnd.Haiku-StyledEdit 1508367857 +1 russian x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name Стильный редактор Paste Menus Вставить OK LoadAlert ОК @@ -7,7 +7,6 @@ File Menus Файл Lines: Statistics Строк: Italic Menus Наклонный Left Menus По левому краю -Revert to the last version of \"%s\"? RevertToSavedAlert Вернуться к последней сохраненной версии \"%s\"? Search backwards FindandReplaceWindow Искать снизу вверх Size Menus Размер Save QuitAlert Сохранить @@ -20,7 +19,6 @@ Cancel SaveAlert Отмена Cannot revert, file not found: \"%s\". RevertToSavedAlert Невозможно вернуть, файл не найден: \"%s\". Case-sensitive FindandReplaceWindow Учитывать регистр Green Menus Зеленый -Revert to saved… Menus Вернуться к сохраненному… Yellow Menus Желтый Replace in all windows FindandReplaceWindow Заменить во всех окнах Wrap lines Menus Перенос строк diff --git a/data/catalogs/apps/stylededit/sk.catkeys b/data/catalogs/apps/stylededit/sk.catkeys index a60ecb905c..fff9124e6f 100644 --- a/data/catalogs/apps/stylededit/sk.catkeys +++ b/data/catalogs/apps/stylededit/sk.catkeys @@ -1,4 +1,4 @@ -1 slovak x-vnd.Haiku-StyledEdit 1508367857 +1 slovak x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name StyledEdit Paste Menus Vložiť OK LoadAlert OK @@ -7,7 +7,6 @@ File Menus Súbor Lines: Statistics Riadkov: Italic Menus Kurzíva Left Menus Vľavo -Revert to the last version of \"%s\"? RevertToSavedAlert Vrátiť späť poslednú verziu „%s“? Search backwards FindandReplaceWindow Hľadať dozadu Size Menus Veľkosť Save QuitAlert Uložiť @@ -20,7 +19,6 @@ Cancel SaveAlert Zrušiť Cannot revert, file not found: \"%s\". RevertToSavedAlert Nie je možné vrátiť späť, súbor nebol nájdený: „%s“. Case-sensitive FindandReplaceWindow Rozlišovať veľkosť písmen Green Menus Zelená -Revert to saved… Menus Vrátiť späť uložené… Yellow Menus Žltá Replace in all windows FindandReplaceWindow Nahradiť vo všetkých oknách Wrap lines Menus Zalamovať riadky diff --git a/data/catalogs/apps/stylededit/sv.catkeys b/data/catalogs/apps/stylededit/sv.catkeys index d13b3d8f1b..5b0804f28b 100644 --- a/data/catalogs/apps/stylededit/sv.catkeys +++ b/data/catalogs/apps/stylededit/sv.catkeys @@ -1,4 +1,4 @@ -1 swedish x-vnd.Haiku-StyledEdit 1508367857 +1 swedish x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name SkrivStiligt Paste Menus Klistra in OK LoadAlert OK @@ -7,7 +7,6 @@ File Menus Arkiv Lines: Statistics Rader: Italic Menus Kursiv Left Menus Vänster -Revert to the last version of \"%s\"? RevertToSavedAlert Återgå till den senast använda versionen av "%s"? Search backwards FindandReplaceWindow Sök bakåt Size Menus Storlek Save QuitAlert Spara @@ -20,7 +19,6 @@ Cancel SaveAlert Avbryt Cannot revert, file not found: \"%s\". RevertToSavedAlert Kan inte återgå, filen hittades inte: "%s". Case-sensitive FindandReplaceWindow Skiftlägeskänslig Green Menus Grön -Revert to saved… Menus Återgå till sparad… Yellow Menus Gul Replace in all windows FindandReplaceWindow Ersätt i alla fönster Wrap lines Menus Bryt rader diff --git a/data/catalogs/apps/stylededit/uk.catkeys b/data/catalogs/apps/stylededit/uk.catkeys index 4587d8524e..f500f4038c 100644 --- a/data/catalogs/apps/stylededit/uk.catkeys +++ b/data/catalogs/apps/stylededit/uk.catkeys @@ -1,4 +1,4 @@ -1 ukrainian x-vnd.Haiku-StyledEdit 1508367857 +1 ukrainian x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name Редактор тексту StyledEdit Paste Menus Вставити OK LoadAlert Гаразд @@ -7,7 +7,6 @@ File Menus Файл Lines: Statistics Стрічка: Italic Menus Italic Left Menus Вліво -Revert to the last version of \"%s\"? RevertToSavedAlert Повернутись до останньої версії \"%s\" ? Search backwards FindandReplaceWindow Повторний пошук Size Menus Розмір Save QuitAlert Зберегти @@ -20,7 +19,6 @@ Cancel SaveAlert Відмінити Cannot revert, file not found: \"%s\". RevertToSavedAlert Неможливо повернути, файл не знайдено: \"%s\". Case-sensitive FindandReplaceWindow Чутливий до регістра Green Menus Зелений -Revert to saved… Menus Повернутись до збереження… Yellow Menus Жовтий Replace in all windows FindandReplaceWindow Замінити у всіх вікнах Wrap lines Menus Перенос по словах diff --git a/data/catalogs/apps/stylededit/zh_Hans.catkeys b/data/catalogs/apps/stylededit/zh_Hans.catkeys index fc7a164634..a4424ebf74 100644 --- a/data/catalogs/apps/stylededit/zh_Hans.catkeys +++ b/data/catalogs/apps/stylededit/zh_Hans.catkeys @@ -1,4 +1,4 @@ -1 english x-vnd.Haiku-StyledEdit 1508367857 +1 english x-vnd.Haiku-StyledEdit 3417936913 StyledEdit System name StyledEdit Paste Menus 粘贴 OK LoadAlert 确定 @@ -7,7 +7,6 @@ File Menus 文件 Lines: Statistics 行数: Italic Menus 斜体 Left Menus 居左 -Revert to the last version of \"%s\"? RevertToSavedAlert 恢复到最后一个\"%s\"版本? Search backwards FindandReplaceWindow 后台搜索 Size Menus 大小 Save QuitAlert 保存 @@ -20,7 +19,6 @@ Cancel SaveAlert 取消 Cannot revert, file not found: \"%s\". RevertToSavedAlert 无法恢复,文件未找到:\"%s\"。 Case-sensitive FindandReplaceWindow 区分大小写 Green Menus 绿 -Revert to saved… Menus 恢复保存为... Yellow Menus 黄 Replace in all windows FindandReplaceWindow 在所有窗口进行替换 Wrap lines Menus 收起 diff --git a/data/catalogs/apps/terminal/de.catkeys b/data/catalogs/apps/terminal/de.catkeys index 8706e0e36c..35cf4784ee 100644 --- a/data/catalogs/apps/terminal/de.catkeys +++ b/data/catalogs/apps/terminal/de.catkeys @@ -1,10 +1,9 @@ -1 german x-vnd.Haiku-Terminal 1252738083 +1 german x-vnd.Haiku-Terminal 1724034391 Not found. Terminal TermWindow Nicht gefunden. Switch Terminals Terminal TermWindow Terminals wechseln Change directory Terminal TermView Zum Ordner wechseln OK Terminal TermWindow OK New Terminal Terminal TermWindow Neues Terminal -Cursor text Terminal AppearancePrefView Text unter Cursor Terminal couldn't start the shell. Sorry. Terminal TermApp Das Terminal konnte die Konsole leider nicht starten. Match case Terminal FindWindow Groß-/Kleinschreibung beachten Quit Terminal TermWindow Beenden @@ -20,8 +19,11 @@ Font: Terminal AppearancePrefView Schriftart: Copy here Terminal TermView Hierher kopieren Really close? Terminal TermWindow Wirklich schließen? Copy Terminal TermWindow Kopieren +Color scheme: Terminal AppearancePrefView Farbschema: Window title: Terminal TermWindow Fenstertitel: Unrecognized option \"%s\"\n Terminal arguments parsing Unbekannte Option \"%s\"\n +Blue Terminal colors scheme Blau +Custom Terminal colors scheme Benutzerdefiniert %app% settings Terminal PrefWindow window title %app%-Einstellungen Cancel Terminal SetTitleWindow Abbrechen Increase Terminal TermWindow Vergrößern @@ -45,6 +47,7 @@ The following processes are still running:\n\n\t%1\n\nIf you close the Terminal, Insert path Terminal TermView Pfad einfügen Haiku Terminal\nCopyright 2001-2009 Haiku, Inc.\nCopyright(C) 1999 Kazuho Okui and Takashi Murai.\n\nUsage: %s [OPTION] [SHELL]\n Terminal TermApp Haiku Terminal\nCopyright 2001-2009 Haiku, Inc.\nCopyright(C) 1999 Kazuho Okui und Takashi Murai.\n\nGebrauch: %s [OPTION] [SHELL]\n No search string was entered. Terminal TermWindow Es wurde kein Suchbegriff eingegeben. +Font size Terminal TermWindow Schriftgröße Blinking cursor Terminal AppearancePrefView Blinkender Cursor Don't save Terminal PrefWindow Verwerfen Set window title Terminal TermWindow Setze Fenstertitel @@ -57,11 +60,15 @@ Find… Terminal TermWindow Suchen... The process \"%1\" is still running.\nIf you close the Terminal, the process will be killed. Terminal TermWindow Der Prozess \"%1\" läuft noch.\nWird das Terminal geschlossen, wird auch dieser Prozess abgebrochen. Move here Terminal TermView Hierher verschieben \t%d\t-\tThe current working directory of the active process in the\n\t\t\tcurrent tab. Optionally the maximum number of path components\n\t\t\tcan be specified. E.g. '%2d' for at most two components.\n\t%i\t-\tThe index of the window.\n\t%p\t-\tThe name of the active process in the current tab.\n\t%t\t-\tThe title of the current tab.\n\t%%\t-\tThe character '%'. Terminal ToolTips \t%d\t-\tDas aktuelle Arbeitsverzeichnis des aktiven Prozesses\n\t\t\t in diesem Reiter. Optional kann die maximale Anzahl von Pfad-Komponenten\n\t\t\t angegeben werden, z.B. '%2d' für maximal zwei Komponenten.\n\t%i\t-\tDer Index des Fensters.\n\t%p\t-\tDer Titel dieses Reiters.\n\t%%\t-\tDas %-Zeichen. +Retro Terminal colors scheme Retro Error! Terminal getString Fehler! New tab Terminal TermWindow Neuer Reiter The pattern specifying the tab titles. The following placeholders\ncan be used:\n Terminal AppearancePrefView Die Formel für Reitertitel. Folgende Variablen\nstehen zur Verfügung:\n Selected background Terminal AppearancePrefView Auswahl-Hintergrund +Slate Terminal colors scheme Schiefer +Midnight Terminal colors scheme Mitternacht Decrease Terminal TermWindow Verkleinern +Default Terminal colors scheme Standard Create link here Terminal TermView Verknüpfung hier erstellen Close Terminal TermWindow Schließen Text Terminal AppearancePrefView Text @@ -74,7 +81,6 @@ Set tab title Terminal TermWindow Reiter umbenennen Settings… Terminal TermWindow Einstellungen... Abort Terminal Shell Abbrechen Edit Terminal TermWindow Bearbeiten -Cursor background Terminal AppearancePrefView Cursor Color: Terminal AppearancePrefView Farbe: The pattern specifying the window title. The following placeholders\ncan be used:\n Terminal TermWindow Die Formel für den Fenstertitel. Folgende Variablen\nstehen zur Verfügung:\n Print Terminal TermWindow Drucken diff --git a/data/catalogs/apps/terminal/fi.catkeys b/data/catalogs/apps/terminal/fi.catkeys index 113223d121..da707a5a7e 100644 --- a/data/catalogs/apps/terminal/fi.catkeys +++ b/data/catalogs/apps/terminal/fi.catkeys @@ -1,7 +1,8 @@ -1 finnish x-vnd.Haiku-Terminal 2912171349 +1 finnish x-vnd.Haiku-Terminal 4226482962 Not found. Terminal TermWindow Ei löytynyt. Switch Terminals Terminal TermWindow Vaihda pääteikkunoita Change directory Terminal TermView Vaihda hakemistoa +Professional Terminal colors scheme Ammattilaistaso OK Terminal TermWindow Valmis New Terminal Terminal TermWindow Uusi Pääteikkuna Terminal couldn't start the shell. Sorry. Terminal TermApp Komentotulkin käynnistäminen Pääteikkunassa epäonnistui. @@ -19,8 +20,11 @@ Font: Terminal AppearancePrefView Kirjasintyyppi: Copy here Terminal TermView Kopioi tänne Really close? Terminal TermWindow Suljetaanko todella? Copy Terminal TermWindow Kopioi +Color scheme: Terminal AppearancePrefView Väriteema: Window title: Terminal TermWindow Ikkunaotsikko: Unrecognized option \"%s\"\n Terminal arguments parsing Tunnistamaton valitsin ”%s”\n +Blue Terminal colors scheme Sininen +Custom Terminal colors scheme Räätälöity %app% settings Terminal PrefWindow window title %app%-asetukset Cancel Terminal SetTitleWindow Peru Increase Terminal TermWindow Kasvata @@ -44,6 +48,8 @@ The following processes are still running:\n\n\t%1\n\nIf you close the Terminal, Insert path Terminal TermView Lisää polku Haiku Terminal\nCopyright 2001-2009 Haiku, Inc.\nCopyright(C) 1999 Kazuho Okui and Takashi Murai.\n\nUsage: %s [OPTION] [SHELL]\n Terminal TermApp Haiku Pääteikkuna\nCopyright 2001-2009 Haiku, Inc.\nCopyright(C) 1999 Kazuho Okui ja Takashi Murai.\n\nKäyttö: %s [VALITSIN] [KOMENTOTULKKI]\n No search string was entered. Terminal TermWindow Hakumerkkijono ei kirjoitettu. +Font size Terminal TermWindow Kirjasinkoko +Blinking cursor Terminal AppearancePrefView Vilkkuva kohdistin Don't save Terminal PrefWindow Älä tallenna Set window title Terminal TermWindow Aseta ikkunaotsikko Terminal System name Pääteikkuna @@ -55,11 +61,15 @@ Find… Terminal TermWindow Etsi... The process \"%1\" is still running.\nIf you close the Terminal, the process will be killed. Terminal TermWindow Prosessia ”%1” suoritetaan yhä.\nJos suljet Pääteikkunan, prosessi tapetaan. Move here Terminal TermView Siirrä tänne \t%d\t-\tThe current working directory of the active process in the\n\t\t\tcurrent tab. Optionally the maximum number of path components\n\t\t\tcan be specified. E.g. '%2d' for at most two components.\n\t%i\t-\tThe index of the window.\n\t%p\t-\tThe name of the active process in the current tab.\n\t%t\t-\tThe title of the current tab.\n\t%%\t-\tThe character '%'. Terminal ToolTips \t%d\t-\tKäynnissä olevan prosessin nykyinen työhakemisto\n\t\t\tnykyisessä välilehdessä. Valinnaisesti määriteltävien polkukomponenttien\n\t\t\tenimmäismäärä. Esim.: ’%2d’ kahdelle yleisimmälle komponentille.\n\t%i\t-\tIkkunan indeksi.\n\t%p\t-\tKäynnissä olevan prosessin nimi nykyisessä välilehdessä.\n\t%t\t-\tNykyisen välilehden otsikko.\n\t%%\t-\tMerkki ’%’. +Retro Terminal colors scheme Retro Error! Terminal getString Virhe! New tab Terminal TermWindow Uusi välilehti The pattern specifying the tab titles. The following placeholders\ncan be used:\n Terminal AppearancePrefView Välilehtiotsikot määrittävä malli. Seuraavia paikanpitäjiä\nvoidaan käyttää:\n Selected background Terminal AppearancePrefView Valitse tausta +Slate Terminal colors scheme Laatta +Midnight Terminal colors scheme Keskiyö Decrease Terminal TermWindow Vähennä +Default Terminal colors scheme Oletus Create link here Terminal TermView Luo linkki tänne Close Terminal TermWindow Sulje Text Terminal AppearancePrefView Teksti diff --git a/data/catalogs/apps/terminal/fr.catkeys b/data/catalogs/apps/terminal/fr.catkeys index 3e32fadde1..fea25bcd6d 100644 --- a/data/catalogs/apps/terminal/fr.catkeys +++ b/data/catalogs/apps/terminal/fr.catkeys @@ -1,4 +1,4 @@ -1 french x-vnd.Haiku-Terminal 680179617 +1 french x-vnd.Haiku-Terminal 1829613568 Not found. Terminal TermWindow Non trouvé. Switch Terminals Terminal TermWindow Inverser les Terminaux Change directory Terminal TermView Changer de répertoire @@ -73,7 +73,6 @@ Set tab title Terminal TermWindow Changer le titre de l'onglet Settings… Terminal TermWindow Réglages… Abort Terminal Shell Abandonner Edit Terminal TermWindow Éditer -Cursor background Terminal AppearancePrefView Arrière-plan du curseur Color: Terminal AppearancePrefView Couleur : The pattern specifying the window title. The following placeholders\ncan be used:\n Terminal TermWindow Le modèle utilisé pour composer le titre des fenêtres peut\ncontenir les éléments suivants :\n Print Terminal TermWindow Imprimer diff --git a/data/catalogs/apps/terminal/hu.catkeys b/data/catalogs/apps/terminal/hu.catkeys index a5b99bc3be..5190b37a43 100644 --- a/data/catalogs/apps/terminal/hu.catkeys +++ b/data/catalogs/apps/terminal/hu.catkeys @@ -1,10 +1,10 @@ -1 hungarian x-vnd.Haiku-Terminal 1252738083 +1 hungarian x-vnd.Haiku-Terminal 4226482962 Not found. Terminal TermWindow Nem található. Switch Terminals Terminal TermWindow Terminálok közti váltás Change directory Terminal TermView Mappa váltása +Professional Terminal colors scheme Professzionális OK Terminal TermWindow Rendben New Terminal Terminal TermWindow Új terminál -Cursor text Terminal AppearancePrefView Kurzor szöveg Terminal couldn't start the shell. Sorry. Terminal TermApp Sajnos, a terminálnak nem sikerült elindítani a shellt. Match case Terminal FindWindow Betűérzékeny Quit Terminal TermWindow Kilépés @@ -20,8 +20,11 @@ Font: Terminal AppearancePrefView Betűtípus: Copy here Terminal TermView Másolás Really close? Terminal TermWindow Biztos bezárja? Copy Terminal TermWindow Másolás +Color scheme: Terminal AppearancePrefView Színösszeállítás: Window title: Terminal TermWindow Ablak címe: Unrecognized option \"%s\"\n Terminal arguments parsing Ismeretlen beállítás: %s\n +Blue Terminal colors scheme Kék +Custom Terminal colors scheme Egyéni %app% settings Terminal PrefWindow window title %app% beállítások Cancel Terminal SetTitleWindow Mégse Increase Terminal TermWindow Növelés @@ -45,6 +48,7 @@ The following processes are still running:\n\n\t%1\n\nIf you close the Terminal, Insert path Terminal TermView Útvonal beszúrása Haiku Terminal\nCopyright 2001-2009 Haiku, Inc.\nCopyright(C) 1999 Kazuho Okui and Takashi Murai.\n\nUsage: %s [OPTION] [SHELL]\n Terminal TermApp Haiku Terminál\nMinden jog fenntartva 2001-2009 Haiku, Inc.\nMinden jog fenntartva(C) 1999 Kazuho Okui és Takashi Murai.\n\nHasználata: %s [OPCIÓ] [SHELL]\n No search string was entered. Terminal TermWindow Nincs beírva keresendő szöveg +Font size Terminal TermWindow Betűméret Blinking cursor Terminal AppearancePrefView Villogó kurzor Don't save Terminal PrefWindow Nincs mentés Set window title Terminal TermWindow Ablak címének beállítása @@ -57,11 +61,15 @@ Find… Terminal TermWindow Keresés… The process \"%1\" is still running.\nIf you close the Terminal, the process will be killed. Terminal TermWindow A folyamat (%1) még fut.\nHa bezárja a Terminált, a folyamat megszakad. Move here Terminal TermView Mozgatás \t%d\t-\tThe current working directory of the active process in the\n\t\t\tcurrent tab. Optionally the maximum number of path components\n\t\t\tcan be specified. E.g. '%2d' for at most two components.\n\t%i\t-\tThe index of the window.\n\t%p\t-\tThe name of the active process in the current tab.\n\t%t\t-\tThe title of the current tab.\n\t%%\t-\tThe character '%'. Terminal ToolTips \t%d\t-\tAz a mappa amiben a jelenlegi fül az aktív folyamata\n\t\t\tfut épp.Meg lehet adni az elérési út\n\t\t\tkomponenseinek számát. Pl. '%2d' maximum két komponenshez.\n\t%i\t-\tAz ablak indexe.\n\t%p\t-\tA jelenlegi fülben futó folyamat neve.\n\t%t\t-\tA jelenlegi fül címe.\n\t%%\t-\tEgy '%' karakter. +Retro Terminal colors scheme Retro Error! Terminal getString Hiba! New tab Terminal TermWindow Új lap The pattern specifying the tab titles. The following placeholders\ncan be used:\n Terminal AppearancePrefView A fülek címét meghatározó minta. A következő kódok használhatóak: Selected background Terminal AppearancePrefView Kijelölés háttere +Slate Terminal colors scheme Pala +Midnight Terminal colors scheme Éjfél Decrease Terminal TermWindow Csökkentés +Default Terminal colors scheme Eredeti Create link here Terminal TermView Hivatkozás létrehozása Close Terminal TermWindow Bezárás Text Terminal AppearancePrefView Szöveg @@ -74,7 +82,6 @@ Set tab title Terminal TermWindow Lap címének beállítása Settings… Terminal TermWindow Beállítások… Abort Terminal Shell Megszakítás Edit Terminal TermWindow Szerkesztés -Cursor background Terminal AppearancePrefView Kurzor háttere Color: Terminal AppearancePrefView Szín: The pattern specifying the window title. The following placeholders\ncan be used:\n Terminal TermWindow Az ablak címét meghatározó minta. A következő kódok használhatóak: Print Terminal TermWindow Nyomtatás diff --git a/data/catalogs/apps/terminal/ja.catkeys b/data/catalogs/apps/terminal/ja.catkeys index a9312ca65c..f310164b88 100644 --- a/data/catalogs/apps/terminal/ja.catkeys +++ b/data/catalogs/apps/terminal/ja.catkeys @@ -1,10 +1,10 @@ -1 japanese x-vnd.Haiku-Terminal 1252738083 +1 japanese x-vnd.Haiku-Terminal 4226482962 Not found. Terminal TermWindow これ以上見つかりません。 Switch Terminals Terminal TermWindow ターミナルを切替える Change directory Terminal TermView ディレクトリを変更 +Professional Terminal colors scheme プロフェッショナル OK Terminal TermWindow OK New Terminal Terminal TermWindow 新しいターミナルを開く -Cursor text Terminal AppearancePrefView カーソル Terminal couldn't start the shell. Sorry. Terminal TermApp すみません、シェルを起動できませんでした。 Match case Terminal FindWindow 大文字と小文字を区別する Quit Terminal TermWindow 終了 @@ -20,8 +20,11 @@ Font: Terminal AppearancePrefView フォント: Copy here Terminal TermView カレントディレクトリへコピー Really close? Terminal TermWindow 本当に閉じますか? Copy Terminal TermWindow コピー +Color scheme: Terminal AppearancePrefView 配色: Window title: Terminal TermWindow ウィンドウタイトル: Unrecognized option \"%s\"\n Terminal arguments parsing Unrecognized option \"%s\"\n +Blue Terminal colors scheme ブルー +Custom Terminal colors scheme カスタム %app% settings Terminal PrefWindow window title %app% 設定 Cancel Terminal SetTitleWindow 中止 Increase Terminal TermWindow 大きく @@ -45,6 +48,7 @@ The following processes are still running:\n\n\t%1\n\nIf you close the Terminal, Insert path Terminal TermView パスを挿入 Haiku Terminal\nCopyright 2001-2009 Haiku, Inc.\nCopyright(C) 1999 Kazuho Okui and Takashi Murai.\n\nUsage: %s [OPTION] [SHELL]\n Terminal TermApp Haiku Terminal\nCopyright 2001-2009 Haiku, Inc.\nCopyright(C) 1999 Kazuho Okui and Takashi Murai.\n\nUsage: %s [OPTION] [SHELL]\n No search string was entered. Terminal TermWindow 検索テキストが入力されていません。 +Font size Terminal TermWindow フォントのサイズ Blinking cursor Terminal AppearancePrefView カーソルを点滅させる Don't save Terminal PrefWindow 保存しない Set window title Terminal TermWindow ウィンドウタイトルを設定 @@ -57,11 +61,15 @@ Find… Terminal TermWindow 検索… The process \"%1\" is still running.\nIf you close the Terminal, the process will be killed. Terminal TermWindow プロセス \"%1\" がまだ実行中です。\nTerminalを閉じると強制終了されます。 Move here Terminal TermView カレントディレクトリへ移動 \t%d\t-\tThe current working directory of the active process in the\n\t\t\tcurrent tab. Optionally the maximum number of path components\n\t\t\tcan be specified. E.g. '%2d' for at most two components.\n\t%i\t-\tThe index of the window.\n\t%p\t-\tThe name of the active process in the current tab.\n\t%t\t-\tThe title of the current tab.\n\t%%\t-\tThe character '%'. Terminal ToolTips \t%d\t-\t現在のタブへの実行中プロセスのカレントワーキングディレクトリ\n\t\t\tの表示。オプションでパス要素の最大値を\n\t\t\t指定できます。 例. '%2d' 最大 2 要素。\n\t%i\t-\tThe index of the window.\n\t%p\t-\t実行中プロセス名の現在のタプへの表示。\n\t%t\t-\t現在のタブのタイトル。\n\t%%\t-\t文字 '%' 。 +Retro Terminal colors scheme レトロ Error! Terminal getString エラー! New tab Terminal TermWindow 新しいタブ The pattern specifying the tab titles. The following placeholders\ncan be used:\n Terminal AppearancePrefView パターンはタブタイトルを指定します。次のプレースホルダーが\n使用できます:\n Selected background Terminal AppearancePrefView 選択されたテキストの背景 +Slate Terminal colors scheme スレート +Midnight Terminal colors scheme ミッドナイト Decrease Terminal TermWindow 小さく +Default Terminal colors scheme デフォルト Create link here Terminal TermView カレントディレクトリにリンク作成 Close Terminal TermWindow 閉じる Text Terminal AppearancePrefView テキスト @@ -74,7 +82,6 @@ Set tab title Terminal TermWindow タブのタイトルを設定 Settings… Terminal TermWindow 設定… Abort Terminal Shell 中断 Edit Terminal TermWindow 編集 -Cursor background Terminal AppearancePrefView カーソルの背景 Color: Terminal AppearancePrefView 色: The pattern specifying the window title. The following placeholders\ncan be used:\n Terminal TermWindow パターンはウィンドウタイトルを指定します。次のプレースホルダーが\n使用できます:\n Print Terminal TermWindow 印刷 diff --git a/data/catalogs/apps/terminal/pt_BR.catkeys b/data/catalogs/apps/terminal/pt_BR.catkeys index 424782f150..a887dad2f2 100644 --- a/data/catalogs/apps/terminal/pt_BR.catkeys +++ b/data/catalogs/apps/terminal/pt_BR.catkeys @@ -1,10 +1,9 @@ -1 portuguese (brazil) x-vnd.Haiku-Terminal 1252738083 +1 portuguese (brazil) x-vnd.Haiku-Terminal 1829613568 Not found. Terminal TermWindow Não localizado. Switch Terminals Terminal TermWindow Alternar Terminais Change directory Terminal TermView Mudar de pasta OK Terminal TermWindow OK New Terminal Terminal TermWindow Novo Terminal -Cursor text Terminal AppearancePrefView Texto do cursor Terminal couldn't start the shell. Sorry. Terminal TermApp Terminal não pôde iniciar o shell. Desculpe. Match case Terminal FindWindow Diferenciar maiúsculas de minúsculas Quit Terminal TermWindow Sair @@ -74,7 +73,6 @@ Set tab title Terminal TermWindow Definir o título da guia Settings… Terminal TermWindow Configurações... Abort Terminal Shell Cancelar Edit Terminal TermWindow Editar -Cursor background Terminal AppearancePrefView Plano de fundo do cursor Color: Terminal AppearancePrefView Cor: The pattern specifying the window title. The following placeholders\ncan be used:\n Terminal TermWindow O padrão especificando o título da janela. Os seguintes espaços reservados\npodem ser usados:\n Print Terminal TermWindow Imprimir diff --git a/data/catalogs/apps/terminal/sv.catkeys b/data/catalogs/apps/terminal/sv.catkeys index c2e9323986..255dbc3012 100644 --- a/data/catalogs/apps/terminal/sv.catkeys +++ b/data/catalogs/apps/terminal/sv.catkeys @@ -1,10 +1,9 @@ -1 swedish x-vnd.Haiku-Terminal 1252738083 +1 swedish x-vnd.Haiku-Terminal 1829613568 Not found. Terminal TermWindow Hittades ej. Switch Terminals Terminal TermWindow Växla terminal Change directory Terminal TermView Byt katalog OK Terminal TermWindow OK New Terminal Terminal TermWindow Ny terminal -Cursor text Terminal AppearancePrefView Markörtext Terminal couldn't start the shell. Sorry. Terminal TermApp Terminalen kunde inte starta skalet. Match case Terminal FindWindow Matcha gemener/versaler Quit Terminal TermWindow Avsluta @@ -74,7 +73,6 @@ Set tab title Terminal TermWindow Ange fliktitel Settings… Terminal TermWindow Inställningar... Abort Terminal Shell Avbryt Edit Terminal TermWindow Redigera -Cursor background Terminal AppearancePrefView Markörbakgrund Color: Terminal AppearancePrefView Färg: The pattern specifying the window title. The following placeholders\ncan be used:\n Terminal TermWindow Mönstret bestämmer fönstrets namn. Följande alternativ finns:\n Print Terminal TermWindow Skriv ut diff --git a/data/catalogs/kits/fi.catkeys b/data/catalogs/kits/fi.catkeys index fc976505fa..c82592ed8a 100644 --- a/data/catalogs/kits/fi.catkeys +++ b/data/catalogs/kits/fi.catkeys @@ -1,21 +1,29 @@ -1 finnish x-vnd.Haiku-libbe 864109244 +1 finnish x-vnd.Haiku-libbe 672385853 +gamma AboutWindow gamma +beta AboutWindow beeta %3.2f GiB StringForSize %3.2f gibitavua Written by: AboutWindow Tekijä: About %app% AboutMenuItem Ohjelmasta %app% Cut TextView Leikkaa +Version AboutWindow Versio Cannot create the replicant for \"%description\".\n%error ZombieReplicantView Ei voida luoda replikanttia kohteelle ”%description”.\n%error +About AboutWindow Ohjelmasta Copy TextView Kopioi %3.2f KiB StringForSize %3.2f kibitavua %d bytes StringForSize %d tavua +alpha AboutWindow alfa Error PrintJob Virhe No Pages to print! PrintJob Ei ole tulostettavia sivuja! +All Rights Reserved. AboutWindow All Rights Reserved. OK Dragger Valmis OK PrintJob Valmis Green: ColorControl Vihreä: +Version history: AboutWindow Versiohistoria: Remove replicant Dragger Poista replikantti OK ZombieReplicantView Valmis Print Server is not responding. PrintJob Tulostuspalvelin ei vastaa. Paste TextView Liitä +Special Thanks: AboutWindow Erityiskiitokset: %.2f TiB StringForSize %.2f tebitavua Cannot locate the application for the replicant. No application signature supplied.\n%error ZombieReplicantView Ei voi paikallistaa sovellusta replikantille. Sovellusallekirjoitusta ei ole tarjottu.\n%error Redo TextView Tee uudelleen @@ -26,6 +34,8 @@ Undo TextView Peru Red: ColorControl Punainen: %3.2f MiB StringForSize %3.2f mebitavua About %app… Dragger Ohjelmasta %app... +development AboutWindow ohjelmakehitys Error ZombieReplicantView Virhe Blue: ColorControl Sininen: +gold master AboutWindow gold master Can't delete this replicant from its original application. Life goes on. Dragger Ei voida poistaa tätä replikanttia sen alkuperäisestä sovelluksesta. Elämä jatkuu. diff --git a/data/catalogs/kits/ja.catkeys b/data/catalogs/kits/ja.catkeys index 508c8397bf..768688b063 100644 --- a/data/catalogs/kits/ja.catkeys +++ b/data/catalogs/kits/ja.catkeys @@ -1,4 +1,6 @@ -1 japanese x-vnd.Haiku-libbe 1560959841 +1 japanese x-vnd.Haiku-libbe 672385853 +gamma AboutWindow γ +beta AboutWindow β %3.2f GiB StringForSize %3.2f GiB Written by: AboutWindow 作者: About %app% AboutMenuItem %app% について @@ -9,8 +11,10 @@ About AboutWindow このソフトウェアについて… Copy TextView コピー %3.2f KiB StringForSize %3.2f KiB %d bytes StringForSize %d バイト +alpha AboutWindow α Error PrintJob エラー No Pages to print! PrintJob 印刷するページがありません。 +All Rights Reserved. AboutWindow All Rights Reserved. OK Dragger OK OK PrintJob OK Green: ColorControl 緑: @@ -19,6 +23,7 @@ Remove replicant Dragger レプリカントを削除 OK ZombieReplicantView OK Print Server is not responding. PrintJob プリントサーバーが応答しません。 Paste TextView 貼り付け +Special Thanks: AboutWindow Special Thanks: %.2f TiB StringForSize %.2f TiB Cannot locate the application for the replicant. No application signature supplied.\n%error ZombieReplicantView このレプリカント用のアプリケーションを見つけることができません。アプリケーション識別子が提供されていません。\n%error Redo TextView やり直し @@ -29,6 +34,7 @@ Undo TextView 元に戻す Red: ColorControl 赤: %3.2f MiB StringForSize %3.2f MiB About %app… Dragger %appについて… +development AboutWindow 開発版 Error ZombieReplicantView エラー Blue: ColorControl 青: gold master AboutWindow ゴールデンマスター diff --git a/data/catalogs/kits/tracker/fi.catkeys b/data/catalogs/kits/tracker/fi.catkeys index 38b0ab04a5..fc2e07d27c 100644 --- a/data/catalogs/kits/tracker/fi.catkeys +++ b/data/catalogs/kits/tracker/fi.catkeys @@ -1,4 +1,4 @@ -1 finnish x-vnd.Haiku-libtracker 1301055003 +1 finnish x-vnd.Haiku-libtracker 3955647850 common B_COMMON_DIRECTORY yhteinen OK WidgetAttributeText Valmis Icon view VolumeWindow Kuvakenäkymä @@ -452,6 +452,7 @@ Mount DeskWindow Liitä Mount ContainerWindow Liitä %capacity (%used used -- %free free) InfoWindow %capacity (%used käytetty -- %free vapaana) Cancel FSClipBoard Peru +Restart Deskbar DeskWindow Käynnistä Työpöytäpalkki uudelleen Cut more ContainerWindow Leikkaa lisää Deleting: StatusWindow Poistetaan: Empty Trash InfoWindow Tyhjennä roskakori diff --git a/data/catalogs/preferences/appearance/fi.catkeys b/data/catalogs/preferences/appearance/fi.catkeys index 4f65cd8bb8..ccd3e6232b 100644 --- a/data/catalogs/preferences/appearance/fi.catkeys +++ b/data/catalogs/preferences/appearance/fi.catkeys @@ -1,4 +1,4 @@ -1 finnish x-vnd.Haiku-Appearance 1428480647 +1 finnish x-vnd.Haiku-Appearance 2950529393 Plain font: Font view Pelkkä kirjasin: Control highlight Colors tab Kontrollin korostus Control border Colors tab Kontrollin reuna @@ -23,27 +23,33 @@ Tooltip background Colors tab Työkaluvinkin tausta Selected menu item background Colors tab Valitun valikkovalinnan tausta Antialiasing APRWindow Reunanpehmennys Navigation base Colors tab Navigoinnin pohja +Selected list item text Colors tab Valitun luettelorivin teksti Window border Colors tab Ikkunaraja +Double: DecorSettingsView Kaksikko: Window tab text Colors tab Ikkunakahvan teksti Document text Colors tab Dokumentin teksti Navigation pulse Colors tab Navigoinnin välke Window decorator: DecorSettingsView Ikkunan kehystäjä: Selected menu item text Colors tab Valitun valikkovalinnan teksti Menu background Colors tab Valikon tausta +List background Colors tab Luettelotausta OK DecorSettingsView Valmis Control mark Colors tab Ohjausmerkki Size: Font Selection view Koko: +Selected list item background Colors tab Valitun luettelorivin tausta Panel background Colors tab Paneelin tausta Menu font: Font view Valikkokirjasin: Colors APRWindow Värit Control background Colors tab Kontrollin tausta Inactive window tab Colors tab Epäaktiivisen ikkunakahvan väri +List item text Colors tab Luettelorivin teksti Appearance System name Ulkoasuasetukset Fixed font: Font view Tasalevyinen kirjasin: The quick brown fox jumps over the lazy dog. Font Selection view Don't translate this literally ! Use a phrase showing all chars from A to Z. Albert osti fagotin ja töräytti puhkuvan melodian. Reduce colored edges filter strength: AntialiasingSettingsView Vähennä värillisten reunojen suodatuksen vahvuutta: Subpixel based anti-aliasing in combination with glyph hinting is not available in this build of Haiku to avoid possible patent issues. To enable this feature, you have to build Haiku yourself and enable certain options in the libfreetype configuration header. AntialiasingSettingsView Alipikselipohjainen reunanpehmennys yhdistettynä kirjoitusmerkkiviimeistelyyn ei ole saatavilla tässä Haiku-versiossa patenttisyiden takia. Ominaisuuden saaminen käyttöön vaatii Haikun uudelleenkääntämistä ja eräiden optioiden aktivoimista libfreetype:n määrittelytiedostoissa. Control text Colors tab Kontrollin teksti +Single: DecorSettingsView Yksikkö: Tooltip text Colors tab Työkaluvinkin teksti Bold font: Font view Lihavoitu kirjasin: Inactive window border Colors tab Ei-aktiivinen ikkunaraja @@ -52,6 +58,7 @@ LCD subpixel AntialiasingSettingsView LCD alipikseli Selected menu item border Colors tab Valitun valikkovalinnan reuna Strong AntialiasingSettingsView Vahva Panel text Colors tab Paneelin teksti +Arrow style DecorSettingsView Nuolityyli Monospaced fonts only AntialiasingSettingsView Vain monospace-kirjasimet Look and feel APRWindow Ulkoasu ja käyttötuntuma Antialiasing menu AntialiasingSettingsView Reunanpehmennysvalikko diff --git a/data/catalogs/preferences/appearance/ja.catkeys b/data/catalogs/preferences/appearance/ja.catkeys index 98f34c160e..41e50d98af 100644 --- a/data/catalogs/preferences/appearance/ja.catkeys +++ b/data/catalogs/preferences/appearance/ja.catkeys @@ -1,4 +1,4 @@ -1 japanese x-vnd.Haiku-Appearance 580285868 +1 japanese x-vnd.Haiku-Appearance 2950529393 Plain font: Font view 標準フォント: Control highlight Colors tab コントロールのハイライト Control border Colors tab コントロールの境界 @@ -25,6 +25,7 @@ Antialiasing APRWindow アンチエイリアス Navigation base Colors tab ナビゲーション Selected list item text Colors tab リスト選択項目の文字 Window border Colors tab ウィンドウ枠 +Double: DecorSettingsView 両方向: Window tab text Colors tab ウィンドウタブの文字 Document text Colors tab ドキュメントの文字 Navigation pulse Colors tab ナビゲーションの点滅 @@ -48,6 +49,7 @@ The quick brown fox jumps over the lazy dog. Font Selection view Don't translate Reduce colored edges filter strength: AntialiasingSettingsView カラーエッジフィルターの強度を下げる Subpixel based anti-aliasing in combination with glyph hinting is not available in this build of Haiku to avoid possible patent issues. To enable this feature, you have to build Haiku yourself and enable certain options in the libfreetype configuration header. AntialiasingSettingsView このHaikuのビルドでは、グリフのヒンティングと組合せたサブピクセルベースのアンチエイリアスは特許問題の可能性を回避するため使用できません。有効にするには、Haikuをソースからビルドして、libfreetypeの設定ヘッダーファイル中の特定のオプションを有効にしなければなりません。 Control text Colors tab コントロールの文字 +Single: DecorSettingsView 一方向: Tooltip text Colors tab ツールチップの文字 Bold font: Font view 太字フォント: Inactive window border Colors tab 非アクティブなウィンドウ枠 diff --git a/data/catalogs/preferences/sounds/be.catkeys b/data/catalogs/preferences/sounds/be.catkeys index b9e3fc71bd..b6e90dc4dc 100644 --- a/data/catalogs/preferences/sounds/be.catkeys +++ b/data/catalogs/preferences/sounds/be.catkeys @@ -1,8 +1,7 @@ -1 belarusian x-vnd.Haiku-Sounds 3924145958 +1 belarusian x-vnd.Haiku-Sounds 150798324 Sounds System name Гукі No such file or directory HEventList Няма такога файла ці каталога OK SoundsHApp ОК -Sound File: HWindow Аўдыё файл: OK HEventList ОК OK HWindow ОК This is not an audio file. HWindow Гэта не аўдыё файл. diff --git a/data/catalogs/preferences/sounds/de.catkeys b/data/catalogs/preferences/sounds/de.catkeys index d7981cc451..9865d3d701 100644 --- a/data/catalogs/preferences/sounds/de.catkeys +++ b/data/catalogs/preferences/sounds/de.catkeys @@ -1,8 +1,7 @@ -1 german x-vnd.Haiku-Sounds 3924145958 +1 german x-vnd.Haiku-Sounds 150798324 Sounds System name Klänge No such file or directory HEventList Datei oder Ordner nicht gefunden OK SoundsHApp OK -Sound File: HWindow Klangdatei: OK HEventList OK OK HWindow OK This is not an audio file. HWindow Dies ist keine Audiodatei. diff --git a/data/catalogs/preferences/sounds/el.catkeys b/data/catalogs/preferences/sounds/el.catkeys index 795ceec7c4..7fa0f53548 100644 --- a/data/catalogs/preferences/sounds/el.catkeys +++ b/data/catalogs/preferences/sounds/el.catkeys @@ -1,8 +1,7 @@ -1 greek, modern (1453-) x-vnd.Haiku-Sounds 3924145958 +1 greek, modern (1453-) x-vnd.Haiku-Sounds 150798324 Sounds System name Sounds No such file or directory HEventList Δεν υπάρχει τέτοιο αρχείο ή κατάλογος OK SoundsHApp Εντάξει -Sound File: HWindow Αρχείο Ήχου: OK HEventList Εντάξει OK HWindow Εντάξει This is not an audio file. HWindow Αυτό δεν είναι ένα αρχείο ήχου. diff --git a/data/catalogs/preferences/sounds/fi.catkeys b/data/catalogs/preferences/sounds/fi.catkeys index a45c2f945f..147ed5453a 100644 --- a/data/catalogs/preferences/sounds/fi.catkeys +++ b/data/catalogs/preferences/sounds/fi.catkeys @@ -1,8 +1,7 @@ -1 finnish x-vnd.Haiku-Sounds 3924145958 +1 finnish x-vnd.Haiku-Sounds 150798324 Sounds System name Ääniasetukset No such file or directory HEventList Tiedostoa tai hakemistoa ei löydy OK SoundsHApp Valmis -Sound File: HWindow Äänitiedosto: OK HEventList Valmis OK HWindow Valmis This is not an audio file. HWindow Tämä ei ole äänitiedosto. diff --git a/data/catalogs/preferences/sounds/fr.catkeys b/data/catalogs/preferences/sounds/fr.catkeys index b980425faf..29db9edd0f 100644 --- a/data/catalogs/preferences/sounds/fr.catkeys +++ b/data/catalogs/preferences/sounds/fr.catkeys @@ -1,8 +1,7 @@ -1 french x-vnd.Haiku-Sounds 3924145958 +1 french x-vnd.Haiku-Sounds 150798324 Sounds System name Sons No such file or directory HEventList Pas de tel fichier ou répertoire OK SoundsHApp OK -Sound File: HWindow Fichier son : OK HEventList OK OK HWindow OK This is not an audio file. HWindow Ceci n'est pas un fichier audio. diff --git a/data/catalogs/preferences/sounds/hi.catkeys b/data/catalogs/preferences/sounds/hi.catkeys index e5742e87ab..67d592b9f0 100644 --- a/data/catalogs/preferences/sounds/hi.catkeys +++ b/data/catalogs/preferences/sounds/hi.catkeys @@ -1,8 +1,7 @@ -1 hindi x-vnd.Haiku-Sounds 3924145958 +1 hindi x-vnd.Haiku-Sounds 150798324 Sounds System name आवाजें No such file or directory HEventList ऐसी कोई फ़ाइल या निर्देशिका नही हैं OK SoundsHApp ठीक है -Sound File: HWindow ध्वनि फ़ाइल: OK HEventList ठीक है OK HWindow ठीक है This is not an audio file. HWindow यह एक ऑडियो फ़ाइल नहीं है diff --git a/data/catalogs/preferences/sounds/hu.catkeys b/data/catalogs/preferences/sounds/hu.catkeys index a7b4244172..dddd5e4f28 100644 --- a/data/catalogs/preferences/sounds/hu.catkeys +++ b/data/catalogs/preferences/sounds/hu.catkeys @@ -1,8 +1,7 @@ -1 hungarian x-vnd.Haiku-Sounds 3924145958 +1 hungarian x-vnd.Haiku-Sounds 150798324 Sounds System name Hangok No such file or directory HEventList Nem található ilyen fájl vagy mappa OK SoundsHApp Rendben -Sound File: HWindow Hangfájl: OK HEventList Rendben OK HWindow Rendben This is not an audio file. HWindow Ez nem egy hangfájl. diff --git a/data/catalogs/preferences/sounds/ja.catkeys b/data/catalogs/preferences/sounds/ja.catkeys index a7bbf020af..7b7fa08333 100644 --- a/data/catalogs/preferences/sounds/ja.catkeys +++ b/data/catalogs/preferences/sounds/ja.catkeys @@ -1,8 +1,7 @@ -1 japanese x-vnd.Haiku-Sounds 3924145958 +1 japanese x-vnd.Haiku-Sounds 150798324 Sounds System name サウンド No such file or directory HEventList ファイルまたはフォルダーがありません OK SoundsHApp OK -Sound File: HWindow サウンドファイル: OK HEventList OK OK HWindow OK This is not an audio file. HWindow オーディオファイルではありません。 diff --git a/data/catalogs/preferences/sounds/lt.catkeys b/data/catalogs/preferences/sounds/lt.catkeys index 95925f579a..cab87d72ea 100644 --- a/data/catalogs/preferences/sounds/lt.catkeys +++ b/data/catalogs/preferences/sounds/lt.catkeys @@ -1,8 +1,7 @@ -1 lithuanian x-vnd.Haiku-Sounds 3924145958 +1 lithuanian x-vnd.Haiku-Sounds 150798324 Sounds System name Garsai No such file or directory HEventList Tokio failo ar aplanko nėra OK SoundsHApp Gerai -Sound File: HWindow Garso failas: OK HEventList Gerai OK HWindow Gerai This is not an audio file. HWindow Tai nėra garso failas. diff --git a/data/catalogs/preferences/sounds/nl.catkeys b/data/catalogs/preferences/sounds/nl.catkeys index db041bc048..9e086c7d71 100644 --- a/data/catalogs/preferences/sounds/nl.catkeys +++ b/data/catalogs/preferences/sounds/nl.catkeys @@ -1,8 +1,7 @@ -1 dutch; flemish x-vnd.Haiku-Sounds 3924145958 +1 dutch; flemish x-vnd.Haiku-Sounds 150798324 Sounds System name Geluiden No such file or directory HEventList Geen dergelijk bestand of map OK SoundsHApp Oké -Sound File: HWindow Geluidsbestand: OK HEventList Oké OK HWindow Oké This is not an audio file. HWindow Dit is geen geluidsbestand. diff --git a/data/catalogs/preferences/sounds/pl.catkeys b/data/catalogs/preferences/sounds/pl.catkeys index 6f0c7e0286..8b30661f3f 100644 --- a/data/catalogs/preferences/sounds/pl.catkeys +++ b/data/catalogs/preferences/sounds/pl.catkeys @@ -1,8 +1,7 @@ -1 polish x-vnd.Haiku-Sounds 3924145958 +1 polish x-vnd.Haiku-Sounds 150798324 Sounds System name Dźwięki No such file or directory HEventList Nie znaleziono pliku/folderu OK SoundsHApp OK -Sound File: HWindow Plik audio: OK HEventList OK OK HWindow OK This is not an audio file. HWindow To nie jest plik audio. diff --git a/data/catalogs/preferences/sounds/pt_BR.catkeys b/data/catalogs/preferences/sounds/pt_BR.catkeys index d2ae37f278..4a49a9f809 100644 --- a/data/catalogs/preferences/sounds/pt_BR.catkeys +++ b/data/catalogs/preferences/sounds/pt_BR.catkeys @@ -1,8 +1,7 @@ -1 portuguese (brazil) x-vnd.Haiku-Sounds 3924145958 +1 portuguese (brazil) x-vnd.Haiku-Sounds 150798324 Sounds System name Sons No such file or directory HEventList Arquivo ou pasta inexistente OK SoundsHApp OK -Sound File: HWindow Arquivo de som: OK HEventList OK OK HWindow OK This is not an audio file. HWindow Isto não é um arquivo de áudio. diff --git a/data/catalogs/preferences/sounds/ro.catkeys b/data/catalogs/preferences/sounds/ro.catkeys index b43b3ab9ba..e8f9ce0f50 100644 --- a/data/catalogs/preferences/sounds/ro.catkeys +++ b/data/catalogs/preferences/sounds/ro.catkeys @@ -1,8 +1,7 @@ -1 romanian x-vnd.Haiku-Sounds 3924145958 +1 romanian x-vnd.Haiku-Sounds 150798324 Sounds System name Sunete No such file or directory HEventList Niciun astfel de fișier sau dosar OK SoundsHApp OK -Sound File: HWindow Fișier de sunet: OK HEventList OK OK HWindow OK This is not an audio file. HWindow Acesta nu este un fișier audio. diff --git a/data/catalogs/preferences/sounds/ru.catkeys b/data/catalogs/preferences/sounds/ru.catkeys index 1894ca9d00..3b433a18fd 100644 --- a/data/catalogs/preferences/sounds/ru.catkeys +++ b/data/catalogs/preferences/sounds/ru.catkeys @@ -1,8 +1,7 @@ -1 russian x-vnd.Haiku-Sounds 3924145958 +1 russian x-vnd.Haiku-Sounds 150798324 Sounds System name Звуки No such file or directory HEventList Такого файла или папки не существует OK SoundsHApp ОК -Sound File: HWindow Аудиофайл: OK HEventList ОК OK HWindow ОК This is not an audio file. HWindow Это не аудиофайл. diff --git a/data/catalogs/preferences/sounds/sk.catkeys b/data/catalogs/preferences/sounds/sk.catkeys index 76270ccffd..a5cb4bab9b 100644 --- a/data/catalogs/preferences/sounds/sk.catkeys +++ b/data/catalogs/preferences/sounds/sk.catkeys @@ -1,8 +1,7 @@ -1 slovak x-vnd.Haiku-Sounds 3924145958 +1 slovak x-vnd.Haiku-Sounds 150798324 Sounds System name Zvuky No such file or directory HEventList Taký súbor alebo adresár neexistuje OK SoundsHApp OK -Sound File: HWindow Zvukový súbor: OK HEventList OK OK HWindow OK This is not an audio file. HWindow Toto nie je zvukový súbor. diff --git a/data/catalogs/preferences/sounds/sv.catkeys b/data/catalogs/preferences/sounds/sv.catkeys index ef5908d5f7..2787ab974c 100644 --- a/data/catalogs/preferences/sounds/sv.catkeys +++ b/data/catalogs/preferences/sounds/sv.catkeys @@ -1,8 +1,7 @@ -1 swedish x-vnd.Haiku-Sounds 3924145958 +1 swedish x-vnd.Haiku-Sounds 150798324 Sounds System name Ljud No such file or directory HEventList Ingen sådan fil eller katalog OK SoundsHApp OK -Sound File: HWindow Ljudfil: OK HEventList OK OK HWindow OK This is not an audio file. HWindow Detta är ingen ljudfil. diff --git a/data/catalogs/preferences/sounds/uk.catkeys b/data/catalogs/preferences/sounds/uk.catkeys index ba2cc29b47..9de72f798d 100644 --- a/data/catalogs/preferences/sounds/uk.catkeys +++ b/data/catalogs/preferences/sounds/uk.catkeys @@ -1,8 +1,7 @@ -1 ukrainian x-vnd.Haiku-Sounds 3924145958 +1 ukrainian x-vnd.Haiku-Sounds 150798324 Sounds System name Звуки No such file or directory HEventList Немає такого файлу або папки OK SoundsHApp Гаразд -Sound File: HWindow Звуковий файл: OK HEventList Гаразд OK HWindow Гаразд This is not an audio file. HWindow Це не аудіо файл. diff --git a/data/catalogs/preferences/sounds/zh_Hans.catkeys b/data/catalogs/preferences/sounds/zh_Hans.catkeys index 047b7b548e..1703662a04 100644 --- a/data/catalogs/preferences/sounds/zh_Hans.catkeys +++ b/data/catalogs/preferences/sounds/zh_Hans.catkeys @@ -1,8 +1,7 @@ -1 english x-vnd.Haiku-Sounds 3924145958 +1 english x-vnd.Haiku-Sounds 150798324 Sounds System name 声音 No such file or directory HEventList 该文件或者目录不存在。 OK SoundsHApp 确定 -Sound File: HWindow 声音文件: OK HEventList 确定 OK HWindow 确定 This is not an audio file. HWindow 该文件不是音频文件。 diff --git a/data/catalogs/servers/debug/de.catkeys b/data/catalogs/servers/debug/de.catkeys index 0f029db5eb..5c39619dc4 100644 --- a/data/catalogs/servers/debug/de.catkeys +++ b/data/catalogs/servers/debug/de.catkeys @@ -1,4 +1,3 @@ -1 german x-vnd.Haiku-debug_server 945172012 +1 german x-vnd.Haiku-debug_server 3203333611 Debug DebugServer Debug -Kill DebugServer Beenden erzwingen The application:\n\n %app\n\nhas encountered an error which prevents it from continuing. Haiku will terminate the application and clean up. DebugServer Die Anwendung:\n\n %app\n\nist auf einen Fehler gestoßen und kann nicht weiter ausgeführt werden. Haiku wird die Anwendung beenden und das System säubern. diff --git a/data/catalogs/servers/debug/fr.catkeys b/data/catalogs/servers/debug/fr.catkeys index b977c2618c..3cac33e52c 100644 --- a/data/catalogs/servers/debug/fr.catkeys +++ b/data/catalogs/servers/debug/fr.catkeys @@ -1,4 +1,3 @@ -1 french x-vnd.Haiku-debug_server 945172012 +1 french x-vnd.Haiku-debug_server 3203333611 Debug DebugServer Déboguer -Kill DebugServer Tuer The application:\n\n %app\n\nhas encountered an error which prevents it from continuing. Haiku will terminate the application and clean up. DebugServer L'application :\n\n %app\n\na rencontré une erreur l'empêchant de continuer. Haiku va fermer l'application et libérer ses ressources. diff --git a/data/catalogs/servers/debug/hu.catkeys b/data/catalogs/servers/debug/hu.catkeys index ab653946ad..eab8ece8e4 100644 --- a/data/catalogs/servers/debug/hu.catkeys +++ b/data/catalogs/servers/debug/hu.catkeys @@ -1,4 +1,3 @@ -1 hungarian x-vnd.Haiku-debug_server 945172012 +1 hungarian x-vnd.Haiku-debug_server 3203333611 Debug DebugServer Hibakeresés -Kill DebugServer Megszakítás The application:\n\n %app\n\nhas encountered an error which prevents it from continuing. Haiku will terminate the application and clean up. DebugServer A következő program:\n\n %app\n\nhibába ütközött, és nem tud tovább futni. A Haiku leállítja a programot. diff --git a/data/catalogs/servers/debug/ja.catkeys b/data/catalogs/servers/debug/ja.catkeys index 0fe95c9e7e..ba7444b8d8 100644 --- a/data/catalogs/servers/debug/ja.catkeys +++ b/data/catalogs/servers/debug/ja.catkeys @@ -1,4 +1,3 @@ -1 japanese x-vnd.Haiku-debug_server 945172012 +1 japanese x-vnd.Haiku-debug_server 3203333611 Debug DebugServer デバッグ -Kill DebugServer 強制終了 The application:\n\n %app\n\nhas encountered an error which prevents it from continuing. Haiku will terminate the application and clean up. DebugServer アプリケーション:\n\n %app\n\nは、エラーのため続行できません。Haiku はアプリケーションを終了し、後始末をします。 diff --git a/data/catalogs/servers/debug/pt_BR.catkeys b/data/catalogs/servers/debug/pt_BR.catkeys index 4782a4f050..8a29165750 100644 --- a/data/catalogs/servers/debug/pt_BR.catkeys +++ b/data/catalogs/servers/debug/pt_BR.catkeys @@ -1,4 +1,3 @@ -1 portuguese (brazil) x-vnd.Haiku-debug_server 945172012 +1 portuguese (brazil) x-vnd.Haiku-debug_server 3203333611 Debug DebugServer Depurar -Kill DebugServer Matar The application:\n\n %app\n\nhas encountered an error which prevents it from continuing. Haiku will terminate the application and clean up. DebugServer A aplicação:\n\n %app\n\nencontrou um erro que a impede de continuar. Haiku irá fechar a aplicação. diff --git a/data/catalogs/servers/debug/sv.catkeys b/data/catalogs/servers/debug/sv.catkeys index b098b1b1d7..0dc0a5a263 100644 --- a/data/catalogs/servers/debug/sv.catkeys +++ b/data/catalogs/servers/debug/sv.catkeys @@ -1,4 +1,3 @@ -1 swedish x-vnd.Haiku-debug_server 945172012 +1 swedish x-vnd.Haiku-debug_server 3203333611 Debug DebugServer Felsök -Kill DebugServer Döda The application:\n\n %app\n\nhas encountered an error which prevents it from continuing. Haiku will terminate the application and clean up. DebugServer Programmet:\n\n %app\n\nhar stött på ett fel som förhindrar den från att fortsätta. Haiku kommer att avsluta programmet och stöda upp. diff --git a/docs/user/Doxyfile b/docs/user/Doxyfile index b9f030f261..cfbbf00967 100644 --- a/docs/user/Doxyfile +++ b/docs/user/Doxyfile @@ -601,7 +601,7 @@ WARN_LOGFILE = INPUT = . \ app \ drivers \ - game \ + game \ interface \ keyboard \ locale \ @@ -614,6 +614,7 @@ INPUT = . \ ../../headers/os/drivers/fs_interface.h \ ../../headers/os/drivers/USB3.h \ ../../headers/os/drivers/USB_spec.h \ + ../../headers/os/game \ ../../headers/os/interface \ ../../headers/os/locale \ ../../headers/os/media \ diff --git a/docs/user/app/Cursor.dox b/docs/user/app/Cursor.dox new file mode 100644 index 0000000000..56d9dbe7e9 --- /dev/null +++ b/docs/user/app/Cursor.dox @@ -0,0 +1,292 @@ +/* + * Copyright 2012 Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * John Scipione, jscipione@gmail.com + * + * Corresponds to: + * /trunk/headers/os/app/Cursor.h hrev45039 + * /trunk/src/kits/app/Cursor.cpp hrev45039 + */ + + +/*! + \file Cursor.h + \brief Provides the BCursor class. +*/ + + +/*! + \enum BCursorID + List of predefined cursor IDs +*/ + + +/*! + \var BCursorID B_CURSOR_ID_SYSTEM_DEFAULT + System default cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_CONTEXT_MENU + Context menu cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_COPY + Copy cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_CREATE_LINK + Symlink cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_CROSS_HAIR + Cross hairs cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_FOLLOW_LINK + Follow html link cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_GRAB + Grab cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_GRABBING + Grabbing cursor (mouse down) +*/ + + +/*! + \var BCursorID B_CURSOR_ID_HELP + Help cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_I_BEAM + I beam cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_I_BEAM_HORIZONTAL + Horizontal I beam cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_MOVE + Move cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_NO_CURSOR + No cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_NOT_ALLOWED + Not allowed cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_PROGRESS + Progress cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_RESIZE_NORTH + Resize north cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_RESIZE_EAST + Resize east cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_RESIZE_SOUTH + Resize south cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_RESIZE_WEST + Resize west cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_RESIZE_NORTH_EAST + Resize north east cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_RESIZE_NORTH_WEST + Resize north west cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_RESIZE_SOUTH_EAST + Resize south east cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_RESIZE_SOUTH_WEST + Resize south west cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_RESIZE_NORTH_SOUTH + Resize north south cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_RESIZE_EAST_WEST + Resize east west cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_RESIZE_NORTH_EAST_SOUTH_WEST + Resize north east south west cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_RESIZE_NORTH_WEST_SOUTH_EAST + Resize north west south east cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_ZOOM_IN + Zoom in cursor +*/ + + +/*! + \var BCursorID B_CURSOR_ID_ZOOM_OUT + Zoom out cursor +*/ + + +/*! + \class BCursor + \ingroup app + \brief BCursor describes a view-wide or application-wide cursor. + + \note As BeOS only supports 16x16 monochrome cursors, to see a nice + shadowed one we will need to extend this. +*/ + + +/*! + \fn BCursor::BCursor(const void* cursorData) + \brief Initializes a new cursor object. + + If the \a cursorData parameter is not \c NULL then the cursor is initialized + with the cursor data. + + \param cursorData The cursor data. +*/ + + +/*! + \fn BCursor::BCursor(BCursorID id) + \brief Initializes a new cursor object from a predefined cursor \a id. + + \param id The predefined \a id to initialize to. +*/ + + +/*! + \fn BCursor::BCursor(const BCursor& other) + \brief Initializes a new cursor object from another cursor object. + + \param other The cursor object to initialize from. +*/ + + +/*! + \fn BCursor::BCursor(BMessage* data) + \brief Initializes a new cursor object from a message archive. + + \param data The message data to initialize from. +*/ + + +/*! + \fn BCursor::~BCursor() + \brief Destroy the cursor and free it's memory. +*/ + + +/*! + status_t BCursor::Archive(BMessage *into, bool deep) const + \brief Archive the cursor. Not implemented. +*/ + + +/*! + BArchivable* BCursor::Instantiate(BMessage *data) + \brief Instantiate the cursor from a message. Not implemented. +*/ + + +/*! + BCursor& BCursor::operator=(const BCursor& other) + \brief Set the cursor to another cursor object. + + \param other The cursor object to copy from. + + \returns the new cursor object. +*/ + + +/*! + bool BCursor::operator==(const BCursor& other) const + \brief Compare a cursor object to another and return if they are equal. + + \param other The cursor object to compare to. + + \returns \c true if the cursor objects are equal, \c false if the cursor + objects are not equal. +*/ + + +/*! + bool BCursor::operator!=(const BCursor& other) const + \brief Compare a cursor object to another and return if they are not equal. + + \param other The cursor object to compare to. + + \returns \c true if the cursor objects are not equal, \c false if the cursor + objects are equal. +*/ diff --git a/docs/user/book.css b/docs/user/book.css index 649b285599..e5d0fc4e3d 100644 --- a/docs/user/book.css +++ b/docs/user/book.css @@ -480,7 +480,7 @@ div.fragment pre.fragment { font-family: "Deja Vu Mono", Courier, "Courier New", monospace, fixed; font-weight: normal; font-style: normal; - font-size: 0.9em; + font-size: 13px; line-height: 1.3; } div.fragment pre.fragment a.code { diff --git a/docs/user/game/DirectWindow.dox b/docs/user/game/DirectWindow.dox new file mode 100644 index 0000000000..53b042d8bd --- /dev/null +++ b/docs/user/game/DirectWindow.dox @@ -0,0 +1,281 @@ +/* + * Copyright 2012 Haiku, Inc. All rights reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * John Scipione, jscipione@gmail.com + * + * Corresponds to: + * src/kits/game/DirectWindow.cpp hrev45044 + * src/kits/game/DirectWindow.h hrev45044 + */ + + +/*! + \file DirectWindow.h + \brief Provides the DirectWindow class. +*/ + + +/*! + \enum direct_buffer_state + Direct buffer state constants +*/ + + +/*! + \enum direct_driver_state + Direct driver state constants +*/ + + +/*! + \struct direct_buffer_info + Direct butter info struct +*/ + + +/*! + \var direct_buffer_info::buffer_state + State of the direct buffer access privileges. + It can have one of the following values: + - \c B_DIRECT_MODE_MASK + - \c B_DIRECT_START + - \c B_DIRECT_MODIFY + - \c B_DIRECT_STOP + - \c B_BUFFER_MOVED + - \c B_BUFFER_RESET + - \c B_BUFFER_RESIZED + - \c B_CLIPPING_MODIFIED +*/ + + +/*! + \var direct_buffer_info::driver_state + State of the graphics card on which your direct window is displayed. + There are two possible values: + - \c B_MODE_CHANGED The resolution or color depth has changed. + - \c B_DRIVER_CHANGED The window was moved onto another monitor. +*/ + + +/*! + \var direct_buffer_info::bits + Pointer to the frame buffer in your team's memory space. +*/ + + +/*! + \var direct_buffer_info::pci_bits + Pointer to the frame buffer in the PCI memory space. This value is + typically needed to control DMA. +*/ + +/*! + \var direct_buffer_info::bytes_per_row + Number of bytes used to represent a single row of pixels in the frame buffer. +*/ + + +/*! + \var direct_buffer_info::bits_per_pixel + number of bits actually used to store a single pixel, including reserved, + unused, or alpha channel bits. This value is usually a multiple of eight. +*/ + + +/*! + \var direct_buffer_info::pixel_format + The format used to encode a pixel as defined by the \c color_space type. +*/ + +/*! + \var direct_buffer_info::layout + Reserved for future use. +*/ + +/*! + \var direct_buffer_info::orientation + Reserved for future use. +*/ + +/*! + \var direct_buffer_info::_reserved[9] + Reserved for future use. +*/ + +/*! + \var direct_buffer_info::_dd_type_ + Reserved for future use. +*/ + +/*! + \var direct_buffer_info::_dd_token_ + Reserved for future use. +*/ + +/*! + \var direct_buffer_info::clip_list_count + Number of rectangles in \c clip_list. +*/ + +/*! + \var direct_buffer_info::window_bounds + Rectangle that defines the full content area of the window in screen + coordinates. +*/ + +/*! + \var direct_buffer_info::clip_bounds + Bounding rectangle of the visible part of the content area of the window + in screen coordinates. +*/ + + +/*! + \var direct_buffer_info::clip_list + List of rectangles that together define the visible region of the content + area of the window in screen coordinates. +*/ + + +/*! + \class BDirectWindow + \ingroup game + \ingroup libbe + \brief Provides direct access to the video card graphics frame buffer. +*/ + + +/*! + \fn BDirectWindow::BDirectWindow(BRect frame, const char *title, + window_type type, uint32 flags, uint32 workspace) + \brief Creates and initializes a BDirectWindow object. + + \param frame The initial frame rectangle of the window. + \param title The title of the Window. + \param type Window type (see BWindow). + \param flags Window flags (see BWindow). + \param workspace Workspace of the direct window (see BWindow). +*/ + + +/*! + \fn BDirectWindow::BDirectWindow(BRect frame, const char *title, + window_look look, window_feel feel, uint32 flags, uint32 workspace) + \brief Creates and initializes a BDirectWindow object. + + \param frame The initial frame rectangle of the window. + \param title The title of the Window. + \param look Window look (see BWindow). + \param feel Window feel (see BWindow). + \param flags Window flags (see BWindow). + \param workspace Workspace of the direct window (see BWindow). +*/ + + +/*! + \fn BDirectWindow::~BDirectWindow() + \brief Destroys the BDirectWindow and frees all memory used by it. + + Do not delete a BDirectWindow object directly, call Quit() instead. + + Destroying a BDirectWindow involves a few steps to make sure that it + is disconnected and cleaned up. + + Set the fConnectionDisabled flag to \c true to prevent DirectConnected() + from attempting to reconnect while it's being destroyed. + + next call Hide() and finally Sync() to force the direct window to + disconnect from direct access. + + Once these steps are complete you may do your usual destructor work. +*/ + + +/*! + \fn BArchivable* BDirectWindow::Instantiate(BMessage *data) + \brief Instantiate window from message \a data. Not implemented. +*/ + + +/*! + \fn status_t BDirectWindow::Archive(BMessage *data, bool deep) const + \brief Archive window into message \a data. Not implemented. +*/ + + +/*! + \fn void BDirectWindow::DirectConnected(direct_buffer_info *info) + \brief hook function called when your application learns about the state + of the graphics display and changes occur. + + This is the heart of BDirectWindow. + + \param info The \c direct_buffer_info struct +*/ + + +/*! + \fn status_t BDirectWindow::GetClippingRegion(BRegion *region, + BPoint *origin) const + \brief Sets \a region to the current clipping region of the direct window. + + If \a origin is not \c NULL, the \a region is offset by \a origin. + + \warning GetClippingRegion() should only be called from within the + DirectConnected() method. If called outside GetClippingRegion() will + return \c B_ERROR. + + \param region The clipping region to fill out. + \param origin An origin to offset the region by. + + \returns A status code. + \retval B_OK Everything went as expected. + \retval B_BAD_VALUE \a region was NULL. + \retval B_ERROR Window not locked or not in DirectConnected() method. + \retval B_NO_MEMORY Not enough memory to fill \a region +*/ + + +/*! + \fn status_t BDirectWindow::SetFullScreen(bool enable) + \brief Enables or disables full-screen mode. + + The SupportsWindowMode() method determines whether or not the video card + is capable of supporting windowed mode. + + When the window is in full screen mode it will always have the focus and + no other window can be in front of it. + + \param enable \c true to enable fullscreen mode, \c false for windowed mode. + + \returns A status code. + \retval B_OK Everything went as expected. + \retval B_ERROR An error occurred while trying to switch between full screen + and windowed mode. + + \see BDirectWindow::SupportsWindowMode() +*/ + + +/*! + \fn bool BDirectWindow::IsFullScreen() const + \brief Returns whether the window is in full-screen or windowed mode. + + \returns \c true if in full-screen mode, \c false if in windowed mode. +*/ + + +/*! + \fn static bool BDirectWindow::SupportsWindowMode(screen_id id) + \brief Returns whether or not the specified screen supports windowed mode. + + Because this is a static function you don't have to construct a + BDirectWindow object to call it. + + \param id The id of the screen you want to check, \c B_MAIN_SCREEN_ID by + default. + + \returns \c true if the screen support windowed mode, \c false otherwise. +*/ diff --git a/docs/user/interface/BDragger_example.png b/docs/user/interface/BDragger_example.png new file mode 100644 index 0000000000..11693a204a Binary files /dev/null and b/docs/user/interface/BDragger_example.png differ diff --git a/docs/user/interface/Button.dox b/docs/user/interface/Button.dox index 6bcd7d7bba..9932b70da5 100644 --- a/docs/user/interface/Button.dox +++ b/docs/user/interface/Button.dox @@ -169,36 +169,6 @@ */ -/*! - \fn void BButton::MouseDown(BPoint point) - \brief Hook method that is called when a mouse button is pressed. - - \param point The point on the screen where to mouse pointer is when - the mouse button is pressed. - - \sa BView::MouseDown() -*/ - - -/*! - \fn void BButton::AttachedToWindow() - \brief Hook method that is called when the object is attached to a - window. - - \sa BControl::AttachedToWindow() -*/ - - -/*! - \fn void BButton::KeyDown(const char *bytes, int32 numBytes) - \brief Hook method that is called when a keyboard key is pushed down. - to the window. - - \param bytes The key pressed. - \param numBytes The number of keys pressed. -*/ - - /*! \fn void BButton::MakeDefault(bool flag) \brief Make the BButton the default button i.e. it will be activated @@ -258,14 +228,6 @@ */ -/*! - \fn void BButton::ResizeToPreferred() - \brief Resizes the BButton to its preferred size. - - \see BView::ResizeToPreferred() -*/ - - /*! \fn status_t BButton::Invoke(BMessage *message) \brief The BButton is invoked from a message. @@ -282,88 +244,3 @@ \see BControl::Invoke() */ - - -/*! - \fn void BButton::FrameMoved(BPoint newLocation) - \brief Hook method that is called when the BButton has moved. - - \param newLocation The location on the screen that the BButton - is moved to. - - \see BView::FrameMoved(); -*/ - - -/*! - \fn void BButton::FrameResized(float width, float height) - \brief Hook method that is called when the BButton changes size. - - \param width the new \a width of the BButton - \param height the new \a height of the BButton - - \see BView::FrameResized(); -*/ - - -/*! - \fn void BButton::MakeFocus(bool focused) - \brief Focus or unfocus the BButton. - - \param focused If \c true focus the button, otherwise remove focus from - the button. - - \see BControl::MakeFocus() -*/ - - -/*! - \fn status_t BButton::Perform(perform_code code, void* _data) - \brief Perform an action on the BButton. - - \param code The \a perform_code. One of the following: - \li \c PERFORM_CODE_MIN_SIZE - \li \c PERFORM_CODE_MAX_SIZE - \li \c PERFORM_CODE_PREFERRED_SIZE - \li \c PERFORM_CODE_LAYOUT_ALIGNMENT - \li \c PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH - \li \c PERFORM_CODE_GET_HEIGHT_FOR_WIDTH - \li \c PERFORM_CODE_SET_LAYOUT - \li \c PERFORM_CODE_INVALIDATE_LAYOUT - \li \c PERFORM_CODE_DO_LAYOUT - \param _data Data to use to act on. - - \returns \c B_OK if the action was successful or an error code if not. -*/ - - -/*! - \fn void BButton::InvalidateLayout(bool descendants) - \brief Redraws the BButton. - - \param descendants Redraw subviews as well. -*/ - - -/*! - \fn BSize BButton::MinSize() - \brief Returns the minimum size of the BButton. - - \returns The minimum BButton size as a BSize -*/ - - -/*! - \fn BSize BButton::MaxSize() - \brief Returns the maximum size of the BButton. - - \returns The maximum BButton size as a BSize -*/ - - -/*! - \fn BSize BButton::PreferredSize() - \brief Returns the preferred size of the BButton. - - \returns The preferred BButton size as a BSize -*/ diff --git a/docs/user/interface/CheckBox.dox b/docs/user/interface/CheckBox.dox index 917a272730..95c5607de7 100644 --- a/docs/user/interface/CheckBox.dox +++ b/docs/user/interface/CheckBox.dox @@ -126,28 +126,6 @@ */ -/*! - \fn void BCheckBox::FrameMoved(BPoint newLocation) - \brief Hook method that gets called when the checkbox is moved. - - \param newLocation The point that the top left corner of the frame - is moved to. - - \sa BView::FrameMoved() -*/ - - -/*! - \fn void BCheckBox::FrameResized(float width, float height) - \brief Hook method that gets called when the checkbox is resized. - - \param width The new \a width of the checkbox. - \param height The new \a height of the checkbox. - - \sa BView::FrameResized() -*/ - - /*! \fn void BCheckBox::GetPreferredSize(float* _width, float* _height) \brief Fill out the preferred width and height of the checkbox @@ -160,64 +138,6 @@ */ -/*! - \fn void BCheckBox::ResizeToPreferred() - \brief Resize the checkbox to its preferred size. - - \sa BView::ResizeToPreferred() -*/ - - -/*! - \fn void BCheckBox::InvalidateLayout(bool descendants) - \brief \brief Redraws the checkbox. - - \param descendants Redraw child views as well. - - \sa BLayout::InvalidateLayout() -*/ - - -/*! - \fn BSize BCheckBox::MinSize() - \brief Get the minimum size of the checkbox. - - \return The minimum size of the checkbox as a BSize. - - \sa BAbstractLayout::MinSize() -*/ - - -/*! - \fn BSize BCheckBox::MaxSize() - \brief Get the maximum size of the checkbox. - - \return The maximum size of the checkbox as a BSize. - - \sa BAbstractLayout::MaxSize() -*/ - - -/*! - \fn BSize BCheckBox::PreferredSize() - \brief Get the preferred size of the checkbox. - - \return The preferred size of the checkbox as a BSize. - - \sa BAbstractLayout::PreferredSize() -*/ - - -/*! - \fn void BCheckBox::MakeFocus(bool focused) - \brief Gives or removes focus from the checkbox. - - \param focused \a true to set focus, \a false to remove it. - - \sa BControl::MakeFocus() -*/ - - /*! \fn void BCheckBox::SetValue(int32 value) \brief Turn the checkbox on or off. @@ -227,13 +147,3 @@ \sa BControl::SetValue() */ - - -/*! - \fn status_t BCheckBox::Invoke(BMessage *message) - \brief Tells the messenger to send a message. - - \param message The \a message to send. - - \sa BInvoker::Invoke() -*/ diff --git a/docs/user/interface/Dragger.dox b/docs/user/interface/Dragger.dox new file mode 100644 index 0000000000..d86936e9a8 --- /dev/null +++ b/docs/user/interface/Dragger.dox @@ -0,0 +1,191 @@ +/* + * Copyright 2012 Haiku inc. + * Distributed under the terms of the MIT License. + * + * Documentation by: + * John Scipione, jscipione@gmail.com + * + * Corresponds to: + * /trunk/headers/os/interface/Dragger.h hrev45050 + * /trunk/src/kits/interface/Dragger.cpp hrev45050 + + +/*! + \file Dragger.h + \brief Provides the BDragger class. +*/ + + +/*! + \class BDragger + \ingroup interface + \ingroup libbe + \brief A view that allows the user drag and drop a target view. + + The target view must be its immediate relative--a sibling, a parent, or + single child. The target BView must be able to be archived. + + The dragger draws a handle on top of the target view, usually in the + bottom left the corner that the user can grab. When the user drags the + handle the target view appears to move with the handle. + + However the target view doesn't actually move, instead, the view is archived + into a BMessage object and the BMessage object is dragged. When the BMessage + is dropped, the target BView is reconstructed from the archive (along with + the BDragger). The new object is a a replicant of the target view. + + An example of a dragger handle on the Clock app can be seen below. + + \image html BDragger_example.png + + This class is tied closely to BShelf. A BShelf object accepts dragged BViews, + reconstructs them from their archives and adds them to the view hierarchy + of another view. + + The Show Replicants/Hide Replicants menu item in Deskbar shows and hides the + BDragger handles. +*/ + + +/*! + \fn BDragger::BDragger(BRect frame, BView* target, uint32 resizingMode, + uint32 flags) + \brief Creates a new BDragger and sets its target view. + + The target view must be its immediate relative--a sibling, a parent, or + single child, however, the constructor does not establish this + relationship for you. + + Once you construct the BDragger you must do one of of these: + - Add the target as a child of the dragger. + - Add the dragger as a child of the target. + - Add the dragger as a sibling of the target. + + If you add the target as a child of the dragger it should be its only + child. + + A BDragger draws in the right bottom corner of its frame rectangle. If the + \a target view is a parent or a sibling of the dragger then the frame + rectangle needs to be no larger than the handle. However, if the \a target + is a child of the dragger then the dragger's frame rectangle must enclose + the target's frame so that the dragger doesn't clip the \a target. + + \param frame The frame rectangle that the dragger is draw into. + \param target The view to set the dragger to. + \param resizingMode Sets the parameters by which the dragger can be + resized. See BView for more information on resizing options. + \param flags The flags mask sets what notifications the BDragger can + receive. See BView for more information on \a flags. +*/ + + +/*! + \fn BDragger::BDragger(BMessage* data) + \brief Constructs a BDragger object from message \a data. + + \param data The message \a data to restore from. +*/ + + +/*! + \fn BDragger::~BDragger() + \brief Destroys the BDragger object and frees the memory it uses, + primarily from the bitmap handle. +*/ + + +/*! + \fn static BArchivable* BDragger::Instantiate(BMessage* data) + \brief Creates a new BDragger object from the BMessage constructor. + + \returns A newly created BDragger or \c NULL if the message doesn't + contain an archived BDragger object. +*/ + + +/*! + \fn status_t BDragger::Archive(BMessage* data, bool deep) const + \brief Archives the draggers's relationship to the target view. + + The \a deep parameter has no effect on the BDragger object but + is passed on to BView::Archive(). + + \returns A status code, typically \c B_OK or \c B_ERROR on error. + + \see BView::Archive() +*/ + + +/*! + \fn void BDragger::AttachedToWindow() + \brief Puts the BDragger under the control of HideAllDraggers() and + ShowAllDraggers(). +*/ + + +/*! + \fn void BDragger::DetachedFromWindow() + \brief Removes the BDragger from the control of HideAllDraggers() + and ShowAllDraggers(). +*/ + + +/*! + \fn void BDragger::Draw(BRect updateRect) + \brief Draws the dragger handle. + + \param updateRect The rectangular area to draw the handle in. +*/ + + +/*! + \fn void BDragger::MouseDown(BPoint point) + \brief Hook method that is called when a mouse button is pressed over the + dragger. + + This results in the archiving of the target view and the dragger and + initiates a drag-and-drop operation. + + \param point The point on the screen where to mouse pointer is when + the mouse is clicked. +*/ + + +/*! + \fn void BDragger::MessageReceived(BMessage* msg) + \brief Receives messages that control the visibility of the dragger handle. + + \param msg The message received + + \see BView::MessageReceived() +*/ + + +/*! + \fn static status_t BDragger::ShowAllDraggers() + \brief Causes all BDragger objects to draw their handles. + + The Show Replicants menu item in Deskbar does its work through this + method. + + \returns A status code, \c B_OK on success or an error code on failure. +*/ + + +/*! + \fn static status_t BDragger::HideAllDraggers() + \brief Hides all BDragger objects so that they're not visible on screen. + + The Hide Replicants menu item in Deskbar does its work through this + method. + + \returns A status code, \c B_OK on success or an error code on failure. +*/ + + +/*! + \fn static bool BDragger::AreDraggersDrawn() + \brief Returns whether or not draggers are currently drawn. + + \returns \c true if draggers are drawn, \c false otherwise. +*/ diff --git a/docs/user/storage/File.dox b/docs/user/storage/File.dox new file mode 100644 index 0000000000..503e0aa614 --- /dev/null +++ b/docs/user/storage/File.dox @@ -0,0 +1,395 @@ +/* + * Copyright 2009-2012 Haiku, Inc. All rights reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Tyler Dauwalder + * John Scipione, jscipione@gmail.com + * Ingo Weinhold, bonefish@users.sf.net + * + * Corresponds to: + * headers/os/storage/File.h hrev45060 + * src/kits/storage/File.cpp hrev45060 + */ + + +/*! + \file File.h + Provides the BFile class. +*/ + + +/*! + \class BFile + \ingroup storage + \ingroup libbe + \brief Provides the ability to read and write the data of a file. + + The file is automatically opened when you initialize a BFile and is + automatically closed when you re-initialize or destroy the object. + + Symbolic links are automatically transversed by opening a BFile. + The node that the BFile ends up opening will be the file or directory + that the link points to, not the symbolic link file itself. +*/ + + +/*! + \fn BFile::BFile() + \brief Creates an uninitialized BFile object. + + Should be followed by a call to one of the SetTo() methods, or an + assignment: + - SetTo(const entry_ref* ref, uint32 openMode) + - SetTo(const BEntry* entry, uint32 openMode) + - SetTo(const char* path, uint32 openMode) + - SetTo(const BDirectory* dir, const char* path, uint32 openMode) + - operator=(const BFile &file) +*/ + + +/*! + \fn BFile::BFile(const BFile& file) + \brief Creates a copy of the supplied BFile. + + If \a file is uninitialized, the newly constructed BFile will be too. + + \param file The BFile object to be copied. +*/ + + +/*! + \fn BFile::BFile(const entry_ref* ref, uint32 openMode) + \brief Creates a BFile and initializes it to the file referred to by + the supplied entry_ref and according to the specified open mode. + + \param ref The entry_ref referring to the file. + \param openMode The mode in which the file should be opened. + + \see SetTo(const entry_ref* ref, uint32 openMode) +*/ + + +/*! + \fn BFile::BFile(const BEntry* entry, uint32 openMode) + \brief Creates a BFile and initializes it to the file referred to by + the supplied BEntry and according to the specified open mode. + + \param entry The BEntry referring to the file. + \param openMode The mode in which the file should be opened. + + \see SetTo(const BEntry* entry, uint32 openMode) +*/ + + +/*! + \fn BFile::BFile(const char* path, uint32 openMode) + \brief Creates a BFile and initializes it to the file referred to by + the supplied path name and according to the specified open mode. + + \param path The file's path name. + \param openMode The mode in which the file should be opened. + + \see SetTo(const char* path, uint32 openMode) +*/ + + +/*! + \fn BFile::BFile(const BDirectory *dir, const char* path, uint32 openMode) + \brief Creates a BFile and initializes it to the file referred to by + the supplied path name relative to the specified BDirectory and + according to the specified open mode. + + \param dir The BDirectory, relative to which the file's path name is + given. + \param path The file's path name relative to \a dir. + \param openMode The mode in which the file should be opened. + + \see SetTo(const BDirectory* dir, const char* path, uint32 openMode) +*/ + + +/*! + \fn BFile::~BFile() + \brief Destroys the BFile object and frees all allocated resources. + + If the file is properly initialized, the file descriptor is closed. +*/ + + +/*! + \fn status_t BFile::SetTo(const entry_ref* ref, uint32 openMode) + \brief Re-initializes the BFile to the file referred to by the + supplied entry_ref and according to the specified open mode. + + \param ref The entry_ref referring to the file. + \param openMode The mode in which the file should be opened + \a openMode must be a bitwise or of exactly one of the flags. + - \c B_READ_ONLY: The file is opened read only. + - \c B_WRITE_ONLY: The file is opened write only. + - \c B_READ_WRITE: The file is opened for random read/write access. + and any number of the flags + - \c B_CREATE_FILE: A new file will be created, if it does not already + exist. + - \c B_FAIL_IF_EXISTS: If the file does already exist and + \c B_CREATE_FILE is set, SetTo() fails. + - \c B_ERASE_FILE: An already existing file is truncated to zero size. + - \c B_OPEN_AT_END: Seek() to the end of the file after opening. + + \returns A status code. + \retval B_OK Everything went fine. + \retval B_BAD_VALUE \c NULL \a ref or bad \a openMode. + \retval B_ENTRY_NOT_FOUND File not found or failed to create file. + \retval B_FILE_EXISTS File exists and \c B_FAIL_IF_EXISTS was passed. + \retval B_PERMISSION_DENIED File permissions didn't allow operation. + \retval B_NO_MEMORY Insufficient memory for operation. + \retval B_LINK_LIMIT Indicates a cyclic loop within the file system. + \retval B_BUSY A node was busy. + \retval B_FILE_ERROR A general file error. + \retval B_NO_MORE_FDS The application has run out of file descriptors. +*/ + + +/*! + \fn status_t BFile::SetTo(const BEntry* entry, uint32 openMode) + \brief Re-initializes the BFile to the file referred to by the + supplied BEntry and according to the specified open mode. + + \param entry the BEntry referring to the file + \param openMode the mode in which the file should be opened + + \returns A status code. + \retval B_OK Everything went fine. + \retval B_BAD_VALUE \c NULL \a entry or bad \a openMode. + \retval B_ENTRY_NOT_FOUND File not found or failed to create file. + \retval B_FILE_EXISTS File exists and \c B_FAIL_IF_EXISTS was passed. + \retval B_PERMISSION_DENIED File permissions didn't allow operation. + \retval B_NO_MEMORY Insufficient memory for operation. + \retval B_LINK_LIMIT Indicates a cyclic loop within the file system. + \retval B_BUSY A node was busy. + \retval B_FILE_ERROR A general file error. + \retval B_NO_MORE_FDS The application has run out of file descriptors. + + \todo Implemented using SetTo(entry_ref*, uint32). Check, if necessary + to re-implement! +*/ + + +/*! + \fn status_t BFile::SetTo(const char* path, uint32 openMode) + \brief Re-initializes the BFile to the file referred to by the + supplied path name and according to the specified open mode. + + \param path The file's path name. + \param openMode The mode in which the file should be opened. + + \returns A status code. + \retval B_OK Everything went fine. + \retval B_BAD_VALUE \c NULL \a path or bad \a openMode. + \retval B_ENTRY_NOT_FOUND File not found or failed to create file. + \retval B_FILE_EXISTS File exists and \c B_FAIL_IF_EXISTS was passed. + \retval B_PERMISSION_DENIED File permissions didn't allow operation. + \retval B_NO_MEMORY Insufficient memory for operation. + \retval B_LINK_LIMIT Indicates a cyclic loop within the file system. + \retval B_BUSY A node was busy. + \retval B_FILE_ERROR A general file error. + \retval B_NO_MORE_FDS The application has run out of file descriptors. +*/ +*/ + + +/*! + \fn status_t BFile::SetTo(const BDirectory* dir, const char* path, + uint32 openMode) + \brief Re-initializes the BFile to the file referred to by the + supplied path name relative to the specified BDirectory and + according to the specified open mode. + + \param dir The BDirectory, relative to which the file's path name is + given. + \param path The file's path name relative to \a dir. + \param openMode The mode in which the file should be opened. + + \returns A status code. + \retval B_OK Everything went fine. + \retval B_BAD_VALUE \c NULL \a dir or \a path or bad \a openMode. + \retval B_ENTRY_NOT_FOUND File not found or failed to create file. + \retval B_FILE_EXISTS File exists and \c B_FAIL_IF_EXISTS was passed. + \retval B_PERMISSION_DENIED File permissions didn't allow operation. + \retval B_NO_MEMORY Insufficient memory for operation. + \retval B_LINK_LIMIT Indicates a cyclic loop within the file system. + \retval B_BUSY A node was busy. + \retval B_FILE_ERROR A general file error. + \retval B_NO_MORE_FDS The application has run out of file descriptors. + + \todo Implemented using SetTo(BEntry*, uint32). Check, if necessary + to re-implement! +*/ + + +/*! + \fn bool BFile::IsReadable() const + \brief Reports whether or not the file is readable. + + \return + - \c true, if the BFile has been initialized properly and the file has + been been opened for reading, + - \c false, otherwise. +*/ + + +/*! + \fn bool BFile::IsWritable() const + \brief Reports whether or not the file is writable. + + \return + - \c true, if the BFile has been initialized properly and the file has + been opened for writing, + - \c false, otherwise. +*/ + + +/*! + ssize_t BFile::Read(void* buffer, size_t size) + \brief Reads a number of bytes from the file into a buffer. + + \param buffer The buffer the data from the file shall be written to. + \param size The number of bytes that shall be read. + + \returns The number of bytes read or an error code. +*/ + + +/*! + \fn ssize_t BFile::ReadAt(off_t location, void* buffer, size_t size) + \brief Reads a number of bytes from a certain position within the file + into a buffer. + + \param location The position (in bytes) within the file from which the + data shall be read. + \param buffer The buffer the data from the file shall be written to. + \param size The number of bytes that shall be read. + + \returns The number of bytes read or an error code. +*/ + + +/*! + \fn ssize_t BFile::Write(const void* buffer, size_t size) + \brief Writes a number of bytes from a buffer into the file. + + \param buffer The buffer containing the data to be written to the file. + \param size The number of bytes that shall be written. + + \returns The number of bytes actually written or an error code. +*/ + + +/*! + \fn ssize_t BFile::WriteAt(off_t location, const void* buffer, size_t size) + \brief \brief Writes a number of bytes from a buffer at a certain position + into the file. + + \param location The position (in bytes) within the file at which the data + shall be written. + \param buffer The buffer containing the data to be written to the file. + \param size The number of bytes that shall be written. + + \returns The number of bytes actually written or an error code. +*/ + + +/*! + \fn off_t BFile::Seek(off_t offset, uint32 seekMode) + \brief Seeks to another read/write position within the file. + + It is allowed to seek past the end of the file. A subsequent call to + Write() will pad the file with undefined data. Seeking before the + beginning of the file will fail and the behavior of subsequent Read() + or Write() invocations will be undefined. + + \param offset New read/write position, depending on \a seekMode relative + to the beginning or the end of the file or the current position. + \param seekMode + - \c SEEK_SET: move relative to the beginning of the file + - \c SEEK_CUR: move relative to the current position + - \c SEEK_END: move relative to the end of the file + + \returns The new read/write position relative to the beginning of the + file or an error code. + \retval B_ERROR Trying to seek before the beginning of the file. + \retval B_FILE_ERROR The file is not properly initialized. +*/ + + +/*! + \fn off_t BFile::Position() const + \brief Gets the current read/write position within the file. + + \returns The current read/write position relative to the beginning of the + file or an error code. + \retval B_ERROR After a Seek() before the beginning of the file. + \retval B_FILE_ERROR The file has not been initialized. +*/ + + +/*! + \fn status_t BFile::SetSize(off_t size) + \brief Sets the size of the file. + + If the file is shorter than \a size bytes it will be padded with + unspecified data to the requested size. If it is larger, it will be + truncated. + + \note There's no problem with setting the size of a BFile opened in + \c B_READ_ONLY mode, unless the file resides on a read only volume. + + \param size The new file size. + + \returns A status code. + \retval B_OK Everything went fine. + \retval B_NOT_ALLOWED Trying to set the size of a file on a read only + volume. + \retval B_DEVICE_FULL There's not enough space left on the volume. +*/ + + +/*! + \fn status_t BFile::GetSize(off_t* size) const + \brief Gets the size of the file. + + \param size The file size to fill out. + + \returns A status code. + + \see BStatable::GetSize() +*/ + + +/*! + \fn BFile& BFile::operator=(const BFile &file) + \brief Assigns another BFile to this BFile. + + If the other BFile is uninitialized, this one will be too. Otherwise it + will refer to the same file using the same mode, unless an error occurs. + + \param file The original BFile to assign from. + + \returns A reference to the assigned BFile. +*/ + + +/*! + \fn int BFile::get_fd() const + \brief Gets the file descriptor of the BFile. + + To be used instead of accessing the BNode's private \c fFd member directly. + + \returns The file descriptor, or -1 if not properly initialized. +*/ + + +/*! + \fn void BFile::close_fd() + \brief Overrides BNode::close_fd() for binary compatibility with BeOS R5. +*/ diff --git a/docs/user/storage/MimeType.dox b/docs/user/storage/MimeType.dox index 741304542c..6879b46552 100644 --- a/docs/user/storage/MimeType.dox +++ b/docs/user/storage/MimeType.dox @@ -361,7 +361,7 @@ /*! - \fn status_tBMimeType::GetFileExtensions(BMessage *extensions) const + \fn status_t BMimeType::GetFileExtensions(BMessage *extensions) const \brief Fetches the MIME type's associated filename extensions from the MIME database. @@ -525,9 +525,8 @@ */ -// /*! - \fn status_t BMimeType::SetP0referredApp(const char *signature, + \fn status_t BMimeType::SetPreferredApp(const char *signature, app_verb verb) \brief Sets the preferred application for the MIME type. @@ -832,12 +831,12 @@ mini icon. Additionally, the bitmap must be in the \c B_CMAP8 color space (8-bit color). - \param type Pointer to a pre-allocated string containing the MIME type whose - custom icon you wish to fetch. + \param type Pointer to a pre-allocated string containing the MIME type + whose custom icon you wish to fetch. \param icon Pointer to a pre-allocated \c BBitmap of proper size and - colorspace into which the icon is copied. - \param icon_size Value that specifies which icon to return. Currently - \c B_LARGE_ICON and \c B_MINI_ICON are supported. + colorspace into which the icon is copied. + \param which Value that specifies which icon to return. Currently + \c B_LARGE_ICON and \c B_MINI_ICON are supported. \returns A status code. \retval B_OK Success diff --git a/headers/os/game/DirectWindow.h b/headers/os/game/DirectWindow.h index 36e31a7777..ea022d848d 100644 --- a/headers/os/game/DirectWindow.h +++ b/headers/os/game/DirectWindow.h @@ -8,6 +8,7 @@ #ifndef _DIRECT_WINDOW_H #define _DIRECT_WINDOW_H + #include #include @@ -54,98 +55,106 @@ typedef struct { class BDirectWindow : public BWindow { public: - BDirectWindow(BRect frame, const char *title, window_type type, - uint32 flags, uint32 workspace = B_CURRENT_WORKSPACE); - BDirectWindow(BRect frame, const char *title, window_look look, - window_feel feel, uint32 flags, - uint32 workspace = B_CURRENT_WORKSPACE); - virtual ~BDirectWindow(); + BDirectWindow(BRect frame, const char *title, + window_type type, uint32 flags, + uint32 workspace = B_CURRENT_WORKSPACE); + BDirectWindow(BRect frame, const char *title, + window_look look, window_feel feel, + uint32 flags, + uint32 workspace = B_CURRENT_WORKSPACE); + virtual ~BDirectWindow(); - static BArchivable* Instantiate(BMessage *data); - virtual status_t Archive(BMessage *data, bool deep = true) const; + static BArchivable* Instantiate(BMessage *data); + virtual status_t Archive(BMessage *data, + bool deep = true) const; - virtual void Quit(); - virtual void DispatchMessage(BMessage *message, BHandler *handler); - virtual void MessageReceived(BMessage *message); - virtual void FrameMoved(BPoint newPosition); - virtual void WorkspacesChanged(uint32 oldWorkspaces, - uint32 newWorkspaces); - virtual void WorkspaceActivated(int32 workspaceIndex, bool state); - virtual void FrameResized(float newWidth, float newHeight); - virtual void Minimize(bool minimize); - virtual void Zoom(BPoint recPosition, float recWidth, - float recHeight); - virtual void ScreenChanged(BRect screenFrame, color_space depth); - virtual void MenusBeginning(); - virtual void MenusEnded(); - virtual void WindowActivated(bool state); - virtual void Show(); - virtual void Hide(); - virtual BHandler* ResolveSpecifier(BMessage *message, int32 index, - BMessage *specifier, int32 form, - const char *property); - virtual status_t GetSupportedSuites(BMessage *data); - virtual status_t Perform(perform_code code, void *arg); + virtual void Quit(); + virtual void DispatchMessage(BMessage *message, + BHandler *handler); + virtual void MessageReceived(BMessage *message); + virtual void FrameMoved(BPoint newPosition); + virtual void WorkspacesChanged(uint32 oldWorkspaces, + uint32 newWorkspaces); + virtual void WorkspaceActivated(int32 workspaceIndex, + bool state); + virtual void FrameResized(float newWidth, float newHeight); + virtual void Minimize(bool minimize); + virtual void Zoom(BPoint recPosition, float recWidth, + float recHeight); + virtual void ScreenChanged(BRect screenFrame, + color_space depth); + virtual void MenusBeginning(); + virtual void MenusEnded(); + virtual void WindowActivated(bool state); + virtual void Show(); + virtual void Hide(); + virtual BHandler* ResolveSpecifier(BMessage *message, + int32 index, BMessage *specifier, + int32 form, const char *property); + virtual status_t GetSupportedSuites(BMessage *data); + virtual status_t Perform(perform_code code, void *arg); private: - virtual void task_looper(); - virtual BMessage* ConvertToMessage(void *raw, int32 code); + virtual void task_looper(); + virtual BMessage* ConvertToMessage(void *raw, int32 code); public: - virtual void DirectConnected(direct_buffer_info *info); - status_t GetClippingRegion(BRegion *region, - BPoint *origin = NULL) const; - status_t SetFullScreen(bool enable); - bool IsFullScreen() const; + virtual void DirectConnected(direct_buffer_info *info); + status_t GetClippingRegion(BRegion *region, + BPoint *origin = NULL) const; + status_t SetFullScreen(bool enable); + bool IsFullScreen() const; - static bool SupportsWindowMode(screen_id id = B_MAIN_SCREEN_ID); + static bool SupportsWindowMode( + screen_id id = B_MAIN_SCREEN_ID); private: - typedef BWindow inherited; + typedef BWindow inherited; - virtual void _ReservedDirectWindow1(); - virtual void _ReservedDirectWindow2(); - virtual void _ReservedDirectWindow3(); - virtual void _ReservedDirectWindow4(); + virtual void _ReservedDirectWindow1(); + virtual void _ReservedDirectWindow2(); + virtual void _ReservedDirectWindow3(); + virtual void _ReservedDirectWindow4(); - BDirectWindow(); - BDirectWindow(BDirectWindow& other); - BDirectWindow& operator=(BDirectWindow& other); + BDirectWindow(); + BDirectWindow(BDirectWindow& other); + BDirectWindow& operator=(BDirectWindow& other); - static int32 _daemon_thread(void* arg); - int32 _DirectDaemon(); - bool _LockDirect() const; - void _UnlockDirect() const; + static int32 _daemon_thread(void* arg); + int32 _DirectDaemon(); + bool _LockDirect() const; + void _UnlockDirect() const; - void _InitData(); - void _DisposeData(); + void _InitData(); + void _DisposeData(); - bool fDaemonKiller; - bool fConnectionEnable; - bool fIsFullScreen; - bool _unused; - bool fInDirectConnect; + bool fDaemonKiller; + bool fConnectionEnable; + bool fIsFullScreen; + bool _unused; + bool fInDirectConnect; - int32 fDirectLock; - sem_id fDirectSem; - uint32 fDirectLockCount; - thread_id fDirectLockOwner; - char* fDirectLockStack; + int32 fDirectLock; + sem_id fDirectSem; + uint32 fDirectLockCount; + thread_id fDirectLockOwner; + char* fDirectLockStack; - sem_id fDisableSem; - sem_id fDisableSemAck; + sem_id fDisableSem; + sem_id fDisableSemAck; - uint32 fInitStatus; - uint32 fInfoAreaSize; + uint32 fInitStatus; + uint32 fInfoAreaSize; - uint32 _reserved[2]; + uint32 _reserved[2]; - area_id fClonedClippingArea; - area_id fSourceClippingArea; - thread_id fDirectDaemonId; - direct_buffer_info* fBufferDesc; + area_id fClonedClippingArea; + area_id fSourceClippingArea; + thread_id fDirectDaemonId; + direct_buffer_info* fBufferDesc; - uint32 _more_reserved_[17]; + uint32 _more_reserved_[17]; }; + #endif // _DIRECT_WINDOW_H diff --git a/headers/os/interface/Dragger.h b/headers/os/interface/Dragger.h index 623aa1172b..8900e24854 100644 --- a/headers/os/interface/Dragger.h +++ b/headers/os/interface/Dragger.h @@ -23,8 +23,8 @@ namespace BPrivate { class BDragger : public BView { public: - BDragger(BRect bounds, BView* target, - uint32 resizingMask = B_FOLLOW_NONE, + BDragger(BRect frame, BView* target, + uint32 resizingMode = B_FOLLOW_NONE, uint32 flags = B_WILL_DRAW); BDragger(BMessage* data); virtual ~BDragger(); diff --git a/headers/os/storage/File.h b/headers/os/storage/File.h index 77d9d374ea..bd9947cc22 100644 --- a/headers/os/storage/File.h +++ b/headers/os/storage/File.h @@ -60,7 +60,7 @@ class BFile : public BNode, public BPositionIO { virtual void close_fd(); private: - //! The file's open mode. + // The file's open mode. uint32 fMode; }; diff --git a/headers/os/support/Debug.h b/headers/os/support/Debug.h index 78aefdc678..1f88b2716b 100644 --- a/headers/os/support/Debug.h +++ b/headers/os/support/Debug.h @@ -47,11 +47,13 @@ extern "C" { PRINT(("%s\t", #OBJ)); \ (OBJ).PrintToStream(); \ } ((void)0) - #define TRACE() _debugPrintf("File: %s, Line: %d, Thread: %ld\n", \ - __FILE__, __LINE__, find_thread(NULL)) + #define TRACE() _debugPrintf("File: %s, Line: %d, Thread: %" \ + B_PRId32 "\n", __FILE__, __LINE__, \ + find_thread(NULL)) - #define SERIAL_TRACE() _sPrintf("File: %s, Line: %d, Thread: %ld\n", \ - __FILE__, __LINE__, find_thread(NULL)) + #define SERIAL_TRACE() _sPrintf("File: %s, Line: %d, Thread: %" \ + B_PRId32 "\n", __FILE__, __LINE__, \ + find_thread(NULL)) #define DEBUGGER(MSG) if (_rtDebugFlag) debugger(MSG) #if !defined(ASSERT) diff --git a/src/add-ons/kernel/bus_managers/pci/pci.cpp b/src/add-ons/kernel/bus_managers/pci/pci.cpp index c91ce3d149..73447cc639 100644 --- a/src/add-ons/kernel/bus_managers/pci/pci.cpp +++ b/src/add-ons/kernel/bus_managers/pci/pci.cpp @@ -739,6 +739,12 @@ PCI::_EnumerateBus(int domain, uint8 bus, uint8 *subordinateBus) if (baseClass != PCI_bridge || subClass != PCI_pci) continue; + // skip incorrectly configured devices + uint8 headerType = ReadConfig(domain, bus, dev, function, + PCI_header_type, 1) & PCI_header_type_mask; + if (headerType != PCI_header_type_PCI_to_PCI_bridge) + continue; + TRACE(("PCI: found PCI-PCI bridge: domain %u, bus %u, dev %u, func %u\n", domain, bus, dev, function)); TRACE(("PCI: original settings: pcicmd %04" B_PRIx32 ", primary-bus " @@ -793,6 +799,12 @@ PCI::_EnumerateBus(int domain, uint8 bus, uint8 *subordinateBus) if (baseClass != PCI_bridge || subClass != PCI_pci) continue; + // skip incorrectly configured devices + uint8 headerType = ReadConfig(domain, bus, dev, function, + PCI_header_type, 1) & PCI_header_type_mask; + if (headerType != PCI_header_type_PCI_to_PCI_bridge) + continue; + TRACE(("PCI: configuring PCI-PCI bridge: domain %u, bus %u, dev %u, func %u\n", domain, bus, dev, function)); @@ -877,6 +889,18 @@ PCI::_FixupDevices(int domain, uint8 bus) if (subClass != PCI_pci) continue; + // some FIC motherboards have a buggy BIOS... + // make sure the header type is correct for a bridge, + uint8 headerType = ReadConfig(domain, bus, dev, function, + PCI_header_type, 1) & PCI_header_type_mask; + if (headerType != PCI_header_type_PCI_to_PCI_bridge) { + dprintf("PCI: dom %u, bus %u, dev %2u, func %u, PCI bridge" + " class but wrong header type 0x%02x, ignoring.\n", + domain, bus, dev, function, headerType); + continue; + } + + int busBehindBridge = ReadConfig(domain, bus, dev, function, PCI_secondary_bus, 1); @@ -894,7 +918,9 @@ PCI::_ConfigureBridges(PCIBus *bus) { for (PCIDev *dev = bus->child; dev; dev = dev->next) { if (dev->info.class_base == PCI_bridge - && dev->info.class_sub == PCI_pci) { + && dev->info.class_sub == PCI_pci + && (dev->info.header_type & PCI_header_type_mask) + == PCI_header_type_PCI_to_PCI_bridge) { uint16 bridgeControlOld = ReadConfig(dev->domain, dev->bus, dev->device, dev->function, PCI_bridge_control, 2); uint16 bridgeControlNew = bridgeControlOld; @@ -1058,7 +1084,10 @@ PCI::_DiscoverDevice(PCIBus *bus, uint8 dev, uint8 function) PCI_class_base, 1); uint8 subClass = ReadConfig(bus->domain, bus->bus, dev, function, PCI_class_sub, 1); - if (baseClass == PCI_bridge && subClass == PCI_pci) { + uint8 headerType = ReadConfig(bus->domain, bus->bus, dev, function, + PCI_header_type, 1) & PCI_header_type_mask; + if (baseClass == PCI_bridge && subClass == PCI_pci + && headerType == PCI_header_type_PCI_to_PCI_bridge) { uint8 secondaryBus = ReadConfig(bus->domain, bus->bus, dev, function, PCI_secondary_bus, 1); PCIBus *newBus = _CreateBus(newDev, bus->domain, secondaryBus); diff --git a/src/add-ons/kernel/network/stack/device_interfaces.cpp b/src/add-ons/kernel/network/stack/device_interfaces.cpp index cce93f6bea..af179b2bb5 100644 --- a/src/add-ons/kernel/network/stack/device_interfaces.cpp +++ b/src/add-ons/kernel/network/stack/device_interfaces.cpp @@ -182,6 +182,7 @@ allocate_device_interface(net_device* device, net_device_module_info* module) interface->device = device; interface->up_count = 0; interface->ref_count = 1; + interface->monitor_count = 0; interface->deframe_func = NULL; interface->deframe_ref_count = 0; diff --git a/src/add-ons/opengl/swpipe/GalliumContext.cpp b/src/add-ons/opengl/swpipe/GalliumContext.cpp index f06c7b96b7..bf8ee85eb2 100644 --- a/src/add-ons/opengl/swpipe/GalliumContext.cpp +++ b/src/add-ons/opengl/swpipe/GalliumContext.cpp @@ -26,9 +26,10 @@ extern "C" { #include "state_tracker/st_gl_api.h" #include "state_tracker/st_manager.h" #include "state_tracker/sw_winsys.h" -#include "softpipe/sp_public.h" #ifdef HAVE_LLVM #include "llvmpipe/lp_public.h" +#else +#include "softpipe/sp_public.h" #endif } @@ -52,6 +53,11 @@ hgl_viewport(struct gl_context* glContext, GLint x, GLint y, glContext, x, y, width, height); struct hgl_context *context = (struct hgl_context*)glContext->DriverCtx; + if (!context) { + ERROR("%s: No context yet. bailing.\n", __func__); + return; + } + int32 bitmapWidth; int32 bitmapHeight; @@ -207,11 +213,10 @@ GalliumContext::CreateScreen() #ifdef HAVE_LLVM fScreen = llvmpipe_create_screen(winsys); + #else + fScreen = softpipe_create_screen(winsys); #endif - if (fScreen == NULL) - fScreen = softpipe_create_screen(winsys); - if (fScreen == NULL) { ERROR("%s: Couldn't create screen!\n", __FUNCTION__); FREE(winsys); diff --git a/src/add-ons/opengl/swpipe/Jamfile b/src/add-ons/opengl/swpipe/Jamfile index 6283699f9a..6d067ffc7e 100644 --- a/src/add-ons/opengl/swpipe/Jamfile +++ b/src/add-ons/opengl/swpipe/Jamfile @@ -13,14 +13,103 @@ local sources = GalliumFramebuffer.cpp bitmap_wrapper.cpp ; -if $(HAIKU_LLVM_PRESENT) { +local HAIKU_SWPIPE_DRIVER = $(HAIKU_GALLIUM_SOFTPIPE_LIB) ; + +local llvmLibraries = ; +if $(HAIKU_LLVM_DIR) { # TODO: Add LLVM OptionalBuildPackage SubDirC++Flags [ FDefines HAVE_LLVM=0x0302 ] ; # TODO: This is a hack for now SubDirSysHdrs /boot/common/include ; -} + HAIKU_LLVM_DIR = /boot/common/lib ; + HAIKU_SWPIPE_DRIVER = $(HAIKU_GALLIUM_LLVMPIPE_LIB) ; + + llvmLibraries = + $(HAIKU_LLVM_DIR)/libLLVMAsmParser.a + $(HAIKU_LLVM_DIR)/libLLVMInstrumentation.a + $(HAIKU_LLVM_DIR)/libLLVMLinker.a + $(HAIKU_LLVM_DIR)/libLLVMArchive.a + $(HAIKU_LLVM_DIR)/libLLVMBitReader.a + $(HAIKU_LLVM_DIR)/libLLVMDebugInfo.a + $(HAIKU_LLVM_DIR)/libLLVMJIT.a + $(HAIKU_LLVM_DIR)/libLLVMipo.a + $(HAIKU_LLVM_DIR)/libLLVMVectorize.a + $(HAIKU_LLVM_DIR)/libLLVMBitWriter.a + $(HAIKU_LLVM_DIR)/libLLVMTableGen.a + $(HAIKU_LLVM_DIR)/libLLVMHexagonCodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMHexagonAsmPrinter.a + $(HAIKU_LLVM_DIR)/libLLVMHexagonDesc.a + $(HAIKU_LLVM_DIR)/libLLVMHexagonInfo.a + $(HAIKU_LLVM_DIR)/libLLVMNVPTXCodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMNVPTXDesc.a + $(HAIKU_LLVM_DIR)/libLLVMNVPTXInfo.a + $(HAIKU_LLVM_DIR)/libLLVMNVPTXAsmPrinter.a + $(HAIKU_LLVM_DIR)/libLLVMMBlazeCodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMMBlazeAsmParser.a + $(HAIKU_LLVM_DIR)/libLLVMMBlazeDisassembler.a + $(HAIKU_LLVM_DIR)/libLLVMMBlazeDesc.a + $(HAIKU_LLVM_DIR)/libLLVMMBlazeInfo.a + $(HAIKU_LLVM_DIR)/libLLVMMBlazeAsmPrinter.a + $(HAIKU_LLVM_DIR)/libLLVMCppBackendCodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMCppBackendInfo.a + $(HAIKU_LLVM_DIR)/libLLVMMSP430CodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMMSP430Desc.a + $(HAIKU_LLVM_DIR)/libLLVMMSP430AsmPrinter.a + $(HAIKU_LLVM_DIR)/libLLVMMSP430Info.a + $(HAIKU_LLVM_DIR)/libLLVMXCoreCodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMXCoreDesc.a + $(HAIKU_LLVM_DIR)/libLLVMXCoreInfo.a + $(HAIKU_LLVM_DIR)/libLLVMCellSPUCodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMCellSPUDesc.a + $(HAIKU_LLVM_DIR)/libLLVMCellSPUInfo.a + $(HAIKU_LLVM_DIR)/libLLVMMipsAsmParser.a + $(HAIKU_LLVM_DIR)/libLLVMMipsCodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMMipsDesc.a + $(HAIKU_LLVM_DIR)/libLLVMMipsAsmPrinter.a + $(HAIKU_LLVM_DIR)/libLLVMMipsDisassembler.a + $(HAIKU_LLVM_DIR)/libLLVMMipsInfo.a + $(HAIKU_LLVM_DIR)/libLLVMARMAsmParser.a + $(HAIKU_LLVM_DIR)/libLLVMARMCodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMARMDisassembler.a + $(HAIKU_LLVM_DIR)/libLLVMARMDesc.a + $(HAIKU_LLVM_DIR)/libLLVMARMInfo.a + $(HAIKU_LLVM_DIR)/libLLVMARMAsmPrinter.a + $(HAIKU_LLVM_DIR)/libLLVMPowerPCCodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMPowerPCDesc.a + $(HAIKU_LLVM_DIR)/libLLVMPowerPCInfo.a + $(HAIKU_LLVM_DIR)/libLLVMPowerPCAsmPrinter.a + $(HAIKU_LLVM_DIR)/libLLVMSparcCodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMSparcDesc.a + $(HAIKU_LLVM_DIR)/libLLVMSparcInfo.a + $(HAIKU_LLVM_DIR)/libLLVMX86AsmParser.a + $(HAIKU_LLVM_DIR)/libLLVMX86CodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMSelectionDAG.a + $(HAIKU_LLVM_DIR)/libLLVMAsmPrinter.a + $(HAIKU_LLVM_DIR)/libLLVMX86Disassembler.a + $(HAIKU_LLVM_DIR)/libLLVMX86Desc.a + $(HAIKU_LLVM_DIR)/libLLVMX86Info.a + $(HAIKU_LLVM_DIR)/libLLVMX86AsmPrinter.a + $(HAIKU_LLVM_DIR)/libLLVMX86Utils.a + $(HAIKU_LLVM_DIR)/libLLVMMCDisassembler.a + $(HAIKU_LLVM_DIR)/libLLVMMCParser.a + $(HAIKU_LLVM_DIR)/libLLVMInterpreter.a + $(HAIKU_LLVM_DIR)/libLLVMCodeGen.a + $(HAIKU_LLVM_DIR)/libLLVMScalarOpts.a + $(HAIKU_LLVM_DIR)/libLLVMInstCombine.a + $(HAIKU_LLVM_DIR)/libLLVMTransformUtils.a + $(HAIKU_LLVM_DIR)/libLLVMipa.a + $(HAIKU_LLVM_DIR)/libLLVMAnalysis.a + $(HAIKU_LLVM_DIR)/libLLVMMCJIT.a + $(HAIKU_LLVM_DIR)/libLLVMRuntimeDyld.a + $(HAIKU_LLVM_DIR)/libLLVMExecutionEngine.a + $(HAIKU_LLVM_DIR)/libLLVMTarget.a + $(HAIKU_LLVM_DIR)/libLLVMMC.a + $(HAIKU_LLVM_DIR)/libLLVMObject.a + $(HAIKU_LLVM_DIR)/libLLVMCore.a + $(HAIKU_LLVM_DIR)/libLLVMSupport.a ; +} UsePrivateHeaders interface ; SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; @@ -31,7 +120,10 @@ AddResources Software\ Renderer : SoftwareRenderer.rdef ; Addon Software\ Renderer : $(sources) : libGL.so - $(HAIKU_MESA_DIR)/lib.haiku/libgallium.a - $(HAIKU_MESA_DIR)/lib.haiku/libsoftpipe.a - be translation $(TARGET_LIBSUPC++) + $(HAIKU_SWPIPE_DRIVER) + $(HAIKU_MESA_LIB) + $(HAIKU_GLSL_LIB) + $(HAIKU_GALLIUM_LIB) + $(llvmLibraries) + be translation stdc++ $(TARGET_LIBSUPC++) ; diff --git a/src/add-ons/opengl/swrast/Jamfile b/src/add-ons/opengl/swrast/Jamfile index 091b217f1e..513a251382 100644 --- a/src/add-ons/opengl/swrast/Jamfile +++ b/src/add-ons/opengl/swrast/Jamfile @@ -8,20 +8,8 @@ if $(TARGET_PLATFORM) != haiku { } -{ - local defines ; - defines = BEOS_THREADS GNU_ASSEMBLER ; - - if $(TARGET_ARCH) = x86 { - defines += USE_X86_ASM USE_MMX_ASM USE_3DNOW_ASM USE_SSE_ASM ; - } else if $(TARGET_ARCH) = ppc { - # Not yet supported, as current Mesa3D PPC assembly is Linux-dependent! - # defines += USE_PPC_ASM ; - } else if $(TARGET_ARCH) = sparc { - defines += USE_SPARC_ASM ; - } -} - +local defines = BEOS_THREADS GNU_ASSEMBLER ; +SubDirC++Flags [ FDefines $(defines) ] ; local sources = MesaSoftwareRenderer.cpp ; @@ -35,15 +23,12 @@ UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa main ] ; UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mapi ] ; UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mapi glapi ] ; -# For older versions of Mesa -UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa glapi ] ; -UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa tnl ] ; -UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa x86 ] ; - - AddResources Software\ Rasterizer : MesaSoftwareRenderer.rdef ; Addon Software\ Rasterizer : MesaSoftwareRenderer.cpp - : libGL.so be $(TARGET_LIBSUPC++) + : + $(HAIKU_MESA_LIB) + $(HAIKU_GLSL_LIB) + libGL.so be $(TARGET_LIBSUPC++) ; diff --git a/src/add-ons/opengl/swrast/MesaSoftwareRenderer.cpp b/src/add-ons/opengl/swrast/MesaSoftwareRenderer.cpp index e15f44d10c..0b21ff46ca 100644 --- a/src/add-ons/opengl/swrast/MesaSoftwareRenderer.cpp +++ b/src/add-ons/opengl/swrast/MesaSoftwareRenderer.cpp @@ -469,22 +469,11 @@ MesaSoftwareRenderer::_Error(gl_context* ctx) const GLubyte* MesaSoftwareRenderer::_GetString(gl_context* ctx, GLenum name) { - switch (name) { case GL_VENDOR: return (const GLubyte*) "Mesa Project"; - case GL_RENDERER: { - _mesa_get_cpu_features(); - static char buffer[256] = { '\0' }; - - if (!buffer[0]) { - char* cpuInfo = _mesa_get_cpu_string(); - // Let's build an renderer string - sprintf(buffer, "Software Rasterizer for %s", cpuInfo); - free(cpuInfo); - } - return (const GLubyte*) buffer; - } + case GL_RENDERER: + return (const GLubyte*) "Software Rasterizer"; default: // Let core library handle all other cases return NULL; diff --git a/src/add-ons/opengl/swrast_legacy/Jamfile b/src/add-ons/opengl/swrast_legacy/Jamfile index 1442673e96..34efd62ab8 100644 --- a/src/add-ons/opengl/swrast_legacy/Jamfile +++ b/src/add-ons/opengl/swrast_legacy/Jamfile @@ -47,6 +47,8 @@ UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa x86 ] ; AddResources Legacy\ Software\ Rasterizer : MesaSoftwareRenderer.rdef ; Addon Legacy\ Software\ Rasterizer : - MesaSoftwareRenderer.cpp - : libGL.so be $(TARGET_LIBSUPC++) + $(sources) + : + $(HAIKU_MESA_LIB) + libGL.so be $(TARGET_LIBSUPC++) ; diff --git a/src/apps/debugger/Jamfile b/src/apps/debugger/Jamfile index b219fe4034..44c56d0a89 100644 --- a/src/apps/debugger/Jamfile +++ b/src/apps/debugger/Jamfile @@ -9,6 +9,7 @@ UsePrivateSystemHeaders ; SEARCH_SOURCE += [ FDirName $(SUBDIR) arch ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) arch x86 ] ; +SEARCH_SOURCE += [ FDirName $(SUBDIR) arch x86_64 ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) controllers ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) debug_info ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) debug_managers ] ; @@ -71,6 +72,10 @@ Application Debugger : ArchitectureX86.cpp CpuStateX86.cpp + # arch/x86_64 + ArchitectureX8664.cpp + CpuStateX8664.cpp + # controllers DebugReportGenerator.cpp TeamDebugger.cpp @@ -305,6 +310,7 @@ Application Debugger : : Debugger_demangler.o Debugger_disasm_x86.o + Debugger_disasm_x86_64.o Debugger_dwarf.o DebugAnalyzer_gui_table.o @@ -325,5 +331,6 @@ Application Debugger : ; HaikuSubInclude arch x86 disasm ; +HaikuSubInclude arch x86_64 disasm ; HaikuSubInclude demangler ; HaikuSubInclude dwarf ; diff --git a/src/apps/debugger/arch/x86/ArchitectureX86.cpp b/src/apps/debugger/arch/x86/ArchitectureX86.cpp index 5892f2d193..dd19a9012d 100644 --- a/src/apps/debugger/arch/x86/ArchitectureX86.cpp +++ b/src/apps/debugger/arch/x86/ArchitectureX86.cpp @@ -53,6 +53,7 @@ static const int32 kFromDwarfRegisters[] = { -1, -1, -1, -1, -1, -1, -1, -1, // SSE -1, -1, -1, -1, -1, -1, -1, -1 // MMX }; + static const int32 kFromDwarfRegisterCount = sizeof(kFromDwarfRegisters) / 4; @@ -216,6 +217,7 @@ ArchitectureX86::InitRegisterRules(CfaContext& context) const return B_OK; } + status_t ArchitectureX86::GetDwarfRegisterMaps(RegisterMap** _toDwarf, RegisterMap** _fromDwarf) const diff --git a/src/apps/debugger/arch/x86_64/ArchitectureX8664.cpp b/src/apps/debugger/arch/x86_64/ArchitectureX8664.cpp new file mode 100644 index 0000000000..747ee12424 --- /dev/null +++ b/src/apps/debugger/arch/x86_64/ArchitectureX8664.cpp @@ -0,0 +1,522 @@ +/* + * Copyright 2012, Alex Smith, alex@alex-smith.me.uk. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2011-2012, Rene Gollent, rene@gollent.com. + * Distributed under the terms of the MIT License. + */ + + +#include "ArchitectureX8664.h" + +#include + +#include + +#include + +#include "CfaContext.h" +#include "CpuStateX8664.h" +#include "DisassembledCode.h" +#include "FunctionDebugInfo.h" +#include "InstructionInfo.h" +#include "NoOpStackFrameDebugInfo.h" +#include "RegisterMap.h" +#include "StackFrame.h" +#include "Statement.h" +#include "TeamMemory.h" +#include "X86AssemblyLanguage.h" + +#include "disasm/DisassemblerX8664.h" + + +static const int32 kFromDwarfRegisters[] = { + X86_64_REGISTER_RAX, + X86_64_REGISTER_RDX, + X86_64_REGISTER_RCX, + X86_64_REGISTER_RBX, + X86_64_REGISTER_RSI, + X86_64_REGISTER_RDI, + X86_64_REGISTER_RBP, + X86_64_REGISTER_RSP, + X86_64_REGISTER_R8, + X86_64_REGISTER_R9, + X86_64_REGISTER_R10, + X86_64_REGISTER_R11, + X86_64_REGISTER_R12, + X86_64_REGISTER_R13, + X86_64_REGISTER_R14, + X86_64_REGISTER_R15, + X86_64_REGISTER_RIP, + -1, -1, -1, -1, -1, -1, -1, -1, // xmm0-xmm7 + -1, -1, -1, -1, -1, -1, -1, -1, // xmm8-xmm15 + -1, -1, -1, -1, -1, -1, -1, -1, // st0-st7 + -1, -1, -1, -1, -1, -1, -1, -1, // mm0-mm7 + -1, // rflags + X86_64_REGISTER_ES, + X86_64_REGISTER_CS, + X86_64_REGISTER_SS, + X86_64_REGISTER_DS, + X86_64_REGISTER_FS, + X86_64_REGISTER_GS, +}; + +static const int32 kFromDwarfRegisterCount = sizeof(kFromDwarfRegisters) / 4; + + +// #pragma mark - ToDwarfRegisterMap + + +struct ArchitectureX8664::ToDwarfRegisterMap : RegisterMap { + ToDwarfRegisterMap() + { + // init the index array from the reverse map + memset(fIndices, -1, sizeof(fIndices)); + for (int32 i = 0; i < kFromDwarfRegisterCount; i++) { + if (kFromDwarfRegisters[i] >= 0) + fIndices[kFromDwarfRegisters[i]] = i; + } + } + + virtual int32 CountRegisters() const + { + return X86_64_REGISTER_COUNT; + } + + virtual int32 MapRegisterIndex(int32 index) const + { + return index >= 0 && index < X86_64_REGISTER_COUNT ? fIndices[index] : -1; + } + +private: + int32 fIndices[X86_64_REGISTER_COUNT]; +}; + + +// #pragma mark - FromDwarfRegisterMap + + +struct ArchitectureX8664::FromDwarfRegisterMap : RegisterMap { + virtual int32 CountRegisters() const + { + return kFromDwarfRegisterCount; + } + + virtual int32 MapRegisterIndex(int32 index) const + { + return index >= 0 && index < kFromDwarfRegisterCount + ? kFromDwarfRegisters[index] : -1; + } +}; + + +// #pragma mark - ArchitectureX8664 + + +ArchitectureX8664::ArchitectureX8664(TeamMemory* teamMemory) + : + Architecture(teamMemory, 8, false), + fAssemblyLanguage(NULL), + fToDwarfRegisterMap(NULL), + fFromDwarfRegisterMap(NULL) +{ +} + + +ArchitectureX8664::~ArchitectureX8664() +{ + if (fToDwarfRegisterMap != NULL) + fToDwarfRegisterMap->ReleaseReference(); + if (fFromDwarfRegisterMap != NULL) + fFromDwarfRegisterMap->ReleaseReference(); + if (fAssemblyLanguage != NULL) + fAssemblyLanguage->ReleaseReference(); +} + + +status_t +ArchitectureX8664::Init() +{ + fAssemblyLanguage = new(std::nothrow) X86AssemblyLanguage; + if (fAssemblyLanguage == NULL) + return B_NO_MEMORY; + + try { + _AddIntegerRegister(X86_64_REGISTER_RIP, "rip", B_UINT64_TYPE, + REGISTER_TYPE_INSTRUCTION_POINTER, false); + _AddIntegerRegister(X86_64_REGISTER_RSP, "rsp", B_UINT64_TYPE, + REGISTER_TYPE_STACK_POINTER, true); + _AddIntegerRegister(X86_64_REGISTER_RBP, "rbp", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, true); + + _AddIntegerRegister(X86_64_REGISTER_RAX, "rax", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, false); + _AddIntegerRegister(X86_64_REGISTER_RBX, "rbx", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, true); + _AddIntegerRegister(X86_64_REGISTER_RCX, "rcx", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, false); + _AddIntegerRegister(X86_64_REGISTER_RDX, "rdx", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, false); + + _AddIntegerRegister(X86_64_REGISTER_RSI, "rsi", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, false); + _AddIntegerRegister(X86_64_REGISTER_RDI, "rdi", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, false); + + _AddIntegerRegister(X86_64_REGISTER_R8, "r8", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, false); + _AddIntegerRegister(X86_64_REGISTER_R9, "r9", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, false); + _AddIntegerRegister(X86_64_REGISTER_R10, "r10", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, false); + _AddIntegerRegister(X86_64_REGISTER_R11, "r11", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, false); + _AddIntegerRegister(X86_64_REGISTER_R12, "r12", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, true); + _AddIntegerRegister(X86_64_REGISTER_R13, "r13", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, true); + _AddIntegerRegister(X86_64_REGISTER_R14, "r14", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, true); + _AddIntegerRegister(X86_64_REGISTER_R15, "r15", B_UINT64_TYPE, + REGISTER_TYPE_GENERAL_PURPOSE, true); + + _AddIntegerRegister(X86_64_REGISTER_CS, "cs", B_UINT16_TYPE, + REGISTER_TYPE_SPECIAL_PURPOSE, true); + _AddIntegerRegister(X86_64_REGISTER_DS, "ds", B_UINT16_TYPE, + REGISTER_TYPE_SPECIAL_PURPOSE, true); + _AddIntegerRegister(X86_64_REGISTER_ES, "es", B_UINT16_TYPE, + REGISTER_TYPE_SPECIAL_PURPOSE, true); + _AddIntegerRegister(X86_64_REGISTER_FS, "fs", B_UINT16_TYPE, + REGISTER_TYPE_SPECIAL_PURPOSE, true); + _AddIntegerRegister(X86_64_REGISTER_GS, "gs", B_UINT16_TYPE, + REGISTER_TYPE_SPECIAL_PURPOSE, true); + _AddIntegerRegister(X86_64_REGISTER_SS, "ss", B_UINT16_TYPE, + REGISTER_TYPE_SPECIAL_PURPOSE, true); + } catch (std::bad_alloc) { + return B_NO_MEMORY; + } + + fToDwarfRegisterMap = new(std::nothrow) ToDwarfRegisterMap; + fFromDwarfRegisterMap = new(std::nothrow) FromDwarfRegisterMap; + + if (fToDwarfRegisterMap == NULL || fFromDwarfRegisterMap == NULL) + return B_NO_MEMORY; + + return B_OK; +} + + +int32 +ArchitectureX8664::StackGrowthDirection() const +{ + return STACK_GROWTH_DIRECTION_NEGATIVE; +} + + +int32 +ArchitectureX8664::CountRegisters() const +{ + return fRegisters.Count(); +} + + +const Register* +ArchitectureX8664::Registers() const +{ + return fRegisters.Elements(); +} + + +status_t +ArchitectureX8664::InitRegisterRules(CfaContext& context) const +{ + status_t error = Architecture::InitRegisterRules(context); + if (error != B_OK) + return error; + + // set up rule for RIP register + context.RegisterRule(fToDwarfRegisterMap->MapRegisterIndex( + X86_64_REGISTER_RIP))->SetToLocationOffset(0); + + return B_OK; +} + + +status_t +ArchitectureX8664::GetDwarfRegisterMaps(RegisterMap** _toDwarf, + RegisterMap** _fromDwarf) const +{ + if (_toDwarf != NULL) { + *_toDwarf = fToDwarfRegisterMap; + fToDwarfRegisterMap->AcquireReference(); + } + + if (_fromDwarf != NULL) { + *_fromDwarf = fFromDwarfRegisterMap; + fFromDwarfRegisterMap->AcquireReference(); + } + + return B_OK; +} + + +status_t +ArchitectureX8664::CreateCpuState(CpuState*& _state) +{ + CpuStateX8664* state = new(std::nothrow) CpuStateX8664; + if (state == NULL) + return B_NO_MEMORY; + + _state = state; + return B_OK; +} + + +status_t +ArchitectureX8664::CreateCpuState(const void* cpuStateData, size_t size, + CpuState*& _state) +{ + if (size != sizeof(x86_64_debug_cpu_state)) + return B_BAD_VALUE; + + CpuStateX8664* state = new(std::nothrow) CpuStateX8664( + *(const x86_64_debug_cpu_state*)cpuStateData); + if (state == NULL) + return B_NO_MEMORY; + + _state = state; + return B_OK; +} + + +status_t +ArchitectureX8664::CreateStackFrame(Image* image, FunctionDebugInfo* function, + CpuState* _cpuState, bool isTopFrame, StackFrame*& _frame, + CpuState*& _previousCpuState) +{ + fprintf(stderr, "ArchitectureX8664::CreateStackFrame: TODO\n"); + return B_UNSUPPORTED; +} + + +void +ArchitectureX8664::UpdateStackFrameCpuState(const StackFrame* frame, + Image* previousImage, FunctionDebugInfo* previousFunction, + CpuState* previousCpuState) +{ + fprintf(stderr, "ArchitectureX8664::UpdateStackFrameCpuState: TODO\n"); +} + + +status_t +ArchitectureX8664::ReadValueFromMemory(target_addr_t address, uint32 valueType, + BVariant& _value) const +{ + uint8 buffer[64]; + size_t size = BVariant::SizeOfType(valueType); + if (size == 0 || size > sizeof(buffer)) + return B_BAD_VALUE; + + ssize_t bytesRead = fTeamMemory->ReadMemory(address, buffer, size); + if (bytesRead < 0) + return bytesRead; + if ((size_t)bytesRead != size) + return B_ERROR; + + // TODO: We need to swap endianess, if the host is big endian! + + switch (valueType) { + case B_INT8_TYPE: + _value.SetTo(*(int8*)buffer); + return B_OK; + case B_UINT8_TYPE: + _value.SetTo(*(uint8*)buffer); + return B_OK; + case B_INT16_TYPE: + _value.SetTo(*(int16*)buffer); + return B_OK; + case B_UINT16_TYPE: + _value.SetTo(*(uint16*)buffer); + return B_OK; + case B_INT32_TYPE: + _value.SetTo(*(int32*)buffer); + return B_OK; + case B_UINT32_TYPE: + _value.SetTo(*(uint32*)buffer); + return B_OK; + case B_INT64_TYPE: + _value.SetTo(*(int64*)buffer); + return B_OK; + case B_UINT64_TYPE: + _value.SetTo(*(uint64*)buffer); + return B_OK; + case B_FLOAT_TYPE: + _value.SetTo(*(float*)buffer); + // TODO: float on the host might work differently! + return B_OK; + case B_DOUBLE_TYPE: + _value.SetTo(*(double*)buffer); + // TODO: double on the host might work differently! + return B_OK; + default: + return B_BAD_VALUE; + } +} + + +status_t +ArchitectureX8664::ReadValueFromMemory(target_addr_t addressSpace, + target_addr_t address, uint32 valueType, BVariant& _value) const +{ + // n/a on this architecture + return B_BAD_VALUE; +} + + +status_t +ArchitectureX8664::DisassembleCode(FunctionDebugInfo* function, + const void* buffer, size_t bufferSize, DisassembledCode*& _sourceCode) +{ + DisassembledCode* source = new(std::nothrow) DisassembledCode( + fAssemblyLanguage); + if (source == NULL) + return B_NO_MEMORY; + BReference sourceReference(source, true); + + // init disassembler + DisassemblerX8664 disassembler; + status_t error = disassembler.Init(function->Address(), buffer, bufferSize); + if (error != B_OK) + return error; + + // add a function name line + BString functionName(function->PrettyName()); + if (!source->AddCommentLine((functionName << ':').String())) + return B_NO_MEMORY; + + // disassemble the instructions + BString line; + target_addr_t instructionAddress; + target_size_t instructionSize; + bool breakpointAllowed; + while (disassembler.GetNextInstruction(line, instructionAddress, + instructionSize, breakpointAllowed) == B_OK) { +// TODO: Respect breakpointAllowed! + if (!source->AddInstructionLine(line, instructionAddress, + instructionSize)) { + return B_NO_MEMORY; + } + } + + _sourceCode = sourceReference.Detach(); + return B_OK; +} + + +status_t +ArchitectureX8664::GetStatement(FunctionDebugInfo* function, + target_addr_t address, Statement*& _statement) +{ +// TODO: This is not architecture dependent anymore! + // get the instruction info + InstructionInfo info; + status_t error = GetInstructionInfo(address, info); + if (error != B_OK) + return error; + + // create a statement + ContiguousStatement* statement = new(std::nothrow) ContiguousStatement( + SourceLocation(-1), TargetAddressRange(info.Address(), info.Size())); + if (statement == NULL) + return B_NO_MEMORY; + + _statement = statement; + return B_OK; +} + + +status_t +ArchitectureX8664::GetInstructionInfo(target_addr_t address, + InstructionInfo& _info) +{ + // read the code + uint8 buffer[16]; + // TODO: What's the maximum instruction size? + ssize_t bytesRead = fTeamMemory->ReadMemory(address, buffer, + sizeof(buffer)); + if (bytesRead < 0) + return bytesRead; + + // init disassembler + DisassemblerX8664 disassembler; + status_t error = disassembler.Init(address, buffer, bytesRead); + if (error != B_OK) + return error; + + // disassemble the instruction + BString line; + target_addr_t instructionAddress; + target_size_t instructionSize; + bool breakpointAllowed; + error = disassembler.GetNextInstruction(line, instructionAddress, + instructionSize, breakpointAllowed); + if (error != B_OK) + return error; + + // FIXME: Is this correct for x86_64? I'm not entirely sure. + instruction_type instructionType = INSTRUCTION_TYPE_OTHER; + if (buffer[0] == 0xff && (buffer[1] & 0x34) == 0x10) { + // absolute call with r/m32 + instructionType = INSTRUCTION_TYPE_SUBROUTINE_CALL; + } else if (buffer[0] == 0xe8 && instructionSize == 5) { + // relative call with rel32 -- don't categorize the call with 0 as + // subroutine call, since it is only used to get the address of the GOT + if (buffer[1] != 0 || buffer[2] != 0 || buffer[3] != 0 + || buffer[4] != 0) { + instructionType = INSTRUCTION_TYPE_SUBROUTINE_CALL; + } + } + + if (!_info.SetTo(instructionAddress, instructionSize, instructionType, + breakpointAllowed, line)) { + return B_NO_MEMORY; + } + + return B_OK; +} + + +status_t +ArchitectureX8664::GetWatchpointDebugCapabilities(int32& _maxRegisterCount, + int32& _maxBytesPerRegister, uint8& _watchpointCapabilityFlags) +{ + // Have 4 debug registers, 1 is required for breakpoint support, which + // leaves 3 available for watchpoints. + _maxRegisterCount = 3; + _maxBytesPerRegister = 8; + + // x86 only supports write and read/write watchpoints. + _watchpointCapabilityFlags = WATCHPOINT_CAPABILITY_FLAG_WRITE + | WATCHPOINT_CAPABILITY_FLAG_READ_WRITE; + + return B_OK; +} + + +void +ArchitectureX8664::_AddRegister(int32 index, const char* name, + uint32 bitSize, uint32 valueType, register_type type, bool calleePreserved) +{ + if (!fRegisters.Add(Register(index, name, bitSize, valueType, type, + calleePreserved))) { + throw std::bad_alloc(); + } +} + + +void +ArchitectureX8664::_AddIntegerRegister(int32 index, const char* name, + uint32 valueType, register_type type, bool calleePreserved) +{ + _AddRegister(index, name, 8 * BVariant::SizeOfType(valueType), valueType, + type, calleePreserved); +} diff --git a/src/apps/debugger/arch/x86_64/ArchitectureX8664.h b/src/apps/debugger/arch/x86_64/ArchitectureX8664.h new file mode 100644 index 0000000000..ec814483f0 --- /dev/null +++ b/src/apps/debugger/arch/x86_64/ArchitectureX8664.h @@ -0,0 +1,90 @@ +/* + * Copyright 2012, Alex Smith, alex@alex-smith.me.uk. + * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2011-2012, Rene Gollent, rene@gollent.com. + * Distributed under the terms of the MIT License. + */ +#ifndef ARCHITECTURE_X86_64_H +#define ARCHITECTURE_X86_64_H + + +#include + +#include "Architecture.h" +#include "Register.h" + + +class SourceLanguage; + + +class ArchitectureX8664 : public Architecture { +public: + ArchitectureX8664(TeamMemory* teamMemory); + virtual ~ArchitectureX8664(); + + virtual status_t Init(); + + virtual int32 StackGrowthDirection() const; + + virtual int32 CountRegisters() const; + virtual const Register* Registers() const; + virtual status_t InitRegisterRules(CfaContext& context) const; + + virtual status_t GetDwarfRegisterMaps(RegisterMap** _toDwarf, + RegisterMap** _fromDwarf) const; + + virtual status_t CreateCpuState(CpuState*& _state); + virtual status_t CreateCpuState(const void* cpuStateData, + size_t size, CpuState*& _state); + virtual status_t CreateStackFrame(Image* image, + FunctionDebugInfo* function, + CpuState* cpuState, bool isTopFrame, + StackFrame*& _previousFrame, + CpuState*& _previousCpuState); + virtual void UpdateStackFrameCpuState( + const StackFrame* frame, + Image* previousImage, + FunctionDebugInfo* previousFunction, + CpuState* previousCpuState); + + virtual status_t ReadValueFromMemory(target_addr_t address, + uint32 valueType, BVariant& _value) const; + virtual status_t ReadValueFromMemory(target_addr_t addressSpace, + target_addr_t address, uint32 valueType, + BVariant& _value) const; + + virtual status_t DisassembleCode(FunctionDebugInfo* function, + const void* buffer, size_t bufferSize, + DisassembledCode*& _sourceCode); + virtual status_t GetStatement(FunctionDebugInfo* function, + target_addr_t address, + Statement*& _statement); + virtual status_t GetInstructionInfo(target_addr_t address, + InstructionInfo& _info); + + virtual status_t GetWatchpointDebugCapabilities( + int32& _maxRegisterCount, + int32& _maxBytesPerRegister, + uint8& _watchpointCapabilityFlags); + +private: + struct ToDwarfRegisterMap; + struct FromDwarfRegisterMap; + +private: + void _AddRegister(int32 index, const char* name, + uint32 bitSize, uint32 valueType, + register_type type, bool calleePreserved); + void _AddIntegerRegister(int32 index, + const char* name, uint32 valueType, + register_type type, bool calleePreserved); + +private: + Array fRegisters; + SourceLanguage* fAssemblyLanguage; + ToDwarfRegisterMap* fToDwarfRegisterMap; + FromDwarfRegisterMap* fFromDwarfRegisterMap; +}; + + +#endif // ARCHITECTURE_X86_64_H diff --git a/src/apps/debugger/arch/x86_64/CpuStateX8664.cpp b/src/apps/debugger/arch/x86_64/CpuStateX8664.cpp new file mode 100644 index 0000000000..1d562e02d0 --- /dev/null +++ b/src/apps/debugger/arch/x86_64/CpuStateX8664.cpp @@ -0,0 +1,146 @@ +/* + * Copyright 2012, Alex Smith, alex@alex-smith.me.uk. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2011, Rene Gollent, rene@gollent.com. + * Distributed under the terms of the MIT License. + */ + +#include "CpuStateX8664.h" + +#include "Register.h" + + +CpuStateX8664::CpuStateX8664() + : + fSetRegisters() +{ +} + + +CpuStateX8664::CpuStateX8664(const x86_64_debug_cpu_state& state) + : + fSetRegisters() +{ + SetIntRegister(X86_64_REGISTER_RIP, state.rip); + SetIntRegister(X86_64_REGISTER_RSP, state.rsp); + SetIntRegister(X86_64_REGISTER_RBP, state.rbp); + SetIntRegister(X86_64_REGISTER_RAX, state.rax); + SetIntRegister(X86_64_REGISTER_RBX, state.rbx); + SetIntRegister(X86_64_REGISTER_RCX, state.rcx); + SetIntRegister(X86_64_REGISTER_RDX, state.rdx); + SetIntRegister(X86_64_REGISTER_RSI, state.rsi); + SetIntRegister(X86_64_REGISTER_RDI, state.rdi); + SetIntRegister(X86_64_REGISTER_R8, state.r8); + SetIntRegister(X86_64_REGISTER_R9, state.r9); + SetIntRegister(X86_64_REGISTER_R10, state.r10); + SetIntRegister(X86_64_REGISTER_R11, state.r11); + SetIntRegister(X86_64_REGISTER_R12, state.r12); + SetIntRegister(X86_64_REGISTER_R13, state.r13); + SetIntRegister(X86_64_REGISTER_R14, state.r14); + SetIntRegister(X86_64_REGISTER_R15, state.r15); + SetIntRegister(X86_64_REGISTER_CS, state.cs); + SetIntRegister(X86_64_REGISTER_DS, state.ds); + SetIntRegister(X86_64_REGISTER_ES, state.es); + SetIntRegister(X86_64_REGISTER_FS, state.fs); + SetIntRegister(X86_64_REGISTER_GS, state.gs); + SetIntRegister(X86_64_REGISTER_SS, state.ss); +} + + +CpuStateX8664::~CpuStateX8664() +{ +} + + +target_addr_t +CpuStateX8664::InstructionPointer() const +{ + return IsRegisterSet(X86_64_REGISTER_RIP) + ? IntRegisterValue(X86_64_REGISTER_RIP) : 0; +} + + +target_addr_t +CpuStateX8664::StackFramePointer() const +{ + return IsRegisterSet(X86_64_REGISTER_RBP) + ? IntRegisterValue(X86_64_REGISTER_RBP) : 0; +} + + +target_addr_t +CpuStateX8664::StackPointer() const +{ + return IsRegisterSet(X86_64_REGISTER_RSP) + ? IntRegisterValue(X86_64_REGISTER_RSP) : 0; +} + + +bool +CpuStateX8664::GetRegisterValue(const Register* reg, BVariant& _value) const +{ + int32 index = reg->Index(); + if (!IsRegisterSet(index)) + return false; + + if (index >= X86_64_INT_REGISTER_END) + return false; + + if (reg->BitSize() == 16) + _value.SetTo((uint16)fIntRegisters[index]); + else + _value.SetTo(fIntRegisters[index]); + + return true; +} + + +bool +CpuStateX8664::SetRegisterValue(const Register* reg, const BVariant& value) +{ + int32 index = reg->Index(); + if (index >= X86_64_INT_REGISTER_END) + return false; + + fIntRegisters[index] = value.ToUInt64(); + fSetRegisters[index] = 1; + return true; +} + + +bool +CpuStateX8664::IsRegisterSet(int32 index) const +{ + return index >= 0 && index < X86_64_REGISTER_COUNT && fSetRegisters[index]; +} + + +uint64 +CpuStateX8664::IntRegisterValue(int32 index) const +{ + if (!IsRegisterSet(index) || index >= X86_64_INT_REGISTER_END) + return 0; + + return fIntRegisters[index]; +} + + +void +CpuStateX8664::SetIntRegister(int32 index, uint64 value) +{ + if (index < 0 || index >= X86_64_INT_REGISTER_END) + return; + + fIntRegisters[index] = value; + fSetRegisters[index] = 1; +} + + +void +CpuStateX8664::UnsetRegister(int32 index) +{ + if (index < 0 || index >= X86_64_REGISTER_COUNT) + return; + + fSetRegisters[index] = 0; +} diff --git a/src/apps/debugger/arch/x86_64/CpuStateX8664.h b/src/apps/debugger/arch/x86_64/CpuStateX8664.h new file mode 100644 index 0000000000..2c52d60b90 --- /dev/null +++ b/src/apps/debugger/arch/x86_64/CpuStateX8664.h @@ -0,0 +1,79 @@ +/* + * Copyright 2012, Alex Smith, alex@alex-smith.me.uk. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2011, Rene Gollent, rene@gollent.com. + * Distributed under the terms of the MIT License. + */ +#ifndef CPU_STATE_X86_64_H +#define CPU_STATE_X86_64_H + +#include + +#include + +#include "CpuState.h" + + +enum { + X86_64_REGISTER_RIP = 0, + X86_64_REGISTER_RSP, + X86_64_REGISTER_RBP, + + X86_64_REGISTER_RAX, + X86_64_REGISTER_RBX, + X86_64_REGISTER_RCX, + X86_64_REGISTER_RDX, + + X86_64_REGISTER_RSI, + X86_64_REGISTER_RDI, + + X86_64_REGISTER_R8, + X86_64_REGISTER_R9, + X86_64_REGISTER_R10, + X86_64_REGISTER_R11, + X86_64_REGISTER_R12, + X86_64_REGISTER_R13, + X86_64_REGISTER_R14, + X86_64_REGISTER_R15, + + X86_64_REGISTER_CS, + X86_64_REGISTER_DS, + X86_64_REGISTER_ES, + X86_64_REGISTER_FS, + X86_64_REGISTER_GS, + X86_64_REGISTER_SS, + + X86_64_INT_REGISTER_END, + X86_64_REGISTER_COUNT +}; + + +class CpuStateX8664 : public CpuState { +public: + CpuStateX8664(); + CpuStateX8664(const x86_64_debug_cpu_state& state); + virtual ~CpuStateX8664(); + + virtual target_addr_t InstructionPointer() const; + virtual target_addr_t StackFramePointer() const; + virtual target_addr_t StackPointer() const; + virtual bool GetRegisterValue(const Register* reg, + BVariant& _value) const; + virtual bool SetRegisterValue(const Register* reg, + const BVariant& value); + + bool IsRegisterSet(int32 index) const; + uint64 IntRegisterValue(int32 index) const; + void SetIntRegister(int32 index, uint64 value); + void UnsetRegister(int32 index); + +private: + typedef std::bitset RegisterBitSet; + +private: + uint64 fIntRegisters[X86_64_REGISTER_COUNT]; + RegisterBitSet fSetRegisters; +}; + + +#endif // CPU_STATE_X86_64_H diff --git a/src/apps/debugger/arch/x86_64/disasm/DisassemblerX8664.cpp b/src/apps/debugger/arch/x86_64/disasm/DisassemblerX8664.cpp new file mode 100644 index 0000000000..7122943d11 --- /dev/null +++ b/src/apps/debugger/arch/x86_64/disasm/DisassemblerX8664.cpp @@ -0,0 +1,111 @@ +/* + * Copyright 2012, Alex Smith, alex@alex-smith.me.uk. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2008, François Revol, revol@free.fr + * Distributed under the terms of the MIT License. + */ + +#include "DisassemblerX8664.h" + +#include + +#include "udis86.h" + +#include + + +struct DisassemblerX8664::UdisData : ud_t { +}; + + +DisassemblerX8664::DisassemblerX8664() + : + fAddress(0), + fCode(NULL), + fCodeSize(0), + fUdisData(NULL) +{ +} + + +DisassemblerX8664::~DisassemblerX8664() +{ + delete fUdisData; +} + + +status_t +DisassemblerX8664::Init(target_addr_t address, const void* code, size_t codeSize) +{ + // unset old data + delete fUdisData; + fUdisData = NULL; + + // set new data + fUdisData = new(std::nothrow) UdisData; + if (fUdisData == NULL) + return B_NO_MEMORY; + + fAddress = address; + fCode = (const uint8*)code; + fCodeSize = codeSize; + + // init udis + ud_init(fUdisData); + ud_set_input_buffer(fUdisData, (unsigned char*)fCode, fCodeSize); + ud_set_mode(fUdisData, 64); + ud_set_pc(fUdisData, (uint64_t)fAddress); + ud_set_syntax(fUdisData, UD_SYN_ATT); + ud_set_vendor(fUdisData, UD_VENDOR_INTEL); + // TODO: Set the correct vendor! + + return B_OK; +} + + +status_t +DisassemblerX8664::GetNextInstruction(BString& line, target_addr_t& _address, + target_size_t& _size, bool& _breakpointAllowed) +{ + unsigned int size = ud_disassemble(fUdisData); + if (size < 1) + return B_ENTRY_NOT_FOUND; + + uint64 address = ud_insn_off(fUdisData); + + char buffer[256]; + snprintf(buffer, sizeof(buffer), "0x%08" B_PRIx64 ": %16.16s %s", address, + ud_insn_hex(fUdisData), ud_insn_asm(fUdisData)); + // TODO: Resolve symbols! + + line = buffer; + _address = address; + _size = size; + _breakpointAllowed = true; + // TODO: Implement (rep!)! + + return B_OK; +} + + +status_t +DisassemblerX8664::GetPreviousInstruction(target_addr_t nextAddress, + target_addr_t& _address, target_size_t& _size) +{ + if (nextAddress < fAddress || nextAddress > fAddress + fCodeSize) + return B_BAD_VALUE; + + // loop until hitting the last instruction + while (true) { + target_size_t size = ud_disassemble(fUdisData); + if (size < 1) + return B_ENTRY_NOT_FOUND; + + target_addr_t address = ud_insn_off(fUdisData); + if (address + size == nextAddress) { + _address = address; + _size = size; + return B_OK; + } + } +} diff --git a/src/apps/debugger/arch/x86_64/disasm/DisassemblerX8664.h b/src/apps/debugger/arch/x86_64/disasm/DisassemblerX8664.h new file mode 100644 index 0000000000..af045f4b7b --- /dev/null +++ b/src/apps/debugger/arch/x86_64/disasm/DisassemblerX8664.h @@ -0,0 +1,42 @@ +/* + * Copyright 2012, Alex Smith, alex@alex-smith.me.uk. + * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Distributed under the terms of the MIT License. + */ +#ifndef DISASSEMBLER_X86_64_H +#define DISASSEMBLER_X86_64_H + +#include + +#include "Types.h" + + +class DisassemblerX8664 { +public: + DisassemblerX8664(); + virtual ~DisassemblerX8664(); + + virtual status_t Init(target_addr_t address, const void* code, + size_t codeSize); + + virtual status_t GetNextInstruction(BString& line, + target_addr_t& _address, + target_size_t& _size, + bool& _breakpointAllowed); + virtual status_t GetPreviousInstruction( + target_addr_t nextAddress, + target_addr_t& _address, + target_size_t& _size); + +private: + struct UdisData; + +private: + target_addr_t fAddress; + const uint8* fCode; + size_t fCodeSize; + UdisData* fUdisData; +}; + + +#endif // DISASSEMBLER_X86_64_H diff --git a/src/apps/debugger/arch/x86_64/disasm/Jamfile b/src/apps/debugger/arch/x86_64/disasm/Jamfile new file mode 100644 index 0000000000..7abcbb21b7 --- /dev/null +++ b/src/apps/debugger/arch/x86_64/disasm/Jamfile @@ -0,0 +1,16 @@ +SubDir HAIKU_TOP src apps debugger arch x86_64 disasm ; + +CCFLAGS += -Werror ; +C++FLAGS += -Werror ; + +UseHeaders [ LibraryHeaders udis86 ] ; +UseHeaders [ LibraryHeaders [ FDirName udis86 libudis86 ] ] ; + +SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ; +SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) $(DOTDOT) types ] ; + + +MergeObject Debugger_disasm_x86_64.o + : + DisassemblerX8664.cpp +; diff --git a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp index 6a68656f1d..2781768c3b 100644 --- a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp +++ b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp @@ -592,8 +592,8 @@ DwarfImageDebugInfo::CreateFrame(Image* image, const Register* reg = registers + i; BVariant value; if (previousCpuState->GetRegisterValue(reg, value)) { - TRACE_CFI(" %3s: %#" B_PRIx32 "\n", reg->Name(), - value.ToUInt32()); + TRACE_CFI(" %3s: %#" B_PRIx64 "\n", reg->Name(), + value.ToUInt64()); } else TRACE_CFI(" %3s: undefined\n", reg->Name()); } diff --git a/src/apps/debugger/debug_info/DwarfTypeFactory.cpp b/src/apps/debugger/debug_info/DwarfTypeFactory.cpp index 76d2e163b9..527e500d0a 100644 --- a/src/apps/debugger/debug_info/DwarfTypeFactory.cpp +++ b/src/apps/debugger/debug_info/DwarfTypeFactory.cpp @@ -625,8 +625,9 @@ DwarfTypeFactory::_CreatePrimitiveType(const BString& name, if (byteSizeValue->IsValid()) { BVariant value; status_t error = fTypeContext->File()->EvaluateDynamicValue( - fTypeContext->GetCompilationUnit(), fTypeContext->SubprogramEntry(), - byteSizeValue, fTypeContext->TargetInterface(), + fTypeContext->GetCompilationUnit(), fTypeContext->AddressSize(), + fTypeContext->SubprogramEntry(), byteSizeValue, + fTypeContext->TargetInterface(), fTypeContext->InstructionPointer(), fTypeContext->FramePointer(), value); if (error == B_OK && value.IsInteger()) @@ -634,8 +635,9 @@ DwarfTypeFactory::_CreatePrimitiveType(const BString& name, } else if (bitSizeValue->IsValid()) { BVariant value; status_t error = fTypeContext->File()->EvaluateDynamicValue( - fTypeContext->GetCompilationUnit(), fTypeContext->SubprogramEntry(), - bitSizeValue, fTypeContext->TargetInterface(), + fTypeContext->GetCompilationUnit(), fTypeContext->AddressSize(), + fTypeContext->SubprogramEntry(), bitSizeValue, + fTypeContext->TargetInterface(), fTypeContext->InstructionPointer(), fTypeContext->FramePointer(), value); if (error == B_OK && value.IsInteger()) @@ -973,6 +975,7 @@ DwarfTypeFactory::_CreateEnumerationType(const BString& name, BVariant value; status_t error = fTypeContext->File()->EvaluateConstantValue( fTypeContext->GetCompilationUnit(), + fTypeContext->AddressSize(), fTypeContext->SubprogramEntry(), enumeratorEntry->ConstValue(), fTypeContext->TargetInterface(), fTypeContext->InstructionPointer(), @@ -1019,10 +1022,12 @@ DwarfTypeFactory::_CreateSubrangeType(const BString& name, // evaluate it DIEType* valueType; status_t error = fTypeContext->File()->EvaluateDynamicValue( - fTypeContext->GetCompilationUnit(), fTypeContext->SubprogramEntry(), - lowerBoundOwnerEntry->LowerBound(), fTypeContext->TargetInterface(), - fTypeContext->InstructionPointer(), fTypeContext->FramePointer(), - lowerBound, &valueType); + fTypeContext->GetCompilationUnit(), fTypeContext->AddressSize(), + fTypeContext->SubprogramEntry(), + lowerBoundOwnerEntry->LowerBound(), + fTypeContext->TargetInterface(), + fTypeContext->InstructionPointer(), + fTypeContext->FramePointer(), lowerBound, &valueType); if (error != B_OK) { WARNING(" failed to evaluate lower bound: %s\n", strerror(error)); return error; @@ -1046,8 +1051,10 @@ DwarfTypeFactory::_CreateSubrangeType(const BString& name, // evaluate it DIEType* valueType; status_t error = fTypeContext->File()->EvaluateDynamicValue( - fTypeContext->GetCompilationUnit(), fTypeContext->SubprogramEntry(), - upperBoundOwnerEntry->UpperBound(), fTypeContext->TargetInterface(), + fTypeContext->GetCompilationUnit(), fTypeContext->AddressSize(), + fTypeContext->SubprogramEntry(), + upperBoundOwnerEntry->UpperBound(), + fTypeContext->TargetInterface(), fTypeContext->InstructionPointer(), fTypeContext->FramePointer(), upperBound, &valueType); if (error != B_OK) { @@ -1069,10 +1076,10 @@ DwarfTypeFactory::_CreateSubrangeType(const BString& name, DIEType* valueType; status_t error = fTypeContext->File()->EvaluateDynamicValue( fTypeContext->GetCompilationUnit(), - fTypeContext->SubprogramEntry(), countOwnerEntry->Count(), - fTypeContext->TargetInterface(), - fTypeContext->InstructionPointer(), fTypeContext->FramePointer(), - count, &valueType); + fTypeContext->AddressSize(), fTypeContext->SubprogramEntry(), + countOwnerEntry->Count(), fTypeContext->TargetInterface(), + fTypeContext->InstructionPointer(), + fTypeContext->FramePointer(), count, &valueType); if (error != B_OK) { WARNING(" failed to evaluate count: %s\n", strerror(error)); return error; @@ -1375,9 +1382,10 @@ DwarfTypeFactory::_ResolveTypeByteSize(DIEType* typeEntry, // get the actual value BVariant size; status_t error = fTypeContext->File()->EvaluateDynamicValue( - fTypeContext->GetCompilationUnit(), fTypeContext->SubprogramEntry(), - sizeValue, fTypeContext->TargetInterface(), - fTypeContext->InstructionPointer(), fTypeContext->FramePointer(), size); + fTypeContext->GetCompilationUnit(), fTypeContext->AddressSize(), + fTypeContext->SubprogramEntry(), sizeValue, + fTypeContext->TargetInterface(), fTypeContext->InstructionPointer(), + fTypeContext->FramePointer(), size); if (error != B_OK) { TRACE_LOCALS(" failed to resolve attribute: %s\n", strerror(error)); return error; diff --git a/src/apps/debugger/debug_info/DwarfTypes.cpp b/src/apps/debugger/debug_info/DwarfTypes.cpp index 3c85e4b0ec..20c52de259 100644 --- a/src/apps/debugger/debug_info/DwarfTypes.cpp +++ b/src/apps/debugger/debug_info/DwarfTypes.cpp @@ -11,6 +11,7 @@ #include "Architecture.h" #include "ArrayIndexPath.h" +#include "CompilationUnit.h" #include "Dwarf.h" #include "DwarfFile.h" #include "DwarfTargetInterface.h" @@ -162,6 +163,14 @@ DwarfTypeContext::~DwarfTypeContext() } +uint8 +DwarfTypeContext::AddressSize() const +{ + return fCompilationUnit != NULL ? fCompilationUnit->AddressSize() + : fArchitecture->AddressSize(); +} + + // #pragma mark - DwarfType @@ -310,11 +319,11 @@ DwarfType::ResolveLocation(DwarfTypeContext* typeContext, bool hasObjectAddress, ValueLocation& _location) { status_t error = typeContext->File()->ResolveLocation( - typeContext->GetCompilationUnit(), typeContext->SubprogramEntry(), - description, typeContext->TargetInterface(), - typeContext->InstructionPointer(), objectAddress, hasObjectAddress, - typeContext->FramePointer(), typeContext->RelocationDelta(), - _location); + typeContext->GetCompilationUnit(), typeContext->AddressSize(), + typeContext->SubprogramEntry(), description, + typeContext->TargetInterface(), typeContext->InstructionPointer(), + objectAddress, hasObjectAddress, typeContext->FramePointer(), + typeContext->RelocationDelta(), _location); if (error != B_OK) return error; @@ -707,10 +716,10 @@ DwarfCompoundType::ResolveDataMemberLocation(DataMember* _member, if (memberEntry->ByteSize()->IsValid()) { BVariant value; error = typeContext->File()->EvaluateDynamicValue( - typeContext->GetCompilationUnit(), typeContext->SubprogramEntry(), - memberEntry->ByteSize(), typeContext->TargetInterface(), - typeContext->InstructionPointer(), typeContext->FramePointer(), - value); + typeContext->GetCompilationUnit(), typeContext->AddressSize(), + typeContext->SubprogramEntry(), memberEntry->ByteSize(), + typeContext->TargetInterface(), typeContext->InstructionPointer(), + typeContext->FramePointer(), value); if (error != B_OK) return error; byteSize = value.ToUInt64(); @@ -722,10 +731,10 @@ DwarfCompoundType::ResolveDataMemberLocation(DataMember* _member, if (memberEntry->BitOffset()->IsValid()) { BVariant value; error = typeContext->File()->EvaluateDynamicValue( - typeContext->GetCompilationUnit(), typeContext->SubprogramEntry(), - memberEntry->BitOffset(), typeContext->TargetInterface(), - typeContext->InstructionPointer(), typeContext->FramePointer(), - value); + typeContext->GetCompilationUnit(), typeContext->AddressSize(), + typeContext->SubprogramEntry(), memberEntry->BitOffset(), + typeContext->TargetInterface(), typeContext->InstructionPointer(), + typeContext->FramePointer(), value); if (error != B_OK) return error; bitOffset = value.ToUInt64(); @@ -736,10 +745,10 @@ DwarfCompoundType::ResolveDataMemberLocation(DataMember* _member, if (memberEntry->BitSize()->IsValid()) { BVariant value; error = typeContext->File()->EvaluateDynamicValue( - typeContext->GetCompilationUnit(), typeContext->SubprogramEntry(), - memberEntry->BitSize(), typeContext->TargetInterface(), - typeContext->InstructionPointer(), typeContext->FramePointer(), - value); + typeContext->GetCompilationUnit(), typeContext->AddressSize(), + typeContext->SubprogramEntry(), memberEntry->BitSize(), + typeContext->TargetInterface(), typeContext->InstructionPointer(), + typeContext->FramePointer(), value); if (error != B_OK) return error; bitSize = value.ToUInt64(); @@ -944,10 +953,10 @@ DwarfArrayType::ResolveElementLocation(const ArrayIndexPath& indexPath, fEntry, HasBitStridePredicate())) { BVariant value; status_t error = typeContext->File()->EvaluateDynamicValue( - typeContext->GetCompilationUnit(), typeContext->SubprogramEntry(), - bitStrideOwnerEntry->BitStride(), typeContext->TargetInterface(), - typeContext->InstructionPointer(), typeContext->FramePointer(), - value); + typeContext->GetCompilationUnit(), typeContext->AddressSize(), + typeContext->SubprogramEntry(), bitStrideOwnerEntry->BitStride(), + typeContext->TargetInterface(), typeContext->InstructionPointer(), + typeContext->FramePointer(), value); if (error != B_OK) return error; if (!value.IsInteger()) @@ -980,6 +989,7 @@ DwarfArrayType::ResolveElementLocation(const ArrayIndexPath& indexPath, BVariant value; status_t error = typeContext->File()->EvaluateDynamicValue( typeContext->GetCompilationUnit(), + typeContext->AddressSize(), typeContext->SubprogramEntry(), bitStrideOwnerEntry->BitStride(), typeContext->TargetInterface(), @@ -998,6 +1008,7 @@ DwarfArrayType::ResolveElementLocation(const ArrayIndexPath& indexPath, BVariant value; status_t error = typeContext->File()->EvaluateDynamicValue( typeContext->GetCompilationUnit(), + typeContext->AddressSize(), typeContext->SubprogramEntry(), byteStrideOwnerEntry->ByteStride(), typeContext->TargetInterface(), diff --git a/src/apps/debugger/debug_info/DwarfTypes.h b/src/apps/debugger/debug_info/DwarfTypes.h index 50983cc49d..628bae5416 100644 --- a/src/apps/debugger/debug_info/DwarfTypes.h +++ b/src/apps/debugger/debug_info/DwarfTypes.h @@ -81,6 +81,7 @@ public: { return fTargetInterface; } RegisterMap* FromDwarfRegisterMap() const { return fFromDwarfRegisterMap; } + uint8 AddressSize() const; private: Architecture* fArchitecture; diff --git a/src/apps/debugger/debugger_interface/DebuggerInterface.cpp b/src/apps/debugger/debugger_interface/DebuggerInterface.cpp index 8a47162d4b..585327d633 100644 --- a/src/apps/debugger/debugger_interface/DebuggerInterface.cpp +++ b/src/apps/debugger/debugger_interface/DebuggerInterface.cpp @@ -22,6 +22,7 @@ #include "debug_utils.h" #include "ArchitectureX86.h" +#include "ArchitectureX8664.h" #include "CpuState.h" #include "DebugEvent.h" #include "ImageInfo.h" @@ -255,8 +256,10 @@ DebuggerInterface::Init() // TODO: this probably needs to be rethought a bit, // since especially when we eventually support remote debugging, // the architecture will depend on the target machine, not the host -#ifdef ARCH_x86 +#if defined(ARCH_x86) fArchitecture = new(std::nothrow) ArchitectureX86(this); +#elif defined(ARCH_x86_64) + fArchitecture = new(std::nothrow) ArchitectureX8664(this); #else return B_UNSUPPORTED; #endif diff --git a/src/apps/debugger/dwarf/CfaContext.cpp b/src/apps/debugger/dwarf/CfaContext.cpp index 6205ad0a0d..d4d13a111e 100644 --- a/src/apps/debugger/dwarf/CfaContext.cpp +++ b/src/apps/debugger/dwarf/CfaContext.cpp @@ -9,11 +9,10 @@ #include "CfaContext.h" -CfaContext::CfaContext(target_addr_t targetLocation, - target_addr_t initialLocation) +CfaContext::CfaContext() : - fTargetLocation(targetLocation), - fLocation(initialLocation), + fTargetLocation(0), + fLocation(0), fCodeAlignment(0), fDataAlignment(0), fReturnAddressRegister(0), @@ -31,6 +30,15 @@ CfaContext::~CfaContext() } +void +CfaContext::SetLocation(target_addr_t targetLocation, + target_addr_t initialLocation) +{ + fTargetLocation = targetLocation; + fLocation = initialLocation; +} + + status_t CfaContext::Init(uint32 registerCount) { diff --git a/src/apps/debugger/dwarf/CfaContext.h b/src/apps/debugger/dwarf/CfaContext.h index b652e010c8..78d224cbd2 100644 --- a/src/apps/debugger/dwarf/CfaContext.h +++ b/src/apps/debugger/dwarf/CfaContext.h @@ -14,10 +14,12 @@ class CfaContext { public: - CfaContext(target_addr_t targetLocation, - target_addr_t initialLocation); + CfaContext(); ~CfaContext(); + void SetLocation(target_addr_t targetLocation, + target_addr_t initialLocation); + status_t Init(uint32 registerCount); status_t SaveInitialRuleSet(); diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index 1ca733e90a..7c71714295 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -61,13 +61,13 @@ struct DwarfFile::ExpressionEvaluationContext : DwarfExpressionEvaluationContext { public: ExpressionEvaluationContext(DwarfFile* file, CompilationUnit* unit, - DIESubprogram* subprogramEntry, + uint8 addressSize, DIESubprogram* subprogramEntry, const DwarfTargetInterface* targetInterface, target_addr_t instructionPointer, target_addr_t objectPointer, bool hasObjectPointer, target_addr_t framePointer, target_addr_t relocationDelta) : - DwarfExpressionEvaluationContext(targetInterface, unit->AddressSize(), + DwarfExpressionEvaluationContext(targetInterface, addressSize, relocationDelta), fFile(file), fUnit(unit), @@ -200,11 +200,41 @@ enum { }; +// encodings for CFI_AUGMENTATION_ADDRESS_POINTER_FORMAT +enum { + CFI_ADDRESS_FORMAT_ABSOLUTE = 0x00, + CFI_ADDRESS_FORMAT_UNSIGNED_LEB128 = 0x01, + CFI_ADDRESS_FORMAT_UNSIGNED_16 = 0x02, + CFI_ADDRESS_FORMAT_UNSIGNED_32 = 0x03, + CFI_ADDRESS_FORMAT_UNSIGNED_64 = 0x04, + CFI_ADDRESS_FORMAT_SIGNED = 0x08, + CFI_ADDRESS_FORMAT_SIGNED_LEB128 = + CFI_ADDRESS_FORMAT_UNSIGNED_LEB128 | CFI_ADDRESS_FORMAT_SIGNED, + CFI_ADDRESS_FORMAT_SIGNED_16 = + CFI_ADDRESS_FORMAT_UNSIGNED_16 | CFI_ADDRESS_FORMAT_SIGNED, + CFI_ADDRESS_FORMAT_SIGNED_32 = + CFI_ADDRESS_FORMAT_UNSIGNED_32 | CFI_ADDRESS_FORMAT_SIGNED, + CFI_ADDRESS_FORMAT_SIGNED_64 = + CFI_ADDRESS_FORMAT_UNSIGNED_64 | CFI_ADDRESS_FORMAT_SIGNED +}; + + +enum { + CFI_ADDRESS_TYPE_PC_RELATIVE = 0x10, + CFI_ADDRESS_TYPE_TEXT_RELATIVE = 0x20, + CFI_ADDRESS_TYPE_DATA_RELATIVE = 0x30, + CFI_ADDRESS_TYPE_FUNCTION_RELATIVE = 0x40, + CFI_ADDRESS_TYPE_ALIGNED = 0x50, + CFI_ADDRESS_TYPE_INDIRECT = 0x80 +}; + + struct DwarfFile::CIEAugmentation { CIEAugmentation() : fString(NULL), - fFlags(0) + fFlags(0), + fAddressEncoding(0) { } @@ -224,17 +254,33 @@ struct DwarfFile::CIEAugmentation { fFlags |= CFI_AUGMENTATION_DATA; const char* string = fString + 1; + // read the augmentation data block -- it is preceeded by an + // LEB128 indicating the length of the data block + uint64 length = dataReader.ReadUnsignedLEB128(0); + uint64 remaining = length; // let's see what data we have to expect + + TRACE_CFI(" %" B_PRIu64 " bytes of augmentation data\n", length); while (*string != '\0') { switch (*string) { case 'L': fFlags |= CFI_AUGMENTATION_LANGUAGE_SPECIFIC_DATA; + dataReader.Read(0); + --remaining; break; case 'P': - fFlags |= CFI_AUGMENTATION_PERSONALITY; - break; + { + char personalityEncoding = dataReader.Read(0); + uint8 addressSize = EncodedAddressSize( + personalityEncoding, NULL); + dataReader.Skip(addressSize); + remaining -= addressSize + 1; + break; + } case 'R': fFlags |= CFI_AUGMENTATION_ADDRESS_POINTER_FORMAT; + fAddressEncoding = dataReader.Read(0); + --remaining; break; default: return B_UNSUPPORTED; @@ -242,18 +288,11 @@ struct DwarfFile::CIEAugmentation { string++; } - // read the augmentation data block -- it is preceeded by an - // LEB128 indicating the length of the data block - uint64 length = dataReader.ReadUnsignedLEB128(0); - dataReader.Skip(length); - // TODO: Actually read what is interesting for us! The - // CFI_AUGMENTATION_ADDRESS_POINTER_FORMAT might be. The - // specs are not saying much about it. - - TRACE_CFI(" %" B_PRIu64 " bytes of augmentation data\n", length); - - if (dataReader.HasOverflow()) + dataReader.Skip(remaining); + if (remaining != 0 || dataReader.HasOverflow()) { + WARNING("Error while reading CIE Augmentation\n"); return B_BAD_DATA; + } return B_OK; } @@ -296,9 +335,117 @@ struct DwarfFile::CIEAugmentation { return (fFlags & CFI_AUGMENTATION_DATA) != 0; } + bool HasFDEAddressFormat() const + { + return (fFlags & CFI_AUGMENTATION_ADDRESS_POINTER_FORMAT) != 0; + } + + target_addr_t FDEAddressOffset(ElfFile* file, + ElfSection* debugFrameSection) const + { + switch (FDEAddressType()) { + case CFI_ADDRESS_FORMAT_ABSOLUTE: + TRACE_CFI("FDE address format: absolute, "); + return 0; + case CFI_ADDRESS_TYPE_PC_RELATIVE: + TRACE_CFI("FDE address format: PC relative, "); + return debugFrameSection->LoadAddress(); + case CFI_ADDRESS_TYPE_FUNCTION_RELATIVE: + TRACE_CFI("FDE address format: function relative, "); + return 0; + case CFI_ADDRESS_TYPE_TEXT_RELATIVE: + TRACE_CFI("FDE address format: text relative, "); + return file->TextSegment()->LoadAddress(); + case CFI_ADDRESS_TYPE_DATA_RELATIVE: + TRACE_CFI("FDE address format: data relative, "); + return file->DataSegment()->LoadAddress(); + case CFI_ADDRESS_TYPE_ALIGNED: + case CFI_ADDRESS_TYPE_INDIRECT: + TRACE_CFI("FDE address format: UNIMPLEMENTED, "); + // TODO: implement + // -- note: type indirect is currently not generated + return 0; + } + + return 0; + } + + int8 EncodedAddressSize(char encoding, CompilationUnit* unit) const + { + switch (encoding & 0x07) { + case CFI_ADDRESS_FORMAT_ABSOLUTE: + return unit->AddressSize(); + case CFI_ADDRESS_FORMAT_UNSIGNED_16: + return 2; + case CFI_ADDRESS_FORMAT_UNSIGNED_32: + return 4; + case CFI_ADDRESS_FORMAT_UNSIGNED_64: + return 8; + } + + // TODO: gcc doesn't (currently) actually generate LEB128-formatted + // addresses. If that changes, we'll need to handle them accordingly + return 0; + } + + uint8 FDEAddressType() const + { + return fAddressEncoding & 0x70; + } + + target_addr_t ReadEncodedAddress(DataReader &reader, + ElfFile* file, ElfSection* debugFrameSection, + bool valueOnly = false) const + { + target_addr_t address = valueOnly ? 0 : FDEAddressOffset(file, + debugFrameSection); + switch (fAddressEncoding & 0x0f) { + case CFI_ADDRESS_FORMAT_ABSOLUTE: + address += reader.ReadAddress(0); + TRACE_CFI(" target address: %" B_PRId64 "\n", address); + break; + case CFI_ADDRESS_FORMAT_UNSIGNED_LEB128: + address += reader.ReadUnsignedLEB128(0); + TRACE_CFI(" unsigned LEB128: %" B_PRId64 "\n", address); + break; + case CFI_ADDRESS_FORMAT_SIGNED_LEB128: + address += reader.ReadSignedLEB128(0); + TRACE_CFI(" signed LEB128: %" B_PRId64 "\n", address); + break; + case CFI_ADDRESS_FORMAT_UNSIGNED_16: + address += reader.Read(0); + TRACE_CFI(" unsigned 16-bit: %" B_PRId64 "\n", address); + break; + case CFI_ADDRESS_FORMAT_SIGNED_16: + address += reader.Read(0); + TRACE_CFI(" signed 16-bit: %" B_PRId64 "\n", address); + break; + case CFI_ADDRESS_FORMAT_UNSIGNED_32: + address += reader.Read(0); + TRACE_CFI(" unsigned 32-bit: %" B_PRId64 "\n", address); + break; + case CFI_ADDRESS_FORMAT_SIGNED_32: + address += reader.Read(0); + TRACE_CFI(" signed 32-bit: %" B_PRId64 "\n", address); + break; + case CFI_ADDRESS_FORMAT_UNSIGNED_64: + address += reader.Read(0); + TRACE_CFI(" unsigned 64-bit: %" B_PRId64 "\n", address); + break; + case CFI_ADDRESS_FORMAT_SIGNED_64: + address += reader.Read(0); + TRACE_CFI(" signed 64-bit: %" B_PRId64 "\n", address); + break; + } + + return address; + } + + private: const char* fString; uint32 fFlags; + int8 fAddressEncoding; }; @@ -601,14 +748,15 @@ DwarfFile::UnwindCallFrame(CompilationUnit* unit, uint8 addressSize, status_t -DwarfFile::EvaluateExpression(CompilationUnit* unit, +DwarfFile::EvaluateExpression(CompilationUnit* unit, uint8 addressSize, DIESubprogram* subprogramEntry, const void* expression, off_t expressionLength, const DwarfTargetInterface* targetInterface, target_addr_t instructionPointer, target_addr_t framePointer, target_addr_t valueToPush, bool pushValue, target_addr_t& _result) { - ExpressionEvaluationContext context(this, unit, subprogramEntry, - targetInterface, instructionPointer, 0, false, framePointer, 0); + ExpressionEvaluationContext context(this, unit, addressSize, + subprogramEntry, targetInterface, instructionPointer, 0, false, + framePointer, 0); DwarfExpressionEvaluator evaluator(&context); if (pushValue && evaluator.Push(valueToPush) != B_OK) @@ -619,7 +767,7 @@ DwarfFile::EvaluateExpression(CompilationUnit* unit, status_t -DwarfFile::ResolveLocation(CompilationUnit* unit, +DwarfFile::ResolveLocation(CompilationUnit* unit, uint8 addressSize, DIESubprogram* subprogramEntry, const LocationDescription* location, const DwarfTargetInterface* targetInterface, target_addr_t instructionPointer, target_addr_t objectPointer, @@ -635,9 +783,9 @@ DwarfFile::ResolveLocation(CompilationUnit* unit, return error; // evaluate it - ExpressionEvaluationContext context(this, unit, subprogramEntry, - targetInterface, instructionPointer, objectPointer, hasObjectPointer, - framePointer, relocationDelta); + ExpressionEvaluationContext context(this, unit, addressSize, + subprogramEntry, targetInterface, instructionPointer, objectPointer, + hasObjectPointer, framePointer, relocationDelta); DwarfExpressionEvaluator evaluator(&context); return evaluator.EvaluateLocation(expression, expressionLength, _result); @@ -645,7 +793,7 @@ DwarfFile::ResolveLocation(CompilationUnit* unit, status_t -DwarfFile::EvaluateConstantValue(CompilationUnit* unit, +DwarfFile::EvaluateConstantValue(CompilationUnit* unit, uint8 addressSize, DIESubprogram* subprogramEntry, const ConstantAttributeValue* value, const DwarfTargetInterface* targetInterface, target_addr_t instructionPointer, target_addr_t framePointer, @@ -664,9 +812,10 @@ DwarfFile::EvaluateConstantValue(CompilationUnit* unit, case ATTRIBUTE_CLASS_BLOCK: { target_addr_t result; - status_t error = EvaluateExpression(unit, subprogramEntry, - value->block.data, value->block.length, targetInterface, - instructionPointer, framePointer, 0, false, result); + status_t error = EvaluateExpression(unit, addressSize, + subprogramEntry, value->block.data, value->block.length, + targetInterface, instructionPointer, framePointer, 0, false, + result); if (error != B_OK) return error; @@ -680,7 +829,7 @@ DwarfFile::EvaluateConstantValue(CompilationUnit* unit, status_t -DwarfFile::EvaluateDynamicValue(CompilationUnit* unit, +DwarfFile::EvaluateDynamicValue(CompilationUnit* unit, uint8 addressSize, DIESubprogram* subprogramEntry, const DynamicAttributeValue* value, const DwarfTargetInterface* targetInterface, target_addr_t instructionPointer, target_addr_t framePointer, @@ -763,9 +912,9 @@ DwarfFile::EvaluateDynamicValue(CompilationUnit* unit, if (constantValue == NULL || !constantValue->IsValid()) return B_BAD_VALUE; - status_t error = EvaluateConstantValue(unit, subprogramEntry, - constantValue, targetInterface, instructionPointer, - framePointer, _result); + status_t error = EvaluateConstantValue(unit, addressSize, + subprogramEntry, constantValue, targetInterface, + instructionPointer, framePointer, _result); if (error != B_OK) return error; @@ -776,9 +925,10 @@ DwarfFile::EvaluateDynamicValue(CompilationUnit* unit, case ATTRIBUTE_CLASS_BLOCK: { target_addr_t result; - status_t error = EvaluateExpression(unit, subprogramEntry, - value->block.data, value->block.length, targetInterface, - instructionPointer, framePointer, 0, false, result); + status_t error = EvaluateExpression(unit, addressSize, + subprogramEntry, value->block.data, value->block.length, + targetInterface, instructionPointer, framePointer, 0, false, + result); if (error != B_OK) return error; @@ -1386,27 +1536,48 @@ DwarfFile::_UnwindCallFrame(bool usingEHFrameSection, CompilationUnit* unit, } else { // this is a FDE uint64 initialLocationOffset = dataReader.Offset(); - target_addr_t initialLocation = dataReader.ReadAddress(0); - target_size_t addressRange = dataReader.ReadAddress(0); + // In .eh_frame the CIE offset is a relative back offset. + if (usingEHFrameSection) { + if (cieID > (uint64)lengthOffset) { + TRACE_CFI("Invalid CIE offset: %" B_PRIu64 ", max " + "possible: %" B_PRIu64 "\n", cieID, lengthOffset); + break; + } + // convert to a section relative offset + cieID = lengthOffset - cieID; + } + + + CfaContext context; + CIEAugmentation cieAugmentation; + // when using .eh_frame format, we need to parse the CIE's + // augmentation up front in order to know how the FDE's addresses + // will be represented + DataReader cieReader; + off_t cieRemaining; + status_t error = _ParseCIEHeader(currentFrameSection, + usingEHFrameSection, unit, addressSize, context, cieID, + cieAugmentation, cieReader, cieRemaining); + if (error != B_OK) + return error; + if (cieReader.HasOverflow()) + return B_BAD_DATA; + if (cieRemaining < 0) + return B_BAD_DATA; + + target_addr_t initialLocation = cieAugmentation.ReadEncodedAddress( + dataReader, fElfFile, currentFrameSection); + target_addr_t addressRange = cieAugmentation.ReadEncodedAddress( + dataReader, fElfFile, currentFrameSection, true); if (dataReader.HasOverflow()) return B_BAD_DATA; - // In the GCC 4 .eh_frame initialLocation is relative to the offset - // of the address. - if (usingEHFrameSection && gcc4EHFrameSection) { - // Note: We need to cast to the exact address width, since the - // initialLocation value can be (and likely is) negative. - if (dwarf64) { - initialLocation = (uint64)currentFrameSection - ->LoadAddress() + (uint64)initialLocationOffset - + (uint64)initialLocation; - } else { - initialLocation = (uint32)currentFrameSection - ->LoadAddress() + (uint32)initialLocationOffset - + (uint32)initialLocation; - } + if ((cieAugmentation.FDEAddressType() + & CFI_ADDRESS_TYPE_PC_RELATIVE) != 0) { + initialLocation += initialLocationOffset; } + // TODO: For GCC 2 .eh_frame sections things work differently: The // initial locations are relocated by the runtime loader and // afterwards point to the absolute addresses. Fortunately the @@ -1426,25 +1597,14 @@ DwarfFile::_UnwindCallFrame(bool usingEHFrameSection, CompilationUnit* unit, if (remaining < 0) return B_BAD_DATA; - // In .eh_frame the CIE offset is a relative back offset. - if (usingEHFrameSection) { - if (cieID > (uint64)lengthOffset) { - TRACE_CFI("Invalid CIE offset: %" B_PRIu64 ", max " - "possible: %" B_PRIu64 "\n", cieID, lengthOffset); - break; - } - // convert to a section relative offset - cieID = lengthOffset - cieID; - } - TRACE_CFI(" found fde: length: %" B_PRIu64 " (%" B_PRIdOFF "), CIE offset: %#" B_PRIx64 ", location: %#" B_PRIx64 ", " "range: %#" B_PRIx64 "\n", length, remaining, cieID, initialLocation, addressRange); - CfaContext context(location, initialLocation); + context.SetLocation(location, initialLocation); uint32 registerCount = outputInterface->CountRegisters(); - status_t error = context.Init(registerCount); + error = context.Init(registerCount); if (error != B_OK) return error; @@ -1452,10 +1612,10 @@ DwarfFile::_UnwindCallFrame(bool usingEHFrameSection, CompilationUnit* unit, if (error != B_OK) return error; - // process the CIE - CIEAugmentation cieAugmentation; - error = _ParseCIE(currentFrameSection, usingEHFrameSection, - unit, addressSize, context, cieID, cieAugmentation); + // process the CIE's frame info instructions + cieReader = cieReader.RestrictedReader(cieRemaining); + error = _ParseFrameInfoInstructions(unit, context, + cieReader, cieAugmentation); if (error != B_OK) return error; @@ -1479,7 +1639,7 @@ DwarfFile::_UnwindCallFrame(bool usingEHFrameSection, CompilationUnit* unit, DataReader restrictedReader = dataReader.RestrictedReader(remaining); error = _ParseFrameInfoInstructions(unit, context, - restrictedReader); + restrictedReader, cieAugmentation); if (error != B_OK) return error; @@ -1503,7 +1663,8 @@ DwarfFile::_UnwindCallFrame(bool usingEHFrameSection, CompilationUnit* unit, } case CFA_CFA_RULE_EXPRESSION: { - error = EvaluateExpression(unit, subprogramEntry, + error = EvaluateExpression(unit, addressSize, + subprogramEntry, cfaCfaRule->Expression().block, cfaCfaRule->Expression().size, inputInterface, location, 0, 0, false, @@ -1577,7 +1738,8 @@ DwarfFile::_UnwindCallFrame(bool usingEHFrameSection, CompilationUnit* unit, TRACE_CFI(" -> CFA_RULE_LOCATION_EXPRESSION\n"); target_addr_t address; - error = EvaluateExpression(unit, subprogramEntry, + error = EvaluateExpression(unit, addressSize, + subprogramEntry, rule->Expression().block, rule->Expression().size, inputInterface, location, frameAddress, @@ -1595,7 +1757,8 @@ DwarfFile::_UnwindCallFrame(bool usingEHFrameSection, CompilationUnit* unit, TRACE_CFI(" -> CFA_RULE_VALUE_EXPRESSION\n"); target_addr_t value; - error = EvaluateExpression(unit, subprogramEntry, + error = EvaluateExpression(unit, addressSize, + subprogramEntry, rule->Expression().block, rule->Expression().size, inputInterface, location, frameAddress, @@ -1624,14 +1787,15 @@ DwarfFile::_UnwindCallFrame(bool usingEHFrameSection, CompilationUnit* unit, status_t -DwarfFile::_ParseCIE(ElfSection* debugFrameSection, bool usingEHFrameSection, - CompilationUnit* unit, uint8 addressSize, CfaContext& context, - off_t cieOffset, CIEAugmentation& cieAugmentation) +DwarfFile::_ParseCIEHeader(ElfSection* debugFrameSection, + bool usingEHFrameSection, CompilationUnit* unit, uint8 addressSize, + CfaContext& context, off_t cieOffset, CIEAugmentation& cieAugmentation, + DataReader& dataReader, off_t& _cieRemaining) { if (cieOffset < 0 || cieOffset >= debugFrameSection->Size()) return B_BAD_DATA; - DataReader dataReader((uint8*)debugFrameSection->Data() + cieOffset, + dataReader.SetTo((uint8*)debugFrameSection->Data() + cieOffset, debugFrameSection->Size() - cieOffset, unit != NULL ? unit->AddressSize() : addressSize); @@ -1691,19 +1855,18 @@ DwarfFile::_ParseCIE(ElfSection* debugFrameSection, bool usingEHFrameSection, if (dataReader.HasOverflow()) return B_BAD_DATA; - off_t remaining = (off_t)length - - (dataReader.Offset() - lengthOffset); - if (remaining < 0) + + _cieRemaining = length -(dataReader.Offset() - lengthOffset); + if (_cieRemaining < 0) return B_BAD_DATA; - DataReader restrictedReader = dataReader.RestrictedReader(remaining); - return _ParseFrameInfoInstructions(unit, context, restrictedReader); + return B_OK; } status_t DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, - CfaContext& context, DataReader& dataReader) + CfaContext& context, DataReader& dataReader, CIEAugmentation& augmentation) { while (dataReader.BytesRemaining() > 0) { TRACE_CFI(" [%2" B_PRId64 "]", dataReader.BytesRemaining()); @@ -1754,7 +1917,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, } case DW_CFA_set_loc: { - target_addr_t location = dataReader.ReadAddress(0); + target_addr_t location = augmentation.ReadEncodedAddress( + dataReader, fElfFile, fDebugFrameSection); TRACE_CFI(" DW_CFA_set_loc: %#" B_PRIx64 "\n", location); diff --git a/src/apps/debugger/dwarf/DwarfFile.h b/src/apps/debugger/dwarf/DwarfFile.h index 429e98dde4..458180c8f5 100644 --- a/src/apps/debugger/dwarf/DwarfFile.h +++ b/src/apps/debugger/dwarf/DwarfFile.h @@ -56,6 +56,7 @@ public: target_addr_t& _framePointer); status_t EvaluateExpression(CompilationUnit* unit, + uint8 addressSize, DIESubprogram* subprogramEntry, const void* expression, off_t expressionLength, @@ -65,6 +66,7 @@ public: target_addr_t valueToPush, bool pushValue, target_addr_t& _result); status_t ResolveLocation(CompilationUnit* unit, + uint8 addressSize, DIESubprogram* subprogramEntry, const LocationDescription* location, const DwarfTargetInterface* targetInterface, @@ -79,13 +81,14 @@ public: // bit offsets/sizes (cf. bit pieces). status_t EvaluateConstantValue(CompilationUnit* unit, + uint8 addressSize, DIESubprogram* subprogramEntry, const ConstantAttributeValue* value, const DwarfTargetInterface* targetInterface, target_addr_t instructionPointer, target_addr_t framePointer, BVariant& _result); - status_t EvaluateDynamicValue(CompilationUnit* unit, + status_t EvaluateDynamicValue(CompilationUnit* unit, uint8 addressSize, DIESubprogram* subprogramEntry, const DynamicAttributeValue* value, const DwarfTargetInterface* targetInterface, @@ -123,15 +126,18 @@ private: DwarfTargetInterface* outputInterface, target_addr_t& _framePointer); - status_t _ParseCIE(ElfSection* debugFrameSection, + status_t _ParseCIEHeader(ElfSection* debugFrameSection, bool usingEHFrameSection, CompilationUnit* unit, uint8 addressSize, CfaContext& context, off_t cieOffset, - CIEAugmentation& cieAugmentation); + CIEAugmentation& cieAugmentation, + DataReader& reader, + off_t& _cieRemaining); status_t _ParseFrameInfoInstructions( CompilationUnit* unit, CfaContext& context, - DataReader& dataReader); + DataReader& dataReader, + CIEAugmentation& cieAugmentation); status_t _ParsePublicTypesInfo(); status_t _ParsePublicTypesInfo(DataReader& dataReader, diff --git a/src/apps/debugger/elf/ElfFile.cpp b/src/apps/debugger/elf/ElfFile.cpp index abf1147861..23294351e4 100644 --- a/src/apps/debugger/elf/ElfFile.cpp +++ b/src/apps/debugger/elf/ElfFile.cpp @@ -107,8 +107,7 @@ ElfSegment::~ElfSegment() ElfFile::ElfFile() : fFileSize(0), - fFD(-1), - fElfHeader(NULL) + fFD(-1) { } @@ -121,8 +120,6 @@ ElfFile::~ElfFile() while (ElfSection* section = fSections.RemoveHead()) delete section; - free(fElfHeader); - if (fFD >= 0) close(fFD); } @@ -146,129 +143,16 @@ ElfFile::Init(const char* fileName) } fFileSize = st.st_size; - // read the elf header - fElfHeader = (Elf32_Ehdr*)malloc(sizeof(Elf32_Ehdr)); - if (fElfHeader == NULL) - return B_NO_MEMORY; - - ssize_t bytesRead = pread(fFD, fElfHeader, sizeof(Elf32_Ehdr), 0); - if (bytesRead != (ssize_t)sizeof(Elf32_Ehdr)) + // Read the identification information to determine the class. + uint8 elfIdent[EI_NIDENT]; + ssize_t bytesRead = pread(fFD, elfIdent, sizeof(elfIdent), 0); + if (bytesRead != (ssize_t)sizeof(elfIdent)) return bytesRead < 0 ? errno : B_ERROR; - // check the ELF header - if (!_CheckRange(0, sizeof(Elf32_Ehdr)) || !_CheckElfHeader()) { - WARNING("\"%s\": Not an ELF file\n", fileName); - return B_BAD_DATA; - } - - // check section header table values - off_t sectionHeadersOffset = fElfHeader->e_shoff; - size_t sectionHeaderSize = fElfHeader->e_shentsize; - int sectionCount = fElfHeader->e_shnum; - size_t sectionHeaderTableSize = sectionHeaderSize * sectionCount; - if (!_CheckRange(sectionHeadersOffset, sectionHeaderTableSize)) { - WARNING("\"%s\": Invalid ELF header\n", fileName); - return B_BAD_DATA; - } - - // read the section header table - uint8* sectionHeaderTable = (uint8*)malloc(sectionHeaderTableSize); - if (sectionHeaderTable == NULL) - return B_NO_MEMORY; - MemoryDeleter sectionHeaderTableDeleter(sectionHeaderTable); - - bytesRead = pread(fFD, sectionHeaderTable, sectionHeaderTableSize, - sectionHeadersOffset); - if (bytesRead != (ssize_t)sectionHeaderTableSize) - return bytesRead < 0 ? errno : B_ERROR; - - // check and get the section header string section - Elf32_Shdr* stringSectionHeader = (Elf32_Shdr*)(sectionHeaderTable - + fElfHeader->e_shstrndx * sectionHeaderSize); - if (!_CheckRange(stringSectionHeader->sh_offset, - stringSectionHeader->sh_size)) { - WARNING("\"%s\": Invalid string section header\n", fileName); - return B_BAD_DATA; - } - size_t sectionStringSize = stringSectionHeader->sh_size; - - ElfSection* sectionStringSection = new(std::nothrow) ElfSection(".shstrtab", - fFD, stringSectionHeader->sh_offset, sectionStringSize, - stringSectionHeader->sh_addr, stringSectionHeader->sh_flags); - if (sectionStringSection == NULL) - return B_NO_MEMORY; - fSections.Add(sectionStringSection); - - status_t error = sectionStringSection->Load(); - if (error != B_OK) - return error; - - const char* sectionStrings = (const char*)sectionStringSection->Data(); - - // read the other sections - for (int i = 0; i < sectionCount; i++) { - Elf32_Shdr* sectionHeader = (Elf32_Shdr*)(sectionHeaderTable - + i * sectionHeaderSize); - // skip invalid sections and the section header string section - const char* name = sectionStrings + sectionHeader->sh_name; - if (sectionHeader->sh_name >= sectionStringSize - || !_CheckRange(sectionHeader->sh_offset, sectionHeader->sh_size) - || i == fElfHeader->e_shstrndx) { - continue; - } - - // create an ElfSection - ElfSection* section = new(std::nothrow) ElfSection(name, fFD, - sectionHeader->sh_offset, sectionHeader->sh_size, - sectionHeader->sh_addr, sectionHeader->sh_flags); - if (section == NULL) - return B_NO_MEMORY; - fSections.Add(section); - } - - // check program header table values - off_t programHeadersOffset = fElfHeader->e_phoff; - size_t programHeaderSize = fElfHeader->e_phentsize; - int segmentCount = fElfHeader->e_phnum; - size_t programHeaderTableSize = programHeaderSize * segmentCount; - if (!_CheckRange(programHeadersOffset, programHeaderTableSize)) { - WARNING("\"%s\": Invalid ELF header\n", fileName); - return B_BAD_DATA; - } - - // read the program header table - uint8* programHeaderTable = (uint8*)malloc(programHeaderTableSize); - if (programHeaderTable == NULL) - return B_NO_MEMORY; - MemoryDeleter programHeaderTableDeleter(programHeaderTable); - - bytesRead = pread(fFD, programHeaderTable, programHeaderTableSize, - programHeadersOffset); - if (bytesRead != (ssize_t)programHeaderTableSize) - return bytesRead < 0 ? errno : B_ERROR; - - // read the program headers and create ElfSegment objects - for (int i = 0; i < segmentCount; i++) { - Elf32_Phdr* programHeader = (Elf32_Phdr*)(programHeaderTable - + i * programHeaderSize); - // skip program headers we aren't interested in or that are invalid - if (programHeader->p_type != PT_LOAD || programHeader->p_filesz == 0 - || programHeader->p_memsz == 0 - || !_CheckRange(programHeader->p_offset, programHeader->p_filesz)) { - continue; - } - - // create an ElfSegment - ElfSegment* segment = new(std::nothrow) ElfSegment( - programHeader->p_offset, programHeader->p_filesz, - programHeader->p_vaddr, programHeader->p_memsz, - (programHeader->p_flags & PF_WRITE) != 0); - if (segment == NULL) - return B_NO_MEMORY; - fSegments.Add(segment); - } - - return B_OK; + if(elfIdent[EI_CLASS] == ELFCLASS64) + return _LoadFile(fileName); + else + return _LoadFile(fileName); } @@ -330,6 +214,134 @@ ElfFile::DataSegment() const } +template +status_t +ElfFile::_LoadFile(const char* fileName) +{ + Ehdr elfHeader; + + // read the elf header + ssize_t bytesRead = pread(fFD, &elfHeader, sizeof(Ehdr), 0); + if (bytesRead != (ssize_t)sizeof(Ehdr)) + return bytesRead < 0 ? errno : B_ERROR; + + // check the ELF header + if (!_CheckRange(0, sizeof(Ehdr)) || !_CheckElfHeader(elfHeader)) { + WARNING("\"%s\": Not an ELF file\n", fileName); + return B_BAD_DATA; + } + + // check section header table values + off_t sectionHeadersOffset = elfHeader.e_shoff; + size_t sectionHeaderSize = elfHeader.e_shentsize; + int sectionCount = elfHeader.e_shnum; + size_t sectionHeaderTableSize = sectionHeaderSize * sectionCount; + if (!_CheckRange(sectionHeadersOffset, sectionHeaderTableSize)) { + WARNING("\"%s\": Invalid ELF header\n", fileName); + return B_BAD_DATA; + } + + // read the section header table + uint8* sectionHeaderTable = (uint8*)malloc(sectionHeaderTableSize); + if (sectionHeaderTable == NULL) + return B_NO_MEMORY; + MemoryDeleter sectionHeaderTableDeleter(sectionHeaderTable); + + bytesRead = pread(fFD, sectionHeaderTable, sectionHeaderTableSize, + sectionHeadersOffset); + if (bytesRead != (ssize_t)sectionHeaderTableSize) + return bytesRead < 0 ? errno : B_ERROR; + + // check and get the section header string section + Shdr* stringSectionHeader = (Shdr*)(sectionHeaderTable + + elfHeader.e_shstrndx * sectionHeaderSize); + if (!_CheckRange(stringSectionHeader->sh_offset, + stringSectionHeader->sh_size)) { + WARNING("\"%s\": Invalid string section header\n", fileName); + return B_BAD_DATA; + } + size_t sectionStringSize = stringSectionHeader->sh_size; + + ElfSection* sectionStringSection = new(std::nothrow) ElfSection(".shstrtab", + fFD, stringSectionHeader->sh_offset, sectionStringSize, + stringSectionHeader->sh_addr, stringSectionHeader->sh_flags); + if (sectionStringSection == NULL) + return B_NO_MEMORY; + fSections.Add(sectionStringSection); + + status_t error = sectionStringSection->Load(); + if (error != B_OK) + return error; + + const char* sectionStrings = (const char*)sectionStringSection->Data(); + + // read the other sections + for (int i = 0; i < sectionCount; i++) { + Shdr* sectionHeader = (Shdr*)(sectionHeaderTable + i + * sectionHeaderSize); + // skip invalid sections and the section header string section + const char* name = sectionStrings + sectionHeader->sh_name; + if (sectionHeader->sh_name >= sectionStringSize + || !_CheckRange(sectionHeader->sh_offset, sectionHeader->sh_size) + || i == elfHeader.e_shstrndx) { + continue; + } + + // create an ElfSection + ElfSection* section = new(std::nothrow) ElfSection(name, fFD, + sectionHeader->sh_offset, sectionHeader->sh_size, + sectionHeader->sh_addr, sectionHeader->sh_flags); + if (section == NULL) + return B_NO_MEMORY; + fSections.Add(section); + } + + // check program header table values + off_t programHeadersOffset = elfHeader.e_phoff; + size_t programHeaderSize = elfHeader.e_phentsize; + int segmentCount = elfHeader.e_phnum; + size_t programHeaderTableSize = programHeaderSize * segmentCount; + if (!_CheckRange(programHeadersOffset, programHeaderTableSize)) { + WARNING("\"%s\": Invalid ELF header\n", fileName); + return B_BAD_DATA; + } + + // read the program header table + uint8* programHeaderTable = (uint8*)malloc(programHeaderTableSize); + if (programHeaderTable == NULL) + return B_NO_MEMORY; + MemoryDeleter programHeaderTableDeleter(programHeaderTable); + + bytesRead = pread(fFD, programHeaderTable, programHeaderTableSize, + programHeadersOffset); + if (bytesRead != (ssize_t)programHeaderTableSize) + return bytesRead < 0 ? errno : B_ERROR; + + // read the program headers and create ElfSegment objects + for (int i = 0; i < segmentCount; i++) { + Phdr* programHeader = (Phdr*)(programHeaderTable + i + * programHeaderSize); + // skip program headers we aren't interested in or that are invalid + if (programHeader->p_type != PT_LOAD || programHeader->p_filesz == 0 + || programHeader->p_memsz == 0 + || !_CheckRange(programHeader->p_offset, programHeader->p_filesz)) { + continue; + } + + // create an ElfSegment + ElfSegment* segment = new(std::nothrow) ElfSegment( + programHeader->p_offset, programHeader->p_filesz, + programHeader->p_vaddr, programHeader->p_memsz, + (programHeader->p_flags & PF_WRITE) != 0); + if (segment == NULL) + return B_NO_MEMORY; + fSegments.Add(segment); + } + + return B_OK; +} + + bool ElfFile::_CheckRange(off_t offset, off_t size) const { @@ -338,16 +350,32 @@ ElfFile::_CheckRange(off_t offset, off_t size) const bool -ElfFile::_CheckElfHeader() const +ElfFile::_CheckElfHeader(Elf32_Ehdr& elfHeader) { - return memcmp(fElfHeader->e_ident, ELF_MAGIC, 4) == 0 - && fElfHeader->e_ident[4] == ELFCLASS32 - && fElfHeader->e_shoff > 0 - && fElfHeader->e_shnum > 0 - && fElfHeader->e_shentsize >= sizeof(struct Elf32_Shdr) - && fElfHeader->e_shstrndx != SHN_UNDEF - && fElfHeader->e_shstrndx < fElfHeader->e_shnum - && fElfHeader->e_phoff > 0 - && fElfHeader->e_phnum > 0 - && fElfHeader->e_phentsize >= sizeof(struct Elf32_Phdr); + return memcmp(elfHeader.e_ident, ELF_MAGIC, 4) == 0 + && elfHeader.e_ident[4] == ELFCLASS32 + && elfHeader.e_shoff > 0 + && elfHeader.e_shnum > 0 + && elfHeader.e_shentsize >= sizeof(struct Elf32_Shdr) + && elfHeader.e_shstrndx != SHN_UNDEF + && elfHeader.e_shstrndx < elfHeader.e_shnum + && elfHeader.e_phoff > 0 + && elfHeader.e_phnum > 0 + && elfHeader.e_phentsize >= sizeof(struct Elf32_Phdr); +} + + +bool +ElfFile::_CheckElfHeader(Elf64_Ehdr& elfHeader) +{ + return memcmp(elfHeader.e_ident, ELF_MAGIC, 4) == 0 + && elfHeader.e_ident[4] == ELFCLASS64 + && elfHeader.e_shoff > 0 + && elfHeader.e_shnum > 0 + && elfHeader.e_shentsize >= sizeof(struct Elf64_Shdr) + && elfHeader.e_shstrndx != SHN_UNDEF + && elfHeader.e_shstrndx < elfHeader.e_shnum + && elfHeader.e_phoff > 0 + && elfHeader.e_phnum > 0 + && elfHeader.e_phentsize >= sizeof(struct Elf64_Phdr); } diff --git a/src/apps/debugger/elf/ElfFile.h b/src/apps/debugger/elf/ElfFile.h index c4e7665aa6..b5069437c4 100644 --- a/src/apps/debugger/elf/ElfFile.h +++ b/src/apps/debugger/elf/ElfFile.h @@ -10,6 +10,7 @@ #include #include +#include #include #include "Types.h" @@ -90,13 +91,16 @@ private: typedef DoublyLinkedList SegmentList; private: + template + status_t _LoadFile(const char* fileName); + bool _CheckRange(off_t offset, off_t size) const; - bool _CheckElfHeader() const; + static bool _CheckElfHeader(Elf32_Ehdr& elfHeader); + static bool _CheckElfHeader(Elf64_Ehdr& elfHeader); private: off_t fFileSize; int fFD; - Elf32_Ehdr* fElfHeader; SectionList fSections; SegmentList fSegments; }; diff --git a/src/apps/debugger/user_interface/cli/CliDumpMemoryCommand.cpp b/src/apps/debugger/user_interface/cli/CliDumpMemoryCommand.cpp index 4d8c7d8b66..50899f1f16 100644 --- a/src/apps/debugger/user_interface/cli/CliDumpMemoryCommand.cpp +++ b/src/apps/debugger/user_interface/cli/CliDumpMemoryCommand.cpp @@ -1,6 +1,11 @@ /* + * Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2002-2010, Axel Dörfler, axeld@pinc-software.de. * Copyright 2012, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. + * + * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. + * Distributed under the terms of the NewOS License. */ diff --git a/src/apps/debugger/user_interface/cli/CommandLineUserInterface.cpp b/src/apps/debugger/user_interface/cli/CommandLineUserInterface.cpp index 85a204b3d6..f29b87ec0b 100644 --- a/src/apps/debugger/user_interface/cli/CommandLineUserInterface.cpp +++ b/src/apps/debugger/user_interface/cli/CommandLineUserInterface.cpp @@ -306,43 +306,22 @@ CommandLineUserInterface::_InputLoop() status_t CommandLineUserInterface::_RegisterCommands() { - BReference stackTraceCommandReference( - new(std::nothrow) CliStackTraceCommand, true); - BReference stackTraceCommandReference2( - stackTraceCommandReference.Get()); - - BReference dumpCommandReference( - new(std::nothrow) CliDumpMemoryCommand, true); - BReference dumpCommandReference2( - dumpCommandReference.Get()); - if (!_RegisterCommand("db", dumpCommandReference.Detach())) - return B_NO_MEMORY; - dumpCommandReference = dumpCommandReference2.Get(); - if (!_RegisterCommand("ds", dumpCommandReference.Detach())) - return B_NO_MEMORY; - dumpCommandReference = dumpCommandReference2.Get(); - if (!_RegisterCommand("dw", dumpCommandReference.Detach())) - return B_NO_MEMORY; - dumpCommandReference = dumpCommandReference2.Get(); - if (!_RegisterCommand("dl", dumpCommandReference.Detach())) - return B_NO_MEMORY; - if (!_RegisterCommand("string", dumpCommandReference2.Detach())) - return B_NO_MEMORY; - - if (_RegisterCommand("bt", stackTraceCommandReference.Detach()) + if (_RegisterCommand("bt sc", new(std::nothrow) CliStackTraceCommand) && _RegisterCommand("continue", new(std::nothrow) CliContinueCommand) + && _RegisterCommand("db ds dw dl string", new(std::nothrow) + CliDumpMemoryCommand) && _RegisterCommand("frame", new(std::nothrow) CliStackFrameCommand) && _RegisterCommand("help", new(std::nothrow) HelpCommand(this)) && _RegisterCommand("print", new(std::nothrow) CliPrintVariableCommand) && _RegisterCommand("quit", new(std::nothrow) CliQuitCommand) && _RegisterCommand("save-report", new(std::nothrow) CliDebugReportCommand) - && _RegisterCommand("sc", stackTraceCommandReference2.Detach()) && _RegisterCommand("stop", new(std::nothrow) CliStopCommand) && _RegisterCommand("thread", new(std::nothrow) CliThreadCommand) && _RegisterCommand("threads", new(std::nothrow) CliThreadsCommand) && _RegisterCommand("variables", new(std::nothrow) CliVariablesCommand)) { + fCommands.SortItems(&_CompareCommandEntries); return B_OK; } @@ -358,11 +337,23 @@ CommandLineUserInterface::_RegisterCommand(const BString& name, if (name.IsEmpty() || command == NULL) return false; - CommandEntry* entry = new(std::nothrow) CommandEntry(name, command); - if (entry == NULL || !fCommands.AddItem(entry)) { - delete entry; - return false; - } + BString nextName; + int32 startIndex = 0; + int32 spaceIndex; + do { + spaceIndex = name.FindFirst(' ', startIndex); + if (spaceIndex == B_ERROR) + spaceIndex = name.Length(); + name.CopyInto(nextName, startIndex, spaceIndex - startIndex); + + CommandEntry* entry = new(std::nothrow) CommandEntry(nextName, + command); + if (entry == NULL || !fCommands.AddItem(entry)) { + delete entry; + return false; + } + startIndex = spaceIndex + 1; + } while (startIndex < name.Length()); return true; } @@ -441,3 +432,14 @@ CommandLineUserInterface::_PrintHelp(const char* commandName) entry->Command()->Summary()); } } + + +/*static */ +int +CommandLineUserInterface::_CompareCommandEntries(const CommandEntry* command1, + const CommandEntry* command2) +{ + return ::Compare(command1->Name(), command2->Name()); +} + + diff --git a/src/apps/debugger/user_interface/cli/CommandLineUserInterface.h b/src/apps/debugger/user_interface/cli/CommandLineUserInterface.h index 15630bd4a8..2ca34884e3 100644 --- a/src/apps/debugger/user_interface/cli/CommandLineUserInterface.h +++ b/src/apps/debugger/user_interface/cli/CommandLineUserInterface.h @@ -72,6 +72,9 @@ private: const char* const* argv); CommandEntry* _FindCommand(const char* commandName); void _PrintHelp(const char* commandName); + static int _CompareCommandEntries( + const CommandEntry* command1, + const CommandEntry* command2); private: CliContext fContext; diff --git a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp index 9717a18dcf..fe30580295 100644 --- a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp +++ b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp @@ -104,7 +104,7 @@ MemoryView::Draw(BRect rect) { rect = Bounds(); - float divider = 9 * fCharWidth; + float divider = (fTargetAddressSize + 1) * fCharWidth; StrokeLine(BPoint(divider, rect.top), BPoint(divider, rect.bottom)); diff --git a/src/apps/debugger/user_interface/util/UiUtils.cpp b/src/apps/debugger/user_interface/util/UiUtils.cpp index 2b3e2d157f..a27956f9f6 100644 --- a/src/apps/debugger/user_interface/util/UiUtils.cpp +++ b/src/apps/debugger/user_interface/util/UiUtils.cpp @@ -230,7 +230,8 @@ UiUtils::PrintValueNodeGraph(BString& _output, ValueNodeChild* child, } -/*static*/ void UiUtils::DumpMemory(BString& _output, int32 indentLevel, +/*static*/ void +UiUtils::DumpMemory(BString& _output, int32 indentLevel, TeamMemoryBlock* block, target_addr_t address, int32 itemSize, int32 displayWidth, int32 count) { diff --git a/src/apps/deskbar/BarApp.cpp b/src/apps/deskbar/BarApp.cpp index 42160e01eb..af7372d696 100644 --- a/src/apps/deskbar/BarApp.cpp +++ b/src/apps/deskbar/BarApp.cpp @@ -51,6 +51,8 @@ All rights reserved. #include #include #include +#include +#include #include #include #include @@ -74,9 +76,8 @@ BList TBarApp::sBarTeamInfoList; BList TBarApp::sSubscribers; -const uint32 kShowDeskbarMenu = 'BeMn'; -const uint32 kShowTeamMenu = 'TmMn'; - +const uint32 kShowDeskbarMenu = 'BeMn'; +const uint32 kShowTeamMenu = 'TmMn'; static const color_space kIconColorSpace = B_RGBA32; @@ -95,6 +96,7 @@ main() TBarApp::TBarApp() : BApplication(kDeskbarSignature), fSettingsFile(NULL), + fClockSettingsFile(NULL), fPreferencesWindow(NULL) { InitSettings(); @@ -159,8 +161,11 @@ TBarApp::~TBarApp() = static_cast(sSubscribers.ItemAt(i)); delete messenger; } + SaveSettings(); + delete fSettingsFile; + delete fClockSettingsFile; } @@ -204,9 +209,6 @@ TBarApp::SaveSettings() storedSettings.AddInt32("state", fSettings.state); storedSettings.AddFloat("width", fSettings.width); - storedSettings.AddBool("showSeconds", fSettings.showSeconds); - storedSettings.AddBool("showDayOfWeek", fSettings.showDayOfWeek); - storedSettings.AddPoint("switcherLoc", fSettings.switcherLoc); storedSettings.AddInt32("recentAppsCount", fSettings.recentAppsCount); storedSettings.AddInt32("recentDocsCount", fSettings.recentDocsCount); @@ -233,6 +235,20 @@ TBarApp::SaveSettings() storedSettings.Flatten(fSettingsFile); } + + if (fClockSettingsFile->InitCheck() == B_OK) { + fClockSettingsFile->Seek(0, SEEK_SET); + BMessage storedSettings; + + storedSettings.AddBool("showSeconds", + fClockSettings.showSeconds); + storedSettings.AddBool("showDayOfWeek", + fClockSettings.showDayOfWeek); + storedSettings.AddBool("showTimeZone", + fClockSettings.showTimeZone); + + storedSettings.Flatten(fClockSettingsFile); + } } @@ -243,8 +259,6 @@ TBarApp::InitSettings() settings.vertical = true; settings.left = false; settings.top = true; - settings.showSeconds = false; - settings.showDayOfWeek = false; settings.state = kExpandoState; settings.width = 0; settings.switcherLoc = BPoint(5000, 5000); @@ -266,13 +280,19 @@ TBarApp::InitSettings() settings.recentDocsEnabled = true; settings.recentFoldersEnabled = true; + clock_settings clock; + clock.showSeconds = false; + clock.showDayOfWeek = false; + clock.showTimeZone = false; + BPath dirPath; const char* settingsFileName = "Deskbar_settings"; + const char* clockSettingsFileName = "Deskbar_clock_settings"; find_directory(B_USER_DESKBAR_DIRECTORY, &dirPath, true); // just make it - if (find_directory (B_USER_SETTINGS_DIRECTORY, &dirPath, true) == B_OK) { + if (find_directory(B_USER_SETTINGS_DIRECTORY, &dirPath, true) == B_OK) { BPath filePath = dirPath; filePath.Append(settingsFileName); fSettingsFile = new BFile(filePath.Path(), O_RDWR); @@ -282,6 +302,13 @@ TBarApp::InitSettings() theDir.CreateFile(settingsFileName, fSettingsFile); } + fClockSettingsFile = new BFile(filePath.Path(), O_RDWR); + if (fClockSettingsFile->InitCheck() != B_OK) { + BDirectory theDir(dirPath.Path()); + if (theDir.InitCheck() == B_OK) + theDir.CreateFile(clockSettingsFileName, fClockSettingsFile); + } + BMessage storedSettings; if (fSettingsFile->InitCheck() == B_OK && storedSettings.Unflatten(fSettingsFile) == B_OK) { @@ -299,14 +326,6 @@ TBarApp::InitSettings() } if (storedSettings.FindFloat("width", &settings.width) != B_OK) settings.width = 0; - if (storedSettings.FindBool("showSeconds", &settings.showSeconds) - != B_OK) { - settings.showSeconds = false; - } - if (storedSettings.FindBool("showDayOfWeek", &settings.showDayOfWeek) - != B_OK) { - settings.showDayOfWeek = false; - } if (storedSettings.FindPoint("switcherLoc", &settings.switcherLoc) != B_OK) { settings.switcherLoc = BPoint(5000, 5000); @@ -378,9 +397,26 @@ TBarApp::InitSettings() settings.recentFoldersEnabled = true; } } + + if (fClockSettingsFile->InitCheck() == B_OK + && storedSettings.Unflatten(fClockSettingsFile) == B_OK) { + if (storedSettings.FindBool("showSeconds", &clock.showSeconds) + != B_OK) { + clock.showSeconds = false; + } + if (storedSettings.FindBool("showDayOfWeek", + &clock.showDayOfWeek) != B_OK) { + clock.showDayOfWeek = false; + } + if (storedSettings.FindBool("showTimeZone", + &clock.showTimeZone) != B_OK) { + clock.showDayOfWeek = false; + } + } } fSettings = settings; + fClockSettings = clock; } @@ -444,10 +480,6 @@ TBarApp::MessageReceived(BMessage* message) fSettings.recentDocsEnabled = enabled && count > 0; break; - case kConfigClose: - fPreferencesWindow = NULL; - break; - case B_SOME_APP_LAUNCHED: { team_id team = -1; @@ -626,13 +658,19 @@ TBarApp::MessageReceived(BMessage* message) bool localize; if (message->FindBool("filesys", &localize) == B_OK) gLocalizedNamePreferred = localize; + } + // fall-through + case kShowHideTime: + case kShowSeconds: + case kShowDayOfWeek: + case kShowTimeZone: + case kGetClockSettings: fStatusViewMessenger.SendMessage(message); // Notify the replicant tray (through BarView) that the time // interval has changed and it should update the time view // and reflow the tray icons. break; - } default: BApplication::MessageReceived(message); @@ -845,11 +883,18 @@ TBarApp::IconSize() void TBarApp::ShowPreferencesWindow() { - if (fPreferencesWindow) - fPreferencesWindow->Activate(); - else { + if (fPreferencesWindow == NULL) { fPreferencesWindow = new PreferencesWindow(BRect(0, 0, 320, 240)); fPreferencesWindow->Show(); + } else { + if (fPreferencesWindow->Lock()) { + if (fPreferencesWindow->IsHidden()) + fPreferencesWindow->Show(); + else + fPreferencesWindow->Activate(); + + fPreferencesWindow->Unlock(); + } } } diff --git a/src/apps/deskbar/BarApp.h b/src/apps/deskbar/BarApp.h index 2c817572c0..0427150583 100644 --- a/src/apps/deskbar/BarApp.h +++ b/src/apps/deskbar/BarApp.h @@ -75,8 +75,6 @@ struct desk_settings { bool vertical; bool left; bool top; - bool showSeconds; - bool showDayOfWeek; uint32 state; float width; BPoint switcherLoc; @@ -99,6 +97,12 @@ struct desk_settings { bool recentFoldersEnabled; }; +struct clock_settings { + bool showSeconds; + bool showDayOfWeek; + bool showTimeZone; +}; + class BFile; class BList; class BBitmap; @@ -132,6 +136,7 @@ class TBarApp : public BApplication { virtual void RefsReceived(BMessage* refs); desk_settings* Settings() { return &fSettings; } + clock_settings* ClockSettings() { return &fClockSettings; } TBarView* BarView() const { return fBarView; } TBarWindow* BarWindow() const { return fBarWindow; } @@ -156,7 +161,9 @@ class TBarApp : public BApplication { BMessenger fSwitcherMessenger; BMessenger fStatusViewMessenger; BFile* fSettingsFile; + BFile* fClockSettingsFile; desk_settings fSettings; + clock_settings fClockSettings; PreferencesWindow* fPreferencesWindow; diff --git a/src/apps/deskbar/BarView.cpp b/src/apps/deskbar/BarView.cpp index 6f89271aa1..2c0fb4f97e 100644 --- a/src/apps/deskbar/BarView.cpp +++ b/src/apps/deskbar/BarView.cpp @@ -223,6 +223,11 @@ TBarView::MessageReceived(BMessage* message) { switch (message->what) { case B_LOCALE_CHANGED: + case kShowHideTime: + case kShowSeconds: + case kShowDayOfWeek: + case kShowTimeZone: + case kGetClockSettings: fReplicantTray->MessageReceived(message); break; diff --git a/src/apps/deskbar/DeskbarMenu.cpp b/src/apps/deskbar/DeskbarMenu.cpp index 04d51fbb6f..b85c082a0e 100644 --- a/src/apps/deskbar/DeskbarMenu.cpp +++ b/src/apps/deskbar/DeskbarMenu.cpp @@ -388,13 +388,12 @@ TDeskbarMenu::ResetTargets() case kRebootSystem: case kSuspendSystem: case kShutdownSystem: - item->SetTarget(be_app); - break; - case kShowHideTime: case kShowSeconds: case kShowDayOfWeek: - item->SetTarget(fBarView->fReplicantTray); + case kShowTimeZone: + case kGetClockSettings: + item->SetTarget(be_app); break; } } diff --git a/src/apps/deskbar/DeskbarMenu.h b/src/apps/deskbar/DeskbarMenu.h index ce9b7a6013..3737a32fb9 100644 --- a/src/apps/deskbar/DeskbarMenu.h +++ b/src/apps/deskbar/DeskbarMenu.h @@ -37,6 +37,8 @@ All rights reserved. #include "NavMenu.h" +#include "PreferencesWindow.h" + // for message constants class TBarView; diff --git a/src/apps/deskbar/PreferencesWindow.cpp b/src/apps/deskbar/PreferencesWindow.cpp index 5a0da893a2..eb4fcf6ff9 100644 --- a/src/apps/deskbar/PreferencesWindow.cpp +++ b/src/apps/deskbar/PreferencesWindow.cpp @@ -19,14 +19,16 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include -#include +#include #include #include @@ -34,8 +36,32 @@ #include "StatusView.h" +namespace BPrivate { + +class SettingsItem : public BStringItem { + public: + SettingsItem(const char* label, BView* view) + : + BStringItem(label), + fSettingsView(view) + { + } + + BView* View() + { + return fSettingsView; + } + + private: + BView* fSettingsView; +}; + +} // namespace BPrivate + + static const float kIndentSpacing = be_control_look->DefaultItemSpacing() * 2.3; +static const uint32 kSettingsViewChanged = 'Svch'; #undef B_TRANSLATION_CONTEXT @@ -47,6 +73,15 @@ PreferencesWindow::PreferencesWindow(BRect frame) BWindow(frame, B_TRANSLATE("Deskbar preferences"), B_TITLED_WINDOW, B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE) { + // Main view controls + fSettingsTypeListView = new BListView("List View", + B_SINGLE_SELECTION_LIST); + + BScrollView* scrollView = new BScrollView("scrollview", + fSettingsTypeListView, 0, false, true); + + fSettingsContainerBox = new BBox("SettingsContainerBox"); + // Menu controls fMenuRecentDocuments = new BCheckBox(B_TRANSLATE("Recent documents:"), new BMessage(kUpdateRecentCounts)); @@ -91,12 +126,6 @@ PreferencesWindow::PreferencesWindow(BRect frame) fWindowAutoHide = new BCheckBox(B_TRANSLATE("Auto-hide"), new BMessage(kAutoHide)); - // Clock controls - fShowSeconds = new BCheckBox(B_TRANSLATE("Show seconds"), - new BMessage(kShowSeconds)); - fShowDayOfWeek = new BCheckBox(B_TRANSLATE("Show day of week"), - new BMessage(kShowDayOfWeek)); - // Get settings from BarApp TBarApp* barApp = static_cast(be_app); desk_settings* settings = barApp->Settings(); @@ -156,16 +185,6 @@ PreferencesWindow::PreferencesWindow(BRect frame) fWindowAutoRaise->SetValue(settings->autoRaise); fWindowAutoHide->SetValue(settings->autoHide); - // Clock settings - TReplicantTray* replicantTray = barApp->BarView()->ReplicantTray(); - if (replicantTray->Time() != NULL) { - fShowSeconds->SetValue(replicantTray->Time()->ShowSeconds()); - fShowDayOfWeek->SetValue(replicantTray->Time()->ShowDayOfWeek()); - } else { - fShowSeconds->SetValue(settings->showSeconds); - fShowDayOfWeek->SetValue(settings->showDayOfWeek); - } - EnableDisableDependentItems(); // Targets @@ -179,22 +198,8 @@ PreferencesWindow::PreferencesWindow(BRect frame) fWindowAutoRaise->SetTarget(be_app); fWindowAutoHide->SetTarget(be_app); - fShowSeconds->SetTarget(replicantTray); - fShowDayOfWeek->SetTarget(replicantTray); - // Layout - fMenuBox = new BBox("fMenuBox"); - fAppsBox = new BBox("fAppsBox"); - fWindowBox = new BBox("fWindowBox"); - fClockBox = new BBox("fClockBox"); - - fMenuBox->SetLabel(B_TRANSLATE("Menu")); - fAppsBox->SetLabel(B_TRANSLATE("Applications")); - fWindowBox->SetLabel(B_TRANSLATE("Window")); - fClockBox->SetLabel(B_TRANSLATE("Clock")); - - BView* view; - view = BLayoutBuilder::Group<>() + BView* menuSettingsView = BLayoutBuilder::Group<>() .AddGroup(B_VERTICAL, 0) .AddGroup(B_HORIZONTAL, 0) .AddGroup(B_VERTICAL, 0) @@ -213,13 +218,13 @@ PreferencesWindow::PreferencesWindow(BRect frame) .Add(new BButton(B_TRANSLATE("Edit menu" B_UTF8_ELLIPSIS), new BMessage(kEditMenuInTracker))) .End() + .AddGlue() .SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING) .End() .View(); - fMenuBox->AddChild(view); - view = BLayoutBuilder::Group<>() + BView* applicationsSettingsView = BLayoutBuilder::Group<>() .AddGroup(B_VERTICAL, 0) .Add(fAppsSort) .Add(fAppsSortTrackerFirst) @@ -238,9 +243,8 @@ PreferencesWindow::PreferencesWindow(BRect frame) B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING) .End() .View(); - fAppsBox->AddChild(view); - view = BLayoutBuilder::Group<>() + BView* windowSettingsView = BLayoutBuilder::Group<>() .AddGroup(B_VERTICAL, 0) .Add(fWindowAlwaysOnTop) .Add(fWindowAutoRaise) @@ -250,30 +254,33 @@ PreferencesWindow::PreferencesWindow(BRect frame) B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING) .End() .View(); - fWindowBox->AddChild(view); - - view = BLayoutBuilder::Group<>() - .AddGroup(B_VERTICAL, 0) - .Add(fShowSeconds) - .Add(fShowDayOfWeek) - .AddGlue() - .SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, - B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING) - .End() - .View(); - fClockBox->AddChild(view); BLayoutBuilder::Group<>(this) - .AddGrid(5, 5) - .Add(fMenuBox, 0, 0) - .Add(fWindowBox, 1, 0) - .Add(fAppsBox, 0, 1) - .Add(fClockBox, 1, 1) + .AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING) + .Add(scrollView) + .Add(fSettingsContainerBox) .SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING) - .End() .End(); + fSettingsTypeListView->AddItem(new SettingsItem(B_TRANSLATE("Menu"), + menuSettingsView)); + fSettingsTypeListView->AddItem(new SettingsItem(B_TRANSLATE("Applications"), + applicationsSettingsView)); + fSettingsTypeListView->AddItem(new SettingsItem(B_TRANSLATE("Window"), + windowSettingsView)); + + // constraint the listview width so that the longest item fits + float width = 0; + fSettingsTypeListView->GetPreferredSize(&width, NULL); + width += B_V_SCROLL_BAR_WIDTH; + fSettingsTypeListView->SetExplicitMinSize(BSize(width, 0)); + fSettingsTypeListView->SetExplicitMaxSize(BSize(width, B_SIZE_UNLIMITED)); + + fSettingsTypeListView->SetSelectionMessage( + new BMessage(kSettingsViewChanged)); + fSettingsTypeListView->Select(0); + CenterOnScreen(); } @@ -281,7 +288,6 @@ PreferencesWindow::PreferencesWindow(BRect frame) PreferencesWindow::~PreferencesWindow() { UpdateRecentCounts(); - be_app->PostMessage(kConfigClose); } @@ -306,6 +312,10 @@ PreferencesWindow::MessageReceived(BMessage* message) EnableDisableDependentItems(); break; + case kSettingsViewChanged: + _HandleChangedSettingsView(); + break; + default: BWindow::MessageReceived(message); break; @@ -313,6 +323,17 @@ PreferencesWindow::MessageReceived(BMessage* message) } +bool +PreferencesWindow::QuitRequested() +{ + if (IsHidden()) + return true; + + Hide(); + return false; +} + + void PreferencesWindow::WindowActivated(bool active) { @@ -367,3 +388,35 @@ PreferencesWindow::EnableDisableDependentItems() fWindowAutoRaise->SetEnabled( fWindowAlwaysOnTop->Value() == B_CONTROL_OFF); } + + +// #pragma mark - + + +void +PreferencesWindow::_HandleChangedSettingsView() +{ + int32 currentSelection = fSettingsTypeListView->CurrentSelection(); + if (currentSelection < 0) + return; + + BView* oldView = fSettingsContainerBox->ChildAt(0); + + if (oldView != NULL) + oldView->RemoveSelf(); + + SettingsItem* selectedItem = + dynamic_cast + (fSettingsTypeListView->ItemAt(currentSelection)); + + if (selectedItem != NULL) { + fSettingsContainerBox->SetLabel(selectedItem->Text()); + + BView* view = selectedItem->View(); + view->SetViewColor(fSettingsContainerBox->ViewColor()); + view->Hide(); + fSettingsContainerBox->AddChild(view); + + view->Show(); + } +} diff --git a/src/apps/deskbar/PreferencesWindow.h b/src/apps/deskbar/PreferencesWindow.h index 86fd9c2a5b..6d07e58eb5 100644 --- a/src/apps/deskbar/PreferencesWindow.h +++ b/src/apps/deskbar/PreferencesWindow.h @@ -10,7 +10,6 @@ const uint32 kConfigShow = 'show'; -const uint32 kConfigClose = 'canc'; const uint32 kUpdateRecentCounts = 'upct'; const uint32 kEditMenuInTracker = 'mtrk'; @@ -23,14 +22,10 @@ const uint32 kResizeTeamIcons = 'RTIs'; const uint32 kAutoRaise = 'AtRs'; const uint32 kAutoHide = 'AtHd'; -const uint32 kShowHideTime = 'ShTm'; -const uint32 kShowSeconds = 'SwSc'; -const uint32 kShowDayOfWeek = 'SwDw'; - - class BBox; class BButton; class BCheckBox; +class BListView; class BRadioButton; class BSlider; class BStringView; @@ -43,16 +38,17 @@ public: ~PreferencesWindow(); virtual void MessageReceived(BMessage* message); + virtual bool QuitRequested(); virtual void WindowActivated(bool active); void UpdateRecentCounts(); void EnableDisableDependentItems(); private: - BBox* fMenuBox; - BBox* fAppsBox; - BBox* fClockBox; - BBox* fWindowBox; + void _HandleChangedSettingsView(); + + BListView* fSettingsTypeListView; + BBox* fSettingsContainerBox; BCheckBox* fMenuRecentDocuments; BCheckBox* fMenuRecentApplications; @@ -72,9 +68,6 @@ private: BCheckBox* fWindowAlwaysOnTop; BCheckBox* fWindowAutoRaise; BCheckBox* fWindowAutoHide; - - BCheckBox* fShowSeconds; - BCheckBox* fShowDayOfWeek; }; diff --git a/src/apps/deskbar/StatusView.cpp b/src/apps/deskbar/StatusView.cpp index fcea955957..b9e6976be6 100644 --- a/src/apps/deskbar/StatusView.cpp +++ b/src/apps/deskbar/StatusView.cpp @@ -147,14 +147,8 @@ TReplicantTray::TReplicantTray(TBarView* parent, bool vertical) fMinimumTrayWidth = sMinimumWindowWidth - kGutter - kDragRegionWidth; } - BFormattingConventions conventions; - BLocale::Default()->GetFormattingConventions(&conventions); - bool use24HourClock = conventions.Use24HourClock(); - desk_settings* settings = ((TBarApp*)be_app)->Settings(); - // Create the time view - fTime = new TTimeView(fMinimumTrayWidth, kMaxReplicantHeight - 1.0, - use24HourClock, settings->showSeconds, settings->showDayOfWeek); + fTime = new TTimeView(fMinimumTrayWidth, kMaxReplicantHeight - 1.0); } @@ -180,6 +174,12 @@ TReplicantTray::AttachedToWindow() Window()->SetPulseRate(1000000); + // Set clock settings + clock_settings* settings = ((TBarApp*)be_app)->ClockSettings(); + fTime->SetShowSeconds(settings->showSeconds); + fTime->SetShowDayOfWeek(settings->showDayOfWeek); + fTime->SetShowTimeZone(settings->showTimeZone); + AddChild(fTime); fTime->MoveTo(Bounds().right - fTime->Bounds().Width() - 1, 2); @@ -279,10 +279,7 @@ TReplicantTray::MessageReceived(BMessage* message) if (fTime == NULL) return; - // Locale may have updated 12/24 hour clock - BFormattingConventions conventions; - BLocale::Default()->GetFormattingConventions(&conventions); - fTime->SetUse24HourClock(conventions.Use24HourClock()); + fTime->Update(); // time string reformat -> realign RealignReplicants(); @@ -317,6 +314,36 @@ TReplicantTray::MessageReceived(BMessage* message) AdjustPlacement(); break; + case kShowTimeZone: + if (fTime == NULL) + return; + + fTime->SetShowTimeZone(!fTime->ShowTimeZone()); + + // time string reformat -> realign + RealignReplicants(); + AdjustPlacement(); + break; + + case kGetClockSettings: + { + if (fTime == NULL) + return; + + bool showClock = !fTime->IsHidden(); + bool showSeconds = fTime->ShowSeconds(); + bool showDayOfWeek = fTime->ShowDayOfWeek(); + bool showTimeZone = fTime->ShowTimeZone(); + + BMessage* reply = new BMessage(kGetClockSettings); + reply->AddBool("showClock", showClock); + reply->AddBool("showSeconds", showSeconds); + reply->AddBool("showDayOfWeek", showDayOfWeek); + reply->AddBool("showTimeZone", showTimeZone); + message->SendReply(reply); + break; + } + #ifdef DB_ADDONS case B_NODE_MONITOR: HandleEntryUpdate(message); @@ -375,12 +402,12 @@ TReplicantTray::ShowReplicantMenu(BPoint point) BPopUpMenu* menu = new BPopUpMenu("", false, false); menu->SetFont(be_plain_font); - // If clock is visible show the extended menu, otherwise show "Show time" + // If clock is visible show the extended menu, otherwise show "Show clock" if (!fTime->IsHidden()) fTime->ShowTimeOptions(ConvertToScreen(point)); else { - BMenuItem* item = new BMenuItem(B_TRANSLATE("Show time"), + BMenuItem* item = new BMenuItem(B_TRANSLATE("Show clock"), new BMessage(kShowHideTime)); menu->AddItem(item); menu->SetTargetForItems(this); @@ -411,6 +438,12 @@ TReplicantTray::ShowHideTime() RealignReplicants(); AdjustPlacement(); + + // message Time preferences to update it's show time setting + BMessenger messenger("application/x-vnd.Haiku-Time"); + BMessage* message = new BMessage(kShowHideTime); + message->AddBool("showClock", !fTime->IsHidden()); + messenger.SendMessage(message); } @@ -1235,9 +1268,10 @@ TReplicantTray::SaveTimeSettings() if (fTime == NULL) return; - desk_settings* settings = ((TBarApp*)be_app)->Settings(); + clock_settings* settings = ((TBarApp*)be_app)->ClockSettings(); settings->showSeconds = fTime->ShowSeconds(); settings->showDayOfWeek = fTime->ShowDayOfWeek(); + settings->showTimeZone = fTime->ShowTimeZone(); } diff --git a/src/apps/deskbar/TimeView.cpp b/src/apps/deskbar/TimeView.cpp index b0f86be74b..0c6d0c8c10 100644 --- a/src/apps/deskbar/TimeView.cpp +++ b/src/apps/deskbar/TimeView.cpp @@ -38,6 +38,7 @@ All rights reserved. #include +#include #include #include #include @@ -55,20 +56,11 @@ static const char* const kMinString = "99:99 AM"; static const float kHMargin = 2.0; -enum { - kShowTime, - kChangeTime, - kHide, - kShowCalendar -}; - - #undef B_TRANSLATION_CONTEXT #define B_TRANSLATION_CONTEXT "TimeView" -TTimeView::TTimeView(float maxWidth, float height, bool use24HourClock, - bool showSeconds, bool showDayOfWeek) +TTimeView::TTimeView(float maxWidth, float height) : BView(BRect(-100, -100, -90, -90), "_deskbar_tv_", B_FOLLOW_RIGHT | B_FOLLOW_TOP, @@ -77,9 +69,9 @@ TTimeView::TTimeView(float maxWidth, float height, bool use24HourClock, fMaxWidth(maxWidth), fHeight(height), fOrientation(true), - fUse24HourClock(use24HourClock), - fShowSeconds(showSeconds), - fShowDayOfWeek(showDayOfWeek) + fShowSeconds(false), + fShowDayOfWeek(false), + fShowTimeZone(false) { fCurrentTime = fLastTime = time(NULL); fSeconds = fMinute = fHour = 0; @@ -88,7 +80,6 @@ TTimeView::TTimeView(float maxWidth, float height, bool use24HourClock, fLastTimeStr[0] = 0; fLastDateStr[0] = 0; fNeedToUpdate = true; - fLocale = *BLocale::Default(); } @@ -125,7 +116,10 @@ status_t TTimeView::Archive(BMessage* data, bool deep) const { BView::Archive(data, deep); - data->AddBool("seconds", fShowSeconds); + data->AddBool("showSeconds", fShowSeconds); + data->AddBool("showDayOfWeek", fShowDayOfWeek); + data->AddBool("showTimeZone", fShowTimeZone); + data->AddBool("orientation", fOrientation); data->AddInt32("deskbar:private_align", B_ALIGN_RIGHT); return B_OK; @@ -194,13 +188,21 @@ TTimeView::MessageReceived(BMessage* message) { switch (message->what) { case kChangeTime: + { // launch the time prefs app be_roster->Launch("application/x-vnd.Haiku-Time"); + // tell Time preflet to switch to the clock tab + BMessenger messenger("application/x-vnd.Haiku-Time"); + BMessage* switchToClock = new BMessage('SlCk'); + messenger.SendMessage(switchToClock); break; + } case kShowHideTime: - Window()->PostMessage(message, Parent()); + { + be_app->MessageReceived(message); break; + } case kShowCalendar: { @@ -302,21 +304,6 @@ TTimeView::SetOrientation(bool orientation) } -bool -TTimeView::Use24HourClock() const -{ - return fUse24HourClock; -} - - -void -TTimeView::SetUse24HourClock(bool use24HourClock) -{ - fUse24HourClock = use24HourClock; - Update(); -} - - bool TTimeView::ShowSeconds() const { @@ -347,6 +334,21 @@ TTimeView::SetShowDayOfWeek(bool show) } +bool +TTimeView::ShowTimeZone() const +{ + return fShowTimeZone; +} + + +void +TTimeView::SetShowTimeZone(bool show) +{ + fShowTimeZone = show; + Update(); +} + + void TTimeView::ShowCalendar(BPoint where) { @@ -379,16 +381,17 @@ TTimeView::ShowCalendar(BPoint where) void TTimeView::GetCurrentTime() { - ssize_t offset = 0; + ssize_t offset_dow = 0; + ssize_t offset_time = 0; // ToDo: Check to see if we should write day of week after time for locale if (fShowDayOfWeek) { BString timeFormat("eee "); - offset = fLocale.FormatTime(fCurrentTimeStr, sizeof(fCurrentTimeStr), - fCurrentTime, timeFormat); + offset_dow = fLocale.FormatTime(fCurrentTimeStr, + sizeof(fCurrentTimeStr), fCurrentTime, timeFormat); - if (offset < 0) { + if (offset_dow < 0) { // error occured, attempt to overwrite with current time // (this should not ever happen) fLocale.FormatTime(fCurrentTimeStr, sizeof(fCurrentTimeStr), @@ -398,9 +401,16 @@ TTimeView::GetCurrentTime() } } - fLocale.FormatTime(fCurrentTimeStr + offset, - sizeof(fCurrentTimeStr) - offset, fCurrentTime, + offset_time = fLocale.FormatTime(fCurrentTimeStr + offset_dow, + sizeof(fCurrentTimeStr) - offset_dow, fCurrentTime, fShowSeconds ? B_MEDIUM_TIME_FORMAT : B_SHORT_TIME_FORMAT); + + if (fShowTimeZone) { + BString timeFormat(" V"); + ssize_t offset = offset_dow + offset_time; + fLocale.FormatTime(fCurrentTimeStr + offset, + sizeof(fCurrentTimeStr) - offset, fCurrentTime, timeFormat); + } } @@ -456,7 +466,7 @@ TTimeView::ShowTimeOptions(BPoint point) new BMessage(kChangeTime)); menu->AddItem(item); - item = new BMenuItem(B_TRANSLATE("Hide time"), + item = new BMenuItem(B_TRANSLATE("Hide clock"), new BMessage(kShowHideTime)); menu->AddItem(item); diff --git a/src/apps/deskbar/TimeView.h b/src/apps/deskbar/TimeView.h index f273a10869..129b2021fb 100644 --- a/src/apps/deskbar/TimeView.h +++ b/src/apps/deskbar/TimeView.h @@ -41,7 +41,28 @@ All rights reserved. #include #include -#include "PreferencesWindow.h" // For message constants + +// open Time preferences +const uint32 kChangeTime = 'ChTm'; + +// pop the calendar +const uint32 kShowCalendar = 'ShCa'; + +// show or hide clock +const uint32 kShowHideTime = 'ShTm'; + +// show seconds +const uint32 kShowSeconds = 'SwSc'; + +// show day of week +const uint32 kShowDayOfWeek = 'SwDw'; + +// show time zone +const uint32 kShowTimeZone = 'SwTz'; + +// get clock settings to send to Time prefs +const uint32 kGetClockSettings = 'GCkS'; + class BCountry; @@ -53,9 +74,7 @@ class _EXPORT TTimeView; class TTimeView : public BView { public: - TTimeView(float maxWidth, float height, - bool use24HourClock, bool showSeconds, - bool showDayOfWeek); + TTimeView(float maxWidth, float height); TTimeView(BMessage* data); ~TTimeView(); @@ -77,15 +96,15 @@ public: bool Orientation() const; void SetOrientation(bool o); - bool Use24HourClock() const; - void SetUse24HourClock(bool use24HourClock); - bool ShowSeconds() const; void SetShowSeconds(bool show); bool ShowDayOfWeek() const; void SetShowDayOfWeek(bool show); + bool ShowTimeZone() const; + void SetShowTimeZone(bool show); + void ShowCalendar(BPoint where); private: @@ -116,9 +135,12 @@ private: float fHeight; bool fOrientation; // vertical = true + bool fOverrideLocale; bool fUse24HourClock; bool fShowSeconds; bool fShowDayOfWeek; + bool fShowTimeZone; + BString fTimeFormat; BPoint fTimeLocation; diff --git a/src/apps/diskusage/PieView.cpp b/src/apps/diskusage/PieView.cpp index a1d8f4a4b0..a2fd6952e3 100644 --- a/src/apps/diskusage/PieView.cpp +++ b/src/apps/diskusage/PieView.cpp @@ -139,7 +139,7 @@ PieView::PieView(BVolume* volume) fUpdateFileAt(false) { fMouseOverMenu = new BPopUpMenu(kEmptyStr, false, false); - fMouseOverMenu->AddItem(new BMenuItem(B_TRANSLATE("Get Info"), NULL), + fMouseOverMenu->AddItem(new BMenuItem(B_TRANSLATE("Get info"), NULL), kIdxGetInfo); fMouseOverMenu->AddItem(new BMenuItem(B_TRANSLATE("Open"), NULL), kIdxOpen); @@ -661,7 +661,7 @@ PieView::_BuildOpenWithMenu(FileInfo* info) delete type; - BMenu* openWith = new BMenu(B_TRANSLATE("Open With")); + BMenu* openWith = new BMenu(B_TRANSLATE("Open with")); if (appList.size() == 0) { BMenuItem* item = new BMenuItem(B_TRANSLATE("no supporting apps"), diff --git a/src/apps/stylededit/Constants.h b/src/apps/stylededit/Constants.h index bebe360c40..03f7387f6e 100644 --- a/src/apps/stylededit/Constants.h +++ b/src/apps/stylededit/Constants.h @@ -78,8 +78,10 @@ const uint32 OPEN_AS_ENCODING = 'FPoe'; const uint32 SAVE_AS_ENCODING = 'FPse'; const uint32 SAVE_THEN_QUIT = 'FPsq'; -// Update Line Info -const uint32 UPDATE_LINE = 'UPln'; +// Update StatusView +const uint32 UPDATE_STATUS = 'UPSt'; +const uint32 UNLOCK_FILE = 'UNLk'; +const uint32 UPDATE_LINE_SEL = 'UPls'; #endif // CONSTANTS_H diff --git a/src/apps/stylededit/Jamfile b/src/apps/stylededit/Jamfile index 82e089d73e..1cd8e88651 100644 --- a/src/apps/stylededit/Jamfile +++ b/src/apps/stylededit/Jamfile @@ -13,6 +13,7 @@ Application StyledEdit : ColorMenuItem.cpp FindWindow.cpp ReplaceWindow.cpp + StatusView.cpp StyledEditApp.cpp StyledEditView.cpp StyledEditWindow.cpp @@ -26,6 +27,7 @@ DoCatalogs StyledEdit : : FindWindow.cpp ReplaceWindow.cpp + StatusView.cpp StyledEditApp.cpp StyledEditWindow.cpp ; diff --git a/src/apps/stylededit/StatusView.cpp b/src/apps/stylededit/StatusView.cpp new file mode 100644 index 0000000000..edd3d9878e --- /dev/null +++ b/src/apps/stylededit/StatusView.cpp @@ -0,0 +1,257 @@ +/* + * Copyright 2002-2012, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Vlad Slepukhin + * Siarzhuk Zharski + */ + + +#include "StatusView.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Constants.h" + + +const float kHorzSpacing = 5.f; +#define UTF8_EXPAND_ARROW "\xe2\x96\xbe" + +using namespace BPrivate; + + +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "StatusView" + + +StatusView::StatusView(BScrollView* scrollView) + : + BView(BRect(), "statusview", + B_FOLLOW_BOTTOM | B_FOLLOW_LEFT, B_WILL_DRAW), + fScrollView(scrollView), + fPreferredSize(0., 0.), + fReadOnly(false) +{ + memset(fCellWidth, 0, sizeof(fCellWidth)); +} + + +StatusView::~StatusView() +{ +} + + +void +StatusView::AttachedToWindow() +{ + SetFont(be_plain_font); + SetFontSize(10.); + + BMessage message(UPDATE_STATUS); + message.AddInt32("line", 1); + message.AddInt32("column", 1); + message.AddString("encoding", ""); + SetStatus(&message); + + BScrollBar* scrollBar = fScrollView->ScrollBar(B_HORIZONTAL); + MoveTo(0., scrollBar->Frame().top); + + rgb_color color = B_TRANSPARENT_COLOR; + BView* parent = Parent(); + if (parent != NULL) + color = parent->ViewColor(); + + if (color == B_TRANSPARENT_COLOR) + color = ui_color(B_PANEL_BACKGROUND_COLOR); + + SetViewColor(color); + + ResizeToPreferred(); +} + + +void +StatusView::GetPreferredSize(float* _width, float* _height) +{ + _ValidatePreferredSize(); + + if (_width) + *_width = fPreferredSize.width; + + if (_height) + *_height = fPreferredSize.height; +} + + +void +StatusView::ResizeToPreferred() +{ + float width, height; + GetPreferredSize(&width, &height); + + if (Bounds().Width() > width) + width = Bounds().Width(); + + BView::ResizeTo(width, height); +} + + +void +StatusView::Draw(BRect updateRect) +{ + if (fPreferredSize.width <= 0) + return; + + if (be_control_look != NULL) { + BRect bounds(Bounds()); + be_control_look->DrawMenuBarBackground(this, + bounds, updateRect, ViewColor()); + } + + BRect bounds(Bounds()); + rgb_color highColor = HighColor(); + SetHighColor(tint_color(ViewColor(), B_DARKEN_2_TINT)); + StrokeLine(bounds.LeftTop(), bounds.RightTop()); + + float x = bounds.left; + for (size_t i = 0; i < kStatusCellCount - 1; i++) { + x += fCellWidth[i]; + StrokeLine(BPoint(x, bounds.top + 3), BPoint(x, bounds.bottom - 3)); + } + + SetLowColor(ViewColor()); + SetHighColor(highColor); + + font_height fontHeight; + GetFontHeight(&fontHeight); + + x = bounds.left; + float y = (bounds.bottom + bounds.top + + ceilf(fontHeight.ascent) - ceilf(fontHeight.descent)) / 2; + + for (size_t i = 0; i < kStatusCellCount; i++) { + if (fCellText[i].Length() == 0) + continue; + DrawString(fCellText[i], BPoint(x + kHorzSpacing, y)); + x += fCellWidth[i]; + } +} + + +void +StatusView::MouseDown(BPoint where) +{ + if (!fReadOnly) + return; + + float left = fCellWidth[kPositionCell] + fCellWidth[kEncodingCell]; + if (where.x < left) + return; + + where.x = left; + where.y = Bounds().bottom; + + BPopUpMenu *menu = new BPopUpMenu(B_EMPTY_STRING, false, false); + menu->AddItem(new BMenuItem(B_TRANSLATE("Unlock file"), + new BMessage(UNLOCK_FILE))); + + ConvertToScreen(&where); + menu->SetTargetForItems(this); + menu->Go(where, true, true, true); +} + + +void +StatusView::SetStatus(BMessage* message) +{ + int32 line = 0, column = 0; + if (B_OK == message->FindInt32("line", &line) + && B_OK == message->FindInt32("column", &column)) + { + char info[256]; + snprintf(info, sizeof(info), + B_TRANSLATE("line %d, column %d"), line, column); + fCellText[kPositionCell].SetTo(info); + } + + BString encoding; + if (B_OK == message->FindString("encoding", &encoding)) { + // sometime corresponding Int-32 "encoding" attrib is read as string :( + if (encoding.Length() == 0 + || encoding.Compare("\xff\xff") == 0 + || encoding.Compare("UTF-8") == 0) + { + fCellText[kEncodingCell] = "UTF-8"; + } else { + const BCharacterSet* charset + = BCharacterSetRoster::FindCharacterSetByName(encoding); + fCellText[kEncodingCell] + = charset != NULL ? charset->GetPrintName() : ""; + } + } + + bool modified = false; + fReadOnly = false; + if (B_OK == message->FindBool("modified", &modified) && modified) { + fCellText[kFileStateCell] = B_TRANSLATE("Modified"); + } else if (B_OK == message->FindBool("readOnly", &fReadOnly) && fReadOnly) { + fCellText[kFileStateCell] = B_TRANSLATE("Read-only"); + fCellText[kFileStateCell] << " " UTF8_EXPAND_ARROW; + } else + fCellText[kFileStateCell].Truncate(0); + + _ValidatePreferredSize(); + Invalidate(); +} + + +void +StatusView::_ValidatePreferredSize() +{ + float orgWidth = fPreferredSize.width; + // width + fPreferredSize.width = 0.f; + for (size_t i = 0; i < kStatusCellCount; i++) { + if (fCellText[i].Length() == 0) { + fCellWidth[i] = 0; + continue; + } + float width = ceilf(StringWidth(fCellText[i])); + if (width > 0) + width += kHorzSpacing * 2; + if (width > fCellWidth[i]) + fCellWidth[i] = width; + fPreferredSize.width += fCellWidth[i]; + } + + // height + font_height fontHeight; + GetFontHeight(&fontHeight); + + fPreferredSize.height = ceilf(fontHeight.ascent + fontHeight.descent + + fontHeight.leading); + + if (fPreferredSize.height < B_H_SCROLL_BAR_HEIGHT) + fPreferredSize.height = B_H_SCROLL_BAR_HEIGHT; + + float delta = fPreferredSize.width - orgWidth; + ResizeBy(delta, 0); + BScrollBar* scrollBar = fScrollView->ScrollBar(B_HORIZONTAL); + scrollBar->ResizeBy(-delta, 0); + scrollBar->MoveBy(delta, 0); +} + diff --git a/src/apps/stylededit/StatusView.h b/src/apps/stylededit/StatusView.h new file mode 100644 index 0000000000..fcf542f303 --- /dev/null +++ b/src/apps/stylededit/StatusView.h @@ -0,0 +1,50 @@ +/* + * Copyright 2002-2012, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Vlad Slepukhin + * Siarzhuk Zharski + */ +#ifndef STATUS_VIEW_H +#define STATUS_VIEW_H + + +#include +#include + + +enum { + kPositionCell, + kEncodingCell, + kFileStateCell, + kStatusCellCount +}; + + +class BScrollView; + +class StatusView : public BView { +public: + StatusView(BScrollView* fScrollView); + ~StatusView(); + + void SetStatus(BMessage* mesage); + virtual void AttachedToWindow(); + virtual void GetPreferredSize(float* _width, float* _height); + virtual void ResizeToPreferred(); + virtual void Draw(BRect bounds); + virtual void MouseDown(BPoint point); + +private: + void _ValidatePreferredSize(); + +private: + BScrollView* fScrollView; + BSize fPreferredSize; + BString fCellText[kStatusCellCount]; + float fCellWidth[kStatusCellCount]; + bool fReadOnly; +}; + +#endif // STATUS_VIEW_H diff --git a/src/apps/stylededit/StyledEditApp.cpp b/src/apps/stylededit/StyledEditApp.cpp index 49294e9927..664ecbff4c 100644 --- a/src/apps/stylededit/StyledEditApp.cpp +++ b/src/apps/stylededit/StyledEditApp.cpp @@ -178,7 +178,7 @@ StyledEditApp::OpenDocument() status_t -StyledEditApp::OpenDocument(entry_ref* ref) +StyledEditApp::OpenDocument(entry_ref* ref, BMessage* message) { // traverse eventual symlink BEntry entry(ref, true); @@ -217,13 +217,19 @@ StyledEditApp::OpenDocument(entry_ref* ref) if (document->Lock()) { document->Activate(); document->Unlock(); + if (message != NULL) + document->PostMessage(message); return B_OK; } } } cascade(); - new StyledEditWindow(gWindowRect, ref, fOpenAsEncoding); + document = new StyledEditWindow(gWindowRect, ref, fOpenAsEncoding); + + if (message != NULL) + document->PostMessage(message); + fWindowCount++; return B_OK; @@ -248,8 +254,31 @@ StyledEditApp::RefsReceived(BMessage* message) int32 index = 0; entry_ref ref; - while (message->FindRef("refs", index++, &ref) == B_OK) { - OpenDocument(&ref); + while (message->FindRef("refs", index, &ref) == B_OK) { + int32 line; + if (message->FindInt32("be:line", index, &line) != B_OK) + line = -1; + int32 start, length; + if (message->FindInt32("be:selection_length", index, &length) != B_OK + || message->FindInt32("be:selection_offset", index, &start) != B_OK) + { + start = -1; + length = -1; + } + + BMessage* selMessage = NULL; + if (line >= 0 || (start >= 0 && length >= 0)) { + selMessage = new BMessage(UPDATE_LINE_SEL); + if (line >= 0) + selMessage->AddInt32("be:line", line); + if (start >= 0) { + selMessage->AddInt32("be:selection_offset", start); + selMessage->AddInt32("be:selection_length", max_c(0, length)); + } + } + + OpenDocument(&ref, selMessage); + index++; } } @@ -309,7 +338,7 @@ StyledEditApp::ReadyToRun() int32 StyledEditApp::NumberOfWindows() { - return fWindowCount; + return fWindowCount; } diff --git a/src/apps/stylededit/StyledEditApp.h b/src/apps/stylededit/StyledEditApp.h index dffc41f3ed..71f1f748bb 100644 --- a/src/apps/stylededit/StyledEditApp.h +++ b/src/apps/stylededit/StyledEditApp.h @@ -36,7 +36,8 @@ public: int32 NumberOfWindows(); void OpenDocument(); - status_t OpenDocument(entry_ref* ref); + status_t OpenDocument(entry_ref* ref, + BMessage* message = NULL); void CloseDocument(); private: diff --git a/src/apps/stylededit/StyledEditView.cpp b/src/apps/stylededit/StyledEditView.cpp index 166eb992be..9c8936919e 100644 --- a/src/apps/stylededit/StyledEditView.cpp +++ b/src/apps/stylededit/StyledEditView.cpp @@ -50,8 +50,8 @@ void StyledEditView::Select(int32 start, int32 finish) { fMessenger->SendMessage(start == finish ? DISABLE_ITEMS : ENABLE_ITEMS); - fMessenger->SendMessage(UPDATE_LINE); - BTextView::Select(start, finish); + BTextView::Select(start, finish); + _UpdateStatus(); } @@ -181,7 +181,7 @@ StyledEditView::DeleteText(int32 start, int32 finish) fMessenger-> SendMessage(TEXT_CHANGED); BTextView::DeleteText(start, finish); - fMessenger->SendMessage(UPDATE_LINE); + _UpdateStatus(); } @@ -193,7 +193,7 @@ StyledEditView::InsertText(const char* text, int32 length, int32 offset, fMessenger->SendMessage(TEXT_CHANGED); BTextView::InsertText(text, length, offset, runs); - fMessenger->SendMessage(UPDATE_LINE); + _UpdateStatus(); } @@ -209,5 +209,34 @@ StyledEditView::FrameResized(float width, float height) textRect.InsetBy(TEXT_INSET, TEXT_INSET); SetTextRect(textRect); } -} +} + + +void +StyledEditView::_UpdateStatus() +{ + int32 selStart, selFinish; + GetSelection(&selStart, &selFinish); + + int32 line = CurrentLine(); + int32 lineStart = OffsetAt(line); + + int32 column = 1; + int32 tabSize = (int32)ceilf(TabWidth() / StringWidth("s")); + for (int i = lineStart; i < selStart; i++) { + unsigned char ch = ByteAt(i); + if ((ch & 0xC0) != 0x80) { + if (ch == '\t') + while (column % tabSize) + column++; + column++; + } + } + + BMessage* message = new BMessage(UPDATE_STATUS); + message->AddInt32("line", line + 1); + message->AddInt32("column", column); + message->AddString("encoding", fEncoding.String()); + fMessenger->SendMessage(message); +} diff --git a/src/apps/stylededit/StyledEditView.h b/src/apps/stylededit/StyledEditView.h index 272f193bf2..951c0ead39 100644 --- a/src/apps/stylededit/StyledEditView.h +++ b/src/apps/stylededit/StyledEditView.h @@ -42,6 +42,8 @@ class StyledEditView : public BTextView { uint32 GetEncoding() const; private: + void _UpdateStatus(); + BMessenger *fMessenger; bool fSuppressChanges; BString fEncoding; diff --git a/src/apps/stylededit/StyledEditWindow.cpp b/src/apps/stylededit/StyledEditWindow.cpp index bf6675d180..ab8fc6201f 100644 --- a/src/apps/stylededit/StyledEditWindow.cpp +++ b/src/apps/stylededit/StyledEditWindow.cpp @@ -13,10 +13,11 @@ */ -#include "Constants.h" #include "ColorMenuItem.h" +#include "Constants.h" #include "FindWindow.h" #include "ReplaceWindow.h" +#include "StatusView.h" #include "StyledEditApp.h" #include "StyledEditView.h" #include "StyledEditWindow.h" @@ -514,6 +515,44 @@ StyledEditWindow::MessageReceived(BMessage* message) } break; + case UPDATE_STATUS: + message->AddBool("modified", !fClean); + message->AddBool("readOnly", !fTextView->IsEditable()); + fStatusView->SetStatus(message); + break; + + case UNLOCK_FILE: + { + status_t status = _UnlockFile(); + if (status != B_OK) { + BString text; + bs_printf(&text, + B_TRANSLATE("Unable to unlock file\n\t%s"), + strerror(status)); + _ShowAlert(text, B_TRANSLATE("OK"), "", "", B_STOP_ALERT); + } + PostMessage(UPDATE_STATUS); + break; + } + + case UPDATE_LINE_SEL: + { + int32 line; + if (message->FindInt32("be:line", &line) == B_OK) { + fTextView->GoToLine(line); + fTextView->ScrollToSelection(); + } + + int32 start, length; + if (message->FindInt32("be:selection_offset", &start) == B_OK) { + if (message->FindInt32("be:selection_length", &length) != B_OK) + length = 0; + + fTextView->Select(start, start + length); + fTextView->ScrollToOffset(start); + } + break; + } default: BWindow::MessageReceived(message); break; @@ -846,7 +885,6 @@ StyledEditWindow::OpenFile(entry_ref* ref) fReloadItem->SetEnabled(fSaveMessage != NULL); fEncodingItem->SetEnabled(fSaveMessage != NULL); - fTextView->Select(0, 0); } @@ -1058,6 +1096,9 @@ StyledEditWindow::_InitWindow(uint32 encoding) AddChild(fScrollView); fTextView->MakeFocus(true); + fStatusView = new StatusView(fScrollView); + fScrollView->AddChild(fStatusView); + // Add "File"-menu: BMenu* menu = new BMenu(B_TRANSLATE("File")); fMenuBar->AddItem(menu); @@ -1137,7 +1178,7 @@ StyledEditWindow::_InitWindow(uint32 encoding) menu->AddItem(new BMenuItem(B_TRANSLATE("Find selection"), new BMessage(MENU_FIND_SELECTION), 'H')); - menu->AddItem(new BMenuItem(B_TRANSLATE("Replace" B_UTF8_ELLIPSIS), + menu->AddItem(fReplaceItem = new BMenuItem(B_TRANSLATE("Replace" B_UTF8_ELLIPSIS), new BMessage(MENU_REPLACE), 'R')); menu->AddItem(fReplaceSameItem = new BMenuItem(B_TRANSLATE("Replace next"), new BMessage(MENU_REPLACE_SAME), 'T')); @@ -1294,6 +1335,33 @@ StyledEditWindow::_LoadAttrs() MoveTo(newFrame.left, newFrame.top); ResizeTo(newFrame.Width(), newFrame.Height()); } + + // info about position of caret may live in the file attributes + int32 line = 0; + int32 lineMax = fTextView->CountLines(); + if (documentNode.ReadAttr("be:line", + B_INT32_TYPE, 0, &line, sizeof(line)) == sizeof(line)) + line = min_c(max_c(0, line), lineMax); + else + line = 0; + + int32 start = 0, length = 0, finish = 0; + int32 offsetMax = fTextView->OffsetAt(lineMax); + if (documentNode.ReadAttr("be:selection_offset", + B_INT32_TYPE, 0, &start, sizeof(start)) == sizeof(start) + && documentNode.ReadAttr("be:selection_length", + B_INT32_TYPE, 0, &length, sizeof(length)) == sizeof(length)) + { + finish = start + length; + start = min_c(max_c(0, start), offsetMax); + finish = min_c(max_c(0, finish), offsetMax); + } else { + start = fTextView->OffsetAt(line); + finish = start; + } + + fTextView->Select(start, finish); + fTextView->ScrollToOffset(start); } @@ -1321,6 +1389,18 @@ StyledEditWindow::_SaveAttrs() documentNode.WriteAttr(kInfoAttributeName, B_RECT_TYPE, 0, &frame, sizeof(BRect)); + + // preserve current line and selection too + int32 line = fTextView->CurrentLine(); + documentNode.WriteAttr("be:line", B_INT32_TYPE, 0, &line, sizeof(line)); + + int32 start, end; + fTextView->GetSelection(&start, &end); + int32 length = end - start; + documentNode.WriteAttr("be:selection_offset", + B_INT32_TYPE, 0, &start, sizeof(start)); + documentNode.WriteAttr("be:selection_length", + B_INT32_TYPE, 0, &length, sizeof(length)); } @@ -1369,6 +1449,14 @@ StyledEditWindow::_LoadFile(entry_ref* ref, const char* forceEncoding) return status; } + struct stat st; + if (file.InitCheck() == B_OK && file.GetStat(&st) == B_OK) { + bool editable = (getuid() == st.st_uid && S_IWUSR & st.st_mode) + || (getgid() == st.st_gid && S_IWGRP & st.st_mode) + || (S_IWOTH & st.st_mode); + _SetReadOnly(!editable); + } + // update alignment switch (fTextView->Alignment()) { case B_ALIGN_LEFT: @@ -1480,6 +1568,50 @@ StyledEditWindow::_ReloadDocument(BMessage* message) } +status_t +StyledEditWindow::_UnlockFile() +{ + _NodeMonitorSuspender nodeMonitorSuspender(this); + + if (!fSaveMessage) + return B_ERROR; + + entry_ref dirRef; + const char* name; + if (fSaveMessage->FindRef("directory", &dirRef) != B_OK + || fSaveMessage->FindString("name", &name) != B_OK) + return B_BAD_VALUE; + + BDirectory dir(&dirRef); + BEntry entry(&dir, name); + + status_t status = dir.InitCheck(); + if (status != B_OK) + return status; + + status = entry.InitCheck(); + if (status != B_OK) + return status; + + struct stat st; + BFile file(&entry, B_READ_WRITE); + status = file.InitCheck(); + if (status != B_OK) + return status; + + status = file.GetStat(&st); + if (status != B_OK) + return status; + + st.st_mode |= S_IWUSR; + status = file.SetPermissions(st.st_mode); + if (status == B_OK) + _SetReadOnly(false); + + return status; +} + + bool StyledEditWindow::_Search(BString string, bool caseSensitive, bool wrap, bool backSearch, bool scrollToOccurence) @@ -1719,6 +1851,18 @@ StyledEditWindow::_ShowStatistics() } +void +StyledEditWindow::_SetReadOnly(bool readOnly) +{ + fReplaceItem->SetEnabled(!readOnly); + fReplaceSameItem->SetEnabled(!readOnly); + fFontMenu->SetEnabled(!readOnly); + fAlignLeft->Menu()->SetEnabled(!readOnly); + fWrapItem->SetEnabled(!readOnly); + fTextView->MakeEditable(!readOnly); +} + + #undef B_TRANSLATION_CONTEXT #define B_TRANSLATION_CONTEXT "Menus" @@ -1845,7 +1989,8 @@ StyledEditWindow::_HandleNodeMonitorEvent(BMessage *message) { int32 fields = 0; if (message->FindInt32("fields", &fields) == B_OK - && (fields & (B_STAT_SIZE | B_STAT_MODIFICATION_TIME)) == 0) + && (fields & (B_STAT_SIZE | B_STAT_MODIFICATION_TIME + | B_STAT_MODE)) == 0) break; const char* name = NULL; diff --git a/src/apps/stylededit/StyledEditWindow.h b/src/apps/stylededit/StyledEditWindow.h index ad5db0fe2f..ae8aac3efa 100644 --- a/src/apps/stylededit/StyledEditWindow.h +++ b/src/apps/stylededit/StyledEditWindow.h @@ -12,10 +12,8 @@ #include -#include -#include -#include #include +#include struct entry_ref; @@ -25,6 +23,7 @@ class BMenuBar; class BMenuItem; class BMessage; class BScrollView; +class StatusView; class StyledEditView; @@ -58,6 +57,7 @@ private: status_t _LoadFile(entry_ref* ref, const char* forceEncoding = NULL); void _ReloadDocument(BMessage *message); + status_t _UnlockFile(); bool _Search(BString searchFor, bool caseSensitive, bool wrap, bool backSearch, bool scrollToOccurence = true); @@ -72,6 +72,7 @@ private: void _SetFontStyle(const char* fontFamily, const char* fontStyle); int32 _ShowStatistics(); + void _SetReadOnly(bool editable); void _UpdateCleanUndoRedoSaveRevert(); int32 _ShowAlert(const BString& text, const BString& label, const BString& label2, @@ -119,6 +120,7 @@ private: BMenuItem* fCopyItem; BMenuItem* fFindAgainItem; + BMenuItem* fReplaceItem; BMenuItem* fReplaceSameItem; BMenuItem* fBlackItem; @@ -160,6 +162,7 @@ private: StyledEditView* fTextView; BScrollView* fScrollView; + StatusView* fStatusView; BFilePanel* fSavePanel; BMenu* fSavePanelEncodingMenu; diff --git a/src/apps/webpositive/DownloadProgressView.cpp b/src/apps/webpositive/DownloadProgressView.cpp index 8bdbd69322..aef948b467 100644 --- a/src/apps/webpositive/DownloadProgressView.cpp +++ b/src/apps/webpositive/DownloadProgressView.cpp @@ -776,7 +776,7 @@ DownloadProgressView::_UpdateStatusText() // TODO: Localization of time string... if (now < finishTime - secondsPerDay) { // process is going to take more than a day! - sprintf(timeText, "%0*d:%0*d %0*d/%0*d/%ld", + sprintf(timeText, "%0*d:%0*d %0*d/%0*d/%" B_PRId32, 2, time->tm_hour, 2, time->tm_min, 2, time->tm_mon + 1, 2, time->tm_mday, year); } else { diff --git a/src/apps/webpositive/SettingsWindow.cpp b/src/apps/webpositive/SettingsWindow.cpp index 39fa27a49c..48bedc3194 100644 --- a/src/apps/webpositive/SettingsWindow.cpp +++ b/src/apps/webpositive/SettingsWindow.cpp @@ -499,7 +499,7 @@ SettingsWindow::_BuildSizesMenu(BMenu* menu, uint32 messageWhat) continue; char label[32]; - snprintf(label, sizeof(label), "%ld", size); + snprintf(label, sizeof(label), "%" B_PRId32, size); BMessage* message = new BMessage(messageWhat); message->AddInt32("size", size); diff --git a/src/apps/webpositive/support/FontSelectionView.cpp b/src/apps/webpositive/support/FontSelectionView.cpp index be1adcbd5f..859095e72f 100644 --- a/src/apps/webpositive/support/FontSelectionView.cpp +++ b/src/apps/webpositive/support/FontSelectionView.cpp @@ -453,7 +453,7 @@ void FontSelectionView::_SelectCurrentSize(bool select) { char label[16]; - snprintf(label, sizeof(label), "%ld", (int32)fCurrentFont.Size()); + snprintf(label, sizeof(label), "%" B_PRId32, (int32)fCurrentFont.Size()); BMenuItem* item = fSizesMenu->FindItem(label); if (item != NULL) @@ -480,7 +480,7 @@ FontSelectionView::_BuildSizesMenu() continue; char label[32]; - snprintf(label, sizeof(label), "%ld", size); + snprintf(label, sizeof(label), "%" B_PRId32, size); BMessage* message = new BMessage(kMsgSetSize); message->AddInt32("size", size); diff --git a/src/kits/interface/Dragger.cpp b/src/kits/interface/Dragger.cpp index a61e552e66..cd7aae4b5f 100644 --- a/src/kits/interface/Dragger.cpp +++ b/src/kits/interface/Dragger.cpp @@ -113,9 +113,10 @@ DraggerManager* DraggerManager::sDefaultInstance = NULL; } // unnamed namespace -BDragger::BDragger(BRect bounds, BView* target, uint32 resizeMask, uint32 flags) +BDragger::BDragger(BRect frame, BView* target, uint32 resizingMode, + uint32 flags) : - BView(bounds, "_dragger_", resizeMask, flags), + BView(frame, "_dragger_", resizingMode, flags), fTarget(target), fRelation(TARGET_UNKNOWN), fShelf(NULL), diff --git a/src/kits/interface/PicturePlayer.cpp b/src/kits/interface/PicturePlayer.cpp index 4f0906751e..5a1fcbdf40 100644 --- a/src/kits/interface/PicturePlayer.cpp +++ b/src/kits/interface/PicturePlayer.cpp @@ -562,14 +562,16 @@ PicturePlayer::Play(void **callBackTable, int32 tableEntries, void *userData) #if DEBUG numOps++; #if DEBUG > 1 - fprintf(file, "executed in %lld usecs\n", system_time() - startOpTime); + fprintf(file, "executed in %" B_PRId64 " usecs\n", system_time() + - startOpTime); #endif #endif // TODO: what if too much was read, should we return B_ERROR? } #if DEBUG - fprintf(file, "Done! %ld ops, rendering completed in %lld usecs.\n", numOps, system_time() - startTime); + fprintf(file, "Done! %" B_PRId32 " ops, rendering completed in %" + B_PRId64 " usecs.\n", numOps, system_time() - startTime); fclose(file); #endif return B_OK; diff --git a/src/kits/opengl/Jamfile b/src/kits/opengl/Jamfile index 2b96f1f0e2..7194f4805a 100644 --- a/src/kits/opengl/Jamfile +++ b/src/kits/opengl/Jamfile @@ -18,7 +18,6 @@ if $(TARGET_PLATFORM) != haiku { # We need our public GL headers also when not compiling for Haiku. } - SubDirSysHdrs $(HAIKU_GLU_HEADERS) ; SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; Includes [ FGristFiles $(sources) ] : $(HAIKU_GLU_HEADERS_DEPENDENCY) ; @@ -46,8 +45,8 @@ SharedLibrary libGL.so : $(sources) : # GLU $(HAIKU_GLU_LIBS) - # Mesa libraries (from Mesa optional package): - $(HAIKU_MESA_LIBS) + # GLAPI Dispatch code (from Mesa buildpackage) + $(HAIKU_GLAPI_LIB) # External libraries: game # BWindowScreen needed by BGLScreen stub class diff --git a/src/kits/storage/File.cpp b/src/kits/storage/File.cpp index 3e278c5007..5de260233b 100644 --- a/src/kits/storage/File.cpp +++ b/src/kits/storage/File.cpp @@ -22,7 +22,7 @@ #include -//! Creates an uninitialized BFile. +// Creates an uninitialized BFile. BFile::BFile() : fMode(0) @@ -30,10 +30,7 @@ BFile::BFile() } -//! Creates a copy of the supplied BFile. -/*! If \a file is uninitialized, the newly constructed BFile will be, too. - \param file the BFile object to be copied -*/ +// Creates a copy of the supplied BFile. BFile::BFile(const BFile& file) : fMode(0) @@ -42,12 +39,8 @@ BFile::BFile(const BFile& file) } -/*! \brief Creates a BFile and initializes it to the file referred to by - the supplied entry_ref and according to the specified open mode. - \param ref the entry_ref referring to the file - \param openMode the mode in which the file should be opened - \see SetTo() for values for \a openMode -*/ +// Creates a BFile and initializes it to the file referred to by +// the supplied entry_ref and according to the specified open mode. BFile::BFile(const entry_ref* ref, uint32 openMode) : fMode(0) @@ -56,12 +49,8 @@ BFile::BFile(const entry_ref* ref, uint32 openMode) } -/*! \brief Creates a BFile and initializes it to the file referred to by - the supplied BEntry and according to the specified open mode. - \param entry the BEntry referring to the file - \param openMode the mode in which the file should be opened - \see SetTo() for values for \a openMode -*/ +// Creates a BFile and initializes it to the file referred to by +// the supplied BEntry and according to the specified open mode. BFile::BFile(const BEntry* entry, uint32 openMode) : fMode(0) @@ -70,12 +59,8 @@ BFile::BFile(const BEntry* entry, uint32 openMode) } -/*! \brief Creates a BFile and initializes it to the file referred to by - the supplied path name and according to the specified open mode. - \param path the file's path name - \param openMode the mode in which the file should be opened - \see SetTo() for values for \a openMode -*/ +// Creates a BFile and initializes it to the file referred to by +// the supplied path name and according to the specified open mode. BFile::BFile(const char* path, uint32 openMode) : fMode(0) @@ -84,15 +69,9 @@ BFile::BFile(const char* path, uint32 openMode) } -/*! \brief Creates a BFile and initializes it to the file referred to by - the supplied path name relative to the specified BDirectory and - according to the specified open mode. - \param dir the BDirectory, relative to which the file's path name is - given - \param path the file's path name relative to \a dir - \param openMode the mode in which the file should be opened - \see SetTo() for values for \a openMode -*/ +// Creates a BFile and initializes it to the file referred to by +// the supplied path name relative to the specified BDirectory and +// according to the specified open mode. BFile::BFile(const BDirectory *dir, const char* path, uint32 openMode) : fMode(0) @@ -101,9 +80,7 @@ BFile::BFile(const BDirectory *dir, const char* path, uint32 openMode) } -/*! \brief Frees all allocated resources. - If the file is properly initialized, the file's file descriptor is closed. -*/ +// Frees all allocated resources. BFile::~BFile() { // Also called by the BNode destructor, but we rather try to avoid @@ -115,33 +92,8 @@ BFile::~BFile() } -/*! \brief Re-initializes the BFile to the file referred to by the - supplied entry_ref and according to the specified open mode. - \param ref the entry_ref referring to the file - \param openMode the mode in which the file should be opened - \a openMode must be a bitwise or of exactly one of the flags - - \c B_READ_ONLY: The file is opened read only. - - \c B_WRITE_ONLY: The file is opened write only. - - \c B_READ_WRITE: The file is opened for random read/write access. - and any number of the flags - - \c B_CREATE_FILE: A new file will be created, if it does not already - exist. - - \c B_FAIL_IF_EXISTS: If the file does already exist and B_CREATE_FILE is - set, SetTo() fails. - - \c B_ERASE_FILE: An already existing file is truncated to zero size. - - \c B_OPEN_AT_END: Seek() to the end of the file after opening. - \return - - \c B_OK: Everything went fine. - - \c B_BAD_VALUE: \c NULL \a ref or bad \a openMode. - - \c B_ENTRY_NOT_FOUND: File not found or failed to create file. - - \c B_FILE_EXISTS: File exists and \c B_FAIL_IF_EXISTS was passed. - - \c B_PERMISSION_DENIED: File permissions didn't allow operation. - - \c B_NO_MEMORY: Insufficient memory for operation. - - \c B_LINK_LIMIT: Indicates a cyclic loop within the file system. - - \c B_BUSY: A node was busy. - - \c B_FILE_ERROR: A general file error. - - \c B_NO_MORE_FDS: The application has run out of file descriptors. -*/ +// Re-initializes the BFile to the file referred to by the +// supplied entry_ref and according to the specified open mode. status_t BFile::SetTo(const entry_ref* ref, uint32 openMode) { @@ -169,24 +121,8 @@ BFile::SetTo(const entry_ref* ref, uint32 openMode) } -/*! \brief Re-initializes the BFile to the file referred to by the - supplied BEntry and according to the specified open mode. - \param entry the BEntry referring to the file - \param openMode the mode in which the file should be opened - \return - - \c B_OK: Everything went fine. - - \c B_BAD_VALUE: \c NULL \a entry or bad \a openMode. - - \c B_ENTRY_NOT_FOUND: File not found or failed to create file. - - \c B_FILE_EXISTS: File exists and \c B_FAIL_IF_EXISTS was passed. - - \c B_PERMISSION_DENIED: File permissions didn't allow operation. - - \c B_NO_MEMORY: Insufficient memory for operation. - - \c B_LINK_LIMIT: Indicates a cyclic loop within the file system. - - \c B_BUSY: A node was busy. - - \c B_FILE_ERROR: A general file error. - - \c B_NO_MORE_FDS: The application has run out of file descriptors. - \todo Implemented using SetTo(entry_ref*, uint32). Check, if necessary - to reimplement! -*/ +// Re-initializes the BFile to the file referred to by the +// supplied BEntry and according to the specified open mode. status_t BFile::SetTo(const BEntry* entry, uint32 openMode) { @@ -212,22 +148,8 @@ BFile::SetTo(const BEntry* entry, uint32 openMode) } -/*! \brief Re-initializes the BFile to the file referred to by the - supplied path name and according to the specified open mode. - \param path the file's path name - \param openMode the mode in which the file should be opened - \return - - \c B_OK: Everything went fine. - - \c B_BAD_VALUE: \c NULL \a path or bad \a openMode. - - \c B_ENTRY_NOT_FOUND: File not found or failed to create file. - - \c B_FILE_EXISTS: File exists and \c B_FAIL_IF_EXISTS was passed. - - \c B_PERMISSION_DENIED: File permissions didn't allow operation. - - \c B_NO_MEMORY: Insufficient memory for operation. - - \c B_LINK_LIMIT: Indicates a cyclic loop within the file system. - - \c B_BUSY: A node was busy. - - \c B_FILE_ERROR: A general file error. - - \c B_NO_MORE_FDS: The application has run out of file descriptors. -*/ +// Re-initializes the BFile to the file referred to by the +// supplied path name and according to the specified open mode. status_t BFile::SetTo(const char* path, uint32 openMode) { @@ -250,26 +172,9 @@ BFile::SetTo(const char* path, uint32 openMode) } -/*! \brief Re-initializes the BFile to the file referred to by the - supplied path name relative to the specified BDirectory and - according to the specified open mode. - \param dir the BDirectory, relative to which the file's path name is - given - \param path the file's path name relative to \a dir - \param openMode the mode in which the file should be opened - - \c B_OK: Everything went fine. - - \c B_BAD_VALUE: \c NULL \a dir or \a path or bad \a openMode. - - \c B_ENTRY_NOT_FOUND: File not found or failed to create file. - - \c B_FILE_EXISTS: File exists and \c B_FAIL_IF_EXISTS was passed. - - \c B_PERMISSION_DENIED: File permissions didn't allow operation. - - \c B_NO_MEMORY: Insufficient memory for operation. - - \c B_LINK_LIMIT: Indicates a cyclic loop within the file system. - - \c B_BUSY: A node was busy. - - \c B_FILE_ERROR: A general file error. - - \c B_NO_MORE_FDS: The application has run out of file descriptors. - \todo Implemented using SetTo(BEntry*, uint32). Check, if necessary - to reimplement! -*/ +// Re-initializes the BFile to the file referred to by the +// supplied path name relative to the specified BDirectory and +// according to the specified open mode. status_t BFile::SetTo(const BDirectory* dir, const char* path, uint32 openMode) { @@ -292,12 +197,7 @@ BFile::SetTo(const BDirectory* dir, const char* path, uint32 openMode) } -/*! \brief Returns whether the file is readable. - \return - - \c true, if the BFile has been initialized properly and the file has - been been opened for reading, - - \c false, otherwise. -*/ +// Reports whether or not the file is readable. bool BFile::IsReadable() const { @@ -306,12 +206,7 @@ BFile::IsReadable() const } -/*! \brief Returns whether the file is writable. - \return - - \c true, if the BFile has been initialized properly and the file has - been opened for writing, - - \c false, otherwise. -*/ +// Reports whether or not the file is writable. bool BFile::IsWritable() const { @@ -320,11 +215,7 @@ BFile::IsWritable() const } -/*! \brief Reads a number of bytes from the file into a buffer. - \param buffer the buffer the data from the file shall be written to - \param size the number of bytes that shall be read - \return the number of bytes actually read or an error code -*/ +// Reads a number of bytes from the file into a buffer. ssize_t BFile::Read(void* buffer, size_t size) { @@ -334,14 +225,8 @@ BFile::Read(void* buffer, size_t size) } -/*! \brief Reads a number of bytes from a certain position within the file - into a buffer. - \param location the position (in bytes) within the file from which the - data shall be read - \param buffer the buffer the data from the file shall be written to - \param size the number of bytes that shall be read - \return the number of bytes actually read or an error code -*/ +// Reads a number of bytes from a certain position within the file +// into a buffer. ssize_t BFile::ReadAt(off_t location, void* buffer, size_t size) { @@ -354,11 +239,7 @@ BFile::ReadAt(off_t location, void* buffer, size_t size) } -/*! \brief Writes a number of bytes from a buffer into the file. - \param buffer the buffer containing the data to be written to the file - \param size the number of bytes that shall be written - \return the number of bytes actually written or an error code -*/ +// Writes a number of bytes from a buffer into the file. ssize_t BFile::Write(const void* buffer, size_t size) { @@ -368,14 +249,8 @@ BFile::Write(const void* buffer, size_t size) } -/*! \brief Writes a number of bytes from a buffer at a certain position - into the file. - \param location the position (in bytes) within the file at which the data - shall be written - \param buffer the buffer containing the data to be written to the file - \param size the number of bytes that shall be written - \return the number of bytes actually written or an error code -*/ +// Writes a number of bytes from a buffer at a certain position +// into the file. ssize_t BFile::WriteAt(off_t location, const void* buffer, size_t size) { @@ -388,22 +263,7 @@ BFile::WriteAt(off_t location, const void* buffer, size_t size) } -/*! \brief Seeks to another read/write position within the file. - It is allowed to seek past the end of the file. A subsequent call to - Write() will pad the file with undefined data. Seeking before the - beginning of the file will fail and the behavior of subsequent Read() - or Write() invocations will be undefined. - \param offset new read/write position, depending on \a seekMode relative - to the beginning or the end of the file or the current position - \param seekMode: - - \c SEEK_SET: move relative to the beginning of the file - - \c SEEK_CUR: move relative to the current position - - \c SEEK_END: move relative to the end of the file - \return - - the new read/write position relative to the beginning of the file - - \c B_ERROR when trying to seek before the beginning of the file - - \c B_FILE_ERROR, if the file is not properly initialized -*/ +// Seeks to another read/write position within the file. off_t BFile::Seek(off_t offset, uint32 seekMode) { @@ -413,12 +273,7 @@ BFile::Seek(off_t offset, uint32 seekMode) } -/*! \brief Returns the current read/write position within the file. - \return - - the current read/write position relative to the beginning of the file - - \c B_ERROR, after a Seek() before the beginning of the file - - \c B_FILE_ERROR, if the file has not been initialized -*/ +// Gets the current read/write position within the file. off_t BFile::Position() const { @@ -428,19 +283,7 @@ BFile::Position() const } -/*! \brief Sets the size of the file. - If the file is shorter than \a size bytes it will be padded with - unspecified data to the requested size. If it is larger, it will be - truncated. - Note: There's no problem with setting the size of a BFile opened in - \c B_READ_ONLY mode, unless the file resides on a read only volume. - \param size the new file size - \return - - \c B_OK, if everything went fine - - \c B_NOT_ALLOWED, if trying to set the size of a file on a read only - volume - - \c B_DEVICE_FULL, if there's not enough space left on the volume -*/ +// Sets the size of the file. status_t BFile::SetSize(off_t size) { @@ -454,6 +297,7 @@ BFile::SetSize(off_t size) } +// Gets the size of the file. status_t BFile::GetSize(off_t* size) const { @@ -461,16 +305,12 @@ BFile::GetSize(off_t* size) const } -/*! \brief Assigns another BFile to this BFile. - If the other BFile is uninitialized, this one will be too. Otherwise it - will refer to the same file using the same mode, unless an error occurs. - \param file the original BFile - \return a reference to this BFile -*/ -BFile & +// Assigns another BFile to this BFile. +BFile& BFile::operator=(const BFile &file) { - if (&file != this) { // no need to assign us to ourselves + if (&file != this) { + // no need to assign us to ourselves Unset(); if (file.InitCheck() == B_OK) { // duplicate the file descriptor @@ -497,10 +337,7 @@ void BFile::_PhiloFile5() {} void BFile::_PhiloFile6() {} -/*! Returns the file descriptor. - To be used instead of accessing the BNode's private \c fFd member directly. - \return the file descriptor, or -1, if not properly initialized. -*/ +// Gets the file descriptor of the BFile. int BFile::get_fd() const { @@ -508,11 +345,9 @@ BFile::get_fd() const } -/*! Overrides BNode::close_fd() solely for R5 binary compatibility. -*/ +// Overrides BNode::close_fd() for binary compatibility with BeOS R5. void BFile::close_fd() { BNode::close_fd(); } - diff --git a/src/kits/tracker/OpenWithWindow.cpp b/src/kits/tracker/OpenWithWindow.cpp index c7869fa5f5..fb2414037d 100644 --- a/src/kits/tracker/OpenWithWindow.cpp +++ b/src/kits/tracker/OpenWithWindow.cpp @@ -903,7 +903,7 @@ OpenWithPoseView::HandleMessageDropped(BMessage* DEBUG_ONLY(message)) #if DEBUG // in debug mode allow tweaking the colors const rgb_color* color; - int32 size; + ssize_t size; // handle roColour-style color drops if (message->FindData("RGBColor", 'RGBC', (const void**)&color, &size) == B_OK) { SetViewColor(*color); diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp index 8e9c53f5ed..9c4971cd52 100644 --- a/src/kits/tracker/PoseView.cpp +++ b/src/kits/tracker/PoseView.cpp @@ -6956,6 +6956,7 @@ BPoseView::_EndSelectionRect() SetDrawingMode(B_OP_INVERT); StrokeRect(fSelectionRectInfo.rect, B_MIXED_COLORS); SetDrawingMode(B_OP_COPY); + fSelectionRectInfo.rect.Set(0, 0, -1, -1); } else { Invalidate(fSelectionRectInfo.rect); fSelectionRectInfo.rect.Set(0, 0, -1, -1); diff --git a/src/kits/tracker/QueryPoseView.cpp b/src/kits/tracker/QueryPoseView.cpp index e50efa9af6..b74a3a9f1d 100644 --- a/src/kits/tracker/QueryPoseView.cpp +++ b/src/kits/tracker/QueryPoseView.cpp @@ -299,7 +299,7 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref) timeData.tm_min = 0; nextHour = mktime(&timeData); - PRINT(("%ld minutes, %ld seconds till next hour\n", + PRINT(("%" B_PRId32 " minutes, %" B_PRId32 " seconds till next hour\n", (nextHour - now) / 60, (nextHour - now) % 60)); time_t nextMinute = now + 60; @@ -308,7 +308,7 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref) timeData.tm_sec = 0; nextMinute = mktime(&timeData); - PRINT(("%ld seconds till next minute\n", nextMinute - now)); + PRINT(("%" B_PRId32 " seconds till next minute\n", nextMinute - now)); bigtime_t delta; if (fQueryListContainer->DynamicDateRefreshEveryMinute()) @@ -325,16 +325,18 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref) int32 hoursTillMidnight = minutesTillMidnight/60; minutesTillMidnight %= 60; - PRINT(("%ld hours, %ld minutes, %ld seconds till midnight\n", - hoursTillMidnight, minutesTillMidnight, secondsTillMidnight)); + PRINT(("%" B_PRId32 " hours, %" B_PRId32 " minutes, %" B_PRId32 + " seconds till midnight\n", hoursTillMidnight, minutesTillMidnight, + secondsTillMidnight)); int32 refreshInSeconds = delta % 60; int32 refreshInMinutes = delta / 60; int32 refreshInHours = refreshInMinutes / 60; refreshInMinutes %= 60; - PRINT(("next refresh in %ld hours, %ld minutes, %ld seconds\n", - refreshInHours, refreshInMinutes, refreshInSeconds)); + PRINT(("next refresh in %" B_PRId32 " hours, %" B_PRId32 "minutes, %" + B_PRId32 " seconds\n", refreshInHours, refreshInMinutes, + refreshInSeconds)); #endif // bump up to microseconds diff --git a/src/kits/tracker/Tests.cpp b/src/kits/tracker/Tests.cpp index 7b3c3f0b59..71ac80f89d 100644 --- a/src/kits/tracker/Tests.cpp +++ b/src/kits/tracker/Tests.cpp @@ -179,12 +179,12 @@ IconSpewer::DrawSomeNew() view->SetHighColor(Color(0, 0, 0)); char buffer[256]; if (cycleTime) { - sprintf(buffer, "last cycle time %Ld ms", cycleTime/1000); + sprintf(buffer, "last cycle time %" B_PRId64 " ms", cycleTime/1000); view->DrawString(buffer, BPoint(20, bounds.bottom - 20)); } if (numDrawn) { - sprintf(buffer, "average draw time %Ld us per icon", + sprintf(buffer, "average draw time %" B_PRId64 " us per icon", watch.ElapsedTime() / numDrawn); view->DrawString(buffer, BPoint(20, bounds.bottom - 30)); } diff --git a/src/kits/tracker/Tracker.cpp b/src/kits/tracker/Tracker.cpp index 0ad8f6aa0a..e327762bdf 100644 --- a/src/kits/tracker/Tracker.cpp +++ b/src/kits/tracker/Tracker.cpp @@ -1488,7 +1488,7 @@ TTracker::CloseParent(node_ref parent) void TTracker::ShowSettingsWindow() { - if (!fSettingsWindow) { + if (fSettingsWindow == NULL) { fSettingsWindow = new TrackerSettingsWindow(); fSettingsWindow->Show(); } else { diff --git a/src/kits/tracker/TrackerSettingsWindow.cpp b/src/kits/tracker/TrackerSettingsWindow.cpp index 2d9710d32f..4be73c1bc3 100644 --- a/src/kits/tracker/TrackerSettingsWindow.cpp +++ b/src/kits/tracker/TrackerSettingsWindow.cpp @@ -135,19 +135,10 @@ TrackerSettingsWindow::TrackerSettingsWindow() bool TrackerSettingsWindow::QuitRequested() { - bool isHidden = false; - - if (Lock()) { - isHidden = IsHidden(); - Unlock(); - } else - return true; - - if (isHidden) + if (IsHidden()) return true; Hide(); - return false; } @@ -279,14 +270,14 @@ TrackerSettingsWindow::_HandleChangedSettingsView() BView* oldView = fSettingsContainerBox->ChildAt(0); - if (oldView) + if (oldView != NULL) oldView->RemoveSelf(); SettingsItem* selectedItem = dynamic_cast (fSettingsTypeListView->ItemAt(currentSelection)); - if (selectedItem) { + if (selectedItem != NULL) { fSettingsContainerBox->SetLabel(selectedItem->Text()); BView* view = selectedItem->View(); diff --git a/src/kits/tracker/Utilities.cpp b/src/kits/tracker/Utilities.cpp index c9cca8c1b8..f5b2bb60a0 100644 --- a/src/kits/tracker/Utilities.cpp +++ b/src/kits/tracker/Utilities.cpp @@ -261,7 +261,7 @@ PoseInfo::EndianSwap(void* castToThis) void PoseInfo::PrintToStream() { - PRINT(("%s, inode:%Lx, location %f %f\n", + PRINT(("%s, inode:%" B_PRIx64 ", location %f %f\n", fInvisible ? "hidden" : "visible", fInitedDirectory, fLocation.x, fLocation.y)); } diff --git a/src/preferences/locale/FormatSettingsView.cpp b/src/preferences/locale/FormatSettingsView.cpp index 2ea8cd4d59..0dc5f6bd5b 100644 --- a/src/preferences/locale/FormatSettingsView.cpp +++ b/src/preferences/locale/FormatSettingsView.cpp @@ -258,12 +258,27 @@ void FormatSettingsView::MessageReceived(BMessage* message) { switch (message->what) { + case B_LOCALE_CHANGED: + { + // Time updated 12/24 hour clock + BFormattingConventions conventions; + BLocale::Default()->GetFormattingConventions(&conventions); + if (conventions.Use24HourClock()) + f24HourRadioButton->SetValue(B_CONTROL_ON); + else + f12HourRadioButton->SetValue(B_CONTROL_ON); + + _UpdateExamples(); + Window()->PostMessage(kMsgSettingsChanged); + break; + } + case kClockFormatChange: { BFormattingConventions conventions; BLocale::Default()->GetFormattingConventions(&conventions); conventions.SetExplicitUse24HourClock( - f24HourRadioButton->Value() ? true : false); + f24HourRadioButton->Value() == B_CONTROL_ON); MutableLocaleRoster::Default()->SetDefaultFormattingConventions( conventions); diff --git a/src/preferences/locale/LocalePreflet.cpp b/src/preferences/locale/LocalePreflet.cpp index d71b26be72..65eb3003f1 100644 --- a/src/preferences/locale/LocalePreflet.cpp +++ b/src/preferences/locale/LocalePreflet.cpp @@ -65,6 +65,11 @@ void LocalePreflet::MessageReceived(BMessage* message) { switch (message->what) { + case B_LOCALE_CHANGED: + BLocaleRoster::Default()->Refresh(); + fLocaleWindow->PostMessage(message); + break; + case kMsgRestartTrackerAndDeskbar: if (message->FindInt32("which") == 1) { _RestartApp("application/x-vnd.Be-TRAK"); diff --git a/src/preferences/locale/LocaleWindow.cpp b/src/preferences/locale/LocaleWindow.cpp index 97933bd6e3..2a6b4efce2 100644 --- a/src/preferences/locale/LocaleWindow.cpp +++ b/src/preferences/locale/LocaleWindow.cpp @@ -295,6 +295,10 @@ void LocaleWindow::MessageReceived(BMessage* message) { switch (message->what) { + case B_LOCALE_CHANGED: + fFormatView->MessageReceived(message); + break; + case kMsgDefaults: _Defaults(); break; @@ -478,8 +482,7 @@ LocaleWindow::Show() void LocaleWindow::_SettingsChanged() { - bool haveAnythingToRevert = fFormatView->IsReversible() || _IsReversible(); - fRevertButton->SetEnabled(haveAnythingToRevert); + fRevertButton->SetEnabled(fFormatView->IsReversible() || _IsReversible()); } diff --git a/src/preferences/time/ClockView.cpp b/src/preferences/time/ClockView.cpp new file mode 100644 index 0000000000..8c51c675a1 --- /dev/null +++ b/src/preferences/time/ClockView.cpp @@ -0,0 +1,227 @@ +/* + * Copyright 2004-2011, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * John Scipione + */ + +#include "ClockView.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "TimeMessages.h" + + +static const char* kDeskbarSignature = "application/x-vnd.Be-TSKB"; + +static const float kIndentSpacing + = be_control_look->DefaultItemSpacing() * 2.3; + + +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "Time" + + +ClockView::ClockView(const char* name) + : + BView(name, 0), + fCachedShowClock(B_CONTROL_ON), + fCachedShowSeconds(B_CONTROL_OFF), + fCachedShowDayOfWeek(B_CONTROL_OFF), + fCachedShowTimeZone(B_CONTROL_OFF) +{ + fShowClock = new BCheckBox(B_TRANSLATE("Show clock in Deskbar"), + new BMessage(kShowHideTime)); + fShowSeconds = new BCheckBox(B_TRANSLATE("Display time with seconds"), + new BMessage(kShowSeconds)); + fShowDayOfWeek = new BCheckBox(B_TRANSLATE("Show day of week"), + new BMessage(kShowDayOfWeek)); + fShowTimeZone = new BCheckBox(B_TRANSLATE("Show time zone"), + new BMessage(kShowTimeZone)); + + BView* view = BLayoutBuilder::Group<>(B_VERTICAL, 0) + .Add(fShowSeconds) + .Add(fShowDayOfWeek) + .Add(fShowTimeZone) + .AddGlue() + .SetInsets(B_USE_DEFAULT_SPACING) + .View(); + + BBox* showClockBox = new BBox("show clock box"); + showClockBox->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT, B_ALIGN_TOP)); + showClockBox->SetLabel(fShowClock); + showClockBox->AddChild(view); + + BLayoutBuilder::Group<>(this) + .AddGroup(B_VERTICAL, 0) + .Add(showClockBox) + .End() + .SetInsets(B_USE_DEFAULT_SPACING); +} + + +ClockView::~ClockView() +{ +} + + +void +ClockView::AttachedToWindow() +{ + if (Parent()) + SetViewColor(Parent()->ViewColor()); + + fShowClock->SetTarget(this); + fShowSeconds->SetTarget(this); + fShowDayOfWeek->SetTarget(this); + fShowTimeZone->SetTarget(this); + + // Disable these controls initially, they'll be enabled + // when we get a response from Deskbar. + fShowClock->SetEnabled(false); + fShowSeconds->SetEnabled(false); + fShowDayOfWeek->SetEnabled(false); + fShowTimeZone->SetEnabled(false); + + // Ask Deskbar for current clock settings, it will reply + // asynchronously in MesssageReceived() below. + BMessenger* messenger = new BMessenger(kDeskbarSignature); + BMessenger replyMessenger(this); + BMessage* message = new BMessage(kGetClockSettings); + messenger->SendMessage(message, replyMessenger); +} + + +void +ClockView::MessageReceived(BMessage* message) +{ + switch (message->what) { + case kGetClockSettings: + { + // Get current clock settings from Deskbar + bool showClock; + bool showSeconds; + bool showDayOfWeek; + bool showTimeZone; + + if (message->FindBool("showSeconds", &showSeconds) == B_OK) { + fCachedShowSeconds = showSeconds + ? B_CONTROL_ON : B_CONTROL_OFF; + fShowSeconds->SetValue(fCachedShowSeconds); + fShowSeconds->SetEnabled(true); + } + + if (message->FindBool("showDayOfWeek", &showDayOfWeek) == B_OK) { + fCachedShowDayOfWeek = showDayOfWeek + ? B_CONTROL_ON : B_CONTROL_OFF; + fShowDayOfWeek->SetValue(fCachedShowDayOfWeek); + fShowDayOfWeek->SetEnabled(true); + } + + if (message->FindBool("showTimeZone", &showTimeZone) == B_OK) { + fCachedShowTimeZone = showTimeZone + ? B_CONTROL_ON : B_CONTROL_OFF; + fShowTimeZone->SetValue(fCachedShowTimeZone); + fShowTimeZone->SetEnabled(true); + } + + // do this one last because it might disable the others + if (message->FindBool("showClock", &showClock) == B_OK) { + fCachedShowClock = showClock ? B_CONTROL_ON : B_CONTROL_OFF; + fShowClock->SetValue(fCachedShowClock); + fShowClock->SetEnabled(true); + fShowSeconds->SetEnabled(showClock); + fShowDayOfWeek->SetEnabled(showClock); + fShowTimeZone->SetEnabled(showClock); + } + break; + } + + case kShowHideTime: + { + bool showClock; + if (message->FindBool("showClock", &showClock) == B_OK) { + // message originated from Deskbar, handle special + fShowClock->SetValue(showClock ? B_CONTROL_ON : B_CONTROL_OFF); + fShowSeconds->SetEnabled(showClock); + fShowDayOfWeek->SetEnabled(showClock); + fShowTimeZone->SetEnabled(showClock); + + Window()->PostMessage(kMsgChange); + break; + // don't fall through + } + showClock = fShowClock->Value() == B_CONTROL_ON; + fShowSeconds->SetEnabled(showClock); + fShowDayOfWeek->SetEnabled(showClock); + fShowTimeZone->SetEnabled(showClock); + } + // fall-through + case kShowSeconds: + case kShowDayOfWeek: + case kShowTimeZone: + { + BMessenger* messenger = new BMessenger(kDeskbarSignature); + messenger->SendMessage(message); + + Window()->PostMessage(kMsgChange); + + break; + } + + case kMsgRevert: + _Revert(); + break; + + default: + BView::MessageReceived(message); + break; + } +} + + +bool +ClockView::CheckCanRevert() +{ + return fShowClock->Value() != fCachedShowClock + || fShowSeconds->Value() != fCachedShowSeconds + || fShowDayOfWeek->Value() != fCachedShowDayOfWeek + || fShowTimeZone->Value() != fCachedShowTimeZone; +} + + +void +ClockView::_Revert() +{ + if (fShowClock->Value() != fCachedShowClock) { + fShowClock->SetValue(fCachedShowClock); + fShowClock->Invoke(); + } + + if (fShowSeconds->Value() != fCachedShowSeconds) { + fShowSeconds->SetValue(fCachedShowSeconds); + fShowSeconds->Invoke(); + } + + if (fShowDayOfWeek->Value() != fCachedShowDayOfWeek) { + fShowDayOfWeek->SetValue(fCachedShowDayOfWeek); + fShowDayOfWeek->Invoke(); + } + + if (fShowTimeZone->Value() != fCachedShowTimeZone) { + fShowTimeZone->SetValue(fCachedShowTimeZone); + fShowTimeZone->Invoke(); + } +} diff --git a/src/preferences/time/ClockView.h b/src/preferences/time/ClockView.h new file mode 100644 index 0000000000..d5a6e6502d --- /dev/null +++ b/src/preferences/time/ClockView.h @@ -0,0 +1,44 @@ +/* + * Copyright 2004-2011, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * John Scipione + */ +#ifndef _CLOCK_VIEW_H +#define _CLOCK_VIEW_H + + +#include + + +class BCheckBox; +class BRadioButton; + + +class ClockView : public BView { +public: + ClockView(const char* name); + virtual ~ClockView(); + + virtual void AttachedToWindow(); + virtual void MessageReceived(BMessage* message); + + bool CheckCanRevert(); + +private: + void _Revert(); + + BCheckBox* fShowClock; + BCheckBox* fShowSeconds; + BCheckBox* fShowDayOfWeek; + BCheckBox* fShowTimeZone; + + int32 fCachedShowClock; + int32 fCachedShowSeconds; + int32 fCachedShowDayOfWeek; + int32 fCachedShowTimeZone; +}; + + +#endif // _CLOCK_VIEW_H diff --git a/src/preferences/time/Jamfile b/src/preferences/time/Jamfile index 43e27b0828..aa7154fca1 100644 --- a/src/preferences/time/Jamfile +++ b/src/preferences/time/Jamfile @@ -9,6 +9,7 @@ local sources = AnalogClock.cpp BaseView.cpp Bitmaps.cpp + ClockView.cpp DateTimeEdit.cpp SectionEdit.cpp DateTimeView.cpp diff --git a/src/preferences/time/Time.cpp b/src/preferences/time/Time.cpp index 10c462df03..21a65eabd5 100644 --- a/src/preferences/time/Time.cpp +++ b/src/preferences/time/Time.cpp @@ -20,6 +20,7 @@ #include #include "NetworkTimeView.h" +#include "TimeMessages.h" #include "TimeWindow.h" @@ -64,6 +65,22 @@ TimeApplication::AboutRequested() } +void +TimeApplication::MessageReceived(BMessage* message) +{ + switch (message->what) { + case kSelectClockTab: + case kShowHideTime: + fWindow->PostMessage(message); + break; + + default: + BApplication::MessageReceived(message); + break; + } +} + + int main(int argc, char** argv) { diff --git a/src/preferences/time/Time.h b/src/preferences/time/Time.h index a0af8e0bed..99ab955a81 100644 --- a/src/preferences/time/Time.h +++ b/src/preferences/time/Time.h @@ -14,6 +14,7 @@ #include +class BMessage; class TTimeWindow; @@ -25,6 +26,8 @@ public: virtual void ReadyToRun(); virtual void AboutRequested(); + virtual void MessageReceived(BMessage* message); + private: TTimeWindow* fWindow; }; diff --git a/src/preferences/time/TimeMessages.h b/src/preferences/time/TimeMessages.h index 51a5440189..73206cf440 100644 --- a/src/preferences/time/TimeMessages.h +++ b/src/preferences/time/TimeMessages.h @@ -49,5 +49,23 @@ const uint32 kMsgChange = 'chng'; // change time finished const uint32 kChangeTimeFinished = 'tcfi'; +// show or hide Deskbar clock +const uint32 kShowHideTime = 'ShTm'; + +// show seconds +const uint32 kShowSeconds = 'SwSc'; + +// show day of week +const uint32 kShowDayOfWeek = 'SwDw'; + +// show time zone +const uint32 kShowTimeZone = 'SwTz'; + +// get clock settings from Deskbar +const uint32 kGetClockSettings = 'GCkS'; + +// bring the clock tab to front +const uint32 kSelectClockTab = 'SlCk'; + #endif // _TIME_MESSAGES_H diff --git a/src/preferences/time/TimeWindow.cpp b/src/preferences/time/TimeWindow.cpp index 2c7c6e48d2..8d2e6415ba 100644 --- a/src/preferences/time/TimeWindow.cpp +++ b/src/preferences/time/TimeWindow.cpp @@ -19,6 +19,7 @@ #include #include "BaseView.h" +#include "ClockView.h" #include "DateTimeView.h" #include "NetworkTimeView.h" #include "TimeMessages.h" @@ -79,6 +80,7 @@ TTimeWindow::MessageReceived(BMessage* message) fDateTimeView->MessageReceived(message); fTimeZoneView->MessageReceived(message); fNetworkTimeView->MessageReceived(message); + fClockView->MessageReceived(message); fRevertButton->SetEnabled(false); break; @@ -92,6 +94,15 @@ TTimeWindow::MessageReceived(BMessage* message) _SetRevertStatus(); break; + case kSelectClockTab: + // focus the clock tab (last one) + fTabView->Select(fTabView->CountTabs() - 1); + break; + + case kShowHideTime: + fClockView->MessageReceived(message); + break; + default: BWindow::MessageReceived(message); break; @@ -107,17 +118,19 @@ TTimeWindow::_InitWindow() fDateTimeView = new DateTimeView(B_TRANSLATE("Date and time")); fTimeZoneView = new TimeZoneView(B_TRANSLATE("Time zone")); fNetworkTimeView = new NetworkTimeView(B_TRANSLATE("Network time")); + fClockView = new ClockView(B_TRANSLATE("Clock")); fBaseView = new TTimeBaseView("baseView"); fBaseView->StartWatchingAll(fDateTimeView); fBaseView->StartWatchingAll(fTimeZoneView); - BTabView* tabView = new BTabView("tabView"); - tabView->AddTab(fDateTimeView); - tabView->AddTab(fTimeZoneView); - tabView->AddTab(fNetworkTimeView); + fTabView = new BTabView("tabView"); + fTabView->AddTab(fDateTimeView); + fTabView->AddTab(fTimeZoneView); + fTabView->AddTab(fNetworkTimeView); + fTabView->AddTab(fClockView); - fBaseView->AddChild(tabView); + fBaseView->AddChild(fTabView); fRevertButton = new BButton("revert", B_TRANSLATE("Revert"), new BMessage(kMsgRevert)); @@ -166,5 +179,6 @@ TTimeWindow::_SetRevertStatus() { fRevertButton->SetEnabled(fDateTimeView->CheckCanRevert() || fTimeZoneView->CheckCanRevert() - || fNetworkTimeView->CheckCanRevert()); + || fNetworkTimeView->CheckCanRevert() + || fClockView->CheckCanRevert()); } diff --git a/src/preferences/time/TimeWindow.h b/src/preferences/time/TimeWindow.h index 55ef884ffb..46af79ec63 100644 --- a/src/preferences/time/TimeWindow.h +++ b/src/preferences/time/TimeWindow.h @@ -14,10 +14,12 @@ class BMessage; +class BTabView; +class ClockView; class DateTimeView; -class TTimeBaseView; -class TimeZoneView; class NetworkTimeView; +class TimeZoneView; +class TTimeBaseView; class TTimeWindow : public BWindow { @@ -35,9 +37,13 @@ private: void _SetRevertStatus(); TTimeBaseView* fBaseView; + + BTabView* fTabView; DateTimeView* fDateTimeView; TimeZoneView* fTimeZoneView; NetworkTimeView* fNetworkTimeView; + ClockView* fClockView; + BButton* fRevertButton; };