winefile: merge changes from audited repository

------------------------------------------------------------------------
r108 | martinf | 2006-02-12 17:59:54 +0100 (So, 12 Feb 2006) | 1 line

winefile: don't compile Wine specific functions
------------------------------------------------------------------------
r84 | martinf | 2006-02-04 11:04:41 +0100 (Sa, 04 Feb 2006) | 8 lines

winefile-Sync to Wine:
Aric Stewart <aric@codeweavers.com>
winefile: Highlight the file specified on the command line instead of
filtering based on it. To be integrated with explorer to allow for
that functionality.
Mike McCormack <mike@codeweavers.com>
winefile: Move the license and warranty text into the resources.

------------------------------------------------------------------------
r82 | martinf | 2006-02-04 10:02:15 +0100 (Sa, 04 Feb 2006) | 1 line

winefile: set output directory
------------------------------------------------------------------------
r72 | martinf | 2006-02-02 21:20:51 +0100 (Do, 02 Feb 2006) | 1 line

convert *.rbuild files into valid XML files by inserting XML headers and a <rbuild> root nodes
------------------------------------------------------------------------
r59 | martinf | 2006-01-30 23:41:28 +0100 (Mo, 30 Jan 2006) | 1 line

set properties and ros:history and ros:doc
------------------------------------------------------------------------
r37 | martinf | 2006-01-29 20:03:05 +0100 (So, 29 Jan 2006) | 1 line

set svn:eolstyle in *.rbuild files
------------------------------------------------------------------------
r31 | martinf | 2006-01-29 16:10:34 +0100 (So, 29 Jan 2006) | 2 lines

import Winefile into the new repository
(now including a VC8 project file)
------------------------------------------------------------------------

svn path=/trunk/; revision=21169
This commit is contained in:
Martin Fuchs 2006-02-19 22:20:41 +00:00
parent c0b40ffed2
commit 3fa7cc252d
11 changed files with 1423 additions and 78 deletions

View file

@ -264,3 +264,27 @@ STRINGTABLE
IDS_FREE_SPACE_FMT "%s of %s free"
}
STRINGTABLE
{
IDS_LICENSE_CAPTION, "LICENSE"
IDS_LICENSE,
"This library is free software; you can redistribute it and/or \
modify it under the terms of the GNU Lesser General Public \
License as published by the Free Software Foundation; either \
version 2.1 of the License, or (at your option) any later version.\n\
This library is distributed in the hope that it will be useful, \
but WITHOUT ANY WARRANTY; without even the implied warranty of \
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \
Lesser General Public License for more details.\n\
You should have received a copy of the GNU Lesser General Public \
License along with this library; if not, write to the Free Software \
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"
IDS_WARRANTY_CAPTION, "NO WARRANTY"
IDS_WARRANTY,
"This library is distributed in the hope that it will be useful, \
but WITHOUT ANY WARRANTY; without even the implied warranty of \
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \
Lesser General Public License for more details."
}

View file

@ -1,56 +0,0 @@
/*
* Copyright 2000 Martin Fuchs
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "winefile.h"
#ifdef __WINE__
static const CHAR LicenseCaption[] = "LICENSE";
static const CHAR License[] =
"This library is free software; you can redistribute it and/or "
"modify it under the terms of the GNU Lesser General Public "
"License as published by the Free Software Foundation; either "
"version 2.1 of the License, or (at your option) any later version.\n"
"This library is distributed in the hope that it will be useful, "
"but WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU "
"Lesser General Public License for more details.\n"
"You should have received a copy of the GNU Lesser General Public "
"License along with this library; if not, write to the Free Software "
"Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA";
static const CHAR NoWarrantyCaption[] = "NO WARRANTY";
static const CHAR NoWarranty[] =
"This library is distributed in the hope that it will be useful, "
"but WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU "
"Lesser General Public License for more details.";
VOID WineLicense(HWND hwnd)
{
MessageBoxA(hwnd, License, LicenseCaption, MB_ICONINFORMATION|MB_OK);
}
VOID WineWarranty(HWND hwnd)
{
MessageBoxA(hwnd, NoWarranty, NoWarrantyCaption, MB_ICONEXCLAMATION|MB_OK);
}
#endif

View file

@ -41,7 +41,7 @@ CFG=make_winefile - Win32 Debug
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW"
# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile-MinGW"
# PROP Rebuild_Opt "clean all"
# PROP Target_File "winefile.exe"
# PROP Bsc_Name ""
@ -62,7 +62,7 @@ CFG=make_winefile - Win32 Debug
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW DEBUG=1"
# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile-MinGW DEBUG=1"
# PROP Rebuild_Opt "clean all"
# PROP Target_File "winefile.exe"
# PROP Bsc_Name ""
@ -83,11 +83,11 @@ CFG=make_winefile - Win32 Debug
# Begin Source File
SOURCE=.\Makefile.MinGW
SOURCE=".\Makefile-MinGW"
# End Source File
# Begin Source File
SOURCE=.\winefile.xml
SOURCE=.\winefile.rbuild
# End Source File
# End Target
# End Project

View file

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="make_winefile"
ProjectGUID="{D5D64C37-5820-4EE1-9982-98A2CFFAC645}"
RootNamespace="make_winefile"
Keyword="MakeFileProj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="0"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="msdevfilt -gcc -pipe &quot;perl d:\tools\gSTLFilt.pl&quot; make -f Makefile-MinGW DEBUG=1"
ReBuildCommandLine="msdevfilt -gcc -pipe &quot;perl d:\tools\gSTLFilt.pl&quot; make -f Makefile-MinGW DEBUG=1 clean all"
CleanCommandLine=""
Output="winefile.exe"
PreprocessorDefinitions=""
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="0"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="msdevfilt -gcc -pipe &quot;perl d:\tools\gSTLFilt.pl&quot; make -f Makefile-MinGW"
ReBuildCommandLine="msdevfilt -gcc -pipe &quot;perl d:\tools\gSTLFilt.pl&quot; make -f Makefile-MinGW clean all"
CleanCommandLine=""
Output="winefile.exe"
PreprocessorDefinitions=""
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="Makefile-MinGW"
>
</File>
<File
RelativePath=".\winefile.rbuild"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -135,6 +135,11 @@
#define IDS_COL_SEC 1218
#define IDS_FREE_SPACE_FMT 1219
#define IDS_LICENSE_CAPTION 1300
#define IDS_LICENSE 1301
#define IDS_WARRANTY_CAPTION 1302
#define IDS_WARRANTY 1303
/* range for drive bar command ids: 0x9000..0x90FF */

