mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 23:15:39 +00:00
sync with WINE source
svn path=/trunk/; revision=11181
This commit is contained in:
parent
8ec117a236
commit
a573c6ea80
4 changed files with 50 additions and 82 deletions
|
@ -1,52 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2003 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Explorer clone
|
|
||||||
//
|
|
||||||
// externals.h
|
|
||||||
//
|
|
||||||
// Martin Fuchs, 07.06.2003
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
// launch start programs
|
|
||||||
extern int startup(int argc, char *argv[]);
|
|
||||||
|
|
||||||
// winefile main routine
|
|
||||||
extern int winefile_main(HINSTANCE hinstance, HWND hwndDesktop, int cmdshow);
|
|
||||||
|
|
||||||
// display winefile/file manager window
|
|
||||||
extern void winefile_show_frame(HWND hwndDesktop, int cmdshow);
|
|
||||||
|
|
||||||
// test for already running desktop instance
|
|
||||||
extern BOOL IsAnyDesktopRunning();
|
|
||||||
|
|
||||||
// start desktop bar
|
|
||||||
extern HWND InitializeExplorerBar(HINSTANCE hInstance);
|
|
||||||
|
|
||||||
// load plugins
|
|
||||||
extern int LoadAvailablePlugIns(HWND ExplWnd);
|
|
||||||
|
|
||||||
// shut down plugins
|
|
||||||
extern int ReleaseAvailablePlugIns();
|
|
||||||
|
|
||||||
// search for windows of a specific classname
|
|
||||||
extern int find_window_class(LPCTSTR classname);
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifdef __WINE__
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "wine/port.h"
|
#include "wine/port.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -28,16 +28,14 @@
|
||||||
#include "winefile.h"
|
#include "winefile.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
#ifdef _ROS_
|
|
||||||
#include "externals.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* for read_directory_unix() */
|
/* for read_directory_unix() */
|
||||||
#if !defined(_NO_EXTENSIONS) && !defined(_WIN32)
|
#if !defined(_NO_EXTENSIONS) && defined(__WINE__)
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -53,8 +51,8 @@
|
||||||
#define _MAX_PATH 260
|
#define _MAX_PATH 260
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef NONAMELESSUNION
|
||||||
#define UNION_MEMBER(x) DUMMYUNIONNAME.##x
|
#define UNION_MEMBER(x) DUMMYUNIONNAME.x
|
||||||
#else
|
#else
|
||||||
#define UNION_MEMBER(x) x
|
#define UNION_MEMBER(x) x
|
||||||
#endif
|
#endif
|
||||||
|
@ -386,7 +384,26 @@ static Entry* read_tree_win(Root* root, LPCTSTR path, SORT_ORDER sortOrder, HWND
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if !defined(_NO_EXTENSIONS) && defined(__linux__)
|
#if !defined(_NO_EXTENSIONS) && defined(__WINE__)
|
||||||
|
|
||||||
|
static BOOL time_to_filetime(const time_t* t, FILETIME* ftime)
|
||||||
|
{
|
||||||
|
struct tm* tm = gmtime(t);
|
||||||
|
SYSTEMTIME stime;
|
||||||
|
|
||||||
|
if (!tm)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
stime.wYear = tm->tm_year+1900;
|
||||||
|
stime.wMonth = tm->tm_mon+1;
|
||||||
|
/* stime.wDayOfWeek */
|
||||||
|
stime.wDay = tm->tm_mday;
|
||||||
|
stime.wHour = tm->tm_hour;
|
||||||
|
stime.wMinute = tm->tm_min;
|
||||||
|
stime.wSecond = tm->tm_sec;
|
||||||
|
|
||||||
|
return SystemTimeToFileTime(&stime, ftime);
|
||||||
|
}
|
||||||
|
|
||||||
static void read_directory_unix(Entry* dir, LPCTSTR path)
|
static void read_directory_unix(Entry* dir, LPCTSTR path)
|
||||||
{
|
{
|
||||||
|
@ -520,7 +537,7 @@ static Entry* read_tree_unix(Root* root, LPCTSTR path, SORT_ORDER sortOrder, HWN
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !defined(_NO_EXTENSIONS) && defined(__linux__)
|
#endif // !defined(_NO_EXTENSIONS) && defined(__WINE__)
|
||||||
|
|
||||||
|
|
||||||
#ifdef _SHELL_FOLDERS
|
#ifdef _SHELL_FOLDERS
|
||||||
|
@ -1157,7 +1174,7 @@ static void read_directory(Entry* dir, LPCTSTR path, SORT_ORDER sortOrder, HWND
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#if !defined(_NO_EXTENSIONS) && defined(__linux__)
|
#if !defined(_NO_EXTENSIONS) && defined(__WINE__)
|
||||||
if (dir->etype == ET_UNIX)
|
if (dir->etype == ET_UNIX)
|
||||||
{
|
{
|
||||||
read_directory_unix(dir, path);
|
read_directory_unix(dir, path);
|
||||||
|
@ -1260,7 +1277,7 @@ static ChildWnd* alloc_child_window(LPCTSTR path, LPITEMIDLIST pidl, HWND hwnd)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#if !defined(_NO_EXTENSIONS) && defined(__linux__)
|
#if !defined(_NO_EXTENSIONS) && defined(__WINE__)
|
||||||
if (*path == '/')
|
if (*path == '/')
|
||||||
{
|
{
|
||||||
root->drive_type = GetDriveType(path);
|
root->drive_type = GetDriveType(path);
|
||||||
|
@ -1528,7 +1545,7 @@ static BOOL CALLBACK ExecuteDialogDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam, L
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL CALLBACK sDestinationDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
|
static BOOL CALLBACK DestinationDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||||
{
|
{
|
||||||
switch(nmsg) {
|
switch(nmsg) {
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
|
@ -1892,7 +1909,7 @@ LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
|
||||||
CheckMenuItem(Globals.hMenuOptions, cmd, toggle_fullscreen(hwnd)?MF_CHECKED:0);
|
CheckMenuItem(Globals.hMenuOptions, cmd, toggle_fullscreen(hwnd)?MF_CHECKED:0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __WINE__
|
||||||
case ID_DRIVE_UNIX_FS: {
|
case ID_DRIVE_UNIX_FS: {
|
||||||
TCHAR path[MAX_PATH];
|
TCHAR path[MAX_PATH];
|
||||||
ChildWnd* child;
|
ChildWnd* child;
|
||||||
|
@ -2918,7 +2935,7 @@ static LRESULT pane_notify(Pane* pane, NMHDR* pnmh)
|
||||||
RECT clnt;
|
RECT clnt;
|
||||||
GetClientRect(pane->hwnd, &clnt);
|
GetClientRect(pane->hwnd, &clnt);
|
||||||
|
|
||||||
/* move immediate to simulate HDS_FULLDRAG (for now [04/2000] not realy needed with WINELIB) */
|
/* move immediate to simulate HDS_FULLDRAG (for now [04/2000] not really needed with WINELIB) */
|
||||||
Header_SetItem(pane->hwndHeader, idx, phdn->pitem);
|
Header_SetItem(pane->hwndHeader, idx, phdn->pitem);
|
||||||
|
|
||||||
pane->widths[idx] += dx;
|
pane->widths[idx] += dx;
|
||||||
|
@ -3521,7 +3538,7 @@ LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
|
||||||
TCHAR new_name[BUFFER_LEN], old_name[BUFFER_LEN];
|
TCHAR new_name[BUFFER_LEN], old_name[BUFFER_LEN];
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
int ret = DialogBoxParam(Globals.hInstance, MAKEINTRESOURCE(IDD_SELECT_DESTINATION), hwnd, sDestinationDlgProc, (LPARAM)new_name);
|
int ret = DialogBoxParam(Globals.hInstance, MAKEINTRESOURCE(IDD_SELECT_DESTINATION), hwnd, DestinationDlgProc, (LPARAM)new_name);
|
||||||
if (ret != IDOK)
|
if (ret != IDOK)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -3793,7 +3810,7 @@ void show_frame(HWND hwndParent, int cmdshow)
|
||||||
drivebarBtn.fsStyle = BTNS_BUTTON;
|
drivebarBtn.fsStyle = BTNS_BUTTON;
|
||||||
|
|
||||||
#ifndef _NO_EXTENSIONS
|
#ifndef _NO_EXTENSIONS
|
||||||
#ifdef __linux__
|
#ifdef __WINE__
|
||||||
/* insert unix file system button */
|
/* insert unix file system button */
|
||||||
SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)TEXT("/\0"));
|
SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)TEXT("/\0"));
|
||||||
|
|
||||||
|
@ -3942,11 +3959,9 @@ int winefile_main(HINSTANCE hinstance, HWND hwndParent, int cmdshow)
|
||||||
|
|
||||||
InitInstance(hinstance);
|
InitInstance(hinstance);
|
||||||
|
|
||||||
#ifndef _ROS_ // don't maximize if being called from the ROS desktop
|
|
||||||
if (cmdshow == SW_SHOWNORMAL)
|
if (cmdshow == SW_SHOWNORMAL)
|
||||||
/*TODO: read window placement from registry */
|
/*TODO: read window placement from registry */
|
||||||
cmdshow = SW_MAXIMIZE;
|
cmdshow = SW_MAXIMIZE;
|
||||||
#endif
|
|
||||||
|
|
||||||
show_frame(hwndParent, cmdshow);
|
show_frame(hwndParent, cmdshow);
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ RSC=rc.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "__WINE__" /D WINE_UNUSED= /FR /YX /FD /GZ /c
|
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D WINE_UNUSED= /FR /YX /FD /GZ /c
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD BASE RSC /l 0x407 /d "_DEBUG"
|
# ADD BASE RSC /l 0x407 /d "_DEBUG"
|
||||||
|
@ -71,7 +71,7 @@ LINK32=link.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "UNICODE" /D "__WINE__" /D WINE_UNUSED= /FR /YX /FD /GZ /c
|
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "UNICODE" /D WINE_UNUSED= /FR /YX /FD /GZ /c
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD BASE RSC /l 0x407 /d "_DEBUG"
|
# ADD BASE RSC /l 0x407 /d "_DEBUG"
|
||||||
|
@ -98,7 +98,7 @@ LINK32=link.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "UNICODE" /D "__WINE__" /D WINE_UNUSED= /YX /FD /c
|
# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "UNICODE" /D WINE_UNUSED= /YX /FD /c
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD BASE RSC /l 0x407 /d "NDEBUG"
|
# ADD BASE RSC /l 0x407 /d "NDEBUG"
|
||||||
|
@ -125,7 +125,7 @@ LINK32=link.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "UNICODE" /D WINE_UNUSED= /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "UNICODE" /D WINE_UNUSED= /YX /FD /c
|
||||||
# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "__WINE__" /D WINE_UNUSED= /YX /FD /c
|
# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D WINE_UNUSED= /YX /FD /c
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD BASE RSC /l 0x407 /d "NDEBUG"
|
# ADD BASE RSC /l 0x407 /d "NDEBUG"
|
||||||
|
@ -164,6 +164,11 @@ SOURCE=.\en.rc
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\es.rc
|
||||||
|
# PROP Exclude_From_Build 1
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\images.bmp
|
SOURCE=.\images.bmp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
|
@ -72,9 +72,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define LONGLONGARG TEXT("I64")
|
#define LONGLONGARG _T("I64")
|
||||||
#else
|
#else
|
||||||
#define LONGLONGARG TEXT("L")
|
#define LONGLONGARG _T("L")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BUFFER_LEN 1024
|
#define BUFFER_LEN 1024
|
||||||
|
@ -111,10 +111,10 @@ enum IMAGE {
|
||||||
#define COLOR_SPLITBAR LTGRAY_BRUSH
|
#define COLOR_SPLITBAR LTGRAY_BRUSH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WINEFILEFRAME TEXT("WFS_Frame")
|
#define WINEFILEFRAME _T("WFS_Frame")
|
||||||
#define WINEFILETREE TEXT("WFS_Tree")
|
#define WINEFILETREE _T("WFS_Tree")
|
||||||
#define WINEFILEDRIVES TEXT("WFS_Drives")
|
#define WINEFILEDRIVES _T("WFS_Drives")
|
||||||
#define WINEFILEMDICLIENT TEXT("WFS_MdiClient")
|
#define WINEFILEMDICLIENT _T("WFS_MdiClient")
|
||||||
|
|
||||||
#define FRM_CALC_CLIENT 0xBF83
|
#define FRM_CALC_CLIENT 0xBF83
|
||||||
#define Frame_CalcFrameClient(hwnd, prt) ((BOOL)SNDMSG(hwnd, FRM_CALC_CLIENT, 0, (LPARAM)(PRECT)prt))
|
#define Frame_CalcFrameClient(hwnd, prt) ((BOOL)SNDMSG(hwnd, FRM_CALC_CLIENT, 0, (LPARAM)(PRECT)prt))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue