- $Log$
- Revision 1.8 1999/11/12 00:49:05 smw
- Updated README. Tweaked zip slightly. Started mods for Chat and for
- 'reply to' mail.
+$Log$
+Revision 1.9 1999/11/15 04:19:18 smw
+Killed the refresh timer in who.cpp
+Updated the who function so that refreshes are no longer automated, but
+WILL work when clicking on 'refresh' on the who window.
+who_refresh had a timer which wasn't stoppable, which would, when
+connecting to another bbs, continue running and then core dump.
+Removed the read new button from roomview. It wasn't necessary as new
+messages dump automatically.
+
+Revision 1.8 1999/11/12 00:49:05 smw
+Updated README. Tweaked zip slightly. Started mods for Chat and for
+'reply to' mail.
Revision 1.7 1999/11/11 05:41:38 smw
Another zap tweak: After zapping a room the user is taken directly to the
// wxBeginBusyCursor();
serv_puts(command);
-
+/*
if (IsConnected() == FALSE) {
wxSleep(20); // Give a crashed server some time to restart
reconnect_session();
serv_puts(command);
- }
+ } */
serv_gets(response);
};
-
// Global server properties
class ServProps : public wxMDIChildFrame {
// Kill the client connection and don't destroy Daphne
citadel->detach();
- BigMDI->SetStatusText("Not connected");
- delete TheWholist;
+ BigMDI->SetStatusText("Not connected", 0);
RoomList->DeleteAllItems();
-}
-
+ BigMDI->SetStatusText("", 1);
+ BigMDI->SetStatusText("", 2);
+ }
+
// Edit menu handler
if (citadel->IsConnected()==FALSE) {
wxMessageBox("You are not connected to a BBS.");
} else
-
new RoomView(citadel, this, RoomList->GetNextRoom());
}
}
RI_NOTHING,
RI_ROOM,
RI_CURRUSER,
- RI_SERVPROPS,
- RI_ZAPPED
+ RI_SERVPROPS
+/* RI_ZAPPED */
};
wxTreeItemId prev;
int i, pos, floornum, where;
int mailfloor;
- int zapfloor;
+/* int zapfloor; */
unsigned int roomflags;
prev = null_item;
}
- // Create a bogus floor for zapped rooms
+/* // Create a bogus floor for zapped rooms
zapfloor = AppendItem(
GetRootItem(),
);
}
-
+*/
wxTreeItemId sp = AppendItem(
GetRootItem(),
RoomList->LoadRoomList();
break;
- case RI_ZAPPED:
+/* case RI_ZAPPED:
RoomList->DeleteAllItems();
RoomList->LoadRoomList();
- break;
+ break; */
case RI_SERVPROPS:
BUTTON_GOTO,
BUTTON_SKIP,
BUTTON_CLOSE,
- BUTTON_READNEW,
+/* BUTTON_READNEW, */
BUTTON_READALL,
BUTTON_ENTER,
- BUTTON_ZAP
+ BUTTON_ZAP
};
EVT_BUTTON( BUTTON_GOTO, RoomView::OnButtonPressed)
EVT_BUTTON( BUTTON_SKIP, RoomView::OnButtonPressed)
EVT_BUTTON( BUTTON_CLOSE, RoomView::OnButtonPressed)
- EVT_BUTTON( BUTTON_READNEW, RoomView::OnButtonPressed)
+/* EVT_BUTTON( BUTTON_READNEW, RoomView::OnButtonPressed)*/
EVT_BUTTON( BUTTON_READALL, RoomView::OnButtonPressed)
EVT_BUTTON( BUTTON_ENTER, RoomView::OnButtonPressed)
- EVT_BUTTON( BUTTON_ZAP, RoomView::OnButtonPressed)
+ EVT_BUTTON( BUTTON_ZAP, RoomView::OnButtonPressed)
END_EVENT_TABLE()
g3->right.LeftOf(goto_button, 3);
skip_button->SetConstraints(g3);
- wxButton *readnew_button = new wxButton(
+/* wxButton *readnew_button = new wxButton(
this,
BUTTON_READNEW,
" Read new ",
- wxDefaultPosition);
+ wxDefaultPosition);
wxLayoutConstraints *c2 = new wxLayoutConstraints;
c2->top.SameAs(skip_button, wxTop);
c2->bottom.SameAs(skip_button, wxBottom);
c2->width.AsIs();
c2->right.LeftOf(skip_button, 3);
- readnew_button->SetConstraints(c2);
+ readnew_button->SetConstraints(c2); */
wxButton *readall_button = new wxButton(
this,
wxDefaultPosition);
wxLayoutConstraints *c3 = new wxLayoutConstraints;
- c3->top.SameAs(readnew_button, wxTop);
- c3->bottom.SameAs(readnew_button, wxBottom);
+ c3->top.SameAs(goto_button, wxTop);
+ c3->bottom.SameAs(goto_button, wxBottom);
c3->width.AsIs();
- c3->right.LeftOf(readnew_button, 3);
+ c3->right.LeftOf(goto_button, 3);
readall_button->SetConstraints(c3);
wxButton *enter_button = new wxButton(
if (whichbutton.GetId() == BUTTON_CLOSE) {
delete this;
- } else if (whichbutton.GetId() == BUTTON_READNEW) {
- do_readloop("MSGS NEW");
+/* } else if (whichbutton.GetId() == BUTTON_READNEW) {
+ do_readloop("MSGS NEW"); */
} else if (whichbutton.GetId() == BUTTON_READALL) {
do_readloop("MSGS ALL");
} else if (whichbutton.GetId() == BUTTON_ENTER) {
citsock->serv_trans(sendcmd, recvcmd, xferbuf, ThisRoom);
new RoomView(citsock, citMyMDI, "_BASEROOM_");
RoomList->LoadRoomList();
- delete this;
+ delete this;
}
}
banner->SetConstraints(b1);
wxStaticText *rname = new wxStaticText(banner, -1, citsock->HumanNode);
- rname->SetFont(wxFont(18, wxDEFAULT, wxNORMAL, wxNORMAL));
+ rname->SetFont(wxFont(16, wxDEFAULT, wxNORMAL, wxNORMAL));
rname->SetForegroundColour(wxColour(0xFF, 0xFF, 0x00));
wxLayoutConstraints *t2 = new wxLayoutConstraints;
t2->top.SameAs(banner, wxTop, 1);
// IDs for the controls and the menu commands
enum
{
- BUTTON_DISMISS
+ BUTTON_REFRESH,
+ BUTTON_CLOSE,
};
// ----------------------------------------------------------------------------
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE( who, wxMDIChildFrame)
+ EVT_BUTTON( BUTTON_REFRESH, who::OnButtonPressed)
+ EVT_BUTTON( BUTTON_CLOSE, who::OnButtonPressed)
END_EVENT_TABLE()
// ============================================================================
citsock = sock;
-
- who_refresh *ref = new who_refresh(this);
+ /*who_refresh *ref = new who_refresh(this);*/
// set the frame icon
/* SetIcon(wxICON(mondrian)); */
"wholist");
+ wxButton *refresh_button = new wxButton(
+ this,
+ BUTTON_REFRESH,
+ "Refresh",
+ wxPoint(100,100),
+ wxSize(100,30),
+ 0L,
+ wxDefaultValidator,
+ "refresh_button"
+ );
+
+ wxButton *close_button = new wxButton(
+ this,
+ BUTTON_CLOSE,
+ "Close",
+ wxPoint(200,200),
+ wxSize(100,30),
+ 0L,
+ wxDefaultValidator,
+ "close_button"
+ );
+
+
wxLayoutConstraints *c1 = new wxLayoutConstraints;
c1->top.SameAs(this, wxTop, 10); // 10 from the top
c1->bottom.SameAs(this, wxBottom, 10);
- c1->left.SameAs(this, wxLeft, 10);
+ c1->left.SameAs(this, wxLeft, 10);
c1->right.SameAs(this, wxRight, 10);
wholist->SetConstraints(c1);
c2->centreX.SameAs(this, wxCentreX);
c2->height.AsIs(); c2->width.AsIs();
+ wxLayoutConstraints *b1 = new wxLayoutConstraints;
+ b1->bottom.SameAs(this, wxBottom, 2);
+ b1->height.AsIs();
+ b1->width.AsIs();
+ b1->right.SameAs(this, wxRight, 10);
+ close_button->SetConstraints(b1);
+
+ wxLayoutConstraints *b2 = new wxLayoutConstraints;
+ b2->bottom.SameAs(close_button, wxBottom);
+ b2->left.SameAs(this, wxLeft, 10);
+ b2->height.AsIs();
+ b2->width.AsIs();
+ refresh_button->SetConstraints(b2);
+
SetAutoLayout(TRUE);
Show(TRUE);
LoadWholist();
}
+void who::OnButtonPressed(wxCommandEvent& whichbutton) {
+
+
+ if (whichbutton.GetId() == BUTTON_CLOSE) {
+ wholist->DeleteAllItems();
+ delete this;
+}
+ if (whichbutton.GetId() == BUTTON_REFRESH) {
+ LoadWholist();
+}
+}
// Load up the control
void who::LoadWholist(void) {
wxString sess, user, room, host;
wxStringTokenizer *wl;
+ if (wholist==NULL) {
+ return; }
+ if (citadel->IsConnected()==FALSE) {
+ wxMessageBox("You are not connected to a BBS.");
+ return;
+ } else
+
+
sendcmd = "RWHO";
if (citsock->serv_trans(sendcmd, recvcmd, rwho) != 1) return;
wholist->DeleteAllItems();
-
+/*
who_refresh::who_refresh(who *parent_who)
: wxTimer() {
+ if (citadel->IsConnected()==FALSE) {
+ Stop();
+ delete this;
+ } else
+
which_who = parent_who; // Know which instance to refresh
Start(30000, FALSE); // Call every 30 seconds
-}
+} */
-void who_refresh::Notify(void) {
+/*void who_refresh::Notify(void) {
+
which_who->LoadWholist();
-}
+} */