[haiku-commits] r36423 - in haiku/branches/releases/r1alpha2: . build/jam data/bin headers/build/private/shared headers/os/interface ...

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 22 Apr 2010 21:09:56 +0200 (CEST)

Author: bonefish
Date: 2010-04-22 21:09:56 +0200 (Thu, 22 Apr 2010)
New Revision: 36423
Changeset: http://dev.haiku-os.org/changeset/36423/haiku

Added:
   
haiku/branches/releases/r1alpha2/src/system/kernel/device_manager/IOCallback.cpp
   
haiku/branches/releases/r1alpha2/src/system/kernel/device_manager/IOCallback.h
Modified:
   haiku/branches/releases/r1alpha2/
   haiku/branches/releases/r1alpha2/build/jam/HaikuImage
   haiku/branches/releases/r1alpha2/build/jam/OptionalPackages
   haiku/branches/releases/r1alpha2/build/jam/ReleaseBuildProfiles
   haiku/branches/releases/r1alpha2/build/jam/UserBuildConfig.ReadMe
   haiku/branches/releases/r1alpha2/build/jam/UserBuildConfig.sample
   haiku/branches/releases/r1alpha2/data/bin/installoptionalpackage
   haiku/branches/releases/r1alpha2/headers/build/private/shared/Keymap.h
   haiku/branches/releases/r1alpha2/headers/os/interface/AffineTransform.h
   haiku/branches/releases/r1alpha2/headers/private/shared/Keymap.h
   
haiku/branches/releases/r1alpha2/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp
   
haiku/branches/releases/r1alpha2/src/add-ons/input_server/devices/keyboard/TeamMonitorWindow.cpp
   haiku/branches/releases/r1alpha2/src/add-ons/kernel/bus_managers/acpi/
   
haiku/branches/releases/r1alpha2/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath/
   haiku/branches/releases/r1alpha2/src/apps/deskbar/ExpandoMenuBar.cpp
   haiku/branches/releases/r1alpha2/src/apps/mediaplayer/ControllerView.cpp
   haiku/branches/releases/r1alpha2/src/apps/mediaplayer/MainWin.cpp
   
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/TransportControlGroup.cpp
   haiku/branches/releases/r1alpha2/src/apps/mediaplayer/TransportControlGroup.h
   
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/interface/SeekSlider.cpp
   haiku/branches/releases/r1alpha2/src/apps/mediaplayer/interface/SeekSlider.h
   haiku/branches/releases/r1alpha2/src/apps/mediaplayer/playlist/Playlist.cpp
   haiku/branches/releases/r1alpha2/src/bin/consoled/consoled.cpp
   haiku/branches/releases/r1alpha2/src/bin/coreutils/lib/Jamfile
   haiku/branches/releases/r1alpha2/src/bin/coreutils/src/Jamfile
   haiku/branches/releases/r1alpha2/src/kits/interface/AffineTransform.cpp
   haiku/branches/releases/r1alpha2/src/kits/interface/TextView.cpp
   haiku/branches/releases/r1alpha2/src/kits/shared/Keymap.cpp
   haiku/branches/releases/r1alpha2/src/kits/tracker/PoseView.cpp
   haiku/branches/releases/r1alpha2/src/kits/tracker/PoseView.h
   
haiku/branches/releases/r1alpha2/src/preferences/keymap/KeyboardLayoutView.cpp
   haiku/branches/releases/r1alpha2/src/servers/media/DefaultManager.cpp
   
haiku/branches/releases/r1alpha2/src/system/kernel/device_manager/IOScheduler.cpp
   
haiku/branches/releases/r1alpha2/src/system/kernel/device_manager/IOScheduler.h
   haiku/branches/releases/r1alpha2/src/system/kernel/device_manager/Jamfile
   haiku/branches/releases/r1alpha2/src/system/kernel/fs/vfs_boot.cpp
Log:
Merged r36386, r36388-r36392, r36394-r36401, r36403-r36404, r36406-r36408, 
r36417-r36418 from trunk into branch.



Property changes on: haiku/branches/releases/r1alpha2
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/haiku/trunk:36349-36350,36353,36355-36357,36360-36368,36370-36371,36375,36379,36381-36385
   + 
/haiku/trunk:36349-36350,36353,36355-36357,36360-36368,36370-36371,36375,36379,36381-36386,36388-36392,36394-36401,36403-36404,36406-36408,36417-36418

Modified: haiku/branches/releases/r1alpha2/build/jam/HaikuImage
===================================================================
--- haiku/branches/releases/r1alpha2/build/jam/HaikuImage       2010-04-22 
19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/build/jam/HaikuImage       2010-04-22 
19:09:56 UTC (rev 36423)
@@ -43,7 +43,7 @@
        less lessecho lesskey link linkcatkeys listarea listattr listimage 
listdev
        listport listres listsem listusb ln locate logger login logname ls 
lsindex
        mail2mbox makebootable mbox2mail md5sum merge message mimeset mkdos 
mkdir
-       mkfifo mkfs mkindex modifiers mount mount_nfs mountvolume mv
+       mkfifo mkfs mkindex mktemp modifiers mount mount_nfs mountvolume mv
        netcat netstat nl nohup nproc
        od open
        passwd paste patch pathchk pc ping play playfile playsound playwav pr 
prio

Modified: haiku/branches/releases/r1alpha2/build/jam/OptionalPackages
===================================================================
--- haiku/branches/releases/r1alpha2/build/jam/OptionalPackages 2010-04-22 
19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/build/jam/OptionalPackages 2010-04-22 
19:09:56 UTC (rev 36423)
@@ -24,6 +24,7 @@
 #      BePDF                                   - native PDF reader
 #      BeZillaBrowser                  - fork of Mozilla's 1.8 branch.
 #      Bluetooth                               - experimental Haiku components 
