/////////////////////////////////////////////////////////////////////////////
-// 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;
NULL);
}
-extern void wxDoChangeFont(WXWidget widget, wxFont& font)
+extern void wxDoChangeFont(WXWidget widget, const wxFont& font)
{
// Lesstif 0.87 hangs here, but 0.93 does not; MBN: sometimes it does
#if !wxCHECK_LESSTIF() // || wxCHECK_LESSTIF_VERSION( 0, 93 )
XtVaSetValues( w,
wxFont::GetFontTag(), font.GetFontTypeC( XtDisplay(w) ),
NULL );
+#else
+ wxUnusedVar(widget);
+ wxUnusedVar(font);
#endif
}
// Creates a bitmap with transparent areas drawn in
// the given colour.
-wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, wxColour& colour)
+wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, const wxColour& colour)
{
wxBitmap newBitmap(bitmap.GetWidth(),
bitmap.GetHeight(),