[MPlayer-cvslog] r36147 - in trunk/gui: app/gui.h dialog/about.c dialog/equalizer.c dialog/fileselect.c dialog/msgbox.c dialog/playlist.c dialog/preferences.c dialog/skinbrowser.c dialog/url.c ui/main.c win32/gui.c...

ib subversion at mplayerhq.hu
Thu Apr 4 13:47:39 CEST 2013


Author: ib
Date: Thu Apr  4 13:47:39 2013
New Revision: 36147

Log:
Define "MPlayer" string.

Modified:
   trunk/gui/app/gui.h
   trunk/gui/dialog/about.c
   trunk/gui/dialog/equalizer.c
   trunk/gui/dialog/fileselect.c
   trunk/gui/dialog/msgbox.c
   trunk/gui/dialog/playlist.c
   trunk/gui/dialog/preferences.c
   trunk/gui/dialog/skinbrowser.c
   trunk/gui/dialog/url.c
   trunk/gui/ui/main.c
   trunk/gui/win32/gui.c
   trunk/gui/win32/gui.h
   trunk/gui/wm/ws.c

Modified: trunk/gui/app/gui.h
==============================================================================
--- trunk/gui/app/gui.h	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/app/gui.h	Thu Apr  4 13:47:39 2013	(r36147)
@@ -24,6 +24,9 @@
 #ifndef MPLAYER_GUI_GUI_H
 #define MPLAYER_GUI_GUI_H
 
+/// Name of the program the GUI utilizes
+#define MPlayer "MPlayer"
+
 //@{
 /// Boolean symbolic constant
 #if !defined(True) && !defined(False)

Modified: trunk/gui/dialog/about.c
==============================================================================
--- trunk/gui/dialog/about.c	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/dialog/about.c	Thu Apr  4 13:47:39 2013	(r36147)
@@ -18,6 +18,7 @@
 
 #include "config.h"
 #include "gui/app/app.h"
+#include "gui/app/gui.h"
 #include "help_mp.h"
 #include "version.h"
 
@@ -64,7 +65,7 @@ static GtkWidget * CreateAbout( void )
   gtk_window_set_title( GTK_WINDOW( About ),MSGTR_About );
   gtk_window_set_position( GTK_WINDOW( About ),GTK_WIN_POS_CENTER );
   gtk_window_set_policy( GTK_WINDOW( About ),TRUE,FALSE,FALSE );
-  gtk_window_set_wmclass( GTK_WINDOW( About ),"About","MPlayer" );
+  gtk_window_set_wmclass( GTK_WINDOW( About ),"About",MPlayer );
 
   gtk_widget_realize( About );
   gtkAddIcon( About );
@@ -98,7 +99,7 @@ static GtkWidget * CreateAbout( void )
 #endif
   gtk_widget_show( AboutText );
   gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText );
