Fix to parser.y to make it compile with makefile.unx; wxFileConfig

adds a / to user path if necessary; OGL sample cleans itself up;
wxLog fixes in app.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-11-15 21:53:27 +00:00
parent 43a1889865
commit f57fe24c63
14 changed files with 85 additions and 17 deletions

View File

@@ -114,6 +114,9 @@ wxString wxFileConfig::GetLocalDir()
wxGetHomeDir(&strDir);
if (strDir.Last() != '/' && strDir.Last() != '\\')
strDir += "/";
return strDir;
}

View File

@@ -124,7 +124,7 @@ arg1 : WORD
%%
#if defined(__WXGTK__) || defined(__WXMOTIF__)
#if (defined(__WXGTK__) || defined(__WXMOTIF__)) && !defined(NO_CONFIGURE)
#include "lexer.c"
#else
#include "../common/lex_yy.c"

View File

@@ -70,7 +70,7 @@ void wxStartTimer(void)
{
#if defined(__xlC__) || defined(__AIX__) || defined(__SVR4__) || defined(__SYSV__) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) // || defined(__AIXV3__)
struct timeval tp;
#ifdef __SYSV__
#if defined(__SYSV__) || (defined (__GNUWIN32__) && !defined (__MINGW32__))
gettimeofday(&tp, (struct timezone *)NULL);
#else
gettimeofday(&tp);
@@ -94,7 +94,7 @@ long wxGetElapsedTime(bool resetTimer)
{
#if defined(__xlC__) || defined(__AIX__) || defined(__SVR4__) || defined(__SYSV__) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) // || defined(__AIXV3__)
struct timeval tp;
#ifdef __SYSV__
#if defined(__SYSV__) || (defined (__GNUWIN32__) && !defined (__MINGW32__))
gettimeofday(&tp, (struct timezone *)NULL);
#else
gettimeofday(&tp);
@@ -190,7 +190,7 @@ long wxGetCurrentTime(void)
{
#if defined(__xlC__) || defined(__AIX__) || defined(__SVR4__) || defined(__SYSV__) // || defined(__AIXV3__)
struct timeval tp;
#ifdef __SYSV__
#if defined(__SYSV__) || (defined (__GNUWIN32__) && !defined (__MINGW32__))
gettimeofday(&tp, (struct timezone *)NULL);
#else
gettimeofday(&tp);

View File

@@ -8,4 +8,4 @@ $(PROGRAM)$(GUISUFFIX): $(OBJECTS) $(WXLIB)
$(CC) $(LDFLAGS) -o $(PROGRAM)$(GUISUFFIX) $(OBJECTS) $(LDLIBS)
clean:
rm -f $(OBJECTS) minimal$(GUISUFFIX) core
rm -f $(OBJECTS) $(PROGRAM)$(GUISUFFIX) core

View File

@@ -197,6 +197,14 @@ int wxEntry( int argc, char *argv[] )
if (wxTheApp->Initialized()) retValue = wxTheApp->OnRun();
// flush the logged messages if any
wxLog *pLog = wxLog::GetActiveTarget();
if ( pLog != NULL && pLog->HasPendingMessages() )
pLog->Flush();
delete wxLog::SetActiveTarget(new wxLogStderr); // So dialog boxes aren't used
// for further messages
if (wxTheApp->GetTopWindow())
{
delete wxTheApp->GetTopWindow();
@@ -206,6 +214,7 @@ int wxEntry( int argc, char *argv[] )
wxTheApp->DeletePendingObjects();
wxTheApp->OnExit();
wxApp::CleanUp();
@@ -294,7 +303,7 @@ void wxApp::ProcessXEvent(WXEvent* _event)
{
XEvent* event = (XEvent*) _event;
if (CheckForAccelerator(_event))
if ((event->type == KeyPress) && CheckForAccelerator(_event))
{
// Do nothing! We intercepted and processed the event as an accelerator.
return;

View File

@@ -198,7 +198,7 @@ $(WXLIB) : $(OBJECTS)
$(RANLIB) $@
../common/y_tab.$(OBJSUFF): ../common/y_tab.c ../common/lex_yy.c
$(CCLEX) -c $(CFLAGS) -o $@ ../common/y_tab.c
$(CCLEX) -c $(CFLAGS) -DNO_CONFIGURE -o $@ ../common/y_tab.c
# Replace lex with flex if you run into compilation
# problems with lex_yy.c. See also note about LEX_SCANNER

View File

@@ -2217,6 +2217,30 @@ void wxCanvasInputEvent (Widget drawingArea, XtPointer data, XmDrawingAreaCallba
local_event = *(cbs->event); // We must keep a copy!
/*
switch (local_event.xany.type)
{
case EnterNotify:
cout << "EnterNotify\n";
break;
case LeaveNotify:
cout << "LeaveNotify\n";
break;
case ButtonPress:
cout << "ButtonPress\n";
break;
case ButtonRelease:
cout << "ButtonRelease\n";
break;
case MotionNotify:
cout << "MotionNotify\n";
break;
default:
cout << "Something else\n";
break;
}
*/
switch (local_event.xany.type)
{
case EnterNotify:

View File

@@ -568,6 +568,13 @@ int wxEntry(WXHINSTANCE hInstance,
}
wxTheApp->OnExit();
// flush the logged messages if any
wxLog *pLog = wxLog::GetActiveTarget();
if ( pLog != NULL && pLog->HasPendingMessages() )
pLog->Flush();
wxApp::CleanUp();
delete wxTheApp;

View File

@@ -40,10 +40,6 @@
#ifdef __GNUWIN32__
#include <sys/unistd.h>
#include <sys/stat.h>
#ifndef __MINGW32__
#include <std.h>
#endif //MINGW32
#endif //GNUWIN32
#include "wx/log.h"