for Bluetooth
+#      Bzip                                    - file archiving utility
 #      CDRecord                                - the command line CD writing 
tools
 #      Clockwerk                               - native audio/video compositing
 #      CLucene                                 - indexed file search
@@ -69,6 +70,7 @@
 #      Welcome                                 - introductory documentation to 
Haiku
 #      WifiFirmwareScriptData  - data files needed by install-wifi-firmwares.sh
 #      WonderBrush                             - native graphics application
+#      XZ-Utils                                - file archiving utility
 #      Yasm                                    - the assembler utility
 
 local baseURL = http://haiku-files.org/files/optional-packages ;

Modified: haiku/branches/releases/r1alpha2/build/jam/ReleaseBuildProfiles
===================================================================
--- haiku/branches/releases/r1alpha2/build/jam/ReleaseBuildProfiles     
2010-04-22 19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/build/jam/ReleaseBuildProfiles     
2010-04-22 19:09:56 UTC (rev 36423)
@@ -22,7 +22,7 @@
                        VLC WonderBrush ;
                AddOptionalHaikuImagePackages CVS Development Git Mercurial
                        Python Subversion OpenSSH OpenSSL ;
-               AddOptionalHaikuImagePackages Nano P7zip Welcome BeBook ;
+               AddOptionalHaikuImagePackages Nano P7zip Welcome BeBook 
XZ-Utils ;
        }
 
        case "beta-*" : {
@@ -37,7 +37,7 @@
                HAIKU_IMAGE_HOST_NAME = shredder ;
                HAIKU_IMAGE_SIZE = 450 ;
 
-               AddOptionalHaikuImagePackages Pe Nano Vision P7zip ;
+               AddOptionalHaikuImagePackages Pe Nano Vision P7zip XZ-Utils ;
                AddOptionalHaikuImagePackages Development Subversion OpenSSH 
OpenSSL ;
        }
 }

Modified: haiku/branches/releases/r1alpha2/build/jam/UserBuildConfig.ReadMe
===================================================================
--- haiku/branches/releases/r1alpha2/build/jam/UserBuildConfig.ReadMe   
2010-04-22 19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/build/jam/UserBuildConfig.ReadMe   
2010-04-22 19:09:56 UTC (rev 36423)
@@ -136,7 +136,7 @@
 # alternative gcc version are added by default. Unsetting this variable 
disables
 # building and adding the libraries. Ignored, if --alternative-gcc-output-dir
 # was not specified.
-HAIKU_ADD_ALTERNATIVE_GCC_LIBS = ;
+HAIKU_ADD_ALTERNATIVE_GCC_LIBS = 0 ;
 
 # Specify scripts that shall be run when populating the image/installation
 # directory. The "early" script is run before anything has been copied onto

Modified: haiku/branches/releases/r1alpha2/build/jam/UserBuildConfig.sample
===================================================================
--- haiku/branches/releases/r1alpha2/build/jam/UserBuildConfig.sample   
2010-04-22 19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/build/jam/UserBuildConfig.sample   
2010-04-22 19:09:56 UTC (rev 36423)
@@ -31,4 +31,4 @@
 #AddOptionalHaikuImagePackages WonderBrush ;
 
 # Don't add the libraries built with the alternative gcc version.
-#HAIKU_ADD_ALTERNATIVE_GCC_LIBS = ;
+#HAIKU_ADD_ALTERNATIVE_GCC_LIBS = 0 ;

Modified: haiku/branches/releases/r1alpha2/data/bin/installoptionalpackage
===================================================================
--- haiku/branches/releases/r1alpha2/data/bin/installoptionalpackage    
2010-04-22 19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/data/bin/installoptionalpackage    
2010-04-22 19:09:56 UTC (rev 36423)
@@ -27,6 +27,7 @@
 
 declare -A availablePackages
 declare availablePackagesKeys=""
+declare wantsToInstall=""
 # Some Packages cannot be installed,
 # as they require either the source code or compiled binaries
 declare packageIgnoreList='Bluetooth Development DevelopmentMin \
@@ -309,7 +310,7 @@
 
 function Init()
 {
-       
+
        # Set up some directory paths
        baseDir=`finddir B_COMMON_DATA_DIRECTORY`/optional-packages
        tmpDir=`finddir B_COMMON_TEMP_DIRECTORY`
@@ -322,16 +323,23 @@
        if ! [ -d ${baseDir} ] ; then
                mkdir -p ${baseDir}
        fi
-       
+
+       DetectSystemConfiguration
+       DownloadAllBuildFiles
+       ReadPackageNamesIntoMemory
+}
+
+
+function DownloadAllBuildFiles()
+{
+       # DownloadAllBuildFiles
        # Retreive the necessary jam files from svn.
        local buildFiles="OptionalPackages OptionalPackageDependencies \
                OptionalBuildFeatures"
        for file in ${buildFiles} ; do
                GetBuildFile ${file}
        done
-
-       DetectSystemConfiguration
-       ReadPackageNamesIntoMemory
+       
 }
 
 
@@ -469,26 +477,24 @@
 }
 
 