-  snprintf(title, sizeof(title), MP_TITLE, "MPlayer");
+  snprintf(title, sizeof(title), MP_TITLE, MPlayer);
 #ifdef CONFIG_GTK2
   gtk_text_buffer_insert (AboutTextBuffer, &iter, title, -1);
   gtk_text_buffer_insert (AboutTextBuffer, &iter,

Modified: trunk/gui/dialog/equalizer.c
==============================================================================
--- trunk/gui/dialog/equalizer.c	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/dialog/equalizer.c	Thu Apr  4 13:47:39 2013	(r36147)
@@ -28,6 +28,7 @@
 
 #include "gui/app/app.h"
 #include "gui/app/cfg.h"
+#include "gui/app/gui.h"
 #include "gui/interface.h"
 #include "help_mp.h"
 #include "libaf/equalizer.h"
@@ -262,7 +263,7 @@ static GtkWidget * CreateEqualizer( void
   gtk_window_set_title( GTK_WINDOW( Equalizer ),MSGTR_Equalizer );
   gtk_window_set_position( GTK_WINDOW( Equalizer ),GTK_WIN_POS_CENTER );
   gtk_window_set_policy( GTK_WINDOW( Equalizer ),FALSE,FALSE,FALSE );
-  gtk_window_set_wmclass( GTK_WINDOW( Equalizer ),"Equalizer","MPlayer" );
+  gtk_window_set_wmclass( GTK_WINDOW( Equalizer ),"Equalizer",MPlayer );
 
   gtk_widget_realize( Equalizer );
   gtkAddIcon( Equalizer );
@@ -593,7 +594,7 @@ GtkWidget * CreateEquConfig( void )
   gtk_window_set_position( GTK_WINDOW( EquConfig ),GTK_WIN_POS_CENTER );
 //  gtk_window_set_modal( GTK_WINDOW( EquConfig ),TRUE );
   gtk_window_set_policy( GTK_WINDOW( EquConfig ),FALSE,FALSE,FALSE );
-  gtk_window_set_wmclass( GTK_WINDOW( EquConfig ),"EquConfig","MPlayer" );
+  gtk_window_set_wmclass( GTK_WINDOW( EquConfig ),"EquConfig",MPlayer );
 
   gtk_widget_realize( EquConfig );
   gtkAddIcon( EquConfig );

Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/dialog/fileselect.c	Thu Apr  4 13:47:39 2013	(r36147)
@@ -611,7 +611,7 @@ static GtkWidget *CreateFileSelect(void)
     gtk_window_set_title(GTK_WINDOW(FileSelector), MSGTR_FileSelect);
     gtk_window_set_position(GTK_WINDOW(FileSelector), GTK_WIN_POS_CENTER);
     gtk_window_set_policy(GTK_WINDOW(FileSelector), TRUE, TRUE, TRUE);
-    gtk_window_set_wmclass(GTK_WINDOW(FileSelector), "FileSelect", "MPlayer");
+    gtk_window_set_wmclass(GTK_WINDOW(FileSelector), "FileSelect", MPlayer);
     fsColorMap = gdk_colormap_get_system();
 
     gtk_widget_realize(FileSelector);

Modified: trunk/gui/dialog/msgbox.c
==============================================================================
--- trunk/gui/dialog/msgbox.c	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/dialog/msgbox.c	Thu Apr  4 13:47:39 2013	(r36147)
@@ -19,6 +19,7 @@
 #include <string.h>
 
 #include "gui/app/app.h"
+#include "gui/app/gui.h"
 #include "help_mp.h"
 
 #include "pixmaps/error.xpm"
@@ -60,7 +61,7 @@ static GtkWidget * CreateMessageBox( voi
  gtk_window_set_position( GTK_WINDOW( MessageBox ),GTK_WIN_POS_CENTER );
  gtk_window_set_modal( GTK_WINDOW( MessageBox ),TRUE );
  gtk_window_set_policy( GTK_WINDOW( MessageBox ),TRUE,TRUE,FALSE );
- gtk_window_set_wmclass( GTK_WINDOW( MessageBox ),"Message","MPlayer" );
+ gtk_window_set_wmclass( GTK_WINDOW( MessageBox ),"Message",MPlayer );
 
  gtk_widget_realize( MessageBox );
  gtkAddIcon( MessageBox );

Modified: trunk/gui/dialog/playlist.c
==============================================================================
--- trunk/gui/dialog/playlist.c	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/dialog/playlist.c	Thu Apr  4 13:47:39 2013	(r36147)
@@ -449,7 +449,7 @@ static GtkWidget * CreatePlaylist( void 
   gtk_window_set_title( GTK_WINDOW( Playlist ),MSGTR_PlayList );
   gtk_window_set_position( GTK_WINDOW( Playlist ),GTK_WIN_POS_CENTER );
 //  gtk_window_set_policy( GTK_WINDOW( Playlist ),FALSE,FALSE,FALSE );
-  gtk_window_set_wmclass( GTK_WINDOW( Playlist ),"Playlist","MPlayer" );
+  gtk_window_set_wmclass( GTK_WINDOW( Playlist ),"Playlist",MPlayer );
 
   gtk_widget_realize( Playlist );
   gtkAddIcon( Playlist );

Modified: trunk/gui/dialog/preferences.c
==============================================================================
--- trunk/gui/dialog/preferences.c	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/dialog/preferences.c	Thu Apr  4 13:47:39 2013	(r36147)
@@ -568,7 +568,7 @@ static GtkWidget * CreatePreferences( vo
   gtk_window_set_title( GTK_WINDOW( Preferences ),MSGTR_Preferences );
   gtk_window_set_position( GTK_WINDOW( Preferences ),GTK_WIN_POS_CENTER );
 //  gtk_window_set_policy( GTK_WINDOW( Preferences ),FALSE,FALSE,FALSE );
-  gtk_window_set_wmclass( GTK_WINDOW( Preferences ),"Preferences","MPlayer" );
+  gtk_window_set_wmclass( GTK_WINDOW( Preferences ),"Preferences",MPlayer );
 
   gtk_widget_realize( Preferences );
   gtkAddIcon( Preferences );
@@ -1542,7 +1542,7 @@ static GtkWidget *CreateAudioConfig( voi
   gtk_window_set_title(GTK_WINDOW(AudioConfig), MSGTR_AudioPreferences);
   gtk_window_set_position(GTK_WINDOW(AudioConfig), GTK_WIN_POS_CENTER);
   gtk_window_set_policy(GTK_WINDOW(AudioConfig), FALSE, FALSE, FALSE);
-  gtk_window_set_wmclass(GTK_WINDOW(AudioConfig), "Audio Config", "MPlayer");
+  gtk_window_set_wmclass(GTK_WINDOW(AudioConfig), "Audio Config", MPlayer);
 
   gtk_widget_realize(AudioConfig);
   gtkAddIcon(AudioConfig);
@@ -1737,7 +1737,7 @@ GtkWidget * CreateDXR3Config( void )
  gtk_window_set_title( GTK_WINDOW( DXR3Config ),"DXR3/H+" );
  gtk_window_set_position( GTK_WINDOW( DXR3Config ),GTK_WIN_POS_CENTER );
  gtk_window_set_policy( GTK_WINDOW( DXR3Config ),FALSE,FALSE,FALSE );
- gtk_window_set_wmclass( GTK_WINDOW( DXR3Config ),"DXR3","MPlayer" );
+ gtk_window_set_wmclass( GTK_WINDOW( DXR3Config ),"DXR3",MPlayer );
 
  gtk_widget_realize( DXR3Config );
  gtkAddIcon( DXR3Config );

Modified: trunk/gui/dialog/skinbrowser.c
==============================================================================
--- trunk/gui/dialog/skinbrowser.c	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/dialog/skinbrowser.c	Thu Apr  4 13:47:39 2013	(r36147)
@@ -106,7 +106,7 @@ static GtkWidget * CreateSkinBrowser( vo
  gtk_window_set_title( GTK_WINDOW( SkinBrowser ),MSGTR_SkinBrowser );
  gtk_window_set_position( GTK_WINDOW( SkinBrowser ),GTK_WIN_POS_CENTER );
  gtk_window_set_policy( GTK_WINDOW( SkinBrowser ),FALSE,FALSE,TRUE );
- gtk_window_set_wmclass( GTK_WINDOW( SkinBrowser ),"SkinBrowser","MPlayer" );
+ gtk_window_set_wmclass( GTK_WINDOW( SkinBrowser ),"SkinBrowser",MPlayer );
 
  gtk_widget_realize( SkinBrowser );
  gtkAddIcon( SkinBrowser );

Modified: trunk/gui/dialog/url.c
==============================================================================
--- trunk/gui/dialog/url.c	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/dialog/url.c	Thu Apr  4 13:47:39 2013	(r36147)
@@ -25,6 +25,7 @@
 #include "tools.h"
 #include "gui/interface.h"
 #include "gui/app/app.h"
+#include "gui/app/gui.h"
 #include "gui/ui/actions.h"
 #include "gui/util/list.h"
 #include "gui/util/string.h"
@@ -90,7 +91,7 @@ static GtkWidget *CreateURLDialog(void)
     gtk_window_set_title(GTK_WINDOW(URLDialog), MSGTR_Network);
     gtk_window_set_position(GTK_WINDOW(URLDialog), GTK_WIN_POS_CENTER);
     gtk_window_set_policy(GTK_WINDOW(URLDialog), TRUE, TRUE, FALSE);
-    gtk_window_set_wmclass(GTK_WINDOW(URLDialog), "Network", "MPlayer");
+    gtk_window_set_wmclass(GTK_WINDOW(URLDialog), "Network", MPlayer);
 
     gtk_widget_realize(URLDialog);
     gtkAddIcon(URLDialog);

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/ui/main.c	Thu Apr  4 13:47:39 2013	(r36147)
@@ -349,7 +349,7 @@ void uiMainInit (void)
     mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
   }
 
-  wsWindowCreate(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, (guiApp.mainDecoration ? wsShowFrame : 0 ) | wsMinSize | wsMaxSize | wsHideWindow, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, "MPlayer");
+  wsWindowCreate(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, (guiApp.mainDecoration ? wsShowFrame : 0 ) | wsMinSize | wsMaxSize | wsHideWindow, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, MPlayer);
   mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[main] mainWindow ID: 0x%x\n", (int) guiApp.mainWindow.WindowID);
   wsWindowShape(&guiApp.mainWindow, guiApp.main.Mask.Image);
   wsWindowIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon);

Modified: trunk/gui/win32/gui.c
==============================================================================
--- trunk/gui/win32/gui.c	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/win32/gui.c	Thu Apr  4 13:47:39 2013	(r36147)
@@ -155,7 +155,7 @@ static void console_toggle(gui_t *gui)
         fp = freopen("con", "w", stdout);
         *stderr = *fp;
         setvbuf(stderr, NULL, _IONBF, 0);
-        print_version("MPlayer");
+        print_version(MPlayer);
         console_state = TRUE;
     }
 
@@ -186,7 +186,7 @@ void capitalize(char *fname)
 static void display_about_box(HWND hWnd)
 {
     char about_msg[512];
-    snprintf(about_msg, sizeof(about_msg), MP_TITLE "\n" COPYRIGHT, "MPlayer");
+    snprintf(about_msg, sizeof(about_msg), MP_TITLE "\n" COPYRIGHT, MPlayer);
     MessageBox(hWnd, about_msg, acp(MSGTR_About), MB_OK);
 }
 
@@ -1516,7 +1516,7 @@ int create_window(gui_t *gui, char *skin
     wc.hCursor = LoadCursor(NULL, IDC_ARROW);
     wc.hIcon = gui->icon;
     wc.hbrBackground = CreateSolidBrush(RGB(0, 0, 0));
-    wc.lpszClassName = gui->classname = "MPlayer";
+    wc.lpszClassName = gui->classname = MPlayer;
     wc.lpszMenuName = NULL;
     RegisterClass(&wc);
 
@@ -1552,7 +1552,7 @@ int create_window(gui_t *gui, char *skin
         gui_main_pos_y = y;
     }
 
-    gui->mainwindow = CreateWindowEx(0, gui->classname, "MPlayer", style,
+    gui->mainwindow = CreateWindowEx(0, gui->classname, MPlayer, style,
                                      x, y, rect.right-rect.left, rect.bottom-rect.top,
                                      NULL, NULL, instance, NULL);
 
@@ -1563,7 +1563,7 @@ int create_window(gui_t *gui, char *skin
     nid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
     nid.uCallbackMessage = WM_SYSTRAY;
     nid.hIcon = gui->icon;
-    strcpy(nid.szTip, "MPlayer");
+    strcpy(nid.szTip, MPlayer);
 
     /* register the systray icon */
     Shell_NotifyIcon(NIM_ADD, &nid);
@@ -1587,7 +1587,7 @@ gui_t *create_gui(char *skindir, void (*
 {
     gui_t *gui = calloc(1, sizeof(gui_t));
     char temp[MAX_PATH];
-    HWND runningmplayer = FindWindow("MPlayer", "MPlayer");
+    HWND runningmplayer = FindWindow(MPlayer, MPlayer);
 
     if(runningmplayer)
     {

Modified: trunk/gui/win32/gui.h
==============================================================================
--- trunk/gui/win32/gui.h	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/win32/gui.h	Thu Apr  4 13:47:39 2013	(r36147)
@@ -30,6 +30,9 @@
 #include "skinload.h"
 #include "playlist.h"
 
+/* Name of the program the GUI utilizes */
+#define MPlayer "MPlayer"
+
 extern float video_aspect;
 extern play_tree_t* playtree;
 extern int video_window;

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Thu Apr  4 12:53:20 2013	(r36146)
+++ trunk/gui/wm/ws.c	Thu Apr  4 13:47:39 2013	(r36147)
@@ -28,6 +28,7 @@
 #include "ws.h"
 #include "wsxdnd.h"
 #include "gui/interface.h"
+#include "gui/app/gui.h"
 
 #include "config.h"
 #include "help_mp.h"
@@ -861,9 +862,9 @@ void wsWindowCreate(wsWindow *win, int x
                                   win->VisualInfo.visual,
                                   win->WindowMask, &win->WindowAttrib);
 
-    wsClassHint.res_name = "MPlayer";
+    wsClassHint.res_name = MPlayer;
 
-    wsClassHint.res_class = "MPlayer";
+    wsClassHint.res_class = MPlayer;
     XSetClassHint(wsDisplay, win->WindowID, &wsClassHint);
 
     wsWindowSizeHint(win);


More information about the MPlayer-cvslog mailing list