From f6a006dddc02a5decb0359d5efbdd9ac1f31b955 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Wed, 30 Jun 2021 11:12:57 -0500 Subject: [PATCH] librunview/libsupport x86_gcc2 fixes --- application/ChatCommand.h | 1 + application/ProtocolTemplate.cpp | 1 + application/views/ConversationView.cpp | 13 +++++++++++-- application/windows/MainWindow.cpp | 5 ++--- libs/librunview/Emoticor.h | 6 +++--- libs/librunview/Makefile | 2 +- libs/librunview/SmileTextRender.h | 6 ++++-- libs/librunview/Theme.h | 2 +- libs/libsupport/KeyMap.h | 14 -------------- 9 files changed, 24 insertions(+), 26 deletions(-) diff --git a/application/ChatCommand.h b/application/ChatCommand.h index fa7f206..4b7a5af 100644 --- a/application/ChatCommand.h +++ b/application/ChatCommand.h @@ -10,6 +10,7 @@ #include #include +#include class Conversation; diff --git a/application/ProtocolTemplate.cpp b/application/ProtocolTemplate.cpp index 0caac8f..f8b2f87 100644 --- a/application/ProtocolTemplate.cpp +++ b/application/ProtocolTemplate.cpp @@ -13,6 +13,7 @@ #include "ProtocolTemplate.h" #include +#include #include #include diff --git a/application/views/ConversationView.cpp b/application/views/ConversationView.cpp index 57258e7..9e41053 100644 --- a/application/views/ConversationView.cpp +++ b/application/views/ConversationView.cpp @@ -35,7 +35,8 @@ ConversationView::ConversationView() : BGroupView("chatView", B_VERTICAL, B_USE_DEFAULT_SPACING), - fMessageQueue() + fMessageQueue(), + fConversation(NULL) { fMessageCount = 0; _InitInterface(); @@ -43,7 +44,13 @@ ConversationView::ConversationView() ConversationView::ConversationView(Conversation* chat) - : ConversationView() + : + #if defined(__i386__) && !defined(__x86_64__) + BGroupView("chatView", B_VERTICAL, B_USE_DEFAULT_SPACING), + fMessageQueue() + #else + ConversationView() + #endif { SetConversation(chat); fUserList->SetConversation(chat); @@ -211,6 +218,8 @@ ConversationView::GetConversation() void ConversationView::SetConversation(Conversation* chat) { + if (chat == NULL) + return; fConversation = chat; fNameTextView->SetText(chat->GetName()); fSubjectTextView->SetText(chat->GetSubject()); diff --git a/application/windows/MainWindow.cpp b/application/windows/MainWindow.cpp index fe6f3a5..7a697f1 100644 --- a/application/windows/MainWindow.cpp +++ b/application/windows/MainWindow.cpp @@ -25,7 +25,6 @@ #include "ConversationItem.h" #include "ConversationListView.h" #include "ConversationView.h" -#include "DefaultItems.h" #include "EditingFilter.h" #include "MainWindow.h" #include "NotifyMessage.h" @@ -343,8 +342,8 @@ void MainWindow::SetConversation(Conversation* chat) { // Save current size of chat and textbox - float weightChat = fRightView->ItemWeight(0); - float weightSend = fRightView->ItemWeight(1); + float weightChat = fRightView->ItemWeight((int32)0); + float weightSend = fRightView->ItemWeight((int32)1); fRightView->RemoveChild(fRightView->FindView("chatView")); fRightView->RemoveChild(fRightView->FindView("fSendScroll")); diff --git a/libs/librunview/Emoticor.h b/libs/librunview/Emoticor.h index d5cacfc..218c7fb 100644 --- a/libs/librunview/Emoticor.h +++ b/libs/librunview/Emoticor.h @@ -1,10 +1,10 @@ #ifndef _Emoticor_h_ #define _Emoticor_h_ - #include -#include "RunView.h" -#include "Emoconfig.h" +#include +#include + class Emoticor { diff --git a/libs/librunview/Makefile b/libs/librunview/Makefile index 9f06c41..0e2333e 100644 --- a/libs/librunview/Makefile +++ b/libs/librunview/Makefile @@ -76,7 +76,7 @@ LIBPATHS = # Additional paths to look for system headers. These use the form # "#include
". Directories that contain the files in SRCS are # NOT auto-included here. -SYSTEM_INCLUDE_PATHS = +SYSTEM_INCLUDE_PATHS = libs # Additional paths paths to look for local headers. These use the form # #include "header". Directories that contain the files in SRCS are diff --git a/libs/librunview/SmileTextRender.h b/libs/librunview/SmileTextRender.h index b5d47be..2930ac2 100644 --- a/libs/librunview/SmileTextRender.h +++ b/libs/librunview/SmileTextRender.h @@ -1,7 +1,6 @@ #ifndef _SmileTextRender_H_ #define _SmileTextRender_H_ -#include "TextRender.h" #include #include @@ -10,7 +9,9 @@ #include #include -#include "Emoticor.h" +#include +#include + class SmileTextRender : public TextRender { @@ -34,6 +35,7 @@ public: virtual float Size() { + printf("GETTING EMOTICOR SIZE!!!!\n"); return Emoticor::Get()->Config()->GetEmoticonSize(); } diff --git a/libs/librunview/Theme.h b/libs/librunview/Theme.h index 3367424..55bcee6 100644 --- a/libs/librunview/Theme.h +++ b/libs/librunview/Theme.h @@ -27,7 +27,7 @@ #include #include -#include "TextRender.h" +#include class BView; class NormalTextRender; diff --git a/libs/libsupport/KeyMap.h b/libs/libsupport/KeyMap.h index b7a4de0..7d2275b 100644 --- a/libs/libsupport/KeyMap.h +++ b/libs/libsupport/KeyMap.h @@ -26,8 +26,6 @@ public: void AddList(KeyMap appendList); - List Values() const; - private: std::map fMap; typedef typename std::map::iterator fIter; @@ -127,16 +125,4 @@ KeyMap::AddList(KeyMap appendList) } -template -inline List -KeyMap::Values() const -{ - List list; - - for (fIter i = fMap.begin(); i != fMap.end(); ++i) - list.AddItem(i->second); - - return list; -} - #endif // _KEY_MAP_H