-function AddPackage()
+function BuildListOfRequestedPackages()
 {
-       # AddPackage <name>
-       packagesToInstall=""
-       proceedWithInstallation=false
-       
-       for desiredPackage in ${1}; do
-               if IsPackageNameValid $desiredPackage  ; then
-                       for item in ${availablePackages[${desiredPackage}]} ; do
-                               if ! ContainsSubstring "${packagesToInstall}" 
"${item}" ; then
-                                       packagesToInstall="${packagesToInstall} 
${item}"
-                               fi
-                       done
-                       proceedWithInstallation=true
-               fi
+       if [ "$1" = '-a' ] || [ "$1" = '-s' ]; then
+               shift
+       fi
+       while [ $# -gt 0 ]; do
+               wantsToInstall="${wantsToInstall} $1"
+               shift
        done
+}
+
+
+function AddPackages()
+{
+       # AddPackages
        
        # If one or more packages can be installed, do it.
-       if $proceedWithInstallation  ; then
-               echo "To be installed: ${packagesToInstall}"
+       if BuildFinalListOfPackagesToInstall ; then
                
                for package in ${packagesToInstall} ; do
                        # output the "if [ IsOptionalHaikuImagePackageAdded..." 
code block
@@ -506,6 +512,32 @@
 }
 
 
+function BuildFinalListOfPackagesToInstall()
+{
+       # BuildFinalListOfPackagesToInstall
+       
+       packagesToInstall=""
+       proceedWithInstallation=false
+       
+       for desiredPackage in ${wantsToInstall}; do
+               if IsPackageNameValid $desiredPackage  ; then
+                       for item in ${availablePackages[${desiredPackage}]} ; do
+                               if ! ContainsSubstring "${packagesToInstall}" 
"${item}" ; then
+                                       packagesToInstall="${packagesToInstall} 
${item}"
+                               fi
+                       done
+                       proceedWithInstallation=true
+               fi
+       done
+       if [ $proceedWithInstallation ] ; then
+               echo "To be installed: ${packagesToInstall}"
+               return 0
+       else
+               return 1
+       fi
+}
+
+
 function IsPackageNameValid()
 {
        # IsPackageNameValid <name>
@@ -688,14 +720,38 @@
     http://dev.haiku-os.org/wiki/PackageManagerIdeas
     http://dev.haiku-os.org/wiki/PackageFormat
 
-Usage: ./installoptionalpackage [-l] [-a "<pkg> [<pkg> ...]"]
--l      List installable packages
--a      Add one or more packages and all dependencies
+Usage: ./installoptionalpackage [<pkg> [<pkg> ...]]
+  or   ./installoptionalpackage [-a|-s <pkg> [<pkg> ...]]
+  or   ./installoptionalpackage [-f|-h|-l]
 
+Options:  
+-a     Add one or more packages and all dependencies
+-s     Show the final list of packages that would be installed
+-f     Remove cached data and list installable packages
+-h     Print this help.
+-l     List installable packages
+
 EOF
 }
 
 
+function RemoveCachedFiles()
+{
+       # RemoveCachedFiles
+       echo "Removing cached files ..."
+       if [ -d ${baseDir} ]; then
+               rm -rf ${baseDir}
+       fi
+       
+       # Unset variables, which prevents duplicate entries.
+       declare -A availablePackages
+       declare availablePackagesKeys=""
+       
+       # Reinitialize
+       Init
+}
+
+
 function ListPackages()
 {
        # ListPackages
@@ -721,13 +777,27 @@
        Init
 fi
 
+# Support `installoptionalpackage <pkg> <pkg> ...`
+if [ "$1" != '-f' ] && [ "$1" != '-l' ] && [ "$1" != '-h' ] \
+       && [ "$1" != '-s' ]; then
+       BuildListOfRequestedPackages $@
+       AddPackages
+       exit 0
+fi     
+
 # Parse the arguments given to the script.
-while getopts "a:lh" opt; do
+while getopts "as:fhl" opt; do
        case $opt in
                a)
-                       AddPackage "$OPTARG"
+                       BuildListOfRequestedPackages $@
+                       AddPackages
                        exit 0
                        ;;
+               f)
+                       RemoveCachedFiles
+                       ListPackages
+                       exit 0
+                       ;;
                h)
                        DisplayUsage
                        exit 0
@@ -736,6 +806,11 @@
                        ListPackages
                        exit 0
                        ;;
+               s)
+                       BuildListOfRequestedPackages $@
+                       BuildFinalListOfPackagesToInstall
+                       exit 0
+                       ;;
                \?)
                        echo "Invalid option: -$OPTARG" >&2
                        exit 1

Modified: haiku/branches/releases/r1alpha2/headers/build/private/shared/Keymap.h
===================================================================
--- haiku/branches/releases/r1alpha2/headers/build/private/shared/Keymap.h      
2010-04-22 19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/headers/build/private/shared/Keymap.h      
2010-04-22 19:09:56 UTC (rev 36423)
@@ -28,9 +28,10 @@
                        bool                            IsModifierKey(uint32 
keyCode) const;
                        uint32                          Modifier(uint32 
keyCode) const;
                        uint32                          KeyForModifier(uint32 
modifier) const;
-                       uint8                           IsDeadKey(uint32 
keyCode,
-                                                                       uint32 
modifiers,
-                                                                       bool* 
isEnabled = NULL) const;
+                       uint8                           ActiveDeadKey(uint32 
keyCode,
+                                                                       uint32 
modifiers) const;
+                       uint8                           DeadKey(uint32 keyCode, 
uint32 modifiers,
+                                                                       bool* 
_isEnabled) const;
                        bool                            IsDeadSecondKey(uint32 
keyCode,
                                                                        uint32 
modifiers,
                                                                        uint8 
activeDeadKey) const;

