|
From: <ane...@us...> - 2012-08-21 22:48:07
|
Revision: 940
http://vision.svn.sourceforge.net/vision/?rev=940&view=rev
Author: anevilyak
Date: 2012-08-21 22:47:56 +0000 (Tue, 21 Aug 2012)
Log Message:
-----------
Various minor changes to get things building on Haiku x86_64.
Modified Paths:
--------------
trunk/Vision/Jamfile
trunk/Vision/src/ChannelAgent.cpp
trunk/Vision/src/ChannelOptions.cpp
trunk/Vision/src/ClientAgent.cpp
trunk/Vision/src/ClientAgentInputFilter.cpp
trunk/Vision/src/ClientAgentLogger.cpp
trunk/Vision/src/ClientWindow.cpp
trunk/Vision/src/ClientWindowDock.cpp
trunk/Vision/src/ColorSelector.cpp
trunk/Vision/src/ColorSwatch.cpp
trunk/Vision/src/DCCConnect.cpp
trunk/Vision/src/DCCHandler.cpp
trunk/Vision/src/ListAgent.cpp
trunk/Vision/src/MessageAgent.cpp
trunk/Vision/src/NamesView.cpp
trunk/Vision/src/NetPrefsServerView.cpp
trunk/Vision/src/NetworkManager.cpp
trunk/Vision/src/NetworkMenu.cpp
trunk/Vision/src/NetworkPrefsView.cpp
trunk/Vision/src/NetworkWindow.cpp
trunk/Vision/src/NotifyList.cpp
trunk/Vision/src/ParseCTCP.cpp
trunk/Vision/src/ParseCmd.cpp
trunk/Vision/src/ParseENums.cpp
trunk/Vision/src/ParseEvents.cpp
trunk/Vision/src/PrefAliases.cpp
trunk/Vision/src/PrefApp.cpp
trunk/Vision/src/PrefColor.cpp
trunk/Vision/src/PrefCommand.cpp
trunk/Vision/src/PrefDCC.cpp
trunk/Vision/src/PrefEvent.cpp
trunk/Vision/src/PrefFont.cpp
trunk/Vision/src/PrefGeneral.cpp
trunk/Vision/src/PrefLog.cpp
trunk/Vision/src/PrefsWindow.cpp
trunk/Vision/src/RunView.cpp
trunk/Vision/src/ServerAgent.cpp
trunk/Vision/src/ServerEntryWindow.cpp
trunk/Vision/src/SettingsFile.cpp
trunk/Vision/src/SetupWindow.cpp
trunk/Vision/src/StatusView.cpp
trunk/Vision/src/Utilities.cpp
trunk/Vision/src/Vision.cpp
trunk/Vision/src/WindowList.cpp
Modified: trunk/Vision/Jamfile
===================================================================
--- trunk/Vision/Jamfile 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/Jamfile 2012-08-21 22:47:56 UTC (rev 940)
@@ -1,13 +1,11 @@
-SubDir HAIKU_TOP 3rdparty anevilyak Vision ;
+SubDir HAIKU_TOP src apps vision ;
-SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders interface ;
#SubDirC++Flags -DSINGLE_BINARY -DDEBUG=1 ;
-SubDirC++Flags -DVERSION_STRING=\\\"0.9.8-01092008\\\" -DBUILD_DATE=\\\"Sep_01_2008\\\" ;
+SubDirC++Flags -DVERSION_STRING=\\\"0.9.8-08192012\\\" -DBUILD_DATE=\\\"Aug_19_2012\\\" ;
+SEARCH_SOURCE += [ FDirName $(SUBDIR) src ] ;
-SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) 3rdparty anevilyak Vision src ] ;
-
-Application <3rdparty>Vision :
+Application Vision :
AboutWindow.cpp
ChannelAgent.cpp
ChannelOptions.cpp
@@ -19,7 +17,6 @@
ClientWindowDock.cpp
ColorSelector.cpp
ColorSwatch.cpp
- ColorTools.cpp
DCCConnect.cpp
DCCFileWindow.cpp
DCCHandler.cpp
@@ -30,6 +27,7 @@
NameItem.cpp
NamesView.cpp
NetPrefsServerView.cpp
+ NetworkManager.cpp
NetworkMenu.cpp
NetworkPrefsView.cpp
NetworkWindow.cpp
@@ -51,6 +49,7 @@
PrefLog.cpp
PrefsWindow.cpp
Prompt.cpp
+ ResizeView.cpp
RunView.cpp
ServerAgent.cpp
ServerEntryWindow.cpp
@@ -64,7 +63,7 @@
VTextControl.cpp
Vision.cpp
WindowList.cpp
- : libcolumnlistview.a be translation textencoding tracker $(TARGET_NETWORK_LIBS) $(TARGET_LIBSTDC++)
+ : be libcolumnlistview.a translation textencoding tracker $(TARGET_NETWORK_LIBS) $(TARGET_LIBSUPC++) $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
: Vision.rsrc
;
Modified: trunk/Vision/src/ChannelAgent.cpp
===================================================================
--- trunk/Vision/src/ChannelAgent.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ChannelAgent.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -52,8 +52,8 @@
#include <infopopper/InfoPopper.h>
#endif
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "ChannelWindow"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "ChannelWindow"
ChannelAgent::ChannelAgent (
const char *id_,
@@ -96,11 +96,11 @@
// empty recent nick list
while (fRecentNicks.CountItems() > 0)
- delete fRecentNicks.RemoveItemAt(0L);
+ delete fRecentNicks.RemoveItemAt((int32)0);
// empty nick completion list
while (fCompletionNicks.CountItems() > 0)
- delete fCompletionNicks.RemoveItemAt(0L);
+ delete fCompletionNicks.RemoveItemAt((int32)0);
}
void
@@ -344,7 +344,7 @@
int32 count (fRecentNicks.CountItems());
if (count > MAX_RECENT_NICKS)
{
- delete fRecentNicks.RemoveItemAt (0L);
+ delete fRecentNicks.RemoveItemAt ((int32)0);
}
// scan for presence of nick in list, and remove duplicate if found
RemoveNickFromList (fRecentNicks, nick);
@@ -452,7 +452,7 @@
fLastExpansion = place;
while (!fCompletionNicks.IsEmpty())
- delete fCompletionNicks.RemoveItemAt(0L);
+ delete fCompletionNicks.RemoveItemAt((int32)0);
int32 count (fNamesList->CountItems()),
i (0);
@@ -753,7 +753,7 @@
// over in it after reconnect -- list will quickly be rebuilt anyhow if there
// is any conversation whatsoever going on
while (fRecentNicks.CountItems() > 0)
- delete fRecentNicks.RemoveItemAt(0L);
+ delete fRecentNicks.RemoveItemAt((int32)0);
}
break;
@@ -1230,8 +1230,8 @@
}
break;
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "StatusBar"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "StatusBar"
case M_STATUS_ADDITEMS:
{
Modified: trunk/Vision/src/ChannelOptions.cpp
===================================================================
--- trunk/Vision/src/ChannelOptions.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ChannelOptions.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -29,8 +29,8 @@
#include <stdio.h>
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "ChannelOptions"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "ChannelOptions"
ChannelOptions::ChannelOptions (const char *chan_name_, ChannelAgent *parent_)
: BWindow (
Modified: trunk/Vision/src/ClientAgent.cpp
===================================================================
--- trunk/Vision/src/ClientAgent.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ClientAgent.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -115,7 +115,7 @@
BView::AttachedToWindow();
fActiveTheme->WriteLock();
fActiveTheme->AddView (this);
- fActiveTheme->WriteUnlock();
+ fActiveTheme->WriteUnlock();
}
void
@@ -124,7 +124,7 @@
BView::DetachedFromWindow ();
fActiveTheme->WriteLock();
fActiveTheme->RemoveView (this);
- fActiveTheme->WriteUnlock();
+ fActiveTheme->WriteUnlock();
}
void
@@ -161,9 +161,9 @@
statusMsg.AddInt32 ("status", WIN_NORMAL_BIT);
statusMsg.AddBool ("hidden", false);
Window()->PostMessage (&statusMsg);
-
+
const BRect *agentRect (dynamic_cast<ClientWindow *>(Window())->AgentRect());
-
+
if (*agentRect != Frame())
{
ResizeTo (agentRect->Width(), agentRect->Height());
@@ -190,7 +190,7 @@
"Input", 0, 0,
0,
B_FOLLOW_LEFT_RIGHT | B_FOLLOW_BOTTOM);
-
+
fInput->SetDivider (0);
fInput->ResizeToPreferred();
fInput->MoveTo (
@@ -199,26 +199,26 @@
AddChild (fInput);
fInput->TextView()->AddFilter (new ClientAgentInputFilter (this));
fInput->Invalidate();
-
+
fHistory = new HistoryList ();
-
+
BRect textrect (
2,
fFrame.top,
fFrame.right - fFrame.left - 1 - B_V_SCROLL_BAR_WIDTH,
fFrame.bottom - fInput->Frame().Height() - 8);
-
+
fText = new RunView (
textrect,
fId.String(),
fActiveTheme,
B_FOLLOW_ALL);
-
+
fText->SetClippingName (fId.String());
-
+
if (vision_app->GetBool ("timestamp"))
fText->SetTimeStampFormat (vision_app->GetString ("timestamp_format"));
-
+
fTextScroll = new BScrollView (
"textscroll",
fText,
@@ -227,7 +227,7 @@
false,
true,
B_PLAIN_BORDER);
-
+
AddChild (fTextScroll);
}
@@ -257,8 +257,8 @@
fServerName = name;
}
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "EditMenu"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "EditMenu"
void
ClientAgent::SetEditStates (BMenu *menu, bool targetonly)
@@ -309,7 +309,7 @@
BClipboard clipboard("system");
BMessage *clip ((BMessage *)NULL);
if (clipboard.Lock()) {
- if ((clip = clipboard.Data()))
+ if ((clip = clipboard.Data()))
{
if (clip->HasData ("text/plain", B_MIME_TYPE))
menuItem->SetEnabled(true);
@@ -326,8 +326,8 @@
}
}
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "ClientWindow"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "ClientWindow"
BString
ClientAgent::FilterCrap (const char *data, bool force)
@@ -349,7 +349,7 @@
outData << "[0x03]{";
++i;
-
+
// filter foreground
for (j = 0; j < 2; j++)
if (data[i] >= '0' && data[i] <= '9')
@@ -359,7 +359,7 @@
++i;
}
else break;
-
+
if (data[i] == ',')
{
if (ViewCodes)
@@ -376,7 +376,7 @@
}
--i;
-
+
if (ViewCodes)
outData << "}";
}
@@ -401,7 +401,7 @@
bool fHistoryAdd)
{
BString cmd;
-
+
if (fHistoryAdd)
cmd = fHistory->Submit (buffer);
else
@@ -456,18 +456,18 @@
BMessage submitMsg (M_SUBMIT);
submitMsg.AddBool ("history", addtofHistory);
submitMsg.AddBool ("clear", false);
-
+
for (i = 0; (msg->HasString ("data", i)) && (agentMsgr.IsValid()) && (false == agent->CancelMultilineTextPaste()); ++i)
{
BString data;
msg->FindString ("data", i, &data);
-
+
// add a space so /'s don't get triggered as commands
if (!autoexec)
data.Prepend (" ");
-
+
if (!submitMsg.HasString ("input"))
submitMsg.AddString ("input", data);
else
@@ -496,13 +496,13 @@
int16 font)
{
BMessage packed;
-
+
packed.AddString ("msgz", buffer);
packed.AddInt16 ("fore", fore);
packed.AddInt16 ("back", back);
packed.AddInt16 ("font", font);
-
+
if (msg->HasMessage ("packed"))
msg->ReplaceMessage ("packed", &packed);
else
@@ -551,7 +551,7 @@
mircFont (font),
i (0);
const char *start (NULL);
-
+
while (buffer && *buffer)
{
start = buffer;
@@ -585,7 +585,7 @@
mircFore += (*buffer++ - '0');
}
mircFore = (mircFore % 16) + C_MIRC_WHITE;
-
+
if (*buffer == ',')
{
++buffer;
@@ -681,7 +681,7 @@
logMessage.AddString ("name", fId.String());
fSMsgr.SendMessage(&logMessage);
}
-
+
BMessage deathchant (M_CLIENT_SHUTDOWN);
deathchant.AddPointer("agent", this);
fSMsgr.SendMessage (&deathchant);
@@ -704,7 +704,7 @@
}
}
break;
-
+
case M_THEME_FONT_CHANGE:
{
int16 which (msg->FindInt16 ("which"));
@@ -718,7 +718,7 @@
Invalidate();
}
}
- break;
+ break;
case M_STATE_CHANGE:
{
@@ -732,9 +732,9 @@
else
fText->SetTimeStampFormat (NULL);
}
-
+
bool shouldLog = vision_app->GetBool ("log_enabled");
-
+
if (fIsLogging != shouldLog)
{
if ((fIsLogging = shouldLog))
@@ -742,7 +742,7 @@
BMessage logMessage (M_REGISTER_LOGGER);
logMessage.AddString ("name", fId.String());
fSMsgr.SendMessage (&logMessage);
- }
+ }
else
{
BMessage logMessage (M_UNREGISTER_LOGGER);
@@ -759,7 +759,7 @@
}
}
break;
-
+
case M_SUBMIT_INPUT:
{
fCancelMLPaste = false;
@@ -773,18 +773,18 @@
msg->FindPointer ("invoker", reinterpret_cast<void **>(&invoker));
delete invoker;
}
-
+
switch (which)
{
case PASTE_CANCEL:
break;
-
+
case PASTE_MULTI:
case PASTE_MULTI_NODELAY:
{
BMessage *buffer (new BMessage (*msg));
thread_id tid;
-
+
// if there is some text in the input control already, submit it before
// starting the timed paste
if (fInput->TextView()->TextLength() != 0)
@@ -805,7 +805,7 @@
resume_thread (tid);
}
break;
-
+
case PASTE_SINGLE:
{
BString buffer;
@@ -816,9 +816,9 @@
buffer += (i ? " " : "");
buffer += data;
}
-
+
int32 start, finish;
-
+
if (msg->FindInt32 ("selstart", &start) == B_OK)
{
msg->FindInt32 ("selend", &finish);
@@ -848,7 +848,7 @@
fInput->TextView()->ScrollToSelection();
}
break;
-
+
default:
break;
}
@@ -922,17 +922,17 @@
BString tempString;
BString nickString;
-
+
if (theMessage[0] == '\1')
{
- BString aMessage (theMessage);
+ BString aMessage (theMessage);
aMessage.RemoveFirst ("\1ACTION ");
aMessage.RemoveLast ("\1");
-
+
tempString = " ";
tempString += aMessage;
tempString += "\n";
-
+
nickString = "* ";
nickString += theNick;
isAction = true;
@@ -952,7 +952,7 @@
FirstKnownAs (tempString, knownAs, &hasNick);
tempString.Prepend (nickString);
-
+
int32 dispColor = C_TEXT;
if (hasNick)
{
@@ -960,10 +960,10 @@
dispColor = C_MYNICK;
if ((window = Window()) != NULL && !window->IsActive())
system_beep(kSoundEventNames[(uint32)seNickMentioned]);
- }
+ }
else if (isAction)
dispColor = C_ACTION;
-
+
Display (tempString.String(), dispColor);
}
break;
@@ -976,7 +976,7 @@
if (fMyNick.ICompare (oldNick) == 0)
fMyNick = msg->FindString ("newnick");
-
+
BMessage display;
if (msg->FindMessage ("display", &display) == B_NO_ERROR)
ClientAgent::MessageReceived (&display);
@@ -1014,7 +1014,7 @@
vision_app->LoadURL (lookup.String());
}
break;
-
+
case M_LOOKUP_ACRONYM:
{
BString lookup;
@@ -1025,14 +1025,14 @@
vision_app->LoadURL (lookup.String());
}
break;
-
+
case B_ESCAPE:
fCancelMLPaste = true;
break;
-
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "DCCStatus"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "DCCStatus"
+
case M_DCC_COMPLETE:
{
/// set up ///
@@ -1052,16 +1052,16 @@
msg->FindString ("type", &type);
msg->FindInt32 ("transferred", &xfersize);
msg->FindFloat ("transferRate", &rate);
-
+
BPath pFile (file.String());
fAck << xfersize;
-
+
if (size.ICompare (fAck))
completed = false;
- /// send mesage ///
+ /// send mesage ///
if (type == "SEND")
{
if (completed)
@@ -1075,7 +1075,7 @@
completionMsg += B_TRANSLATE("Completed receive of %1 from %2 (%3), %4 KB/sec");
else
completionMsg += B_TRANSLATE("Failed receive of %1 from %2 (%3/%4), %5 KB/sec");
-
+
}
completionMsg.ReplaceFirst("%1", pFile.Leaf());
completionMsg.ReplaceFirst("%2", nick);
@@ -1100,7 +1100,7 @@
completionMsg.ReplaceFirst("%5", temp.String());
}
completionMsg += "\n";
-
+
Display (completionMsg.String(), C_CTCP_RPY);
}
break;
@@ -1129,7 +1129,7 @@
i,
place;
BString target;
-
+
if ((place = FirstSingleKnownAs (data, fMyNick)) != B_ERROR)
{
result = fMyNick;
Modified: trunk/Vision/src/ClientAgentInputFilter.cpp
===================================================================
--- trunk/Vision/src/ClientAgentInputFilter.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ClientAgentInputFilter.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -1,21 +1,21 @@
/*
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Vision.
- *
+ * The contents of this file are subject to the Mozilla Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is Vision.
+ *
* The Initial Developer of the Original Code is The Vision Team.
* Portions created by The Vision Team are
* Copyright (C) 1999-2010 The Vision Team. All Rights
* Reserved.
- *
+ *
* Contributor(s): Wade Majors <wa...@ez...>
* Rene Gollent
* Todd Lair
@@ -165,8 +165,8 @@
// we have our own pasting code so we can catch multiple lines
BClipboard clipboard ("system");
const char *fText;
- int32 textLen;
- BMessage *clip ((BMessage *)NULL);
+ ssize_t textLen;
+ BMessage *clip (NULL);
if (clipboard.Lock())
{
@@ -213,7 +213,7 @@
filter_result result (B_DISPATCH_MESSAGE);
const char *keyStroke;
int32 keymodifiers;
-
+
BMessenger msgr (fWindow);
WindowList *winList (vision_app->pClientWin()->pWindowList());
@@ -225,7 +225,7 @@
{
return result;
}
-
+
switch (keyStroke[0])
{
/////////////////
@@ -279,26 +279,26 @@
winList->SelectLast();
result = B_SKIP_MESSAGE;
break;
-
+
case B_UP_ARROW:
case B_LEFT_ARROW: // baxter muscle memory
case ',': // bowser muscle memory
winList->ContextSelectUp();
result = B_SKIP_MESSAGE;
break;
-
+
case B_DOWN_ARROW: //
case B_RIGHT_ARROW: // baxter muscle memory
case '.': // bowser muscle memory
winList->ContextSelectDown();
result = B_SKIP_MESSAGE;
break;
-
+
case 'U':
winList->MoveCurrentUp();
result = B_SKIP_MESSAGE;
break;
-
+
case 'D':
winList->MoveCurrentDown();
result = B_SKIP_MESSAGE;
@@ -335,7 +335,7 @@
result = B_SKIP_MESSAGE;
}
break;
-
+
case B_LEFT_ARROW: // collapse current server (if expanded)
{
winList->CollapseCurrentServer();
@@ -349,7 +349,7 @@
result = B_SKIP_MESSAGE;
}
break;
-
+
case '/': // bowser muscle memory
// move to the agents parent ServerAgent
// XXX move to WindowList ?
Modified: trunk/Vision/src/ClientAgentLogger.cpp
===================================================================
--- trunk/Vision/src/ClientAgentLogger.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ClientAgentLogger.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -282,8 +282,8 @@
if (!myLogBuffer->IsEmpty())
{
// grab next string from list and write to file
- currentLogger = myLogBuffer->RemoveItemAt (0L);
- currentString = myLogBuffer->RemoveItemAt (0L);
+ currentLogger = myLogBuffer->RemoveItemAt ((int32)0);
+ currentString = myLogBuffer->RemoveItemAt ((int32)0);
myLogBufferLock->Unlock();
myLogFile = &logger->fLogFiles[*currentLogger];
if (myLogFile->InitCheck() != B_NO_INIT)
@@ -297,8 +297,8 @@
// on shutdown empty out all remaining data (if any) and write to file
while (!myLogBuffer->IsEmpty())
{
- currentLogger = (BString *)(myLogBuffer->RemoveItemAt (0L));
- currentString = (BString *)(myLogBuffer->RemoveItemAt (0L));
+ currentLogger = (BString *)(myLogBuffer->RemoveItemAt ((int32)0));
+ currentString = (BString *)(myLogBuffer->RemoveItemAt ((int32)0));
myLogFile = &logger->fLogFiles[*currentLogger];
if (myLogFile->InitCheck() != B_NO_INIT)
myLogFile->Write (currentString->String(), currentString->Length());
Modified: trunk/Vision/src/ClientWindow.cpp
===================================================================
--- trunk/Vision/src/ClientWindow.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ClientWindow.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -62,8 +62,8 @@
<Brazilian> I have a monkey who draws on my wall really fast
*/
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "ClientWindow"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "ClientWindow"
static const char *skTermSig = "application/x-vnd.Haiku-Terminal";
@@ -648,16 +648,16 @@
// Edit menu
fEdit = new DynamicEditMenu ();
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "EditMenu"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "EditMenu"
fEdit->AddItem (item = new BMenuItem (B_TRANSLATE("Cut"), new BMessage (B_CUT), 'X'));
fEdit->AddItem (item = new BMenuItem (B_TRANSLATE("Copy"), new BMessage (B_COPY), 'C'));
fEdit->AddItem (item = new BMenuItem (B_TRANSLATE("Paste"), new BMessage (B_PASTE), 'V'));
fEdit->AddItem (item = new BMenuItem (B_TRANSLATE("Select All"), new BMessage (B_SELECT_ALL), 'A', B_OPTION_KEY));
fMenuBar->AddItem (fEdit);
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "WindowMenu"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "WindowMenu"
// Window menu
fWindow = new BMenu (B_TRANSLATE("Window"));
Modified: trunk/Vision/src/ClientWindowDock.cpp
===================================================================
--- trunk/Vision/src/ClientWindowDock.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ClientWindowDock.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -39,8 +39,8 @@
return 8 + ceilf(be_plain_font->Size());
}
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "Window List"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "Window List"
//////////////////////////////////////////////////////////////////////////////
/// Begin AgentDock functions
Modified: trunk/Vision/src/ColorSelector.cpp
===================================================================
--- trunk/Vision/src/ColorSelector.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ColorSelector.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -46,7 +46,7 @@
fColor = color;
fInitialColor = initial_color;
}
-
+
void ResetColors(rgb_color col, rgb_color initial)
{
if (!CompareColors(fColor, col) || !CompareColors (fInitialColor, initial)) {
@@ -56,7 +56,7 @@
if (parent) parent->Invalidate(Frame());
}
}
-
+
void SetColor(rgb_color col)
{
if (!CompareColors (fColor, col)) {
@@ -65,23 +65,23 @@
if (parent) parent->Invalidate(Frame());
}
}
-
+
rgb_color Color() const
{
return fColor;
}
-
+
rgb_color InitialColor() const
{
return fInitialColor;
}
-
+
virtual void DrawContent()
{
BRect b = Frame();
BMenu *parent = Menu();
BPoint loc = parent->PenLocation();
-
+
enum {
W_CHAR = 0,
A_CHAR = 1,
@@ -97,18 +97,18 @@
for (int32 i=0; i<NUM_CHARS; i++) {
escapements[i] *= font.Size();
}
-
+
const float blockWidth = escapements[W_CHAR]+escapements[A_CHAR];
-
+
const rgb_color old_col = parent->HighColor();
font_height fh;
-
+
const bool showInitial = !CompareColors(fInitialColor, fColor);
-
+
b.InsetBy(1, 1);
b.bottom -= 1;
b.left = loc.x;
-
+
if (showInitial) {
parent->GetFontHeight(&fh);
parent->DrawString("(", BPoint(b.left, loc.y+fh.ascent));
@@ -130,27 +130,27 @@
parent->DrawString(")", BPoint(b.right+1, loc.y+fh.ascent));
}
b.right += escapements[CLOSE_CHAR] + 1;
-
+
b.left = b.right + escapements[SPACE_CHAR];
b.right = b.left + blockWidth;
-
+
parent->SetHighColor(fColor);
parent->FillRect(b);
parent->SetHighColor(old_col);
b.InsetBy(-1, -1);
parent->StrokeRect(b);
-
+
parent->MovePenTo(b.right + escapements[SPACE_CHAR]*2 + 2, loc.y);
-
+
BMenuItem::DrawContent();
}
-
+
virtual void GetContentSize(float *w, float *h)
{
BMenuItem::GetContentSize(w, h);
*w += Menu()->StringWidth("(W) WA ")+4 + 2;
}
-
+
private:
rgb_color fColor, fInitialColor;
};
@@ -187,9 +187,9 @@
break;
}
}
-
+
if (found) continue;
-
+
// This color doesn't currently exist; add it in.
BMessage* msg = new BMessage(CMD_CHOOSE_UI_COLOR);
msg->AddString("field", name);
@@ -203,7 +203,7 @@
break;
}
rgb_color *init_col;
- if (!initial || initial->FindData ("color", B_RGB_COLOR_TYPE, j,
+ if (!initial || initial->FindData ("color", B_RGB_COLOR_TYPE, j,
(const void **)&init_col, &size) != B_OK)
*init_col = *col;
@@ -226,7 +226,7 @@
fNames(names), fInitColors(colors), fColors(colors), fSizeValid(false)
{
const BRect dummyRect(-100, -100, -10, -10);
-
+
fColorMenu = new BPopUpMenu("Colors");
populate_colors(fColorMenu, fColors, fNames, &fInitColors);
fColorField = new BMenuField(dummyRect, "Color", "Color: ", fColorMenu,
@@ -234,7 +234,7 @@
B_WILL_DRAW|B_FRAME_EVENTS|B_NAVIGABLE);
AddChild(fColorField);
fColorField->SetFont(be_bold_font);
-
+
fColorPalette = new BColorControl(dummyRect.LeftTop(), B_CELLS_32x8, 8,
"Palette", new BMessage(CMD_SET_UI_COLOR),
true);
@@ -243,7 +243,7 @@
fColorPalette->SetDoubleBuffering (B_UPDATE_INVALIDATED | B_UPDATE_RESIZED | B_UPDATE_EXPOSED);
#else
rgb_color *color (NULL);
- int32 size (0);
+ ssize_t size (0);
fColors.FindData ("color", B_RGB_COLOR_TYPE, 0, (const void **)(&color), &size);
swatch = new ColorSwatch (dummyRect, "swatch", *color);
AddChild (swatch);
@@ -274,7 +274,7 @@
void ColorSelector::AttachedToWindow()
{
BControl::AttachedToWindow();
-
+
BMessenger me(this);
fColorPalette->SetTarget(me);
fColorMenu->SetTargetForItems(me);
@@ -301,7 +301,7 @@
fColorField->SetDivider(fColorField->StringWidth(fColorField->Label()) + 5);
fColorField->GetPreferredSize(&mw, &mh);
fColorPalette->GetPreferredSize(&cw, &ch);
-
+
if (really) {
BRect b(Bounds());
if (Window()) Window()->BeginViewTransaction();
@@ -319,7 +319,7 @@
if (Window()) Window()->EndViewTransaction();
}
-#if B_BEOS_VERSION_DANO
+#if B_BEOS_VERSION_DANO
fPrefWidth = (mw > cw ? mw : cw);
#else
fPrefWidth = (mw > cw ? mw : cw) + 5 + swatch->Bounds().Width();
@@ -332,7 +332,7 @@
{
if (msg->WasDropped()) {
rgb_color *color;
- int32 size;
+ ssize_t size;
if (msg->FindData ("RGBColor", B_RGB_COLOR_TYPE, (const void **)&color,
&size) == B_OK) {
if (fColorPalette) {
@@ -347,12 +347,12 @@
}
return;
}
-
+
switch (msg->what) {
case CMD_CHOOSE_UI_COLOR: {
const char* field;
int32 index (0);
- int32 size;
+ ssize_t size;
if (msg->FindString("field", &field) == B_OK) {
msg->FindInt32 ("index", &index);
fCurrentField = field;
@@ -366,7 +366,7 @@
}
}
} break;
-
+
case CMD_SET_UI_COLOR: {
if (Message()) {
BMessage upd(*Message());
@@ -390,7 +390,7 @@
Invoke(&upd);
}
} break;
-
+
default:
BControl::MessageReceived(msg);
break;
@@ -439,17 +439,17 @@
fInitColors.MakeEmpty();
ExtractColors(&fInitColors, colors);
fColors = fInitColors;
-
+
fColorMenu->RemoveItems(0, fColorMenu->CountItems(), true);
populate_colors(fColorMenu, fColors, fNames, &fInitColors);
-
+
if (Window()) ColorSelector::AttachedToWindow();
}
void ColorSelector::Update(const BMessage& changes)
{
int32 index (0);
- int32 size (0);
+ ssize_t size (0);
rgb_color *color;
changes.FindInt32 ("index", &index);
changes.FindData ("color", B_RGB_COLOR_TYPE, (const void **)(&color), &size);
@@ -461,7 +461,7 @@
BMessage *curMsg (item->Message());
curMsg->FindInt32 ("index", &index);
}
-
+
if (fColors.FindData ("color", B_RGB_COLOR_TYPE, index,
(const void **)(&color), &size) == B_OK) {
fColorPalette->SetValue(*color);
@@ -477,7 +477,7 @@
BMessage OriginalColors = fInitColors;
SetTo (OriginalColors);
rgb_color *color;
- int32 size (0);
+ ssize_t size (0);
for (int32 i = 0; i < MAX_COLORS; i++)
if (fInitColors.FindData ("color", B_RGB_COLOR_TYPE, i, (const void **)(&color), &size) == B_OK)
Modified: trunk/Vision/src/ColorSwatch.cpp
===================================================================
--- trunk/Vision/src/ColorSwatch.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ColorSwatch.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -1,21 +1,21 @@
-/*
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Vision.
- *
+/*
+ * The contents of this file are subject to the Mozilla Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is Vision.
+ *
* The Initial Developer of the Original Code is The Vision Team.
* Portions created by The Vision Team are
* Copyright (C) 1999-2010 The Vision Team. All Rights
* Reserved.
- *
+ *
* Contributor(s): Wade Majors <wa...@ez...>
* Rene Gollent
*/
@@ -77,7 +77,7 @@
PushState();
SetDrawingMode (B_OP_COPY);
-
+
rgb_color high (HighColor());
BRect colorPad (Bounds());
SetHighColor (ValueAsColor());
@@ -102,7 +102,7 @@
colorPad.RightTop() + BPoint (0, 1),
colorPad.RightBottom(),
dark);
-
+
AddLine (
colorPad.RightBottom(),
colorPad.LeftBottom() + BPoint (1, 0),
@@ -136,7 +136,7 @@
ViewColor());
}
- AddLine (
+ AddLine (
colorPad.LeftTop(),
colorPad.RightTop() + hless,
dark);
@@ -150,7 +150,7 @@
colorPad.RightTop() + vmore,
colorPad.RightBottom(),
light);
-
+
AddLine (
colorPad.RightBottom(),
colorPad.LeftBottom() + hmore,
@@ -203,5 +203,5 @@
baseColor.blue = 255 - value.blue;
baseColor.alpha = value.alpha;
- return fColor;
+ return baseColor;
}
Modified: trunk/Vision/src/DCCConnect.cpp
===================================================================
--- trunk/Vision/src/DCCConnect.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/DCCConnect.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -41,8 +41,8 @@
#include "PlayButton.h"
#include "Vision.h"
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "DCCMessages"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "DCCMessages"
static const uint32 M_SEND_NEXT_BLOCK = 'msnb';
@@ -350,7 +350,7 @@
const char *sz,
const BMessenger &c)
: DCCConnect (n, fn, sz, "", "", c),
- fPos (0LL)
+ fPos ((int32)0L)
{
int32 dccPort (atoi (vision_app->GetString ("dccMinPort")));
int32 diff (atoi (vision_app->GetString ("dccMaxPort")) - dccPort);
Modified: trunk/Vision/src/DCCHandler.cpp
===================================================================
--- trunk/Vision/src/DCCHandler.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/DCCHandler.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -40,8 +40,8 @@
#include "Vision.h"
#include "VTextControl.h"
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "DCCMessages"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "DCCMessages"
class DCCFileFilter : public BMessageFilter
{
Modified: trunk/Vision/src/ListAgent.cpp
===================================================================
--- trunk/Vision/src/ListAgent.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ListAgent.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -78,8 +78,8 @@
{
frame = Bounds();
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "ChannelListMenu"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "ChannelListMenu"
listMenu = new BMenu (B_TRANSLATE("Channels"));
@@ -99,8 +99,8 @@
mFindAgain->SetEnabled (false);
mFilter->SetEnabled (false);
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "ChannelListWindow"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "ChannelListWindow"
BView *bgView (new BView (
frame,
@@ -159,7 +159,7 @@
}
while (hiddenItems.CountItems() > 0)
- delete hiddenItems.RemoveItemAt (0L);
+ delete hiddenItems.RemoveItemAt ((int32)0);
delete fSMsgr;
delete fAgentWinItem;
@@ -207,7 +207,7 @@
// make sure you call this from a locked looper
BRow *row (NULL);
Window()->DisableUpdates();
- while ((row = fBuildList.RemoveItemAt (0L)) != NULL)
+ while ((row = fBuildList.RemoveItemAt ((int32)0)) != NULL)
listView->AddRow (row);
Window()->EnableUpdates();
@@ -272,8 +272,8 @@
case M_STATUS_ADDITEMS:
{
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "ChannelListStatusBarItems"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "ChannelListStatusBarItems"
BString statusLabel = B_TRANSLATE("Count");
statusLabel += ": ";
vision_app->pClientWin()->pStatusView()->AddItem (new StatusItem (statusLabel.String(), ""), true);
@@ -411,7 +411,7 @@
while (hiddenItems.CountItems() != 0)
{
- currentRow = hiddenItems.RemoveItemAt (0L);
+ currentRow = hiddenItems.RemoveItemAt ((int32)0);
listView->AddRow (currentRow);
}
Modified: trunk/Vision/src/MessageAgent.cpp
===================================================================
--- trunk/Vision/src/MessageAgent.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/MessageAgent.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -52,8 +52,8 @@
#include <infopopper/InfoPopper.h>
#endif
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "DCCMessages"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "DCCMessages"
MessageAgent::MessageAgent (
BRect &frame_,
Modified: trunk/Vision/src/NamesView.cpp
===================================================================
--- trunk/Vision/src/NamesView.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/NamesView.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -1,21 +1,21 @@
-/*
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Vision.
- *
+/*
+ * The contents of this file are subject to the Mozilla Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is Vision.
+ *
* The Initial Developer of the Original Code is The Vision Team.
* Portions created by The Vision Team are
* Copyright (C) 1999-2010 The Vision Team. All Rights
* Reserved.
- *
+ *
* Contributor(s): Wade Majors <wa...@ez...>
* Rene Gollent
* Todd Lair
@@ -59,15 +59,15 @@
delete fMyPopUp;
}
-void
-NamesView::KeyDown (const char * bytes, int32 numBytes)
+void
+NamesView::KeyDown (const char * bytes, int32 numBytes)
{
- BMessage inputMsg (M_INPUT_FOCUS);
- BString buffer;
+ BMessage inputMsg (M_INPUT_FOCUS);
+ BString buffer;
- buffer.Append (bytes, numBytes);
- inputMsg.AddString ("text", buffer.String());
-
+ buffer.Append (bytes, numBytes);
+ inputMsg.AddString ("text", buffer.String());
+
reinterpret_cast<ChannelAgent *>(Parent()->Parent())->fMsgr.SendMessage (&inputMsg);
}
@@ -81,7 +81,7 @@
myMessage = new BMessage (M_OPEN_MSGAGENT);
fMyPopUp->AddItem(new BMenuItem("Query", myMessage));
-
+
myMessage = new BMessage (M_NAMES_POPUP_NOTIFY);
fMyPopUp->AddItem(new BMenuItem("Add To Notify", myMessage));
@@ -150,7 +150,7 @@
fMyPopUp->SetTargetForItems (this);
fCTCPPopUp->SetTargetForItems (this);
-
+
fActiveTheme->WriteLock();
fActiveTheme->AddView (this);
fActiveTheme->WriteUnlock();
@@ -170,13 +170,13 @@
{
int32 selected (IndexOf (myPoint));
bool handled (false);
-
+
if (selected < 0)
{
DeselectAll();
return;
}
-
+
BMessage *inputMsg (Window()->CurrentMessage());
int32 mousebuttons (0),
keymodifiers (0),
@@ -195,7 +195,7 @@
&& (keymodifiers & B_CONTROL_KEY) == 0)
{
// user double clicked
-
+
BListItem *item (ItemAt (IndexOf(myPoint)));
if (item && !item->IsSelected())
{
@@ -214,10 +214,10 @@
msg.AddString ("nick", theNick.String());
reinterpret_cast<ChannelAgent *>(Parent()->Parent())->fMsgr.SendMessage (&msg);
}
-
+
handled = true;
}
-
+
if (mouseclicks == 1
&& CurrentSelection(1) <= 0
&& mousebuttons == B_PRIMARY_MOUSE_BUTTON
@@ -230,12 +230,12 @@
BListItem *item (ItemAt (IndexOf(myPoint)));
if (item && !item->IsSelected())
Select (IndexOf (myPoint), false);
-
+
fTracking = true;
fCurrentindex = IndexOf (myPoint);
handled = true;
}
-
+
if (mouseclicks >= 1
&& CurrentSelection(1) >= 0
&& mousebuttons == B_PRIMARY_MOUSE_BUTTON
@@ -248,7 +248,7 @@
BListItem *item (ItemAt (IndexOf(myPoint)));
if (item)
Select (IndexOf (myPoint), false);
-
+
fTracking = true;
fCurrentindex = IndexOf (myPoint);
handled = true;
@@ -275,7 +275,7 @@
if (mousebuttons == B_TERTIARY_MOUSE_BUTTON)
BListView::MouseDown (myPoint);
- fLastSelected = selected;
+ fLastSelected = selected;
if (!handled)
BListView::MouseDown (myPoint);
}
@@ -285,7 +285,7 @@
{
if (fTracking)
fTracking = false;
-
+
BListView::MouseUp (myPoint);
}
@@ -338,7 +338,7 @@
}
else if (fCurrentindex > current)
{
- // backtrack up
+ // backtrack up
DeselectExcept (first, current);
}
else if (fCurrentindex < current)
@@ -359,7 +359,7 @@
NamesView::ClearList (void)
{
while (CountItems() > 0)
- delete RemoveItem (0L);
+ delete RemoveItem ((int32)0);
}
void
@@ -379,14 +379,14 @@
refresh = true;
fActiveTheme->ReadUnlock();
break;
-
+
case C_OP:
case C_VOICE:
case C_HELPER:
case C_NAMES_SELECTION:
refresh = true;
break;
-
+
default:
break;
}
@@ -394,7 +394,7 @@
Invalidate();
}
break;
-
+
case M_THEME_FONT_CHANGE:
{
int16 which (msg->FindInt16 ("which"));
@@ -410,7 +410,7 @@
}
}
break;
-
+
case B_SIMPLE_DATA:
{
if (msg->HasRef("refs"))
@@ -437,7 +437,7 @@
}
}
break;
-
+
default:
{
BListView::MessageReceived (msg);
Modified: trunk/Vision/src/NetPrefsServerView.cpp
===================================================================
--- trunk/Vision/src/NetPrefsServerView.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/NetPrefsServerView.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -17,8 +17,8 @@
#include "ColumnTypes.h"
#include "Vision.h"
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "ServerListView"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "ServerListView"
const rgb_color serverItemNormalColor = {0, 0, 0, 255};
const rgb_color serverItemDefaultColor = {0, 127, 0, 255};
@@ -273,7 +273,8 @@
{
BStringField *field ((BStringField *) row->GetField (1));
- int32 count, size;
+ int32 count;
+ ssize_t size;
type_code type;
fActiveNetwork->GetInfo ("server", &type, &count);
@@ -300,7 +301,8 @@
if (newServer == NULL)
return;
type_code type;
- int32 count, size;
+ int32 count;
+ ssize_t size;
fActiveNetwork->GetInfo ("server", &type, &count);
const ServerData *data (NULL);
for (int32 i = 0; i < count; i++)
@@ -322,7 +324,7 @@
BLooper *looper (Looper());
if (looper == NULL)
return;
-
+
BAutolock lock (Looper ());
if (!lock.IsLocked ())
return;
@@ -338,7 +340,8 @@
netString.ReplaceFirst("%1", msg->FindString("name"));
netString += ":";
type_code type;
- int32 count, size;
+ int32 count;
+ ssize_t size;
const ServerData *data;
msg->GetInfo ("server", &type, &count);
for (int32 i = 0; i < count; i++)
@@ -395,7 +398,8 @@
BRow *row (fServerList->CurrentSelection ());
if (!row)
break;
- int32 count (0), size (0);
+ int32 count (0);
+ ssize_t size (0);
type_code type;
fActiveNetwork->GetInfo ("server", &type, &count);
const ServerData *compData;
@@ -424,7 +428,7 @@
case M_SERVER_RECV_DATA:
{
const ServerData *data;
- int32 size;
+ ssize_t size;
Window ()->DisableUpdates ();
msg->FindData ("server", B_RAW_TYPE, reinterpret_cast < const void **>(&data), &size);
if (msg->HasBool ("edit"))
Modified: trunk/Vision/src/NetworkManager.cpp
===================================================================
--- trunk/Vision/src/NetworkManager.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/NetworkManager.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -1,28 +1,28 @@
-/*
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Vision.
- *
+/*
+ * The contents of this file are subject to the Mozilla Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is Vision.
+ *
* The Initial Developer of the Original Code is The Vision Team.
* Portions created by The Vision Team are
* Copyright (C) 1999-2010 The Vision Team. All Rights
* Reserved.
- *
+ *
* Contributor(s): Wade Majors <wa...@ez...>
* Rene Gollent
* Todd Lair
* Andrew Bazan
*/
-
+
#include "NetworkManager.h"
#include "VisionMessages.h"
#include "Vision.h"
@@ -42,7 +42,7 @@
{
fPollFDs[i].fd = -1;
}
-
+
fPollThread = spawn_thread(Overlord, "Overlord", B_LOW_PRIORITY, this);
if (fPollThread >= B_OK)
{
@@ -50,7 +50,7 @@
}
else
{
- printf("Thread error: %ld\n", fPollThread);
+ printf("Thread error: %" B_PRId32 "\n", fPollThread);
}
}
@@ -71,7 +71,7 @@
_HandleDisconnect(fSockets.begin()->first, index);
}
_SocketUnlock();
-
+
return true;
}
@@ -85,13 +85,13 @@
_HandleConnect(message);
}
break;
-
+
case M_CREATE_LISTENER:
{
_HandleBind(message);
}
break;
-
+
case M_DESTROY_CONNECTION:
{
int32 sock = -1;
@@ -105,14 +105,14 @@
}
}
break;
-
-
+
+
case M_SEND_CONNECTION_DATA:
{
_HandleSend(message);
}
break;
-
+
default:
BLooper::MessageReceived(message);
break;
@@ -121,7 +121,7 @@
int32
NetworkManager::Overlord(void *data)
-{
+{
NetworkManager *manager = reinterpret_cast<NetworkManager *>(data);
while (!manager->fShuttingDown)
{
@@ -147,10 +147,10 @@
manager->_HandleReceive(manager->fPollFDs[i].fd, i);
}
}
- else if (manager->fPollFDs[i].revents &
+ else if (manager->fPollFDs[i].revents &
(POLLERR | POLLHUP | POLLNVAL))
{
- manager->_HandleDisconnect(manager->fPollFDs[i].fd, i);
+ manager->_HandleDisconnect(manager->fPollFDs[i].fd, i);
}
else if (manager->fPollFDs[i].revents != 0)
{
@@ -171,9 +171,9 @@
BMessenger target;
message->FindMessenger("target", &target);
-
+
BMessenger msgr(network_manager);
-
+
bigtime_t timeout = 0;
if (message->FindInt64("timeout", &timeout) == B_OK && timeout > 0)
{
@@ -227,7 +227,7 @@
}
freeaddrinfo(info);
}
-
+
reply.AddInt32("status", result);
if (result == 0 && sock >= 0)
{
@@ -254,10 +254,10 @@
reply.AddInt32("status", B_BAD_DATA);
}
target.SendMessage(&reply);
-
+
delete message;
-
- return B_OK;
+
+ return B_OK;
}
void
@@ -265,8 +265,8 @@
{
int32 sock = -1;
const void *sendBuffer = NULL;
- int32 size = -1;
- if (data->FindInt32("connection", &sock) == B_OK
+ ssize_t size = -1;
+ if (data->FindInt32("connection", &sock) == B_OK
&& data->FindData("data", B_RAW_TYPE, &sendBuffer, &size) == B_OK)
{
int result = send(sock, sendBuffer, size, 0);
@@ -299,7 +299,7 @@
BMessage msg(M_CONNECTION_DATA_RECEIVED);
msg.AddInt32("connection", sock);
msg.AddData("data", B_RAW_TYPE, recvbuffer, result);
-
+
it->second.SendMessage(&msg);
}
@@ -322,10 +322,10 @@
char ipbuf[100];
memset(namebuf, 0, sizeof(namebuf));
memset(ipbuf, 0, sizeof(ipbuf));
- getnameinfo((sockaddr *)&data, datasize, namebuf, sizeof(namebuf),
+ getnameinfo((sockaddr *)&data, datasize, namebuf, sizeof(namebuf),
NULL, 0, 0);
- getnameinfo((sockaddr *)&data, datasize, ipbuf, sizeof(ipbuf),
- NULL, 0, NI_NUMERICHOST);
+ getnameinfo((sockaddr *)&data, datasize, ipbuf, sizeof(ipbuf),
+ NULL, 0, NI_NUMERICHOST);
_SocketLock();
int32 index = fSockets.size();
fSockets[client] = it->second;
@@ -340,7 +340,7 @@
{
msg.AddString("name", namebuf);
}
- it->second.SendMessage(&msg);
+ it->second.SendMessage(&msg);
}
}
@@ -348,12 +348,12 @@
NetworkManager::_HandleBind(const BMessage *message)
{
BMessenger target;
-
+
if (message->FindMessenger("target", &target) != B_OK)
{
return;
}
-
+
BMessage reply(M_LISTENER_CREATED);
BString interface, port;
if (message->FindString("port", &port) != B_OK)
@@ -368,9 +368,9 @@
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
hints.ai_socktype = SOCK_STREAM;
-
+
int32 sock = -1;
-
+
int result = getaddrinfo(NULL, port.String(), &hints, &info);
if (result == 0)
{
@@ -384,7 +384,7 @@
}
int opt = 1;
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
-
+
result = bind(sock, current->ai_addr, current->ai_addrlen);
if (result < 0)
{
@@ -415,9 +415,9 @@
fPollFDs[index].events = POLLIN | POLLERR;
fListeners.insert(sock);
_SocketUnlock();
- reply.AddInt32("connection", sock);
+ reply.AddInt32("connection", sock);
}
-
+
target.SendMessage(&reply);
}
@@ -425,17 +425,17 @@
NetworkManager::_HandleConnect(const BMessage *message)
{
BMessenger target;
-
+
if (message->FindMessenger("target", &target) != B_OK)
{
return;
}
-
+
BString threadName;
vision_app->GetThreadName(THREAD_S, threadName);
- thread_id connector = spawn_thread(ConnectionHandler, threadName.String(),
+ thread_id connector = spawn_thread(ConnectionHandler, threadName.String(),
B_LOW_PRIORITY, new BMessage(*message));
-
+
if (connector < B_OK)
{
BMessage reply(M_CONNECTION_CREATED);
@@ -479,7 +479,7 @@
}
if (index < fSockets.size() - 1)
{
- memmove(&fPollFDs[index], &fPollFDs[index + 1],
+ memmove(&fPollFDs[index], &fPollFDs[index + 1],
sizeof(pollfd) * (fSockets.size() - index));
}
close(sock);
Modified: trunk/Vision/src/NetworkMenu.cpp
===================================================================
--- trunk/Vision/src/NetworkMenu.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/NetworkMenu.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -1,21 +1,21 @@
-/*
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Vision.
- *
+/*
+ * The contents of this file are subject to the Mozilla Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is Vision.
+ *
* The Initial Developer of the Original Code is The Vision Team.
* Portions created by The Vision Team are
* Copyright (C) 1999-2010 The Vision Team. All Rights
* Reserved.
- *
+ *
* Contributor(s): Rene Gollent
*/
@@ -42,7 +42,7 @@
if (CountItems())
{
BMenuItem *item (NULL);
- while ((item = RemoveItem(0L)) != NULL)
+ while ((item = RemoveItem((int32)0)) != NULL)
delete item;
}
Modified: trunk/Vision/src/NetworkPrefsView.cpp
===================================================================
--- trunk/Vision/src/NetworkPrefsView.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/NetworkPrefsView.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -1,21 +1,21 @@
-/*
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Vision.
- *
+/*
+ * The contents of this file are subject to the Mozilla Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is Vision.
+ *
* The Initial Developer of the Original Code is The Vision Team.
* Portions created by The Vision Team are
* Copyright (C) 1999-2010 The Vision Team. All Rights
* Reserved.
- *
+ *
* Contributor(s): Rene Gollent
* Alan Ellis
*/
@@ -45,8 +45,8 @@
#include "SpeedButton.h"
#include "Vision.h"
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "NetworkPrefView"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "NetworkPrefView"
class InvokingTextView : public BTextView, public BInvoker
@@ -318,11 +318,11 @@
fTextView->SetText (autoexec);
else
fTextView->SetText ("");
-
+
uint32 altCount(0);
- int32 size;
+ ssize_t size;
const ServerData *data (NULL);
- for (int32 i = 0; msg.FindData("server", B_ANY_TYPE, i,
+ for (int32 i = 0; msg.FindData("server", B_ANY_TYPE, i,
reinterpret_cast<const void **>(&data), &size) == B_OK; i++)
{
if (data->state == 0)
@@ -342,7 +342,7 @@
int32 count (fListView->CountItems ()),
i (0);
for (i = 0; i < count; i++)
- delete (fListView->RemoveItem (0L));
+ delete (fListView->RemoveItem ((int32)0));
if ((msg.HasBool ("useDefaults") && msg.FindBool ("useDefaults")))
{
@@ -614,7 +614,7 @@
fActiveNetwork.AddBool ("lagCheck", value);
}
break;
-
+
case M_CONNECT_ON_STARTUP:
{
bool value = msg->FindInt32 ("be:value");
Modified: trunk/Vision/src/NetworkWindow.cpp
===================================================================
--- trunk/Vision/src/NetworkWindow.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/NetworkWindow.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -31,8 +31,8 @@
#include <stdio.h>
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "NetworkSetupWindow"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "NetworkSetupWindow"
NetworkWindow::NetworkWindow (void)
: BWindow (
Modified: trunk/Vision/src/NotifyList.cpp
===================================================================
--- trunk/Vision/src/NotifyList.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/NotifyList.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -1,16 +1,16 @@
-/*
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Vision.
- *
+/*
+ * The contents of this file are subject to the Mozilla Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is Vision.
+ *
* The Initial Developer of the Original Code is The Vision Team.
* Portions created by The Vision Team are
* Copyright (C) 1999-2010 The Vision Team. All Rights
@@ -33,8 +33,8 @@
#include "Vision.h"
#include "WindowList.h"
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "NotifyList"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "NotifyList"
NotifyList::NotifyList (BRect _frame)
: BListView (_frame,
@@ -53,11 +53,11 @@
SetViewColor (fActiveTheme->ForegroundAt (C_NOTIFYLIST_BACKGROUND));
fActiveTheme->ReadUnlock();
}
-
+
NotifyList::~NotifyList (void)
{
while (CountItems() > 0)
- delete RemoveItem (0L);
+ delete RemoveItem((int32)0);
delete fMyPopUp;
}
@@ -65,7 +65,7 @@
NotifyList::UpdateList(BObjectList<NotifyListItem> *newList)
{
while (CountItems() > 0)
- delete RemoveItem (0L);
+ delete RemoveItem ((int32)0);
BList updateList;
// make private copy of list items otherwise things go bad
for (int32 i = 0; i < newList->CountItems(); i++)
@@ -97,18 +97,18 @@
BMessage *inputMsg (Window()->CurrentMessage());
int32 mousebuttons (0),
keymodifiers (0);
-
+
NotifyListItem *item ((NotifyListItem *)ItemAt(selected));
if (!item)
return;
-
+
inputMsg->FindInt32 ("buttons", &mousebuttons);
inputMsg->FindInt32 ("modifiers", &keymodifiers);
-
+
bigtime_t sysTime;
msg->FindInt64 ("when", &sysTime);
uint16 clicks = CheckClickCount (myPoint, fLastClick, sysTime, fLastClickTime, fClickCount) % 3;
-
+
// slight kludge to make sure the expand/collapse triangles behave how they should
// -- needed since OutlineListView's Expand/Collapse-related functions are not virtual
if (mousebuttons == B_PRIMARY_MOUSE_BUTTON)
@@ -136,7 +136,7 @@
else
Select (selected);
}
-
+
if ((keymodifiers & B_SHIFT_KEY) == 0
&& (keymodifiers & B_OPTION_KEY) == 0
&& (keymodifiers & B_COMMAND_KEY) == 0
@@ -173,7 +173,7 @@
int index (CurrentSelection());
if (index < 0)
return;
-
+
NotifyListItem *item (dynamic_cast<NotifyListItem *>(ItemAt(index)));
if (item)
{
@@ -227,7 +227,7 @@
cWin->DispatchMessage (msg, cWin->pCwDock());
break;
}
-
+
case M_THEME_FOREGROUND_CHANGE:
{
int16 which (msg->FindInt16 ("which"));
@@ -240,7 +240,7 @@
fActiveTheme->ReadUnlock();
refresh = true;
break;
-
+
case C_NOTIFY_ON:
case C_NOTIFY_OFF:
case C_NOTIFYLIST_SELECTION:
@@ -264,7 +264,7 @@
}
}
break;
-
+
default:
BListView::MessageReceived (msg);
}
@@ -305,13 +305,13 @@
NotifyListItem::DrawItem (BView *father, BRect frame, bool complete)
{
Theme *fActiveTheme (vision_app->ActiveTheme());
-
+
fActiveTheme->ReadLock();
if (IsSelected())
{
father->SetHighColor (fActiveTheme->ForegroundAt (C_NOTIFYLIST_SELECTION));
- father->SetLowColor (fActiveTheme->ForegroundAt (C_NOTIFYLIST_BACKGROUND));
+ father->SetLowColor (fActiveTheme->ForegroundAt (C_NOTIFYLIST_BACKGROUND));
father->FillRect (frame);
}
else if (complete)
@@ -332,7 +332,7 @@
BString drawString (Text());
fActiveTheme->ReadUnlock();
-
+
father->SetHighColor (color);
father->SetDrawingMode (B_OP_OVER);
Modified: trunk/Vision/src/ParseCTCP.cpp
===================================================================
--- trunk/Vision/src/ParseCTCP.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ParseCTCP.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -32,8 +32,8 @@
#include "Utilities.h"
#include "ServerAgent.h"
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "ServerMessages"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "ServerMessages"
void
ServerAgent::ParseCTCP (BString theNick, BString theTarget, BString theMsg)
@@ -214,7 +214,7 @@
poss (GetWord (theMsg.String(), 5));
poss.RemoveLast("\1");
- off_t pos (0LL);
+ off_t pos ((int32)0L);
int32 i (0);
for (i = 0; i < poss.Length(); ++i)
pos = pos * 10 + poss[i] - '0';
@@ -251,7 +251,7 @@
port (GetWord (theMsg.String(), 4)),
poss (GetWord (theMsg.String(), 5));
poss.RemoveLast("\1");
- off_t pos (0LL);
+ off_t pos ((int32)0L);
for (int32 i = 0; i < poss.Length(); ++i)
pos = pos * 10 + poss[i] - '0';
Modified: trunk/Vision/src/ParseCmd.cpp
===================================================================
--- trunk/Vision/src/ParseCmd.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ParseCmd.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -53,8 +53,8 @@
#include "RunView.h"
#include "WindowList.h"
-#undef B_TRANSLATE_CONTEXT
-#define B_TRANSLATE_CONTEXT "CommandParser"
+#undef B_TRANSLATION_CONTEXT
+#define B_TRANSLATION_CONTEXT "CommandParser"
static void
DisplayCommandError(ClientAgent *agent, const char *commandName)
Modified: trunk/Vision/src/ParseENums.cpp
===================================================================
--- trunk/Vision/src/ParseENums.cpp 2011-11-12 03:20:28 UTC (rev 939)
+++ trunk/Vision/src/ParseENums.cpp 2012-08-21 22:47:56 UTC (rev 940)
@@ -1,21 +1,21 @@
-/*
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Vision.
- *
+/*
+ * The contents of this file are subject to the Mozilla Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND...
[truncated message content] |