it only asks for a recipient in Mail.
Remove delete this; in button_goto (roomview.cpp), as it was causing
daphne to crash if goto was clicked more than once. Unfortunately this
results in a potentially infinite number of room windows open at once,
but as this was the MAIN instability issue with the Linux version it had
to be dealt with.
Worked more on the windows port. Executable is unstable and will be
worked on this week. unfortunately wxWindows is not nearly as portable as
stated and I'll have to learn a whole new set of commands to deal with the
MSW port. Getting there though.
.SUFFIXES: .cpp .o .hpp
.cpp.o:
- c++ $(CFLAGS) -c -lwine $<
+ c++ $(CFLAGS) -c $<
daphne: main.o citclient.o userlogin.o testwindow.o who.o \
sock->SetNotify(0);
sock->Connect(addr, TRUE);
if (sock->IsConnected()) {
-/* cout << "Connect succeeded\n" ; */
serv_gets(ServerReady);
initialize_session();
curr_host = host; // Remember host and port, in case
curr_port = port; // we need to auto-reconnect later
return(0);
} else {
- /* cout << "Connect failed\n" ;*/
return(1);
}
}
if (nl_pos < 0) {
sock->Read(&charbuf[nbytes], (sizeof(charbuf)-nbytes) );
nbytes += sock->LastCount();
- /* cout << "Read " << sock->LastCount() << " bytes \n";*/
}
for (i=nbytes; i>=0; --i)
if (charbuf[i] == 10) nl_pos = i;
GetLine(sock, buf);
*/
-/* cout << "> " << buf << "(len=" << buf.Len() << ")\n"; */
}
// Write a line of text to the server
void CitClient::serv_puts(wxString buf) {
- /* cout << "< " << buf << "\n" ; */
sock->Write((const char *)buf, buf.Len());
sock->Write("\n", 1);
}
// If a mutex is to be wrapped around this function in the future,
// it must begin HERE.
-/* cout << "Beginning transaction\n"; */
Critter.Enter();
// wxBeginBusyCursor();
// If a mutex is to be wrapped around this function in the future,
// it must end HERE.
-/* cout << "Ending transaction...\n"; */
// wxEndBusyCursor();
Critter.Leave();
-/* cout << "...done.\n"; */
if (express_messages_waiting) {
download_express_messages();
}
-/* cout << "serv_trans() returning " << first_digit << "\n"; */
return first_digit;
}
if (attach(curr_host, curr_port) != 0) {
// FIX do this more elegantly
- /* cout << "Could not re-establish session (1)\n"; */
}
sendcmd = "USER " + curr_user;
if (serv_trans(sendcmd) != 3) {
// FIX do this more elegantly
- /* cout << "Could not re-establish session (2)\n"; */
}
sendcmd = "PASS " + curr_pass;
if (serv_trans(sendcmd) != 2) {
// FIX do this more elegantly
- /* cout << "Could not re-establish session (3)\n"; */
}
}
// frame constructor
EnterMessage::EnterMessage(
- CitClient *sock, wxMDIParentFrame *MyMDI,
- wxString roomname, unsigned int roomflags)
+ CitClient *sock,
+ wxMDIParentFrame *MyMDI,
+ wxString roomname,
+ unsigned int roomflags)
+
: wxMDIChildFrame(MyMDI, //parent
-1, //window id
roomname + ": enter message",
" Save ",
wxDefaultPosition);
+
wxLayoutConstraints *c2 = new wxLayoutConstraints;
c2->bottom.SameAs(cancel_button, wxBottom);
c2->right.LeftOf(cancel_button, 5);
c6->height.AsIs();
fromlabel->SetConstraints(c6);
- wxString posting_name_choices[2];
+ wxString posting_name_choices[2];
int num_choices;
if (roomflags & QR_ANONONLY) {
// There may also be the opportunity to present a recipient.
- // FIX ... disable this if we're not in a mail room
+ // FIX ... disable this if we're not in a mail room
+ // Fixed, smw - 12/14/99
+
+ if (roomname == "Mail") {
wxStaticText *tolabel = new wxStaticText(this, -1, "To: ");
wxLayoutConstraints *c8 = new wxLayoutConstraints;
d1->height.AsIs();
findrecp->SetConstraints(d1);
-
+}
// The main portion of this screen is a text entry box.
class EnterMessage : public wxMDIChildFrame {
public:
- EnterMessage(CitClient *sock, wxMDIParentFrame *MyMDI,
- wxString roomname, unsigned int roomflags);
+ EnterMessage(CitClient *sock,
+ wxMDIParentFrame *MyMDI,
+ wxString roomname, unsigned int roomflags);
private:
void OnCancel(wxCommandEvent& whichbutton);
void OnSave(wxCommandEvent& whichbutton);
sendcmd = "SLRP HIGHEST"; // mark messages as read
citsock->serv_trans(sendcmd, recvcmd, xferbuf, ThisRoom);
new RoomView(citsock, citMyMDI, RoomList->GetNextRoom());
- delete this;
} else if (whichbutton.GetId() == BUTTON_ZAP) {
if (citadel->IsConnected()==FALSE) {
wxMessageBox("You are not connected to a BBS.");
allmsgs = "<HTML><BODY>";
i = 0;
while (pos = xferbuf.Find('\n', FALSE), (pos >= 0)) {
-
+
buf.Printf("Reading message %d", ++i);
citMyMDI->SetStatusText(buf, 0);
wxYield();
-
+
buf = xferbuf.Left(pos);
xferbuf = xferbuf.Mid(pos+1);
delete message;
allmsgs += "<HR>";
- }
+
+ }
+
citMyMDI->SetStatusText("Done", 0);
allmsgs += "</BODY></HTML>";