[haiku-commits] r38199 - in haiku/trunk: build/jam src/preferences/filetypes

  • From: zooey@xxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 17 Aug 2010 18:41:28 +0200 (CEST)

Author: zooey
Date: 2010-08-17 18:41:28 +0200 (Tue, 17 Aug 2010)
New Revision: 38199
Changeset: http://dev.haiku-os.org/changeset/38199

Modified:
   haiku/trunk/build/jam/BuildSetup
   haiku/trunk/src/preferences/filetypes/IconView.cpp
   haiku/trunk/src/preferences/filetypes/IconView.h
Log:
* fixed all warnings in FileTypes preflet and enabled -Werror

Modified: haiku/trunk/build/jam/BuildSetup
===================================================================
--- haiku/trunk/build/jam/BuildSetup    2010-08-17 16:39:02 UTC (rev 38198)
+++ haiku/trunk/build/jam/BuildSetup    2010-08-17 16:41:28 UTC (rev 38199)
@@ -1396,7 +1396,7 @@
        EnableWerror src preferences cpufrequency ;
        EnableWerror src preferences datatranslations ;
        EnableWerror src preferences deskbar ;
-#      EnableWerror src preferences filetypes ;
+       EnableWerror src preferences filetypes ;
        EnableWerror src preferences fonts ;
        EnableWerror src preferences joysticks ;
        EnableWerror src preferences keyboard ;

Modified: haiku/trunk/src/preferences/filetypes/IconView.cpp
===================================================================
--- haiku/trunk/src/preferences/filetypes/IconView.cpp  2010-08-17 16:39:02 UTC 
(rev 38198)
+++ haiku/trunk/src/preferences/filetypes/IconView.cpp  2010-08-17 16:41:28 UTC 
(rev 38199)
@@ -696,12 +696,12 @@
                return true;
        }
 
-       if (message->GetInfo("icon/large", &type) == B_OK
-                       && type == B_MESSAGE_TYPE
-               || message->GetInfo("icon", &type) == B_OK
-                       && type == B_VECTOR_ICON_TYPE
-               || message->GetInfo("icon/mini", &type) == B_OK
+       if ((message->GetInfo("icon/large", &type) == B_OK
                        && type == B_MESSAGE_TYPE)
+               || (message->GetInfo("icon", &type) == B_OK
+                       && type == B_VECTOR_ICON_TYPE)
+               || (message->GetInfo("icon/mini", &type) == B_OK
+                       && type == B_MESSAGE_TYPE))
                return true;
 
        return false;
@@ -1377,3 +1377,23 @@
        else if (fHasType)
                BMimeType::StopWatching(this);
 }
+
+
+#if __GNUC__ == 2
+
+status_t
+IconView::SetTarget(BMessenger target)
+{
+       return BControl::SetTarget(target);
+}
+
+
+status_t
+IconView::SetTarget(const BHandler* handler, const BLooper* looper = NULL)
+{
+       return BControl::SetTarget(handler,
+               looper);
+}
+
+#endif
+

Modified: haiku/trunk/src/preferences/filetypes/IconView.h
===================================================================
--- haiku/trunk/src/preferences/filetypes/IconView.h    2010-08-17 16:39:02 UTC 
(rev 38198)
+++ haiku/trunk/src/preferences/filetypes/IconView.h    2010-08-17 16:41:28 UTC 
(rev 38199)
@@ -118,6 +118,15 @@
                        status_t                        GetRef(entry_ref& ref) 
const;
                        status_t                        GetMimeType(BMimeType& 
type) const;
 
+#if __GNUC__ == 2
+       virtual status_t                        SetTarget(BMessenger target);
+       virtual status_t                        SetTarget(const BHandler* 
handler,
+                                                                       const 
BLooper* looper = NULL);
+#else
+                       using BControl::SetTarget;
+#endif
+
+
 protected:
        virtual bool                            AcceptsDrag(const BMessage* 
message);
        virtual BRect                           BitmapRect() const;


Other related posts:

  • » [haiku-commits] r38199 - in haiku/trunk: build/jam src/preferences/filetypes - zooey