changeset 34092:dbf5042ab255

Don't use the Windows style path separator character in Win32 GUI. We use the Unix style path separator character throughout everywhere else, so use it here as well. Although Cygwin and MinGW tolerate a mixed Unix and Windows style, it beautifies the messages.
author ib
date Thu, 06 Oct 2011 12:09:05 +0000
parents 954f6d044371
children b37fbbc09921
files gui/win32/dialogs.c gui/win32/gui.c gui/win32/playlist.c gui/win32/skinload.c
diffstat 4 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/gui/win32/dialogs.c	Thu Oct 06 10:04:40 2011 +0000
+++ b/gui/win32/dialogs.c	Thu Oct 06 12:09:05 2011 +0000
@@ -129,7 +129,7 @@
             filespec = &fileopen.lpstrFile[fileopen.nFileOffset];
             filename[0] = 0;
             strcat(filename, directory);
-            strcat(filename, "\\");
+            strcat(filename, "/");
             strcat(filename, filespec);
 
             if (GetFileAttributes(filename) & FILE_ATTRIBUTE_DIRECTORY)
@@ -712,7 +712,7 @@
                         SendMessage(listbox, LB_GETTEXT, (WPARAM) index, (LPARAM) skinName);
                         /* fill out the full pathname to the skin */
                         strcpy(skinspath, get_path("skins"));
-                        strcat(skinspath, "\\");
+                        strcat(skinspath, "/");
                         strcat(skinspath, skinName);
                         ShowWindow(hwnd, SW_HIDE);
                         Shell_NotifyIcon(NIM_DELETE, &nid);
--- a/gui/win32/gui.c	Thu Oct 06 10:04:40 2011 +0000
+++ b/gui/win32/gui.c	Thu Oct 06 12:09:05 2011 +0000
@@ -1036,14 +1036,14 @@
                             } else {
                                 HANDLE searchhndl;
                                 WIN32_FIND_DATA finddata;
-                                sprintf(searchpath, "%smpegav\\*.dat", device + pos);
+                                sprintf(searchpath, "%smpegav/*.dat", device + pos);
                                 if((searchhndl=FindFirstFile(searchpath, &finddata)) != INVALID_HANDLE_VALUE)
                                 {
                                     mp_msg(MSGT_GPLAYER,MSGL_V, "Opening VCD/SVCD\n");
                                     gui->playlist->clear_playlist(gui->playlist);
                                     do
                                     {
-                                        sprintf(filename, "%smpegav\\%s", device + pos, finddata.cFileName);
+                                        sprintf(filename, "%smpegav/%s", device + pos, finddata.cFileName);
                                         gui->playlist->add_track(gui->playlist, filename, NULL, NULL, 0);
                                     }
                                     while(FindNextFile(searchhndl, &finddata));
@@ -1552,7 +1552,7 @@
     /* create playlist */
     gui->playlist = create_playlist();
 
-    sprintf(temp, "%s\\%s", skindir, skinName);
+    sprintf(temp, "%s/%s", skindir, skinName);
     if(create_window(gui, temp)) return NULL;
     if(create_subwindow(gui)) return NULL;
     if(console) console_toggle();
--- a/gui/win32/playlist.c	Thu Oct 06 10:04:40 2011 +0000
+++ b/gui/win32/playlist.c	Thu Oct 06 12:09:05 2011 +0000
@@ -36,7 +36,7 @@
     char findpath[MAX_PATH], filename[MAX_PATH];
     char *filepart;
 
-    sprintf(findpath, "%s\\*.*", path);
+    sprintf(findpath, "%s/*.*", path);
 
     findHandle = FindFirstFile(findpath, &finddata);
 
@@ -44,7 +44,7 @@
     do
     {
         if (finddata.cFileName[0] == '.' || strstr(finddata.cFileName, "Thumbs.db")) continue;
-        sprintf(findpath, "%s\\%s", path, finddata.cFileName);
+        sprintf(findpath, "%s/%s", path, finddata.cFileName);
 
         if (GetFileAttributes(findpath) & FILE_ATTRIBUTE_DIRECTORY)
         {
--- a/gui/win32/skinload.c	Thu Oct 06 10:04:40 2011 +0000
+++ b/gui/win32/skinload.c	Thu Oct 06 12:09:05 2011 +0000
@@ -120,7 +120,7 @@
     if(!(fp = fopen(fname, "rb")))
     {
         filename = calloc(1, strlen(skin->skindir) + strlen(fname) + 6);
-        sprintf(filename, "%s\\%s.png", skin->skindir, fname);
+        sprintf(filename, "%s/%s.png", skin->skindir, fname);
         if(!(fp = fopen(filename, "rb")))
         {
             mp_msg(MSGT_GPLAYER, MSGL_ERR, "[png] cannot find image %s\n", filename);
@@ -509,7 +509,7 @@
         char *tmp = calloc(1, MAX_LINESIZE);
         char *desc = calloc(1, MAX_LINESIZE);
         filename = calloc(1, strlen(skin->skindir) + strlen(skin->fonts[x]->name) + 6);
-        sprintf(filename, "%s\\%s.fnt", skin->skindir, skin->fonts[x]->name);
+        sprintf(filename, "%s/%s.fnt", skin->skindir, skin->fonts[x]->name);
         if(!(fp = fopen(filename,"rb")))
         {
             mp_msg(MSGT_GPLAYER, MSGL_ERR, "[FONT LOAD] Font not found \"%s\"\n", skin->fonts[x]->name);
@@ -601,7 +601,7 @@
     skin->skindir = strdup(skindir);
 
     filename = calloc(1, strlen(skin->skindir) + strlen("skin") + 2);
-    sprintf(filename, "%s\\skin", skin->skindir);
+    sprintf(filename, "%s/skin", skin->skindir);
     if(!(fp = fopen(filename, "rb")))
     {
         mp_msg(MSGT_GPLAYER, MSGL_FATAL, "[SKIN LOAD] Skin \"%s\" not found\n", skindir);