wxMotif for OS/2 adjustements. Source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: utils.cpp
|
||||
// Name: src/motif/utils.cpp
|
||||
// Purpose: Various utilities
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -180,7 +180,7 @@ static char * GetIniFile (char *dest, const char *filename)
|
||||
{
|
||||
strcpy(dest, filename);
|
||||
}
|
||||
else if ((home = wxGetUserHome("")) != NULL)
|
||||
else if ((home = wxGetUserHome()) != NULL)
|
||||
{
|
||||
strcpy(dest, home);
|
||||
if (dest[strlen(dest) - 1] != '/')
|
||||
@@ -314,7 +314,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value,
|
||||
|
||||
XrmDatabase database;
|
||||
|
||||
if (file != "")
|
||||
if (!file.empty())
|
||||
{
|
||||
char buffer[500];
|
||||
|
||||
@@ -454,7 +454,7 @@ void wxXMergeDatabases (wxApp * theApp, Display * display)
|
||||
environment = GetIniFile (filename, NULL);
|
||||
len = strlen (environment);
|
||||
wxString hostname = wxGetHostName();
|
||||
if ( !!hostname )
|
||||
if ( !hostname.empty() )
|
||||
strncat(environment, hostname, 1024 - len);
|
||||
}
|
||||
homeDB = XrmGetFileDatabase (environment);
|
||||
@@ -667,9 +667,9 @@ void wxHSVToXColor(wxHSV *hsv,XColor *rgb)
|
||||
case 4: r = t, g = p, b = v; break;
|
||||
case 5: r = v, g = p, b = q; break;
|
||||
}
|
||||
rgb->red = r << 8;
|
||||
rgb->green = g << 8;
|
||||
rgb->blue = b << 8;
|
||||
rgb->red = (unsigned short)(r << 8);
|
||||
rgb->green = (unsigned short)(g << 8);
|
||||
rgb->blue = (unsigned short)(b << 8);
|
||||
}
|
||||
|
||||
void wxXColorToHSV(wxHSV *hsv,XColor *rgb)
|
||||
@@ -811,6 +811,7 @@ char wxFindMnemonic (const char *s)
|
||||
char* wxFindAccelerator( const char *s )
|
||||
{
|
||||
#if 1
|
||||
wxUnusedVar(s);
|
||||
// VZ: this function returns incorrect keysym which completely breaks kbd
|
||||
// handling
|
||||
return NULL;
|
||||
@@ -878,6 +879,7 @@ char* wxFindAccelerator( const char *s )
|
||||
XmString wxFindAcceleratorText (const char *s)
|
||||
{
|
||||
#if 1
|
||||
wxUnusedVar(s);
|
||||
// VZ: this function returns incorrect keysym which completely breaks kbd
|
||||
// handling
|
||||
return NULL;
|
||||
@@ -934,6 +936,9 @@ extern void wxDoChangeFont(WXWidget widget, const wxFont& font)
|
||||
XtVaSetValues( w,
|
||||
wxFont::GetFontTag(), font.GetFontTypeC( XtDisplay(w) ),
|
||||
NULL );
|
||||
#else
|
||||
wxUnusedVar(widget);
|
||||
wxUnusedVar(font);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user