View file

@ -239,6 +239,23 @@ static void display_network_error(HWND hwnd)
}
static VOID WineLicense(HWND Wnd)
{
TCHAR cap[20], text[1024];
LoadString(Globals.hInstance, IDS_LICENSE, text, 1024);
LoadString(Globals.hInstance, IDS_LICENSE_CAPTION, cap, 20);
MessageBox(Wnd, text, cap, MB_ICONINFORMATION | MB_OK);
}
static VOID WineWarranty(HWND Wnd)
{
TCHAR cap[20], text[1024];
LoadString(Globals.hInstance, IDS_WARRANTY, text, 1024);
LoadString(Globals.hInstance, IDS_WARRANTY_CAPTION, cap, 20);
MessageBox(Wnd, text, cap, MB_ICONEXCLAMATION | MB_OK);
}
#ifdef __WINE__
#ifdef UNICODE
@ -1125,7 +1142,7 @@ static int TypeOrderFromDirname(LPCTSTR name)
}
/* directories first... */
static int __cdecl compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA* fd2)
static int compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA* fd2)
{
int order1 = fd1->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY? TO_DIR: TO_FILE;
int order2 = fd2->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY? TO_DIR: TO_FILE;
@ -1140,7 +1157,7 @@ static int __cdecl compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA
}
static int __cdecl compareName(const void* arg1, const void* arg2)
static int compareName(const void* arg1, const void* arg2)
{
const WIN32_FIND_DATA* fd1 = &(*(const Entry* const*)arg1)->data;
const WIN32_FIND_DATA* fd2 = &(*(const Entry* const*)arg2)->data;
@ -1152,7 +1169,7 @@ static int __cdecl compareName(const void* arg1, const void* arg2)
return lstrcmpi(fd1->cFileName, fd2->cFileName);
}
static int __cdecl compareExt(const void* arg1, const void* arg2)
static int compareExt(const void* arg1, const void* arg2)
{
const WIN32_FIND_DATA* fd1 = &(*(const Entry* const*)arg1)->data;
const WIN32_FIND_DATA* fd2 = &(*(const Entry* const*)arg2)->data;
@ -1185,7 +1202,7 @@ static int __cdecl compareExt(const void* arg1, const void* arg2)
return lstrcmpi(name1, name2);
}
static int __cdecl compareSize(const void* arg1, const void* arg2)
static int compareSize(const void* arg1, const void* arg2)
{
const WIN32_FIND_DATA* fd1 = &(*(const Entry* const*)arg1)->data;
const WIN32_FIND_DATA* fd2 = &(*(const Entry* const*)arg2)->data;
@ -1206,7 +1223,7 @@ static int __cdecl compareSize(const void* arg1, const void* arg2)
return cmp<0? -1: cmp>0? 1: 0;
}
static int __cdecl compareDate(const void* arg1, const void* arg2)
static int compareDate(const void* arg1, const void* arg2)
{
const WIN32_FIND_DATA* fd1 = &(*(const Entry* const*)arg1)->data;
const WIN32_FIND_DATA* fd2 = &(*(const Entry* const*)arg2)->data;
@ -1219,7 +1236,7 @@ static int __cdecl compareDate(const void* arg1, const void* arg2)
}
static int (__cdecl *sortFunctions[])(const void* arg1, const void* arg2) = {
static int (*sortFunctions[])(const void* arg1, const void* arg2) = {
compareName, /* SORT_NAME */
compareExt, /* SORT_EXT */
compareSize, /* SORT_SIZE */
@ -1403,6 +1420,7 @@ enum TYPE_FILTER {
static ChildWnd* alloc_child_window(LPCTSTR path, LPITEMIDLIST pidl, HWND hwnd)
{
TCHAR drv[_MAX_DRIVE+1], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT];
TCHAR dir_path[MAX_PATH];
TCHAR b1[BUFFER_LEN];
const static TCHAR sAsterics[] = {'*', '\0'};
@ -1447,7 +1465,9 @@ static ChildWnd* alloc_child_window(LPCTSTR path, LPITEMIDLIST pidl, HWND hwnd)
root->entry.level = 0;
entry = read_tree(root, path, pidl, drv, child->sortOrder, hwnd);
lstrcpy(dir_path, drv);
lstrcat(dir_path, dir);
entry = read_tree(root, dir_path, pidl, drv, child->sortOrder, hwnd);
#ifdef _SHELL_FOLDERS
if (root->entry.etype == ET_SHELL)
@ -4779,6 +4799,36 @@ static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path)
Globals.prescan_node = FALSE;
UpdateWindow(Globals.hMainWnd);
if (path && path[0])
{
int index,count;
TCHAR drv[_MAX_DRIVE+1], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT];
TCHAR fullname[_MAX_FNAME+_MAX_EXT+1];
memset(name,0,sizeof(name));
memset(name,0,sizeof(ext));
_tsplitpath(path, drv, dir, name, ext);
if (name[0])
{
count = ListBox_GetCount(child->right.hwnd);
lstrcpy(fullname,name);
lstrcat(fullname,ext);
for (index = 0; index < count; index ++)
{
Entry* entry = (Entry*) ListBox_GetItemData(child->right.hwnd,
index);
if (lstrcmp(entry->data.cFileName,fullname)==0 ||
lstrcmp(entry->data.cAlternateFileName,fullname)==0)
{
ListBox_SetCurSel(child->right.hwnd, index);
SetFocus(child->right.hwnd);
break;
}
}
}
}
}
static void ExitInstance(void)

