/////////////////////////////////////////////////////////////////////////////
-// Name: utils.cpp
+// Name: src/motif/utils.cpp
// Purpose: Various utilities
// Author: Julian Smart
// Modified by:
{
strcpy(dest, filename);
}
- else if ((home = wxGetUserHome("")) != NULL)
+ else if ((home = wxGetUserHome()) != NULL)
{
strcpy(dest, home);
if (dest[strlen(dest) - 1] != '/')
XrmDatabase database;
- if (file != "")
+ if (!file.empty())
{
char buffer[500];
environment = GetIniFile (filename, NULL);
len = strlen (environment);
wxString hostname = wxGetHostName();
- if ( !!hostname )
+ if ( !hostname.empty() )
strncat(environment, hostname, 1024 - len);
}
homeDB = XrmGetFileDatabase (environment);
*x = xev.x_root;
*y = xev.y_root;
#endif
-};
+}
// Return true if we have a colour display
bool wxColourDisplay()
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)
char* wxFindAccelerator( const char *s )
{
#if 1
+ wxUnusedVar(s);
// VZ: this function returns incorrect keysym which completely breaks kbd
// handling
return NULL;
XmString wxFindAcceleratorText (const char *s)
{
#if 1
+ wxUnusedVar(s);
// VZ: this function returns incorrect keysym which completely breaks kbd
// handling
return NULL;
XtVaSetValues( w,
wxFont::GetFontTag(), font.GetFontTypeC( XtDisplay(w) ),
NULL );
+#else
+ wxUnusedVar(widget);
+ wxUnusedVar(font);
#endif
}