]> code.citadel.org Git - citadel.git/commitdiff
Restabilized 'goto'.
authorSteve Williams <patriot@uncensored.citadel.org>
Sat, 8 Jan 2000 20:02:43 +0000 (20:02 +0000)
committerSteve Williams <patriot@uncensored.citadel.org>
Sat, 8 Jan 2000 20:02:43 +0000 (20:02 +0000)
Started adding support for adding your own list of BBSes to choose from.

daphne/ChangeLog
daphne/Makefile
daphne/includes.hpp
daphne/main.cpp
daphne/roomview.cpp
daphne/userlogin.cpp
daphne/who.cpp

index 1c2703ee080d18819b4697c214e556f3bcc8fe60..21ee2b8511bb4fff2fcda454c15c787d060c441f 100644 (file)
@@ -1,15 +1,19 @@
  $Log$
- Revision 1.12  1999/12/15 03:01:07  smw
- Changed 'enter' so that it ONLY asks for a recipient when in mail.
- Changed goto so that it no longer deletes the message window when clicked
- on.  This results in a potential infinitate number of room menus, which
- I'll fix when I have time.  This was the ONLY instability.  Previously
- clicking on goto (in the menu, the arrow button OR the 'goto' button) more
- than once would cause the program to crash.  That's no longer the case.
- The *ix version is now stable.
+ Revision 1.13  2000/01/08 20:02:43  smw
+ Restabilized 'goto'.
+ Started adding support for adding your own list of BBSes to choose from.
 
- Fixed various problems in the MSW version, which will be released only in
- executable form when stabilized.
+Revision 1.12  1999/12/15 03:01:07  smw
+Changed 'enter' so that it ONLY asks for a recipient when in mail.
+Changed goto so that it no longer deletes the message window when clicked
+on.  This results in a potential infinitate number of room menus, which
+I'll fix when I have time.  This was the ONLY instability.  Previously
+clicking on goto (in the menu, the arrow button OR the 'goto' button) more
+than once would cause the program to crash.  That's no longer the case.
+The *ix version is now stable.
+
+Fixed various problems in the MSW version, which will be released only in
+executable form when stabilized.
 
 Revision 1.11  1999/11/15 05:22:11  smw
 On disconnect, changed the SetStatusText() to "" for 1, and 2 to blank
index a3b40fb7ff7d9777b13471a03755f8b0414c9491..5e55cae8f2b1fe18838ec38e5300933df800d515 100644 (file)
@@ -11,18 +11,18 @@ all: daphne
 
 daphne: main.o citclient.o userlogin.o testwindow.o who.o \
        utils.o express_message.o send_express.o prefs.o \
-       roomtree.o roomview.o message.o enter.o \
+       roomtree.o roomview.o message.o enter.o hosts.o \
        selectuser.o servprops.o 
        c++ main.o citclient.o userlogin.o testwindow.o who.o \
        utils.o express_message.o send_express.o prefs.o \
-       roomtree.o roomview.o message.o enter.o \
+       roomtree.o roomview.o message.o enter.o hosts.o\
        selectuser.o servprops.o\
        $(LFLAGS) -o daphne
 
 install: 
        
        install -m 755 daphne /usr/local/bin/./