Modified: 
haiku/branches/releases/r1alpha2/headers/os/interface/AffineTransform.h
===================================================================
--- haiku/branches/releases/r1alpha2/headers/os/interface/AffineTransform.h     
2010-04-22 19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/headers/os/interface/AffineTransform.h     
2010-04-22 19:09:56 UTC (rev 36423)
@@ -81,6 +81,8 @@
                        BAffineTransform                TranslateByCopy(double 
x, double y) const;
                        BAffineTransform                TranslateByCopy(const 
BPoint& delta) const;
 
+//                     const BAffineTransform& SetTranslation(double x, double 
y);
+
        // Rotation
        inline  const BAffineTransform& RotateBy(double angle);
                        const BAffineTransform& RotateBy(const BPoint& center,
@@ -90,6 +92,8 @@
                        BAffineTransform                RotateByCopy(const 
BPoint& center,
                                                                                
double angle) const;
 
+//                     const BAffineTransform& SetRotation(double angle);
+
        // Scaling
        inline  const BAffineTransform& ScaleBy(double scale);
                        const BAffineTransform& ScaleBy(const BPoint& center,
@@ -111,6 +115,9 @@
                        BAffineTransform                ScaleByCopy(const 
BPoint& center,
                                                                                
const BPoint& scale) const;
 
+                       const BAffineTransform& SetScale(double scale);
+                       const BAffineTransform& SetScale(double x, double y);
+
        // Shearing
        inline  const BAffineTransform& ShearBy(double x, double y);
                        const BAffineTransform& ShearBy(const BPoint& center, 
double x,
@@ -126,6 +133,8 @@
                        BAffineTransform                ShearByCopy(const 
BPoint& center,
                                                                                
const BPoint& shear) const;
 
+//                     const BAffineTransform& SetShear(double x, double y);
+
        // Multiplication
        inline  const BAffineTransform& Multiply(const BAffineTransform& other);
                        const BAffineTransform& PreMultiply(const 
BAffineTransform& other);
@@ -191,6 +200,9 @@
 };
 
 
+extern const BAffineTransform B_AFFINE_IDENTITY_TRANSFORM;
+
+
 // #pragma mark - inline methods
 
 

Modified: haiku/branches/releases/r1alpha2/headers/private/shared/Keymap.h
===================================================================
--- haiku/branches/releases/r1alpha2/headers/private/shared/Keymap.h    
2010-04-22 19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/headers/private/shared/Keymap.h    
2010-04-22 19:09:56 UTC (rev 36423)
@@ -28,8 +28,9 @@
                        bool                            IsModifierKey(uint32 
keyCode) const;
                        uint32                          Modifier(uint32 
keyCode) const;
                        uint32                          KeyForModifier(uint32 
modifier) const;
-                       uint8                           IsDeadKey(uint32 
keyCode,
-                                                                       uint32 
modifiers,
+                       uint8                           ActiveDeadKey(uint32 
keyCode,
+                                                                       uint32 
modifiers) const;
+                       uint8                           DeadKey(uint32 keyCode, 
uint32 modifiers,
                                                                        bool* 
isEnabled = NULL) const;
                        bool                            IsDeadSecondKey(uint32 
keyCode,
                                                                        uint32 
modifiers,

Modified: 
haiku/branches/releases/r1alpha2/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp
===================================================================
--- 
haiku/branches/releases/r1alpha2/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp
  2010-04-22 19:08:08 UTC (rev 36422)
+++ 
haiku/branches/releases/r1alpha2/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp
  2010-04-22 19:09:56 UTC (rev 36423)
@@ -398,7 +398,7 @@
 
                uint8 newDeadKey = 0;
                if (activeDeadKey == 0 || !isKeyDown)
-                       newDeadKey = fKeymap.IsDeadKey(keycode, fModifiers);
+                       newDeadKey = fKeymap.ActiveDeadKey(keycode, fModifiers);
 
                char* string = NULL;
                char* rawString = NULL;

Modified: 
haiku/branches/releases/r1alpha2/src/add-ons/input_server/devices/keyboard/TeamMonitorWindow.cpp
===================================================================
--- 
haiku/branches/releases/r1alpha2/src/add-ons/input_server/devices/keyboard/TeamMonitorWindow.cpp
    2010-04-22 19:08:08 UTC (rev 36422)
+++ 
haiku/branches/releases/r1alpha2/src/add-ons/input_server/devices/keyboard/TeamMonitorWindow.cpp
    2010-04-22 19:09:56 UTC (rev 36423)
@@ -68,7 +68,8 @@
 TeamMonitorWindow::TeamMonitorWindow()
        : BWindow(BRect(0, 0, 350, 300), "Team Monitor",
                B_TITLED_WINDOW_LOOK, B_MODAL_ALL_WINDOW_FEEL,
-               B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS,
+               B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS
+                       | B_CLOSE_ON_ESCAPE,
                B_ALL_WORKSPACES),
        fQuitting(false),
        fUpdateRunner(NULL)
@@ -144,6 +145,7 @@
 
        AddShortcut('T', B_COMMAND_KEY | B_OPTION_KEY,
                new BMessage(kMsgLaunchTerminal));
+       AddShortcut('W', B_COMMAND_KEY, new BMessage(B_QUIT_REQUESTED));
 }
 
 


Property changes on: 
haiku/branches/releases/r1alpha2/src/add-ons/kernel/bus_managers/acpi
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/haiku/trunk/src/add-ons/kernel/bus_managers/acpi:36349-36350,36353,36355-36357,36360-36368,36370-36371,36375,36379,36381-36385
/haiku/vendor/acpica/20100121:35554-35558
/haiku/vendor/acpica/current:33139-35553
   + 
/haiku/trunk/src/add-ons/kernel/bus_managers/acpi:36349-36350,36353,36355-36357,36360-36368,36370-36371,36375,36379,36381-36386,36388-36392,36394-36401,36403-36404,36406-36408,36417-36418
/haiku/vendor/acpica/20100121:35554-35558
/haiku/vendor/acpica/current:33139-35553


Property changes on: 
haiku/branches/releases/r1alpha2/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/haiku/trunk/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath:36349-36350,36353,36355-36357,36360-36368,36370-36371,36375,36379,36381-36385
/haiku/vendor/freebsd/HEAD/dev/ath/r204100:35677-35713
/haiku/vendor/freebsd/current/dev/ath:34314-35676
   + 
/haiku/trunk/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath:36349-36350,36353,36355-36357,36360-36368,36370-36371,36375,36379,36381-36386,36388-36392,36394-36401,36403-36404,36406-36408,36417-36418
/haiku/vendor/freebsd/HEAD/dev/ath/r204100:35677-35713
/haiku/vendor/freebsd/current/dev/ath:34314-35676

Modified: haiku/branches/releases/r1alpha2/src/apps/deskbar/ExpandoMenuBar.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/deskbar/ExpandoMenuBar.cpp        
2010-04-22 19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/src/apps/deskbar/ExpandoMenuBar.cpp        
2010-04-22 19:09:56 UTC (rev 36423)
@@ -302,16 +302,14 @@
        TTeamMenuItem* item = TeamItemAtPoint(where, &menuItem);
 
        // check for three finger salute, a.k.a. Vulcan Death Grip
-       if (message != NULL) {
+       if (message != NULL && item != NULL && !fBarView->Dragging()) {
                int32 modifiers = 0;
                message->FindInt32("modifiers", &modifiers);
 
                if ((modifiers & B_COMMAND_KEY) != 0
                        && (modifiers & B_OPTION_KEY) != 0
-                       && (modifiers & B_SHIFT_KEY) != 0
-                       && !fBarView->Dragging()
-                       && item != NULL) {
-                       const BList     *teams = item->Teams();
+                       && (modifiers & B_SHIFT_KEY) != 0) {
+                       const BList* teams = item->Teams();
                        int32 teamCount = teams->CountItems();
 
                        team_id teamID;
@@ -324,50 +322,44 @@
 
                        return;
                }
-       }
 
-       // control click - show all/hide all shortcut
-       int32 modifiers;
-       if (message != NULL && message->FindInt32("modifiers", &modifiers) == 
B_OK
-               && (modifiers & B_CONTROL_KEY) != 0
-               && !fBarView->Dragging()
-               && item != NULL) {
-               // show/hide item's teams
-               BMessage showMessage((modifiers & B_SHIFT_KEY) != 0
-                       ? kMinimizeTeam : kBringTeamToFront);
-               showMessage.AddInt32("itemIndex", IndexOf(item));
-               Window()->PostMessage(&showMessage, this);
-               return;
-       }
+               // control click - show all/hide all shortcut
+               if ((modifiers & B_CONTROL_KEY) != 0) {
+                       // show/hide item's teams
+                       BMessage showMessage((modifiers & B_SHIFT_KEY) != 0
+                               ? kMinimizeTeam : kBringTeamToFront);
+                       showMessage.AddInt32("itemIndex", IndexOf(item));
+                       Window()->PostMessage(&showMessage, this);
+                       return;
+               }
 
-       // Check the bounds of the expand Team icon
-       if (fShowTeamExpander && fVertical && !fBarView->Dragging()
-               && item != NULL) {
-               BRect expanderRect = item->ExpanderBounds();
-               if (expanderRect.Contains(where)) {
-                       // Let the update thread wait...
-                       BAutolock locker(sMonLocker);
+               // Check the bounds of the expand Team icon
+               if (fShowTeamExpander && fVertical) {
+                       BRect expanderRect = item->ExpanderBounds();
+                       if (expanderRect.Contains(where)) {
+                               // Let the update thread wait...
+                               BAutolock locker(sMonLocker);
 
-                       // Toggle the item
-                       item->ToggleExpandState(true);
-                       item->Draw();
+                               // Toggle the item
+                               item->ToggleExpandState(true);
+                               item->Draw();
 
-                       // Absorb the message.
-                       return;
+                               // Absorb the message.
+                               return;
+                       }
                }
-       }
 
-       // double-click on an item brings the team to front
-       int32 clicks;
-       if (message != NULL && message->FindInt32("clicks", &clicks) == B_OK
-               && clicks > 1) {
-               if (item == menuItem && item == fLastClickItem) {
+               // double-click on an item brings the team to front
+               int32 clicks;
+               if (message->FindInt32("clicks", &clicks) == B_OK && clicks > 1
+                       && item == menuItem && item == fLastClickItem) {
                        // activate this team
                        
be_roster->ActivateApp((team_id)item->Teams()->ItemAt(0));
                        return;
                }
-       } else
+
                fLastClickItem = item;
+       }
 
        BMenuBar::MouseDown(where);
 }

Modified: 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/ControllerView.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/mediaplayer/ControllerView.cpp    
2010-04-22 19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/src/apps/mediaplayer/ControllerView.cpp    
2010-04-22 19:09:56 UTC (rev 36423)
@@ -97,7 +97,14 @@
 void
 ControllerView::TogglePlaying()
 {
-       fController->TogglePlaying();
+       BAutolock _(fPlaylist);
+       if (fPlaylist->CurrentItemIndex() == fPlaylist->CountItems() - 1
+               && Position() == 1.0) {
+               // Reached end of playlist and end of last item
+               // -> start again from the first item.
+               fPlaylist->SetCurrentItemIndex(0);
+       } else
+               fController->TogglePlaying();
 }
 
 

Modified: haiku/branches/releases/r1alpha2/src/apps/mediaplayer/MainWin.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/mediaplayer/MainWin.cpp   
2010-04-22 19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/src/apps/mediaplayer/MainWin.cpp   
2010-04-22 19:09:56 UTC (rev 36423)
@@ -55,11 +55,11 @@
 #include "PlaylistWindow.h"
 #include "Settings.h"
 
+
 #define MIN_WIDTH 250
 
 
-int
-MainWin::sNoVideoWidth = MIN_WIDTH;
+int MainWin::sNoVideoWidth = MIN_WIDTH;
 
 
 // XXX TODO: why is lround not defined?
@@ -365,23 +365,23 @@
 
 
 void
-MainWin::Zoom(BPoint rec_position, float rec_width, float rec_height)
+MainWin::Zoom(BPoint /*position*/, float /*width*/, float /*height*/)
 {
        PostMessage(M_TOGGLE_FULLSCREEN);
 }
 
 
 void
-MainWin::DispatchMessage(BMessage *msg, BHandler *handler)
+MainWin::DispatchMessage(BMessage* msg, BHandler* handler)
 {
        if ((msg->what == B_MOUSE_DOWN)
                && (handler == fBackground || handler == fVideoView
-                               || handler == fControls))
+                       || handler == fControls))
                _MouseDown(msg, dynamic_cast<BView*>(handler));
 
        if ((msg->what == B_MOUSE_MOVED)
                && (handler == fBackground || handler == fVideoView
-                               || handler == fControls))
+                       || handler == fControls))
                _MouseMoved(msg, dynamic_cast<BView*>(handler));
 
        if ((msg->what == B_MOUSE_UP)
@@ -390,7 +390,6 @@
 
        if ((msg->what == B_KEY_DOWN)
                && (handler == fBackground || handler == fVideoView)) {
-
                // special case for PrintScreen key
                if (msg->FindInt32("key") == B_PRINT_KEY) {
                        fVideoView->OverlayScreenshotPrepare();
@@ -480,7 +479,6 @@
                                                if (result == B_OK)
                                                        
fController->SetVolume(newVolume);
                                        }
-
                                        break;
                                }
 
@@ -496,7 +494,6 @@
 
                                                result = 
reply.AddString("result", item->LocationURI());
                                        }
-
                                        break;
                                }
 
