Advertisement
Guest User

Untitled

a guest
Jan 8th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.48 KB | None | 0 0
  1. diff -bur keymapswitcher(haiku)/app.makefile keymapswitcher/app.makefile
  2. --- keymapswitcher(haiku)/app.makefile  2012-08-21 01:10:13.007602176 +0600
  3. +++ keymapswitcher/app.makefile 2012-12-25 09:55:56.628359168 +0600
  4. @@ -61,7 +61,7 @@
  5.  #              naming scheme you need to specify the path to the library
  6.  #              and it's name
  7.  #              library: my_lib.a entry: my_lib.a or path/my_lib.a
  8. -LIBS=be $(STDCPPLIBS) localestub
  9. +LIBS=be $(STDCPPLIBS) localestub stdc++
  10.  
  11.  #      specify additional paths to directories following the standard
  12.  #      libXXX.so or libXXX.a naming scheme.  You can specify full paths
  13. diff -bur keymapswitcher(haiku)/DeskView.cpp keymapswitcher/DeskView.cpp
  14. --- keymapswitcher(haiku)/DeskView.cpp  2012-11-16 01:25:25.006029312 +0600
  15. +++ keymapswitcher/DeskView.cpp 2012-12-25 09:45:39.104071168 +0600
  16. @@ -159,8 +159,8 @@
  17.         BList *teams = new BList;
  18.         be_roster->GetAppList(teams);
  19.         int32 teams_count = teams->CountItems();
  20. -       for (int i=0; i<teams_count; i++) {
  21. -               team_id team = (team_id) teams->ItemAt(i);
  22. +       for ( int32 i=0; i<teams_count; i++) {
  23. +               team_id team = (team_id)(addr_t)teams->ItemAt(i);
  24.                 app_info info;
  25.                 be_roster->GetRunningAppInfo(team, &info);
  26.  
  27. @@ -184,11 +184,11 @@
  28.                 DELETE(settings);
  29.         if (NULL != app_list)
  30.                 while (!app_list->IsEmpty())
  31. -                       delete (static_cast<team_keymap*> (app_list->RemoveItem(0L)));
  32. +                       delete (static_cast<team_keymap*> (app_list->RemoveItem((int32)0)));
  33.         DELETE(app_list);
  34.         if (NULL != keymaps) {
  35.                 while (!keymaps->IsEmpty())
  36. -                       delete (static_cast<BString*> (keymaps->RemoveItem(0L)));
  37. +                       delete (static_cast<BString*> (keymaps->RemoveItem((int32)0)));
  38.                 DELETE(keymaps);
  39.         }
  40.  }
  41. Only in keymapswitcher: install
  42. diff -bur keymapswitcher(haiku)/SettingsWindow.cpp keymapswitcher/SettingsWindow.cpp
  43. --- keymapswitcher(haiku)/SettingsWindow.cpp    2012-11-16 00:15:24.007077888 +0600
  44. +++ keymapswitcher/SettingsWindow.cpp   2012-12-25 09:53:36.794296320 +0600
  45. @@ -414,9 +414,9 @@
  46.  SettingsWindow::~SettingsWindow()
  47.  {
  48.         while(0 < available_list->CountItems())
  49. -               delete (dynamic_cast<KeymapItem*> (available_list->RemoveItem(0L)));
  50. +               delete available_list->RemoveItem((int32)0);
  51.         while(0 < selected_list->CountItems())
  52. -               delete (dynamic_cast<KeymapItem*> (selected_list->RemoveItem(0L)));
  53. +               delete selected_list->RemoveItem((int32)0);
  54.         delete settings;
  55.         delete settingsOrg;
  56.  }
  57. @@ -713,7 +713,8 @@
  58.         if(!IsEmpty()) {
  59.                 // first clean the list
  60.                 while(0 < CountItems())
  61. -                       delete (dynamic_cast<KeymapItem*> (RemoveItem(0L)));
  62. +                       //delete (dynamic_cast<KeymapItem*> (RemoveItem(0)));
  63. +                       delete RemoveItem((int32)0);
  64.                 MakeEmpty();
  65.         }
  66.  
  67. @@ -820,7 +821,7 @@
  68.                         Window()->PostMessage(&notify);
  69.                         int32 index = -1;
  70.                         message->FindInt32("index", &index);
  71. -                       delete (dynamic_cast<KeymapItem*> (RemoveItem(index)));
  72. +                       delete (RemoveItem(index));
  73.  
  74.                         // restore selection after delete
  75.                         int32 count = CountItems();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement