[MPlayer-dev-eng] [PATCH] windows gui about box

Alexander Strasser eclipse7 at gmx.net
Sun Aug 28 23:10:23 CEST 2011


Hi Stephen!

Stephen Sheldon wrote:
> The windows gui does not have an about box.  The messages are defined, but not
> handled.  There is even code to draw the about box.  I wanted to see the
> mplayer version, so I changed the string to be displayed from COPYRIGHT to
> MP_TITLE, which has a more generic and up-to-date copyright statement.

  Yes, would be nice to have.

> Index: gui/win32/gui.c
> ===================================================================
> --- gui/win32/gui.c	(revision 34026)
> +++ gui/win32/gui.c	(working copy)
> @@ -46,6 +46,7 @@
>  #include "gui/util/mem.h"
>  #include "gui.h"
>  #include "dialogs.h"
> +#include "version.h"
>  
>  // HACK around bug in old mingw
>  #undef INVALID_FILE_ATTRIBUTES
> @@ -128,6 +129,12 @@
>              filename[i] = tolower(filename[i]);
>      }
>  }
> +static void display_about_box(HWND hWnd)
> +{
> +    char about_msg[512];
> +    sprintf (about_msg, MP_TITLE, "MPlayer");
> +    MessageBox(hWnd, about_msg, "About", MB_OK);
> +}

  I would rather use snprintf here. You could also
get rid of the spurious space between the function
call parenthesis and the function name.

[...]

  Alexander


More information about the MPlayer-dev-eng mailing list