Fixed.

Is it Ok now ? Could it be applied in KDE 4.3.1 ?


2009/5/14 Kevin Ottens <[email protected]>:
> On Wednesday 13 May 2009 22:01:01 Daniel Nascimento wrote:
>> It's almost harmless and was tested in kdelibs 4.2.3.
>
> Still, it breaks binary compatibility of the library. The TabletButton enum
> value should be added at the end of the ButtonType enum, otherwise you're
> shifting the values which will break for apps not rebuilt against the updated
> library.
>
> Other than that it's good to go IMO.
>
> Regards.
> --
> Kévin 'ervin' Ottens, http://ervin.ipsquad.net
> "Ni le maître sans disciple, Ni le disciple sans maître,
> Ne font reculer l'ignorance."
>
> _______________________________________________
> Kde-hardware-devel mailing list
> [email protected]
> https://mail.kde.org/mailman/listinfo/kde-hardware-devel
>
>
--- a/kdelibs/solid/solid/button.h	2009-05-13 11:03:19.000000000 -0300
+++ b/kdelibs/solid/solid/button.h	2009-05-13 11:25:16.000000000 -0300
@@ -55,9 +55,10 @@
          * - LidButton : The switch on a laptop that senses whether the lid is open or closed.
          * - PowerButton : The main power button on the computer.
          * - SleepButton : The sleep button on a computer capable of putting the computer into a suspend state.
+         * - TabletButton : The tablet switch on a laptop that senses if the monitor is rotated or not.
          * - UnknownButtonType : The type of the button is unknow.
          */
-         enum ButtonType{ LidButton, PowerButton, SleepButton, UnknownButtonType };
+         enum ButtonType{ LidButton, PowerButton, SleepButton, UnknownButtonType, TabletButton };
 
 
     private:
--- a/kdelibs/solid/solid/backends/hal/halbutton.cpp	2009-05-13 11:25:49.000000000 -0300
+++ b/kdelibs/solid/solid/backends/hal/halbutton.cpp	2009-05-13 11:39:42.000000000 -0300
@@ -49,6 +49,10 @@
     {
         return Solid::Button::SleepButton;
     }
+    else if (buttontype=="tablet_mode")
+    {
+        return Solid::Button::TabletButton;
+    }
     else
     {
         return Solid::Button::UnknownButtonType;
_______________________________________________
Kde-hardware-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-hardware-devel

Reply via email to