Initial gcc2 support, patch from Haikuports, with a little modification by myself. Set the deskbar replicant show as default, and removed the gcc4 notice from preferences.
This commit is contained in:
parent
f8179b8bad
commit
00440a3ffc
|
@ -30,7 +30,7 @@ CayaPreferencesData::CayaPreferencesData()
|
|||
RaiseUserIsTyping(false),
|
||||
MarkUnreadWindow(true),
|
||||
HideCayaDeskbar(false),
|
||||
DisableReplicant(true),
|
||||
DisableReplicant(false),
|
||||
IgnoreEmoticons(false),
|
||||
NotifyProtocolStatus(true),
|
||||
NotifyContactStatus(false),
|
||||
|
|
|
@ -30,7 +30,7 @@ PreferencesReplicant::PreferencesReplicant()
|
|||
: BView("Replicant", B_WILL_DRAW)
|
||||
{
|
||||
fReplicantString = new BStringView("ReplicantString",
|
||||
"Deskbar Replicant (only with gcc4hybrid)");
|
||||
"Deskbar Replicant");
|
||||
|
||||
fReplicantString->SetExplicitAlignment(
|
||||
BAlignment(B_ALIGN_LEFT, B_ALIGN_MIDDLE));
|
||||
|
@ -40,6 +40,9 @@ PreferencesReplicant::PreferencesReplicant()
|
|||
fDisableReplicant = new BCheckBox("DisableReplicant",
|
||||
"Disable Deskbar replicant", new BMessage(kDisableReplicant));
|
||||
|
||||
if (!CayaPreferences::Item()->HideCayaDeskbar)
|
||||
Looper()->PostMessage(new BMessage(kDisableReplicant));
|
||||
|
||||
fPermanentReplicant = new BCheckBox("PermanentReplicant",
|
||||
"Permanent Deskbar Replicant", NULL);
|
||||
fPermanentReplicant->SetEnabled(false);
|
||||
|
|
|
@ -303,7 +303,7 @@ namespace gloox
|
|||
|
||||
bool ci_equal( char ch1, char ch2 )
|
||||
{
|
||||
return std::toupper( (unsigned char)ch1 ) == std::toupper( (unsigned char)ch2 );
|
||||
return toupper( (unsigned char)ch1 ) == toupper( (unsigned char)ch2 );
|
||||
}
|
||||
|
||||
std::string::size_type ci_find( const std::string& str1, const std::string& str2 )
|
||||
|
|
|
@ -1214,7 +1214,7 @@ namespace gloox
|
|||
/**
|
||||
* A multimap of strings.
|
||||
*/
|
||||
typedef std::multimap<std::string, std::string> StringMultiMap;
|
||||
typedef std::multimap<const std::string, const std::string> StringMultiMap;
|
||||
|
||||
class StanzaExtension;
|
||||
/**
|
||||
|
|
|
@ -141,7 +141,8 @@ namespace gloox
|
|||
{
|
||||
if( pos + needle.length() <= data.length() )
|
||||
{
|
||||
if( !data.compare( pos, needle.length(), needle ) )
|
||||
// if( !data.compare(pos, needle.length(), needle ) )
|
||||
if( !data.compare(needle.substr(pos, needle.length())) )
|
||||
{
|
||||
pos += needle.length() - 1;
|
||||
return ForwardFound;
|
||||
|
|
|
@ -84,11 +84,11 @@ namespace gloox
|
|||
DataFormField* dff = df.addField( DataFormField::TypeListSingle, "stream-method" );
|
||||
StringMultiMap sm;
|
||||
if( streamTypes & FTTypeS5B )
|
||||
sm.insert( std::make_pair( "s5b", XMLNS_BYTESTREAMS ) );
|
||||
sm.insert( std::make_pair<const char*, std::string>( "s5b", XMLNS_BYTESTREAMS ) );
|
||||
if( streamTypes & FTTypeIBB )
|
||||
sm.insert( std::make_pair( "ibb", XMLNS_IBB ) );
|
||||
sm.insert( std::make_pair<const char*, std::string>( "ibb", XMLNS_IBB ) );
|
||||
if( streamTypes & FTTypeOOB )
|
||||
sm.insert( std::make_pair( "oob", XMLNS_IQ_OOB ) );
|
||||
sm.insert( std::make_pair<const char*, std::string>( "oob", XMLNS_IQ_OOB ) );
|
||||
dff->setOptions( sm );
|
||||
feature->addChild( df.tag() );
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ SubDir TOP libs libmsn ;
|
|||
|
||||
SubDirSysHdrs [ FDirName $(TOP) ] ;
|
||||
SubDirSysHdrs [ FDirName $(TOP) libs ] ;
|
||||
SubDirSysHdrs [ FDirName $(TOP) libs libmsn ] ;
|
||||
|
||||
SubDirSysHdrs [ FDirName $(OPENSSL_INCLUDE_DIR) ] ;
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <vector>
|
||||
#include <map>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( disable : 4290 )
|
||||
|
|
|
@ -124,7 +124,7 @@ namespace MSN
|
|||
{
|
||||
std::string color = this->getFormatInfo()["CO"];
|
||||
assert(color.size() <= 6 && color.size() >= 0);
|
||||
color.insert(0U, 6 - color.size(), '0');
|
||||
color.insert((size_t)0, (size_t)(6 - color.size()), '0');
|
||||
int r = 0, g = 0, b = 0;
|
||||
|
||||
b = strtol(color.substr(0, 2).c_str(), NULL, 16);
|
||||
|
@ -167,7 +167,7 @@ namespace MSN
|
|||
|
||||
void Message::setColor(std::string color)
|
||||
{
|
||||
color.insert(0U, 6 - color.size(), '0');
|
||||
color.insert((size_t)0, (size_t)(6 - color.size()), '0');
|
||||
int r = 0, g = 0, b = 0;
|
||||
|
||||
r = strtol(color.substr(0, 2).c_str(), NULL, 16);
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace MSN
|
|||
{
|
||||
void MSNObject::addMSNObject(std::string filename, int Type)
|
||||
{
|
||||
std::ifstream::pos_type size;
|
||||
std::streampos size;
|
||||
char * memblock;
|
||||
SHA_CTX ctx;
|
||||
unsigned char digest[SHA_DIGEST_LENGTH];
|
||||
|
|
|
@ -146,8 +146,8 @@ namespace MSN
|
|||
it1 != s1.end() && it2 != s2.end();
|
||||
++it1, ++it2)
|
||||
{
|
||||
if (std::toupper(*it1) != std::toupper(*it2))
|
||||
return std::toupper(*it1) - std::toupper(*it2);
|
||||
if (toupper(*it1) != toupper(*it2))
|
||||
return toupper(*it1) - toupper(*it2);
|
||||
}
|
||||
size_t size1 = s1.size(), size2 = s2.size();
|
||||
return (int) (size1 - size2);
|
||||
|
@ -358,11 +358,11 @@ namespace MSN
|
|||
int FileSize(const char* sFileName)
|
||||
{
|
||||
std::ifstream f;
|
||||
f.open(sFileName, std::ios_base::binary | std::ios_base::in);
|
||||
f.open(sFileName, std::ios::binary | std::ios::in);
|
||||
if (!f.good() || f.eof() || !f.is_open()) { return 0; }
|
||||
f.seekg(0, std::ios_base::beg);
|
||||
std::ifstream::pos_type begin_pos = f.tellg();
|
||||
f.seekg(0, std::ios_base::end);
|
||||
f.seekg(0, std::ios::beg);
|
||||
std::streampos begin_pos = f.tellg();
|
||||
f.seekg(0, std::ios::end);
|
||||
return static_cast<int>(f.tellg() - begin_pos);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,19 +29,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if STDC_HEADERS
|
||||
# include <string.h>
|
||||
#else
|
||||
# if !HAVE_STRCHR
|
||||
# define strchr index
|
||||
# define strrchr rindex
|
||||
# endif
|
||||
char *strchr(), *strrchr();
|
||||
# if !HAVE_MEMCPY
|
||||
# define memcpy(d, s, n) bcopy ((s), (d), (n))
|
||||
# define memmove(d, s, n) bcopy ((s), (d), (n))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#if HAVE_UNISTD_H
|
||||
|
@ -374,7 +362,6 @@ void yahoo_http_get(int id, const char *url, const char *cookies, int http11,
|
|||
void yahoo_http_head(int id, const char *url, const char *cookies, int len,
|
||||
char *payload, yahoo_get_fd_callback callback, void *data)
|
||||
{
|
||||
printf("yahoo_http_read\n");
|
||||
char host[255];
|
||||
int port = 80;
|
||||
char path[255];
|
||||
|
|
|
@ -52,7 +52,7 @@ const char* kProtocolName = "MSN Protocol";
|
|||
const uint32 kAvatarCheckMessage = 'AVMs';
|
||||
|
||||
struct pollfd* kPollSockets = NULL;
|
||||
struct ssl {
|
||||
struct Ssl {
|
||||
bool isSSL;
|
||||
bool isConnected;
|
||||
SSL *ssl;
|
||||
|
@ -718,7 +718,7 @@ void MSNP::registerSocket(void *s, int reading, int writing, bool isSSL)
|
|||
return;
|
||||
}
|
||||
|
||||
kSocketsSsl = (struct ssl*) realloc(kSocketsSsl, (kSocketsAvailable + 10) * sizeof(struct ssl));
|
||||
kSocketsSsl = (struct Ssl*) realloc(kSocketsSsl, (kSocketsAvailable + 10) * sizeof(struct Ssl));
|
||||
if (kSocketsSsl == NULL) {
|
||||
Error("Memory Error!!\n", NULL);
|
||||
return;
|
||||
|
|
|
@ -2,6 +2,7 @@ SubDir TOP protocols xmpp ;
|
|||
|
||||
SubDirSysHdrs [ FDirName $(TOP) ] ;
|
||||
SubDirSysHdrs [ FDirName $(TOP) libs ] ;
|
||||
SubDirSysHdrs [ FDirName $(TOP) libs libgloox ] ;
|
||||
SubDirSysHdrs [ FDirName $(OPENSSL_INCLUDE_DIR) ] ;
|
||||
SubDirSysHdrs [ FDirName $(CAYA_INCLUDE_DIR) ] ;
|
||||
|
||||
|
|
Ŝarĝante…
Reference in New Issue