@@ -601,13 +598,9 @@
                        bool hadNext = fPlaylist->SetCurrentItemIndex(
                                fPlaylist->CurrentItemIndex() + 1);
                        if (!hadNext) {
-                               if (fHasVideo) {
-                                       if (fCloseWhenDonePlayingMovie)
-                                               PostMessage(B_QUIT_REQUESTED);
-                               } else {
-                                       if (fCloseWhenDonePlayingSound)
-                                               PostMessage(B_QUIT_REQUESTED);
-                               }
+                               if ((fHasVideo && fCloseWhenDonePlayingMovie)
+                                       || (!fHasVideo && 
fCloseWhenDonePlayingSound))
+                                       PostMessage(B_QUIT_REQUESTED);
                        }
                        break;
                }
@@ -1282,7 +1275,7 @@
 //             new BMessage(M_FILE_OPEN), 'O'));
        // Add recent files
        BRecentFilesList recentFiles(10, false, NULL, kAppSig);
-       BMenuItem *item = new BMenuItem(recentFiles.NewFileListMenu(
+       BMenuItem* item = new BMenuItem(recentFiles.NewFileListMenu(
                "Open file"B_UTF8_ELLIPSIS, new BMessage(B_REFS_RECEIVED),
                NULL, this, 10, false, NULL, 0, kAppSig), new 
BMessage(M_FILE_OPEN));
        item->SetShortcut('O', 0);
@@ -1478,14 +1471,15 @@
        }
 }
 