View file

@ -123,7 +123,7 @@ LINK32=link.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "winefileRelease"
# PROP Output_Dir "."
# PROP Intermediate_Dir "winefileRelease"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
@ -139,7 +139,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib comdlg32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib comdlg32.lib ole32.lib version.lib mpr.lib /nologo /subsystem:windows /machine:I386 /out:"winefileRelease/winefile-ansi.exe"
# ADD LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib comdlg32.lib ole32.lib version.lib mpr.lib /nologo /subsystem:windows /machine:I386 /out:"winefile-ansi.exe"
!ENDIF
@ -250,11 +250,6 @@ SOURCE=.\zh.rc
# End Group
# Begin Source File
SOURCE=.\license.c
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=.\resource.h
# End Source File
# Begin Source File

View file

@ -149,10 +149,6 @@ extern WINEFILE_GLOBALS Globals;
#ifdef __WINE__
extern void WineLicense(HWND hwnd);
extern void WineWarranty(HWND hwnd);
#ifdef UNICODE
extern void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext);
#define _tsplitpath _wsplitpath

View file

@ -0,0 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_winefile", "make_winefile.vcproj", "{D5D64C37-5820-4EE1-9982-98A2CFFAC645}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winefile", "winefile.vcproj", "{33A963F1-6C9A-4582-80E5-C6AAD0173499}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
Unicode Debug|Win32 = Unicode Debug|Win32
UNICODE Release|Win32 = UNICODE Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D5D64C37-5820-4EE1-9982-98A2CFFAC645}.Debug|Win32.ActiveCfg = Debug|Win32
{D5D64C37-5820-4EE1-9982-98A2CFFAC645}.Release|Win32.ActiveCfg = Release|Win32
{D5D64C37-5820-4EE1-9982-98A2CFFAC645}.Release|Win32.Build.0 = Release|Win32
{D5D64C37-5820-4EE1-9982-98A2CFFAC645}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
{D5D64C37-5820-4EE1-9982-98A2CFFAC645}.Unicode Debug|Win32.Build.0 = Debug|Win32
{D5D64C37-5820-4EE1-9982-98A2CFFAC645}.UNICODE Release|Win32.ActiveCfg = Release|Win32
{33A963F1-6C9A-4582-80E5-C6AAD0173499}.Debug|Win32.ActiveCfg = Debug|Win32
{33A963F1-6C9A-4582-80E5-C6AAD0173499}.Debug|Win32.Build.0 = Debug|Win32
{33A963F1-6C9A-4582-80E5-C6AAD0173499}.Release|Win32.ActiveCfg = Release|Win32
{33A963F1-6C9A-4582-80E5-C6AAD0173499}.Release|Win32.Build.0 = Release|Win32
{33A963F1-6C9A-4582-80E5-C6AAD0173499}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32
{33A963F1-6C9A-4582-80E5-C6AAD0173499}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32
{33A963F1-6C9A-4582-80E5-C6AAD0173499}.UNICODE Release|Win32.ActiveCfg = UNICODE Release|Win32
{33A963F1-6C9A-4582-80E5-C6AAD0173499}.UNICODE Release|Win32.Build.0 = UNICODE Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

File diff suppressed because it is too large Load diff