From c404bf664da9d8bcfc264cc85dee1895c117e2b6 Mon Sep 17 00:00:00 2001 From: Nathan Bryant Date: Tue, 11 Jan 2000 22:51:42 +0000 Subject: [PATCH] * citclient.cpp: different IDEN string depending on __WXMSW__ etc. macros * hosts.cpp, prefs.cpp: pass FALSE to ini->Flush() as this is supposed to be the default but WX headers appear to lack the default on Windows * includes.hpp: renamed class DoChat to class ChatWindow -- WTF was it named like this? * main.cpp: load bitmaps from resouces if __WXMSW__ is defined * makefile.g95: add hosts.o * daphne.rc: new file; Windows resource definitions. right now just contains the bitmaps --- daphne/ChangeLog | 14 +++++++++++++- daphne/citclient.cpp | 12 +++++++++++- daphne/daphne.rc | 16 ++++++++++++++++ daphne/hosts.cpp | 4 +++- daphne/includes.hpp | 4 +++- daphne/main.cpp | 10 +++++++++- daphne/makefile.g95 | 2 +- daphne/prefs.cpp | 4 +++- 8 files changed, 59 insertions(+), 7 deletions(-) create mode 100644 daphne/daphne.rc diff --git a/daphne/ChangeLog b/daphne/ChangeLog index 9d623806e..9a2a734e2 100644 --- a/daphne/ChangeLog +++ b/daphne/ChangeLog @@ -1,4 +1,17 @@ $Log$ + Revision 1.16 2000/01/11 22:51:42 nbryant + * citclient.cpp: different IDEN string depending on __WXMSW__ etc. + macros + * hosts.cpp, prefs.cpp: pass FALSE to ini->Flush() as this is supposed + to be the default but WX headers appear to lack the default on + Windows + * includes.hpp: renamed class DoChat to class ChatWindow -- WTF was it + named like this? + * main.cpp: load bitmaps from resouces if __WXMSW__ is defined + * makefile.g95: add hosts.o + * daphne.rc: new file; Windows resource definitions. right now just + contains the bitmaps + Revision 1.15 2000/01/08 20:25:21 smw Fixed a condition in goto where the message window would eat itself prior to importing the messages, forcing daphne to crash. @@ -83,4 +96,3 @@ shut down the program. Revision 1.1 1999/11/07 17:56:38 ajc * Began the ChangeLog for this project. - diff --git a/daphne/citclient.cpp b/daphne/citclient.cpp index ef4e2fcc5..1625e8427 100644 --- a/daphne/citclient.cpp +++ b/daphne/citclient.cpp @@ -1,3 +1,5 @@ +// $Id$ + #include "includes.hpp" #include @@ -272,7 +274,15 @@ void CitClient::initialize_session(void) { CurrentRoom = ""; - sendcmd = "IDEN 0|6|001|Daphne"; +#ifdef __WXMSW__ + sendcmd = "IDEN 0|6|001|Daphne (Windows)"; +#elif defined(__WXGTK__) + sendcmd - "IDEN 0|6|001|Daphne (GTK)"; +#elif defined(__WXMOTIF__) + sendcmd = "IDEN 0|6|001|Daphne (Motif)"; +#else + sendcmd = "IDEN 0|6|001|Daphne (Unknown window system)"; +#endif serv_trans(sendcmd); sendcmd = "INFO"; diff --git a/daphne/daphne.rc b/daphne/daphne.rc new file mode 100644 index 000000000..131e93794 --- /dev/null +++ b/daphne/daphne.rc @@ -0,0 +1,16 @@ +// $Id$ + +chat BITMAP "bitmaps/chat.bmp" +floor BITMAP "bitmaps/floor.bmp" +globe BITMAP "bitmaps/globe.bmp" +goto BITMAP "bitmaps/goto.bmp" +mail BITMAP "bitmaps/mail.bmp" +mailroom BITMAP "bitmaps/mailroom.bmp" +newroom BITMAP "bitmaps/newroom.bmp" +oldroom BITMAP "bitmaps/oldroom.bmp" +root BITMAP "bitmaps/root.bmp" +who BITMAP "bitmaps/who.bmp" +xglobe BITMAP "bitmaps/xglobe.bmp" + +#include "wx/msw/wx.rc" + diff --git a/daphne/hosts.cpp b/daphne/hosts.cpp index ca99523bb..da3abfb71 100644 --- a/daphne/hosts.cpp +++ b/daphne/hosts.cpp @@ -1,3 +1,5 @@ +// $Id$ + // ========================================================================= // declarations // ========================================================================= @@ -151,6 +153,6 @@ void Hosts::OnButtonPressed(wxCommandEvent& whichbutton) { ini->Write("/BBSList/Host", server_host->GetValue()); ini->Write("/BBSList/Port", server_port->GetValue()); - ini->Flush(); + ini->Flush(FALSE); } } diff --git a/daphne/includes.hpp b/daphne/includes.hpp index e656445e2..76c1b8db4 100644 --- a/daphne/includes.hpp +++ b/daphne/includes.hpp @@ -1,3 +1,5 @@ +// $Id$ + #include // General-purpose wxWin header #include #include // TCP socket client @@ -189,7 +191,7 @@ private: }; // Just testing... -class DoChat : public wxMDIChildFrame { +class ChatWindow : public wxMDIChildFrame { public: ChatWindow(CitClient *sock, wxMDIParentFrame *MyMDI); private: diff --git a/daphne/main.cpp b/daphne/main.cpp index 0f765ea97..a66280a29 100644 --- a/daphne/main.cpp +++ b/daphne/main.cpp @@ -1,6 +1,7 @@ ///////////////////////////////////////////////////////////////////////////// // Name: main.cpp // Purpose: Main screen type thing +// Version: $Id$ ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -260,7 +261,14 @@ void MyFrame::InitToolBar(wxToolBar* toolBar) { #endif // Set up the toolbar icons (BMP is available on both GTK and MSW) -#ifndef __WXMOTIF__ +#ifdef __WXMSW__ + bitmaps[0] = new wxBitmap("globe", wxBITMAP_TYPE_BMP_RESOURCE); + bitmaps[1] = new wxBitmap("mail", wxBITMAP_TYPE_BMP_RESOURCE); + bitmaps[2] = new wxBitmap("who", wxBITMAP_TYPE_BMP_RESOURCE); + bitmaps[3] = new wxBitmap("chat", wxBITMAP_TYPE_BMP_RESOURCE); + bitmaps[4] = new wxBitmap("xglobe", wxBITMAP_TYPE_BMP_RESOURCE); + bitmaps[5] = new wxBitmap("goto", wxBITMAP_TYPE_BMP_RESOURCE); +#elif !defined(__WXMOTIF__) bitmaps[0] = new wxBitmap("/usr/local/share/bitmaps/globe.bmp", wxBITMAP_TYPE_BMP); bitmaps[1] = new wxBitmap("/usr/local/share/bitmaps/mail.bmp", wxBITMAP_TYPE_BMP); bitmaps[2] = new wxBitmap("/usr/local/share/bitmaps/who.bmp", wxBITMAP_TYPE_BMP); diff --git a/daphne/makefile.g95 b/daphne/makefile.g95 index a9271d365..638ad47b3 100644 --- a/daphne/makefile.g95 +++ b/daphne/makefile.g95 @@ -5,7 +5,7 @@ TARGET = daphne MY_OBJECTS = citclient.o enter.o express_message.o main.o message.o \ prefs.o roomtree.o roomview.o selectuser.o send_express.o \ - servprops.o testwindow.o userlogin.o \ + servprops.o testwindow.o userlogin.o hosts.o \ utils.o who.o OBJECTS = $(MY_OBJECTS) diff --git a/daphne/prefs.cpp b/daphne/prefs.cpp index 9cfeb2f65..4be582983 100644 --- a/daphne/prefs.cpp +++ b/daphne/prefs.cpp @@ -1,3 +1,5 @@ +// $Id$ + // ========================================================================= // declarations // ========================================================================= @@ -165,7 +167,7 @@ void Preferences::OnButtonPressed(wxCommandEvent& whichbutton) { ini->Write("/Citadel Server/ConnectOnStartup", ((server_autoconnect->GetValue()==TRUE) ? wxString("yes") : wxString("no"))); - ini->Flush(); + ini->Flush(FALSE); delete this; } } -- 2.39.2