+
 void
 MainWin::_SetWindowSizeLimits()
 {
        int minWidth;
        int minHeight;
        _GetMinimumWindowSize(minWidth, minHeight);
-       SetSizeLimits(minWidth - 1, 32000, minHeight - 1, fHasVideo ?
-               32000 : minHeight - 1);
+       SetSizeLimits(minWidth - 1, 32000, minHeight - 1,
+               fHasVideo ? 32000 : minHeight - 1);
 }
 
 
@@ -1623,51 +1617,40 @@
 
 
 void
-MainWin::_MouseDown(BMessage *msg, BView* originalHandler)
+MainWin::_MouseDown(BMessage* msg, BView* originalHandler)
 {
-       BPoint screen_where;
        uint32 buttons = msg->FindInt32("buttons");
 
-       // On Zeta, only "screen_where" is relyable, "where" and "be:view_where"
+       // On Zeta, only "screen_where" is reliable, "where" and "be:view_where"
        // seem to be broken
-       if (B_OK != msg->FindPoint("screen_where", &screen_where)) {
+       BPoint screenWhere;
+       if (msg->FindPoint("screen_where", &screenWhere) != B_OK) {
+               // TODO: remove
                // Workaround for BeOS R5, it has no "screen_where"
-               if (!originalHandler || msg->FindPoint("where", &screen_where) 
< B_OK)
+               if (!originalHandler || msg->FindPoint("where", &screenWhere) < 
B_OK)
                        return;
-               originalHandler->ConvertToScreen(&screen_where);
+               originalHandler->ConvertToScreen(&screenWhere);
        }
 
-//     msg->PrintToStream();
+       // double click handling
 
-//     if (1 == msg->FindInt32("buttons") && msg->FindInt32("clicks") == 1) {
+       if (msg->FindInt32("clicks") % 2 == 0) {
+               BRect rect(screenWhere.x - 1, screenWhere.y - 1, screenWhere.x 
+ 1,
+                       screenWhere.y + 1);
+               if (rect.Contains(fMouseDownMousePos)) {
+                       if (buttons == B_PRIMARY_MOUSE_BUTTON)
+                               PostMessage(M_TOGGLE_FULLSCREEN);
+                       else if (buttons == B_SECONDARY_MOUSE_BUTTON)
+                               PostMessage(M_TOGGLE_NO_INTERFACE);
 
-       if (1 == buttons && msg->FindInt32("clicks") % 2 == 0) {
-               BRect r(screen_where.x - 1, screen_where.y - 1, screen_where.x 
+ 1,
-                       screen_where.y + 1);
-               if (r.Contains(fMouseDownMousePos)) {
-                       PostMessage(M_TOGGLE_FULLSCREEN);
                        return;
                }
        }
 
-       if (2 == buttons && msg->FindInt32("clicks") % 2 == 0) {
-               BRect r(screen_where.x - 1, screen_where.y - 1, screen_where.x 
+ 1,
-                       screen_where.y + 1);
-               if (r.Contains(fMouseDownMousePos)) {
-                       PostMessage(M_TOGGLE_NO_INTERFACE);
-                       return;
-               }
-       }
-
-/*
-               // very broken in Zeta:
-               fMouseDownMousePos = fVideoView->ConvertToScreen(
-                       msg->FindPoint("where"));
-*/
-       fMouseDownMousePos = screen_where;
+       fMouseDownMousePos = screenWhere;
        fMouseDownWindowPos = Frame().LeftTop();
 
-       if (buttons == 1 && !fIsFullscreen) {
+       if (buttons == B_PRIMARY_MOUSE_BUTTON && !fIsFullscreen) {
                // start mouse tracking
                fVideoView->SetMouseEventMask(B_POINTER_EVENTS | 
B_NO_POINTER_HISTORY
                        /* | B_LOCK_WINDOW_FOCUS */);
@@ -1676,41 +1659,38 @@
 
        // pop up a context menu if right mouse button is down for 200 ms
 
-       if ((buttons & 2) == 0)
+       if ((buttons & B_SECONDARY_MOUSE_BUTTON) == 0)
                return;
+
        bigtime_t start = system_time();
        bigtime_t delay = 200000;
        BPoint location;
        do {
                fVideoView->GetMouse(&location, &buttons);
-               if ((buttons & 2) == 0)
+               if ((buttons & B_SECONDARY_MOUSE_BUTTON) == 0)
                        break;
                snooze(1000);
        } while (system_time() - start < delay);
 
-       if (buttons & 2)
-               _ShowContextMenu(screen_where);
+       if ((buttons & B_SECONDARY_MOUSE_BUTTON) != 0)
+               _ShowContextMenu(screenWhere);
 }
 
 
 void
-MainWin::_MouseMoved(BMessage *msg, BView* originalHandler)
+MainWin::_MouseMoved(BMessage* msg, BView* originalHandler)
 {
 //     msg->PrintToStream();
 
        BPoint mousePos;
        uint32 buttons = msg->FindInt32("buttons");
 
-       if (1 == buttons && fMouseDownTracking && !fIsFullscreen) {
-/*
-               // very broken in Zeta:
-               BPoint mousePos = msg->FindPoint("where");
-               printf("view where: %.0f, %.0f => ", mousePos.x, mousePos.y);
-               fVideoView->ConvertToScreen(&mousePos);
-*/
-               // On Zeta, only "screen_where" is relyable, "where"
+       if (buttons == B_PRIMARY_MOUSE_BUTTON && fMouseDownTracking
+               && !fIsFullscreen) {
+               // On Zeta, only "screen_where" is reliable, "where"
                // and "be:view_where" seem to be broken
-               if (B_OK != msg->FindPoint("screen_where", &mousePos)) {
+               if (msg->FindPoint("screen_where", &mousePos) != B_OK) {
+                       // TODO: remove
                        // Workaround for BeOS R5, it has no "screen_where"
                        if (!originalHandler || msg->FindPoint("where", 
&mousePos) < B_OK)
                                return;
@@ -1728,19 +1708,18 @@
 
 
 void
-MainWin::_MouseUp(BMessage *msg)
+MainWin::_MouseUp(BMessage* msg)
 {
-//     msg->PrintToStream();
        fMouseDownTracking = false;
 }
 
 
 void
-MainWin::_ShowContextMenu(const BPoint &screen_point)
+MainWin::_ShowContextMenu(const BPoint& screenPoint)
 {
        printf("Show context menu\n");
-       BPopUpMenu *menu = new BPopUpMenu("context menu", false, false);
-       BMenuItem *item;
+       BPopUpMenu* menu = new BPopUpMenu("context menu", false, false);
+       BMenuItem* item;
        menu->AddItem(item = new BMenuItem("Full screen",
                new BMessage(M_TOGGLE_FULLSCREEN), 'F'));
        item->SetMarked(fIsFullscreen);
@@ -1781,9 +1760,9 @@
        menu->AddItem(new BMenuItem("Quit", new BMessage(M_FILE_QUIT), 'Q'));
 
        menu->SetTargetForItems(this);
-       BRect r(screen_point.x - 5, screen_point.y - 5, screen_point.x + 5,
-               screen_point.y + 5);
-       menu->Go(screen_point, true, true, r, true);
+       BRect rect(screenPoint.x - 5, screenPoint.y - 5, screenPoint.x + 5,
+               screenPoint.y + 5);
+       menu->Go(screenPoint, true, true, rect, true);
 }
 
 
@@ -1791,7 +1770,7 @@
        Return true if it shouldn't be passed to the view.
 */
 bool
-MainWin::_KeyDown(BMessage *msg)
+MainWin::_KeyDown(BMessage* msg)
 {
        // TODO: use the shortcut mechanism instead!
 
@@ -1820,19 +1799,19 @@
                        return true;
 
                case B_ENTER:           // Enter / Return
-                       if (modifier & B_COMMAND_KEY) {
+                       if ((modifier & B_COMMAND_KEY) != 0) {
                                PostMessage(M_TOGGLE_FULLSCREEN);
                                return true;
-                       } else
-                               break;
+                       }
+                       break;
 
                case B_TAB:
                        if ((modifier & (B_COMMAND_KEY | B_CONTROL_KEY | 
B_OPTION_KEY
                                        | B_MENU_KEY)) == 0) {
                                PostMessage(M_TOGGLE_FULLSCREEN);
                                return true;
-                       } else
-                               break;
+                       }
+                       break;
 
                case B_UP_ARROW:
                        if ((modifier & B_COMMAND_KEY) != 0)
@@ -1876,17 +1855,15 @@
                        if ((modifier & B_COMMAND_KEY) == 0) {
                                PostMessage(M_VOLUME_UP);
                                return true;
-                       } else {
-                               break;
                        }
+                       break;
 
                case 0x25:              // numeric keypad -
                        if ((modifier & B_COMMAND_KEY) == 0) {
                                PostMessage(M_VOLUME_DOWN);
                                return true;
-                       } else {
-                               break;
                        }
+                       break;
 
                case 0x38:                      // numeric keypad up arrow
                        PostMessage(M_VOLUME_UP);

Modified: 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/TransportControlGroup.cpp
===================================================================
--- 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/TransportControlGroup.cpp 
    2010-04-22 19:08:08 UTC (rev 36422)
+++ 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/TransportControlGroup.cpp 
    2010-04-22 19:09:56 UTC (rev 36423)
@@ -464,6 +464,13 @@
 }
 
 
+float
+TransportControlGroup::Position() const
+{
+       return fSeekSlider->Position();
+}
+
+
 void
 TransportControlGroup::SetDisabledString(const char* string)
 {

Modified: 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/TransportControlGroup.h
===================================================================
--- 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/TransportControlGroup.h   
    2010-04-22 19:08:08 UTC (rev 36422)
+++ 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/TransportControlGroup.h   
    2010-04-22 19:09:56 UTC (rev 36423)
@@ -68,6 +68,7 @@
                        void                            SetVolume(float value);
                        void                            SetPosition(float 
value, bigtime_t position,
                                                                        
bigtime_t duration);
+                       float                           Position() const;
 
                        PeakView*                       GetPeakView() const
                                                                        { 
return fPeakView; }

Modified: 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/interface/SeekSlider.cpp
===================================================================
--- 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/interface/SeekSlider.cpp  
    2010-04-22 19:08:08 UTC (rev 36422)
+++ 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/interface/SeekSlider.cpp  
    2010-04-22 19:09:56 UTC (rev 36423)
@@ -299,6 +299,16 @@
 }
 
 
+float
+SeekSlider::Position() const
+{
+       int32 range = fMaxValue - fMinValue;
+       if (range == 0)
+               return 0;
+       return (float)(Value() - fMinValue) / range;
+}
+
+
 bool
 SeekSlider::IsTracking() const
 {

Modified: 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/interface/SeekSlider.h
===================================================================
--- 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/interface/SeekSlider.h    
    2010-04-22 19:08:08 UTC (rev 36422)
+++ 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/interface/SeekSlider.h    
    2010-04-22 19:09:56 UTC (rev 36423)
@@ -32,6 +32,7 @@
 
        // SeekSlider
                        void                            SetPosition(float 
position);
+                       float                           Position() const;
                        bool                            IsTracking() const;
                        void                            SetDisabledString(const 
char* string);
 

Modified: 
haiku/branches/releases/r1alpha2/src/apps/mediaplayer/playlist/Playlist.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/mediaplayer/playlist/Playlist.cpp 
2010-04-22 19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/src/apps/mediaplayer/playlist/Playlist.cpp 
2010-04-22 19:09:56 UTC (rev 36423)
@@ -352,11 +352,14 @@
 Playlist::SetCurrentItemIndex(int32 index)
 {
        bool result = true;
-       if (index >= CountItems() || index < 0) {
+       if (index >= CountItems()) {
+               index = CountItems() - 1;
+               result = false;
+       }
+       if (index < 0) {
                index = -1;
                result = false;
        }
-
        if (index == fCurrentIndex)
                return result;
 

Modified: haiku/branches/releases/r1alpha2/src/bin/consoled/consoled.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/bin/consoled/consoled.cpp      
2010-04-22 19:08:08 UTC (rev 36422)
+++ haiku/branches/releases/r1alpha2/src/bin/consoled/consoled.cpp      
2010-04-22 19:09:56 UTC (rev 36423)
@@ -147,7 +147,7 @@
 
                uint8 newDeadKey = 0;
                if (activeDeadKey == 0 || !isKeyDown)
-                       newDeadKey = keymap.IsDeadKey(keycode, modifiers);
+                       newDeadKey = keymap.ActiveDeadKey(keycode, modifiers);
 
                char* string = NULL;
                int32 numBytes = 0;

[... truncated: 583 lines follow ...]

Other related posts:

  • » [haiku-commits] r36423 - in haiku/branches/releases/r1alpha2: . build/jam data/bin headers/build/private/shared headers/os/interface ... - ingo_weinhold