-       install bitmaps/*.xpm /usr/local/share/bitmaps
-       install bitmaps/*.bmp /usr/local/share/bitmaps
+       install -c bitmaps/*.xpm /usr/local/share/bitmaps
+       install -c bitmaps/*.bmp /usr/local/share/bitmaps
 clean:
        rm -f *.o core daphne
index 03b944dcd53b10ac2750cd4c0e52e331a9d2bf1d..e656445e274ae7b3906272e57bb5aecc2a1b8d7a 100644 (file)
@@ -159,6 +159,19 @@ private:
 
 
 
+class Hosts : public wxMDIChildFrame {
+public:
+        Hosts(    CitClient *sock, 
+                        wxMDIParentFrame *MyMDI);
+private:
+        void OnButtonPressed(wxCommandEvent& whichbutton);
+        CitClient *citsock;
+        wxMDIParentFrame *citMyMDI;
+        wxTextCtrl *server_host, *server_port;
+        wxCheckBox *server_autoconnect;
+        DECLARE_EVENT_TABLE()
+};
+
 // Just testing...
 class TestWindow : public wxMDIChildFrame {
 public:
index e0e92c2fa9d027bc6bd2c067c9fbee2f806d529b..0f765ea9726b17c96c3e70bab0968f1956131a4e 100644 (file)
@@ -24,7 +24,6 @@ wxMDIParentFrame *BigMDI;
 RoomTree *RoomList;
 wxConfig *ini;
 
-
 // ----------------------------------------------------------------------------
 // private classes
 // ----------------------------------------------------------------------------
@@ -88,6 +87,7 @@ enum
        MENU_CONNECT,
        MENU_TESTWIN,
        EMENU_PREFS,
+       EMENU_HOSTS,
        UMENU_WHO,
        UMENU_SEND_EXPRESS,
        RMENU_GOTO,
@@ -110,6 +110,7 @@ BEGIN_EVENT_TABLE(  MyFrame, wxMDIParentFrame)
        EVT_MENU(       IG_About,               MyFrame::OnAbout)
        EVT_MENU(       MENU_CONNECT,           MyFrame::OnConnect)
        EVT_MENU(       EMENU_PREFS,            MyFrame::OnEditMenu)
+       EVT_MENU(       EMENU_HOSTS,            MyFrame::OnEditMenu)
        EVT_MENU(       GOTO_MAIL,              MyFrame::OnGotoMail)
        EVT_MENU(       MENU_TESTWIN,           MyFrame::OnTestWin)
        EVT_MENU(       UMENU_WHO,              MyFrame::OnUsersMenu)
@@ -150,6 +151,7 @@ bool Daphne::OnInit()
        ini->Read("/Window Sizes/Main", &sizestr, "789 451");
        sscanf((const char *)sizestr, "%d %d", &w, &h);
 
+
        // Connect to the server
        citadel = new CitClient();
 
@@ -206,7 +208,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
 
        wxMenu *menuEdit = new wxMenu;
        menuEdit->Append(EMENU_PREFS, "&Preferences...");
-
+       menuEdit->Append(EMENU_HOSTS, "&BBSes to log into");
        wxMenu *menuUsers = new wxMenu;
        menuUsers->Append(UMENU_WHO, "&Who is online?");
        menuUsers->Append(UMENU_SEND_EXPRESS, "&Page another user");
@@ -380,6 +382,9 @@ void MyFrame::OnEditMenu(wxCommandEvent& cmd) {
        if (id == EMENU_PREFS) {
                new Preferences(citadel, this);
        }
+       else if (id == EMENU_HOSTS) {
+               new Hosts(citadel, this);
+       }
 }
 
 
index 3f03aea1c9ff9df1b334a1367e43ba97b36bc455..622ee21ffda7115a915722dd8eff377926a0d093 100644 (file)
@@ -253,6 +253,7 @@ void RoomView::OnButtonPressed(wxCommandEvent& whichbutton) {
                wxMessageBox("You are not connected to a BBS.");
                return;
                } else
+               delete this;
                sendcmd = "SLRP HIGHEST";       // mark messages as read
                citsock->serv_trans(sendcmd, recvcmd, xferbuf, ThisRoom);
                new RoomView(citsock, citMyMDI, RoomList->GetNextRoom());
@@ -271,6 +272,7 @@ void RoomView::OnButtonPressed(wxCommandEvent& whichbutton) {
 
 
 void RoomView::do_readloop(wxString readcmd) {
+
        wxString sendcmd, recvcmd, buf, allmsgs;
        wxString xferbuf;
         int i, r, pos;
@@ -278,13 +280,7 @@ void RoomView::do_readloop(wxString readcmd) {
        
         if (citadel->IsConnected()==FALSE) {
                 wxMessageBox("You have lost your connection.");
-        } else
-  
-       if (message_window != NULL) {
-               delete message_window;
-               message_window = NULL;
-       }
-
+        } 
 
        // Transmit the "read messages" command
        sendcmd = readcmd;
@@ -318,8 +314,6 @@ void RoomView::do_readloop(wxString readcmd) {
                                                citsock->NodeName);
                allmsgs += message->msgtext;
 
-               delete message;
-
                allmsgs += "<HR>";
                
                }
@@ -338,6 +332,7 @@ void RoomView::do_readloop(wxString readcmd) {
 
        message_window->SetPage(allmsgs);
         Layout();
+
 }
 
 
index da78a2bdc4ca5388c82166c96e2973a284f0f281..98a711cf476678a451234c3ecb19f8d4f0bec540 100644 (file)
@@ -211,10 +211,10 @@ UserLogin::UserLogin(CitClient *sock, wxMDIParentFrame *MyMDI)
 
        sendcmd = "MESG hello";
        if (citsock->serv_trans(sendcmd, recvcmd, xferbuf)==1) {
-               variformat_to_html(buf, xferbuf, FALSE);
-               buf = "<HTML><BODY><CENTER>"
-                       + buf + "</CENTER></BODY></HTML>\n";
-               hello->SetPage(buf);
+               variformat_to_html(buf, xferbuf, FALSE); 
+               buf = "<HTML><font size=-1><BODY>"
+                       + buf + "</BODY></HTML></font>\n"; 
+               hello->SetPage(buf); 
        }
 
        username->SetFocus();
index 8476fa63336d075723eeaed8ef1ae601d8796581..b5eceb896f41f0b7cf760a5a77f51a58495fd28e 100644 (file)
@@ -55,7 +55,8 @@ who::who(CitClient *sock, wxMDIParentFrame *MyMDI)
        citsock = sock;
 
 
-       /*who_refresh *ref = new who_refresh(this);*/
+/*     who_refresh *ref = new who_refresh(this); 
+       if(!this) { delete this; }  */
 
        // set the frame icon
        /* SetIcon(wxICON(mondrian)); */
@@ -182,23 +183,25 @@ void who::LoadWholist(void) {
 
 
 
-/*
-who_refresh::who_refresh(who *parent_who)
+
+/*who_refresh::who_refresh(who *parent_who)
        : wxTimer() {
 
+               if(!this) {
                if (citadel->IsConnected()==FALSE) {
-               Stop();
+               Stop(); 
                delete this;
-        } else
+        } else 
 
        which_who = parent_who;         // Know which instance to refresh
 
-       Start(30000, FALSE);            // Call every 30 seconds
-} */
+       Start(15000, FALSE);            // Call every 30 seconds
+} 
 
 
-/*void who_refresh::Notify(void)  {
+void who_refresh::Notify(void)  {
 
        which_who->LoadWholist();
-} */
+} 
 
+*/