]> code.citadel.org Git - citadel.git/commitdiff
finished off enter and got stuff in wwtt ewerk rg zz sl mustsleep...
authorArt Cancro <ajc@citadel.org>
Fri, 9 Apr 1999 04:08:35 +0000 (04:08 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 9 Apr 1999 04:08:35 +0000 (04:08 +0000)
daphne/citclient.cpp
daphne/enter.cpp
daphne/includes.hpp
daphne/userlogin.cpp
daphne/utils.cpp

index e430f524bf8536f0950ad1eaa0c150f37bbef44b..2b7b4b7f748aedd12c7c4ef125b0e7003501892e 100644 (file)
@@ -114,7 +114,6 @@ int CitClient::serv_trans(
        } else if (first_digit == 4) {          // SEND_LISTING
                for (i=0; i<xferbuf.Number(); ++i) {
                        buf.Printf("%s", (wxString *)xferbuf.Nth(i)->GetData());
-                       cout << i << ": " << buf << "\n";
                        serv_puts(buf);
                }
                serv_puts("000");
index a2570a700279470be464b080bc663605a15a9726..70e7016cfffbcb1db82aad4e6f709868de0ca148 100644 (file)
@@ -56,12 +56,36 @@ EnterMessage::EnterMessage(
        c2->width.AsIs();
        save_button->SetConstraints(c2);
 
+
+
+       wxStaticText *fromlabel = new wxStaticText(this, -1, "From: ");
+
+       wxLayoutConstraints *c6 = new wxLayoutConstraints;
+       c6->top.SameAs(this, wxTop, 12);
+       c6->left.SameAs(this, wxLeft, 2);
+       c6->width.AsIs();
+       c6->height.AsIs();
+       fromlabel->SetConstraints(c6);
+
+       wxString posting_name_choices[] = {
+               citsock->curr_user
+               };
+       fromname = new wxChoice(this, -1,
+               wxDefaultPosition, wxSize(150,25), 1, posting_name_choices);
+
+       wxLayoutConstraints *c7 = new wxLayoutConstraints;
+       c7->bottom.SameAs(fromlabel, wxBottom);
+       c7->left.RightOf(fromlabel, 3);
+       c7->width.AsIs();
+       c7->height.AsIs();
+       fromname->SetConstraints(c7);
+
        TheMessage = new wxTextCtrl(this, -1, "",
                wxDefaultPosition, wxDefaultSize,
                wxTE_MULTILINE);
 
        wxLayoutConstraints *c9 = new wxLayoutConstraints;
-       c9->top.SameAs(this, wxTop, 2);
+       c9->top.SameAs(fromlabel, wxBottom, 2);
        c9->bottom.Above(cancel_button, -5);
        c9->left.SameAs(this, wxLeft, 2);
        c9->right.SameAs(this, wxRight, 2);
index 8aca428e8e09851f9d738b5beb6fe2f781688442..221de95b24f1ff236b3ffd2c2294244869c05281 100644 (file)
@@ -72,6 +72,10 @@ public:
        wxString MorePrompt;
        bool UseFloors;
        int PagingLevel;
+
+       // ... and about the user ...
+       wxString curr_user;
+       wxString curr_pass;
        
        // Stuff we have to keep track of ...
        wxString CurrentRoom;
@@ -238,6 +242,7 @@ private:
        CitClient *citsock;
        wxMDIParentFrame *citMyMDI;
        wxString ThisRoom;
+       wxChoice *fromname;
        wxTextCtrl *TheMessage;
        DECLARE_EVENT_TABLE()
 };
index 530e6341c22917549f6b18590f669196ffe63501..dceb4a946be42af786b4db5089f9915aea65d511 100644 (file)
@@ -266,6 +266,7 @@ void UserLogin::OnButtonPressed(wxCommandEvent& whichbutton) {
                                nopass.ShowModal();
                        } else {
                                BeginSession(recvbuf);
+                               citsock->curr_pass = password->GetValue();
                                delete this;    // dismiss the login box
                        }
                }
@@ -285,6 +286,7 @@ void UserLogin::OnButtonPressed(wxCommandEvent& whichbutton) {
                        sendbuf = "SETP " + password->GetValue();
                        citsock->serv_trans(sendbuf);
                        BeginSession(recvbuf);
+                       citsock->curr_pass = password->GetValue();
                        delete this;            // dismiss the login box
                }
        }
@@ -293,10 +295,10 @@ void UserLogin::OnButtonPressed(wxCommandEvent& whichbutton) {
 
 
 void UserLogin::BeginSession(wxString serv_response) {
-       wxString junk, username;
+       wxString junk;
 
-       extract(username, serv_response.Mid(4), 0);
-       BigMDI->SetStatusText(username, 1);
+       extract(citsock->curr_user, serv_response.Mid(4), 0);
+       BigMDI->SetStatusText(citsock->curr_user, 1);
        citsock->GotoRoom("_BASEROOM_", "", junk);
 
        // FIX ... add code here to perform registration if necessary
index 437b0caf67f6b5d1dbdc83ab8a34a5db2ee05c9e..496d2439462098508628ff85aa43a6fe0d54afbd 100644 (file)
@@ -54,7 +54,6 @@ void MultilineToList(wxStringList& outputlist, wxString inputbuf) {
        }
 DONE:  for (i=0; i<outputlist.Number(); ++i) {
                buf.Printf("%s", (wxString *)outputlist.Nth(i)->GetData());
-               cout << i << ": " << buf << "\n";
        }
 }