[haiku-commits] r41803 - haiku/trunk/src/apps/switcher

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 29 May 2011 10:17:28 +0200 (CEST)

Author: axeld
Date: 2011-05-29 10:17:27 +0200 (Sun, 29 May 2011)
New Revision: 41803
Changeset: https://dev.haiku-os.org/changeset/41803

Modified:
   haiku/trunk/src/apps/switcher/GroupListView.h
   haiku/trunk/src/apps/switcher/Jamfile
   haiku/trunk/src/apps/switcher/WindowsView.cpp
Log:
* Removed TypedGroupListModel - without GCC2's covariant return type handling,
  it's not really worth the effort.
* Added missing libstdc++ to the build.
* This fixes the GCC4 build.


Modified: haiku/trunk/src/apps/switcher/GroupListView.h
===================================================================
--- haiku/trunk/src/apps/switcher/GroupListView.h       2011-05-29 07:36:21 UTC 
(rev 41802)
+++ haiku/trunk/src/apps/switcher/GroupListView.h       2011-05-29 08:17:27 UTC 
(rev 41803)
@@ -21,16 +21,6 @@
 };
 
 
-template<typename ItemType, typename GroupType>
-class TypedGroupListModel : public GroupListModel {
-public:
-       virtual ItemType*                       ItemAt(int32 index) = 0;
-
-       virtual GroupType*                      GroupAt(int32 index) = 0;
-       virtual GroupType*                      GroupForItemAt(int32 index) = 0;
-};
-
-
 class ListItemRenderer {
 public:
        virtual void                            SetTo(BView* owner, void* item) 
= 0;

Modified: haiku/trunk/src/apps/switcher/Jamfile
===================================================================
--- haiku/trunk/src/apps/switcher/Jamfile       2011-05-29 07:36:21 UTC (rev 
41802)
+++ haiku/trunk/src/apps/switcher/Jamfile       2011-05-29 08:17:27 UTC (rev 
41803)
@@ -11,6 +11,7 @@
        Switcher.cpp
        WindowsView.cpp
 
-       : be translation $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) libshared.a
+       : be translation $(TARGET_LIBSTDC++) $(TARGET_LIBSUPC++)
+               $(HAIKU_LOCALE_LIBS) libshared.a
        : Switcher.rdef
 ;

Modified: haiku/trunk/src/apps/switcher/WindowsView.cpp
===================================================================
--- haiku/trunk/src/apps/switcher/WindowsView.cpp       2011-05-29 07:36:21 UTC 
(rev 41802)
+++ haiku/trunk/src/apps/switcher/WindowsView.cpp       2011-05-29 08:17:27 UTC 
(rev 41803)
@@ -24,7 +24,7 @@
 static const uint32 kMsgActivateWindow = 'AcWn';
 
 
-class WindowModel : public TypedGroupListModel<client_window_info, void> {
+class WindowModel : public GroupListModel {
 public:
        WindowModel(team_id team)
                :
@@ -86,7 +86,7 @@
                return fWindows.CountItems();
        }
 
-       virtual client_window_info* ItemAt(int32 index)
+       virtual void* ItemAt(int32 index)
        {
                return fWindows.ItemAt(index);
        }
@@ -103,7 +103,7 @@
 
        virtual void* GroupForItemAt(int32 index)
        {
-               client_window_info* info = ItemAt(index);
+               client_window_info* info = fWindows.ItemAt(index);
                return (void*)(_NthSetBit(0, info->workspaces) + 1);
        }
 


Other related posts:

  • » [haiku-commits] r41803 - haiku/trunk/src/apps/switcher - axeld