delete wxTheApp;
wxTheApp = (wxApp*) NULL;
+ wxSystemSettings::Done();
+
+ delete[] wxBuffer;
+
+ wxClassInfo::CleanUpClasses();
+
/* check for memory leaks */
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
if (wxDebugContext::CountObjectsLeft() > 0)
wxLog *oldLog = wxLog::SetActiveTarget( (wxLog*) NULL );
if (oldLog) delete oldLog;
-
- wxSystemSettings::Done();
-
- wxClassInfo::CleanUpClasses();
-
- delete[] wxBuffer;
}
wxLog *wxApp::CreateLogTarget()
static char *GetResourcePath(char *buf, char *name, bool create)
{
- if (create && FileExists(name)) {
+ if (create && FileExists(name))
+ {
strcpy(buf, name);
return buf; // Exists so ...
}
if (*name == '/')
strcpy(buf, name);
- else {
+ else
+ {
// Put in standard place for resource files if not absolute
strcpy(buf, DEFAULT_XRESOURCE_DIR);
strcat(buf, "/");
strcat(buf, FileNameFromPath(name));
}
- if (create) {
+ if (create)
+ {
// Touch the file to create it
FILE *fd = fopen(buf, "w");
if (fd) fclose(fd);
// window when the server initializes and loaded into the display
// structure on XOpenDisplay;
// if not defined, use .Xdefaults
- if (XResourceManagerString(GDK_DISPLAY()) != NULL) {
+ if (XResourceManagerString(GDK_DISPLAY()) != NULL)
+ {
serverDB = XrmGetStringDatabase(XResourceManagerString(GDK_DISPLAY()));
- } else {
+ }
+ else
+ {
(void)GetIniFile(filename, (char *) NULL);
serverDB = XrmGetFileDatabase(filename);
}
// Open XENVIRONMENT file, or if not defined, the .Xdefaults,
// and merge into existing database
- if ((environment = getenv("XENVIRONMENT")) == NULL) {
+ if ((environment = getenv("XENVIRONMENT")) == NULL)
+ {
size_t len;
environment = GetIniFile(filename, (const char *) NULL);
len = strlen(environment);
wxXMergeDatabases();
XrmDatabase database;
- if ( !file.IsEmpty() ) {
+ if (!file.IsEmpty())
+ {
char buffer[500];
// Is this right? Trying to get it to look in the user's
// home directory instead of current directory -- JACS
bool success = XrmGetResource(database, buf, "*", str_type, &xvalue);
// Try different combinations of upper/lower case, just in case...
- if (!success) {
+ if (!success)
+ {
buf[0] = (isupper(buf[0]) ? tolower(buf[0]) : toupper(buf[0]));
success = XrmGetResource(database, buf, "*", str_type, &xvalue);
}
- if (success) {
+ if (success)
+ {
if (*value)
delete[] *value;
*value = new char[xvalue.size + 1];
{
char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
- if (succ) {
+ if (succ)
+ {
*value = (float)strtod(s, (char **) NULL);
delete[]s;
return TRUE;
{
char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
- if (succ) {
+ if (succ)
+ {
*value = strtol(s, (char **) NULL, 10);
delete[]s;
return TRUE;
{
char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
- if (succ) {
+ if (succ)
+ {
// Handle True, False here
// True, Yes, Enables, Set or Activated
if (*s == 'T' || *s == 'Y' || *s == 'E' || *s == 'S' || *s == 'A')
{
parent->m_sizeSet = FALSE;
}
+
+ if (parent->m_windowStyle & wxTAB_TRAVERSAL)
+ {
+ /* we now allow a window to get the focus as long as it
+ doesn't have any children. */
+ GTK_WIDGET_UNSET_FLAGS( parent->m_wxwindow, GTK_CAN_FOCUS );
+ }
}
//-----------------------------------------------------------------------------
gtk_viewport_set_shadow_type( viewport, GTK_SHADOW_NONE );
}
- if ((m_windowStyle & wxTAB_TRAVERSAL) != 0)
+ if (m_windowStyle & wxTAB_TRAVERSAL)
{
- GTK_WIDGET_SET_FLAGS( m_wxwindow, GTK_CAN_FOCUS ); /* changed from UNSET */
+ /* we now allow a window to get the focus as long as it
+ doesn't have any children. */
+ GTK_WIDGET_SET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
m_acceptsFocus = FALSE;
}
else
delete wxTheApp;
wxTheApp = (wxApp*) NULL;
+ wxSystemSettings::Done();
+
+ delete[] wxBuffer;
+
+ wxClassInfo::CleanUpClasses();
+
/* check for memory leaks */
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
if (wxDebugContext::CountObjectsLeft() > 0)
wxLog *oldLog = wxLog::SetActiveTarget( (wxLog*) NULL );
if (oldLog) delete oldLog;
-
- wxSystemSettings::Done();
-
- wxClassInfo::CleanUpClasses();
-
- delete[] wxBuffer;
}
wxLog *wxApp::CreateLogTarget()
static char *GetResourcePath(char *buf, char *name, bool create)
{
- if (create && FileExists(name)) {
+ if (create && FileExists(name))
+ {
strcpy(buf, name);
return buf; // Exists so ...
}
if (*name == '/')
strcpy(buf, name);
- else {
+ else
+ {
// Put in standard place for resource files if not absolute
strcpy(buf, DEFAULT_XRESOURCE_DIR);
strcat(buf, "/");
strcat(buf, FileNameFromPath(name));
}
- if (create) {
+ if (create)
+ {
// Touch the file to create it
FILE *fd = fopen(buf, "w");
if (fd) fclose(fd);
// window when the server initializes and loaded into the display
// structure on XOpenDisplay;
// if not defined, use .Xdefaults
- if (XResourceManagerString(GDK_DISPLAY()) != NULL) {
+ if (XResourceManagerString(GDK_DISPLAY()) != NULL)
+ {
serverDB = XrmGetStringDatabase(XResourceManagerString(GDK_DISPLAY()));
- } else {
+ }
+ else
+ {
(void)GetIniFile(filename, (char *) NULL);
serverDB = XrmGetFileDatabase(filename);
}
// Open XENVIRONMENT file, or if not defined, the .Xdefaults,
// and merge into existing database
- if ((environment = getenv("XENVIRONMENT")) == NULL) {
+ if ((environment = getenv("XENVIRONMENT")) == NULL)
+ {
size_t len;
environment = GetIniFile(filename, (const char *) NULL);
len = strlen(environment);
wxXMergeDatabases();
XrmDatabase database;
- if ( !file.IsEmpty() ) {
+ if (!file.IsEmpty())
+ {
char buffer[500];
// Is this right? Trying to get it to look in the user's
// home directory instead of current directory -- JACS
bool success = XrmGetResource(database, buf, "*", str_type, &xvalue);
// Try different combinations of upper/lower case, just in case...
- if (!success) {
+ if (!success)
+ {
buf[0] = (isupper(buf[0]) ? tolower(buf[0]) : toupper(buf[0]));
success = XrmGetResource(database, buf, "*", str_type, &xvalue);
}
- if (success) {
+ if (success)
+ {
if (*value)
delete[] *value;
*value = new char[xvalue.size + 1];
{
char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
- if (succ) {
+ if (succ)
+ {
*value = (float)strtod(s, (char **) NULL);
delete[]s;
return TRUE;
{
char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
- if (succ) {
+ if (succ)
+ {
*value = strtol(s, (char **) NULL, 10);
delete[]s;
return TRUE;
{
char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
- if (succ) {
+ if (succ)
+ {
// Handle True, False here
// True, Yes, Enables, Set or Activated
if (*s == 'T' || *s == 'Y' || *s == 'E' || *s == 'S' || *s == 'A')
{
parent->m_sizeSet = FALSE;
}
+
+ if (parent->m_windowStyle & wxTAB_TRAVERSAL)
+ {
+ /* we now allow a window to get the focus as long as it
+ doesn't have any children. */
+ GTK_WIDGET_UNSET_FLAGS( parent->m_wxwindow, GTK_CAN_FOCUS );
+ }
}
//-----------------------------------------------------------------------------
gtk_viewport_set_shadow_type( viewport, GTK_SHADOW_NONE );
}
- if ((m_windowStyle & wxTAB_TRAVERSAL) != 0)
+ if (m_windowStyle & wxTAB_TRAVERSAL)
{
- GTK_WIDGET_SET_FLAGS( m_wxwindow, GTK_CAN_FOCUS ); /* changed from UNSET */
+ /* we now allow a window to get the focus as long as it
+ doesn't have any children. */
+ GTK_WIDGET_SET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
m_acceptsFocus = FALSE;
}
else