--- /dev/null
- add_importlibs(explorer
- advapi32
- gdi32
- user32
- comctl32
- ole32
- oleaut32
- shell32
- browseui
- shlwapi
- shdocvw
- version
- uxtheme
- msvcrt
- kernel32
- ntdll)
+
+PROJECT(SHELL)
+
+add_definitions(-DWIN32)
+
+list(APPEND SOURCE
+ desktop.c
+ dragdrop.c
+ explorer.c
+ rshell.c
+ settings.c
+ shellservice.c
+ startmnu.c
+ startup.c
+ taskband.c
+ taskswnd.c
+ tbsite.c
+ trayntfy.c
+ trayprop.c
+ traywnd.c
+ precomp.h)
+
+add_executable(explorer ${SOURCE} explorer.rc)
+target_link_libraries(explorer uuid wine)
+set_module_type(explorer win32gui UNICODE)
++add_importlibs(explorer advapi32 gdi32 user32 comctl32 ole32 oleaut32 shell32 browseui shlwapi shdocvw version uxtheme msvcrt kernel32 ntdll)
+add_pch(explorer precomp.h SOURCE)
+add_cd_file(TARGET explorer DESTINATION reactos FOR all)
--- /dev/null
-
+
+add_subdirectory(notifyhook)
+
+set_cpp(WITH_RTTI WITH_EXCEPTIONS WITH_STL)
+
+add_definitions(
+ -DWIN32
+ -D__WINDRES__)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+list(APPEND SOURCE
+ shell/mainframe.cpp
+ shell/unixfs.cpp
+ shell/ntobjfs.cpp
+ shell/filechild.cpp
+ shell/shellfs.cpp
+ shell/fatfs.cpp
+ shell/pane.cpp
+ shell/regfs.cpp
+ shell/webchild.cpp
+ shell/entries.cpp
+ shell/shellbrowser.cpp
+ shell/winfs.cpp
+ dialogs/searchprogram.cpp
+ dialogs/settings.cpp
+ taskbar/taskbar.cpp
+ taskbar/favorites.cpp
+ taskbar/quicklaunch.cpp
+ taskbar/desktopbar.cpp
+ taskbar/startmenu.cpp
+ taskbar/traynotify.cpp
+ services/shellservices.cpp
+ desktop/desktop.cpp
+ explorer.cpp
+ utility/xs-native.cpp
+ utility/shellclasses.cpp
+ utility/dragdropimpl.cpp
+ utility/utility.cpp
+ utility/xmlstorage.cpp
+ utility/window.cpp
+ utility/shellbrowserimpl.cpp
+ precomp.h) # utility/shelltests.cpp
+
+if(ARCH STREQUAL "i386")
+ list(APPEND I386_SOURCE i386-stub-win32.c)
+endif()
+
+add_executable(explorer_old
+ ${SOURCE}
+ ${I386_SOURCE}
+ services/startup.c
+ explorer.rc)
+
+target_link_libraries(explorer_old comsupp wine uuid)
+set_module_type(explorer_old win32gui UNICODE)
+add_importlibs(explorer_old advapi32 gdi32 user32 ws2_32 msimg32 comctl32 ole32 oleaut32 shell32 shlwapi notifyhook msvcrt kernel32 ntdll)
+add_pch(explorer_old precomp.h SOURCE)
+add_dependencies(explorer_old psdk)
+add_cd_file(TARGET explorer_old DESTINATION reactos FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/explorer-cfg-template.xml DESTINATION reactos FOR all)
+
+if(NOT MSVC)
+ add_compile_flags("-Wno-error=narrowing")
+
+ # GCC bug #59472
+ if(LTCG)
+ add_target_link_flags(explorer "-Wno-error")
+ endif()
+endif()
--- /dev/null
-
+PROJECT(SHELL)
+
+set_cpp(WITH_RUNTIME)
+
+remove_definitions(-D_WIN32_WINNT=0x502)
+add_definitions(-D_WIN32_WINNT=0x600)
+
+include_directories(${REACTOS_SOURCE_DIR}/lib/atl)
-
- target_link_libraries(browseui
- atlnew
- uuid
- wine)
-
- add_importlibs(browseui
- shlwapi
- shell32
- comctl32
- gdi32
- ole32
- oleaut32
- user32
- advapi32
- msvcrt
- kernel32
- ntdll)
-
+spec2def(browseui.dll browseui.spec ADD_IMPORTLIB)
+
+list(APPEND SOURCE
+ aclmulti.cpp
+ addressband.cpp
+ addresseditbox.cpp
+ bandproxy.cpp
+ bandsite.cpp
+ bandsitemenu.cpp
+ basebar.cpp
+ basebarsite.cpp
+ brandband.cpp
+ browseui.cpp
+ browseuiord.cpp
+ commonbrowser.cpp
+ desktopipc.cpp
+ globalfoldersettings.cpp
+ internettoolbar.cpp
+ parsecmdline.cpp
+ regtreeoptions.cpp
+ shellbrowser.cpp
+ toolsband.cpp
+ travellog.cpp
+ utility.cpp
+ precomp.h)
+
+add_library(browseui SHARED
+ ${SOURCE}
+ dllinstall.c
+ browseui.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/browseui.def)
+
+set_module_type(browseui win32dll UNICODE)
++target_link_libraries(browseui atlnew uuid wine)
++add_importlibs(browseui shlwapi shell32 comctl32 gdi32 ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll)
+add_pch(browseui precomp.h SOURCE)
+add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+ if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ add_target_compile_flags(browseui "-Wno-unused-but-set-variable")
+ endif()
+
+ # Binutils linker bug
+ if(LTCG)
+ add_target_link_flags(browseui "-Wl,--allow-multiple-definition")
+ endif()
+endif()
+
+add_custom_command(TARGET browseui POST_BUILD
+ COMMAND "${CMAKE_COMMAND}" -E copy
+ "$<TARGET_FILE:browseui>"
+ "$<TARGET_FILE_DIR:filebrowser>/$<TARGET_FILE_NAME:browseui>"
+ COMMENT "Copying to output directory")
+
+add_custom_command(TARGET browseui POST_BUILD
+ COMMAND "${CMAKE_COMMAND}" -E copy
+ "$<TARGET_FILE:browseui>"
+ "$<TARGET_FILE_DIR:filebrowser>/$<TARGET_FILE_NAME:browseui>"
+ COMMENT "Copying to output directory")
--- /dev/null
- * Petre Dumitriu
+/*
+ * PROJECT: ReactOS msgina.dll
+ * FILE: dll/win32/msgina/lang/ro-RO.rc
+ * PURPOSE: Romanian Language File for ReactOS Logon GINA DLL
+ * TRANSLATORS:
- PUSHBUTTON "&Da", IDYES, 41, 39, 50, 14, BS_DEFPUSHBUTTON
++ * Petru Dumitriu (petrimetri at gmail dot com)
+ * Ștefan Fulea (stefan dot fulea at mail dot md)
+ */
+
+LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
+
+IDD_STATUSWINDOW_DLG DIALOGEX 0, 0, 275, 80
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP
+CAPTION "Așteptați…"
+FONT 8, "MS Shell Dlg", 400, 0, 1
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ LTEXT "", IDC_STATUSLABEL, 7, 62, 261, 12, SS_WORDELLIPSIS
+END
+
+IDD_NOTICE_DLG DIALOGEX 0, 0, 275, 80
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP
+CAPTION "Bun venit în ReactOS"
+FONT 8, "MS Shell Dlg", 400, 0, 1
+BEGIN
+ CONTROL IDI_ROSLOGO,IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_LOCKICON, IDC_STATIC, 7, 55, 32, 32
+ LTEXT "Apasați simultan «Ctrl»+«Alt»+«Del»", IDC_STATIC, 38, 60, 144, 14
+END
+
+IDD_LOGGEDOUT_DLG DIALOGEX 0, 0, 275, 147
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP
+CAPTION "Autentificare"
+FONT 8, "MS Shell Dlg", 400, 0, 1
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ LTEXT "Nume utilizator:", IDC_STATIC, 6, 60, 52, 8
+ EDITTEXT IDC_USERNAME, 60, 57, 155, 14, ES_AUTOHSCROLL
+ LTEXT "Parola:", IDC_STATIC, 6, 78, 52, 8
+ EDITTEXT IDC_PASSWORD, 60, 76, 155, 14, ES_AUTOHSCROLL | ES_PASSWORD
+ LTEXT "Vă autentificați la:", IDC_STATIC, 6, 96, 52, 8
+ COMBOBOX IDC_LOGON_TO, 60, 95, 155, 14, CBS_DROPDOWNLIST | WS_VSCROLL
+ PUSHBUTTON "Con&firmă", IDOK, 106, 122, 50, 14, BS_DEFPUSHBUTTON
+ PUSHBUTTON "A&nulează", IDCANCEL, 160, 122, 50, 14
+ PUSHBUTTON "&Oprește", IDC_SHUTDOWN, 214, 122, 50, 14
+END
+
+IDD_LOGGEDON_DLG DIALOGEX 0, 0, 275, 175
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP
+CAPTION "Securitate"
+FONT 8, "MS Shell Dlg", 400, 0, 1
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ GROUPBOX "Informații de autentificare", IDC_STATIC, 7, 61, 261, 52
+ LTEXT "<Message>", IDC_LOGONMSG, 15, 73, 245, 18
+ LTEXT "<Logon date>", IDC_LOGONDATE, 15, 94, 245, 8
+ CTEXT "Ce acțiune preferați?", IDC_STATIC, 10, 119, 255, 8
+ PUSHBUTTON "&Blochează calculatorul", IDC_LOCK, 10, 135, 70, 14
+ PUSHBUTTON "&Deautentifică-mă", IDC_LOGOFF, 90, 135, 70, 14
+ PUSHBUTTON "ÃŽnchid&e calculatorul", IDC_SHUTDOWN, 170, 135, 70, 14
+ PUSHBUTTON "Schim&bă parola", IDC_CHANGEPWD, 10, 154, 76, 14
+ PUSHBUTTON "&Gestionar de activități…", IDC_TASKMGR, 90, 154, 70, 14
+ PUSHBUTTON "A&nulează", IDCANCEL, 170, 154, 70, 14
+END
+
+IDD_LOCKED_DLG DIALOGEX 0, 0, 275, 121
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP
+CAPTION "Calculator blocat"
+FONT 8, "MS Shell Dlg", 400, 0, 1
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_LOCKICON, -1, 7, 59, 20, 20
+ LTEXT "Acest calculator este în uz și a fost blocat.", IDC_STATIC, 36, 61, 232, 8
+ LTEXT "Mesaj", IDC_LOCKMSG, 37, 75, 231, 26
+ LTEXT "Apăsați simultan «Ctrl»+«Alt»+«Del» pentru a debloca acest calculator.", IDC_STATIC, 36, 106, 232, 8
+END
+
+IDD_UNLOCK_DLG DIALOGEX 0, 0, 275, 179
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP
+CAPTION "Deblocare calculator"
+FONT 8, "MS Shell Dlg", 400, 0, 1
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_LOCKICON, -1, 7, 59, 20, 20
+ LTEXT "Acest calculator este în uz și a fost blocat.", IDC_STATIC, 36, 61, 232, 8
+ LTEXT "Mesaj", IDC_LOCKMSG, 36, 75, 232, 26
+ LTEXT "Nume utilizator:", IDC_STATIC, 36, 107, 40, 8
+ EDITTEXT IDC_USERNAME, 84, 104, 119, 14, ES_AUTOHSCROLL
+ LTEXT "Parola:", IDC_STATIC, 36, 125, 42, 8
+ EDITTEXT IDC_PASSWORD, 84, 123, 119, 14, ES_AUTOHSCROLL | ES_PASSWORD
+ PUSHBUTTON "Con&firmă", IDOK, 80, 154, 50, 14, BS_DEFPUSHBUTTON
+ PUSHBUTTON "A&nulează", IDCANCEL, 144, 154, 50, 14
+END
+
+IDD_CHANGE_PASSWORD DIALOGEX 0, 0, 275, 166
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP
+CAPTION "Schimbare parolă"
+FONT 8, "MS Shell Dlg", 400, 0, 1
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ LTEXT "Nume utilizator:", IDC_STATIC, 7, 61, 78, 8
+ EDITTEXT IDC_CHANGEPWD_USERNAME, 90, 59, 127, 12, ES_AUTOHSCROLL
+ LTEXT "Autentificat pe:", IDC_STATIC, 7, 78, 78, 8
+ COMBOBOX IDC_CHANGEPWD_DOMAIN, 90, 75, 127, 144, CBS_DROPDOWNLIST | CBS_SORT
+ LTEXT "Parola veche:", IDC_STATIC, 7, 95, 78, 8
+ EDITTEXT IDC_CHANGEPWD_OLDPWD, 90, 92, 127, 12, ES_AUTOHSCROLL | ES_PASSWORD
+ LTEXT "Parola nouă:", IDC_STATIC, 7, 111, 78, 8
+ EDITTEXT IDC_CHANGEPWD_NEWPWD1, 90, 109, 127, 12, ES_AUTOHSCROLL | ES_PASSWORD
+ LTEXT "Confirmați parola:", IDC_STATIC, 7, 127, 78, 8
+ EDITTEXT IDC_CHANGEPWD_NEWPWD2, 90, 125, 127, 12, ES_AUTOHSCROLL | ES_PASSWORD
+ PUSHBUTTON "Con&firmă", IDOK, 164, 145, 50, 14, BS_DEFPUSHBUTTON
+ PUSHBUTTON "A&nulează", IDCANCEL, 218, 145, 50, 14
+END
+
+IDD_LOGOFF_DLG DIALOGEX 0, 0, 188, 60
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU | WS_POPUP
+CAPTION "Deautentificare ReactOS"
+FONT 8, "MS Shell Dlg", 400, 0, 1
+BEGIN
+ ICON IDI_LOCKICON, -1, 7, 7, 20, 20
+ LTEXT "Sigur doriți să vă deautentificați?", IDC_STATIC, 35, 16, 146, 8
++ PUSHBUTTON "D&a", IDYES, 41, 39, 50, 14, BS_DEFPUSHBUTTON
+ PUSHBUTTON "N&u", IDNO, 95, 39, 50, 14
+END
+
+IDD_SHUTDOWN_DLG DIALOGEX 0, 0, 275, 146
+STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION
+CAPTION "ÃŽnchidere ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&Ce doriți să se întâmple?", IDC_STATIC, 39, 57, 167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "Con&firmă", IDOK, 143, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "A&nulează", IDCANCEL, 204, 122, 55, 14
+END
+
+IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
+STYLE DS_MODALFRAME | DS_SHELLFONT | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION ""
+FONT 8, "MS Shell Dlg"
+BEGIN
+ EDITTEXT IDC_LEGALNOTICE_TEXT, 7, 7, 266, 165, ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
+ DEFPUSHBUTTON "ÃŽ&nchide", IDOK, 115, 179, 50, 14
+END
+
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP
+CAPTION "ÃŽnchidere ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&Ce doriți să se întâmple?", IDC_STATIC, 39, 57, 167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "Con&firmă", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "A&nulează", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Manual…", IDHELP, 204, 122, 55, 14
+END
+
+STRINGTABLE
+BEGIN
+ IDS_LOGGEDOUTSAS "Bun venit!"
+ IDS_LOCKEDSAS "Momentan calculatorul este blocat."
+ IDS_PRESSCTRLALTDELETE "Pentru autentificare, apăsați «Ctrl»+«Alt»+«Del»."
+ IDS_ASKFORUSER "Nume utilizator: "
+ IDS_ASKFORPASSWORD "Parola: "
+ IDS_FORCELOGOFF "Această acțiune va deautentifica utilizatorului curent cu posibile pierderi ale datelor nepăstrate. Continuați?"
+ IDS_LOCKMSG "Doar %s sau un Administrator poate debloca acest calculator."
+ IDS_LOGONMSG "Sunteți autentificat ca %s."
+ IDS_LOGONDATE "Data autentificării: %s %s"
+ IDS_COMPUTERLOCKED "Calculator blocat"
+ IDS_LOCKEDWRONGPASSWORD "Parola este eronată. Încercați din nou. Literele din parola necesită atenție la capitalizare."
+ IDS_LOCKEDWRONGUSER "Acest calculator a fost blocat. Doar %s\\%s sau un Administrator pot debloca acest calculator."
+ IDS_CHANGEPWDTITLE "Modifică parola"
+ IDS_NONMATCHINGPASSWORDS "Parolele tastate nu corespund. Tastați aceiași parolă în ambele câmpuri de intrpducere."
+ IDS_PASSWORDCHANGED "Parola dumneavoastră a fost modificată."
+ IDS_LOGONTITLE "Mesaj de autentificare"
+ IDS_LOGONWRONGUSERORPWD "Sistemul nu vă poate autentifica. Asigurați-vă că numele și domeniul sunt corecte apoi tastați din nou parola. În parolă se face distincție între majuscule și minuscule."
+ IDS_LOGONUSERDISABLED "Contul dumneavoastră a fost dezactivat. Contactați administratorul de sistem."
+ IDS_PASSWORDMUSTCHANGE "Este imperativ să vă schimbați parola la prima autentificare."
+ IDS_PASSWORDEXPIRED "Parola v-a expirat și trebuie schimbată."
+END
+
+/* Shutdown Dialog Strings */
+STRINGTABLE
+BEGIN
+ IDS_SHUTDOWN_LOGOFF "Deautentificare ""%s"""
+ IDS_SHUTDOWN_SHUTDOWN "ÃŽnchidere"
+ IDS_SHUTDOWN_RESTART "Repornire"
+ IDS_SHUTDOWN_SLEEP "Stare de veghe"
+ IDS_SHUTDOWN_HIBERNATE "Hibernare"
+ /* Shut down descriptions */
+ IDS_SHUTDOWN_LOGOFF_DESC "Închide sesiunea curentă permițând altor utilizatori autentificarea în sistem."
+ IDS_SHUTDOWN_SHUTDOWN_DESC "Închide atât sesiunea curentă cât și sistemul de operare pentru a puta opri în siguranță alimentarea electrică."
+ IDS_SHUTDOWN_RESTART_DESC "Închide sesiunea curentă și repornește sistemul."
+ IDS_SHUTDOWN_SLEEP_DESC "Induce sistemul în starea de veghe."
+ IDS_SHUTDOWN_HIBERNATE_DESC "Păstrează sesiunea curentă și oprește calculatorul."
+END
--- /dev/null
- spec2def(shell32.dll shell32.spec ADD_IMPORTLIB)
-
+PROJECT(SHELL)
+
+set_cpp(WITH_RUNTIME)
++spec2def(shell32.dll shell32.spec ADD_IMPORTLIB)
+
+remove_definitions(-D_WIN32_WINNT=0x502)
+add_definitions(-D_WIN32_WINNT=0x600)
+
+add_definitions(
+ -D_SHELL32_
+ -D_WINE)
+
+include_directories(
+ ${REACTOS_SOURCE_DIR}/lib/recyclebin
+ ${REACTOS_SOURCE_DIR}/lib/atl
+ ${REACTOS_SOURCE_DIR})
+
-
- target_link_libraries(shell32
- atlnew
- wine
- uuid
- recyclebin)
-
+list(APPEND SOURCE
+ #authors.cpp
+ autocomplete.cpp
+ brsfolder.cpp
+ changenotify.cpp
+ classes.cpp
+ clipboard.cpp
+ control.cpp
+ CMenuBand.cpp
+ CMenuDeskBar.cpp
+ dataobject.cpp
+ dde.cpp
+ debughlp.cpp
+ desktop.cpp
+ dialogs.cpp
+ dragdrophelper.cpp
+ enumidlist.cpp
+ extracticon.cpp
+ folders.cpp
+ iconcache.cpp
+ pidl.cpp
+ shell32_main.cpp
+ shellitem.cpp
+ shelllink.cpp
+ shellole.cpp
+ shellord.cpp
+ shellpath.cpp
+ shellreg.cpp
+ shellstring.cpp
+ folders/desktop.cpp
+ folders/fs.cpp
+ folders/mycomp.cpp
+ folders/mydocuments.cpp
+ folders/printers.cpp
+ folders/admintools.cpp
+ folders/netplaces.cpp
+ folders/fonts.cpp
+ folders/cpanel.cpp
+ folders/recyclebin.cpp
+ droptargets/CexeDropHandler.cpp
+ shlexec.cpp
+ shlfileop.cpp
+ shlfolder.cpp
+ shlfsbind.cpp
+ shlmenu.cpp
+ shlview.cpp
+ shpolicy.cpp
+ stubs.cpp
+ systray.cpp
+ fprop.cpp
+ drive.cpp
+ defcontextmenu.cpp
+ openwithmenu.cpp
+ newmenu.cpp
+ startmenu.cpp
+ folder_options.cpp
+ filedefext.cpp
+ drvdefext.cpp
+ precomp.h)
+
+add_library(shell32 SHARED
+ ${SOURCE}
+ vista.c
+ shell32.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/shell32_stubs.c
+ ${CMAKE_CURRENT_BINARY_DIR}/shell32.def)
+
+set_module_type(shell32 win32dll UNICODE HOTPATCHABLE)
-
- add_importlibs(shell32
- advapi32
- browseui
- gdi32
- user32
- powrprof
- comctl32
- comdlg32
- shdocvw
- shlwapi
- devmgr
- winspool
- winmm
- msvcrt
- kernel32
- ntdll)
-
++target_link_libraries(shell32 atlnew wine uuid recyclebin)
+add_delay_importlibs(shell32 ole32 version fmifs)
++add_importlibs(shell32 advapi32 browseui gdi32 user32 powrprof comctl32 comdlg32 shdocvw shlwapi devmgr winspool winmm msvcrt kernel32 ntdll)
+add_pch(shell32 precomp.h SOURCE)
+add_cd_file(TARGET shell32 DESTINATION reactos/system32 FOR all)
--- /dev/null
- if (NULL != ShortcutIconInfo.hbmMask) DeleteObject(ShortcutIconInfo.hbmColor);
+/*
+ * shell icon cache (SIC)
+ *
+ * Copyright 1998, 1999 Juergen Schmied
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "precomp.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(shell);
+
+/********************** THE ICON CACHE ********************************/
+
+#define INVALID_INDEX -1
+
+typedef struct
+{
+ LPWSTR sSourceFile; /* file (not path!) containing the icon */
+ DWORD dwSourceIndex; /* index within the file, if it is a resoure ID it will be negated */
+ DWORD dwListIndex; /* index within the iconlist */
+ DWORD dwFlags; /* GIL_* flags */
+ DWORD dwAccessTime;
+} SIC_ENTRY, * LPSIC_ENTRY;
+
+static HDPA sic_hdpa = 0;
+
+namespace
+{
+extern CRITICAL_SECTION SHELL32_SicCS;
+CRITICAL_SECTION_DEBUG critsect_debug =
+{
+ 0, 0, &SHELL32_SicCS,
+ { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
+ 0, 0, { (DWORD_PTR)(__FILE__ ": SHELL32_SicCS") }
+};
+CRITICAL_SECTION SHELL32_SicCS = { &critsect_debug, -1, 0, 0, 0, 0 };
+}
+
+/*****************************************************************************
+ * SIC_CompareEntries
+ *
+ * NOTES
+ * Callback for DPA_Search
+ */
+static INT CALLBACK SIC_CompareEntries( LPVOID p1, LPVOID p2, LPARAM lparam)
+{ LPSIC_ENTRY e1 = (LPSIC_ENTRY)p1, e2 = (LPSIC_ENTRY)p2;
+
+ TRACE("%p %p %8lx\n", p1, p2, lparam);
+
+ /* Icons in the cache are keyed by the name of the file they are
+ * loaded from, their resource index and the fact if they have a shortcut
+ * icon overlay or not.
+ */
+ /* first the faster one */
+ if (e1->dwSourceIndex != e2->dwSourceIndex)
+ return (e1->dwSourceIndex < e2->dwSourceIndex) ? -1 : 1;
+
+ if ((e1->dwFlags & GIL_FORSHORTCUT) != (e2->dwFlags & GIL_FORSHORTCUT))
+ return ((e1->dwFlags & GIL_FORSHORTCUT) < (e2->dwFlags & GIL_FORSHORTCUT)) ? -1 : 1;
+
+ return wcsicmp(e1->sSourceFile,e2->sSourceFile);
+}
+
+/* declare SIC_LoadOverlayIcon() */
+static int SIC_LoadOverlayIcon(int icon_idx);
+
+/*****************************************************************************
+ * SIC_OverlayShortcutImage [internal]
+ *
+ * NOTES
+ * Creates a new icon as a copy of the passed-in icon, overlayed with a
+ * shortcut image.
+ * FIXME: This should go to the ImageList implementation!
+ */
+static HICON SIC_OverlayShortcutImage(HICON SourceIcon, BOOL large)
+{
+ ICONINFO ShortcutIconInfo, TargetIconInfo;
+ HICON ShortcutIcon = NULL, TargetIcon;
+ BITMAP TargetBitmapInfo, ShortcutBitmapInfo;
+ HDC ShortcutDC = NULL,
+ TargetDC = NULL;
+ HBITMAP OldShortcutBitmap = NULL,
+ OldTargetBitmap = NULL;
+
+ static int s_imgListIdx = -1;
+ ZeroMemory(&ShortcutIconInfo, sizeof(ShortcutIconInfo));
+ ZeroMemory(&TargetIconInfo, sizeof(TargetIconInfo));
+
+ /* Get information about the source icon and shortcut overlay.
+ * We will write over the source bitmaps to get the final ones */
+ if (! GetIconInfo(SourceIcon, &TargetIconInfo))
+ return NULL;
+
+ /* Is it possible with the ImageList implementation? */
+ if(!TargetIconInfo.hbmColor)
+ {
+ /* Maybe we'll support this at some point */
+ FIXME("1bpp icon wants its overlay!\n");
+ goto fail;
+ }
+
+ if(!GetObjectW(TargetIconInfo.hbmColor, sizeof(BITMAP), &TargetBitmapInfo))
+ {
+ goto fail;
+ }
+
+ /* search for the shortcut icon only once */
+ if (s_imgListIdx == -1)
+ s_imgListIdx = SIC_LoadOverlayIcon(- IDI_SHELL_SHORTCUT);
+ /* FIXME should use icon index 29 instead of the
+ resource id, but not all icons are present yet
+ so we can't use icon indices */
+
+ if (s_imgListIdx != -1)
+ {
+ if (large)
+ ShortcutIcon = ImageList_GetIcon(ShellBigIconList, s_imgListIdx, ILD_TRANSPARENT);
+ else
+ ShortcutIcon = ImageList_GetIcon(ShellSmallIconList, s_imgListIdx, ILD_TRANSPARENT);
+ } else
+ ShortcutIcon = NULL;
+
+ if (!ShortcutIcon || !GetIconInfo(ShortcutIcon, &ShortcutIconInfo))
+ {
+ goto fail;
+ }
+
+ /* Is it possible with the ImageLists ? */
+ if(!ShortcutIconInfo.hbmColor)
+ {
+ /* Maybe we'll support this at some point */
+ FIXME("Should draw 1bpp overlay!\n");
+ goto fail;
+ }
+
+ if(!GetObjectW(ShortcutIconInfo.hbmColor, sizeof(BITMAP), &ShortcutBitmapInfo))
+ {
+ goto fail;
+ }
+
+ /* Setup the masks */
+ ShortcutDC = CreateCompatibleDC(NULL);
+ if (NULL == ShortcutDC) goto fail;
+ OldShortcutBitmap = (HBITMAP)SelectObject(ShortcutDC, ShortcutIconInfo.hbmMask);
+ if (NULL == OldShortcutBitmap) goto fail;
+
+ TargetDC = CreateCompatibleDC(NULL);
+ if (NULL == TargetDC) goto fail;
+ OldTargetBitmap = (HBITMAP)SelectObject(TargetDC, TargetIconInfo.hbmMask);
+ if (NULL == OldTargetBitmap) goto fail;
+
+ /* Create the complete mask by ANDing the source and shortcut masks.
+ * NOTE: in an ImageList, all icons have the same dimensions */
+ if (!BitBlt(TargetDC, 0, 0, ShortcutBitmapInfo.bmWidth, ShortcutBitmapInfo.bmHeight,
+ ShortcutDC, 0, 0, SRCAND))
+ {
+ goto fail;
+ }
+
+ /*
+ * We must remove or add the alpha component to the shortcut overlay:
+ * If we don't, SRCCOPY will copy it to our resulting icon, resulting in a
+ * partially transparent icons where it shouldn't be, and to an invisible icon
+ * if the underlying icon don't have any alpha channel information. (16bpp only icon for instance).
+ * But if the underlying icon has alpha channel information, then we must mark the overlay information
+ * as opaque.
+ * NOTE: This code sucks(tm) and should belong to the ImageList implementation.
+ * NOTE2: there are better ways to do this.
+ */
+ if(ShortcutBitmapInfo.bmBitsPixel == 32)
+ {
+ BOOL add_alpha;
+ BYTE buffer[sizeof(BITMAPINFO) + 256 * sizeof(RGBQUAD)];
+ BITMAPINFO* lpbmi = (BITMAPINFO*)buffer;
+ PVOID bits;
+ PULONG pixel;
+ INT i, j;
+
+ /* Find if the source bitmap has an alpha channel */
+ if(TargetBitmapInfo.bmBitsPixel != 32) add_alpha = FALSE;
+ else
+ {
+ ZeroMemory(buffer, sizeof(buffer));
+ lpbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ lpbmi->bmiHeader.biWidth = TargetBitmapInfo.bmWidth;
+ lpbmi->bmiHeader.biHeight = TargetBitmapInfo.bmHeight;
+ lpbmi->bmiHeader.biPlanes = 1;
+ lpbmi->bmiHeader.biBitCount = 32;
+
+ bits = HeapAlloc(GetProcessHeap(), 0, TargetBitmapInfo.bmHeight * TargetBitmapInfo.bmWidthBytes);
+
+ if(!bits) goto fail;
+
+ if(!GetDIBits(TargetDC, TargetIconInfo.hbmColor, 0, TargetBitmapInfo.bmHeight, bits, lpbmi, DIB_RGB_COLORS))
+ {
+ ERR("GetBIBits failed!\n");
+ HeapFree(GetProcessHeap(), 0, bits);
+ goto fail;
+ }
+
+ i = j = 0;
+ pixel = (PULONG)bits;
+
+ for(i=0; i<TargetBitmapInfo.bmHeight; i++)
+ {
+ for(j=0; j<TargetBitmapInfo.bmWidth; j++)
+ {
+ add_alpha = (*pixel++ & 0xFF000000) != 0;
+ if(add_alpha) break;
+ }
+ if(add_alpha) break;
+ }
+ HeapFree(GetProcessHeap(), 0, bits);
+ }
+
+ /* Allocate the bits */
+ bits = HeapAlloc(GetProcessHeap(), 0, ShortcutBitmapInfo.bmHeight*ShortcutBitmapInfo.bmWidthBytes);
+ if(!bits) goto fail;
+
+ ZeroMemory(buffer, sizeof(buffer));
+ lpbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ lpbmi->bmiHeader.biWidth = ShortcutBitmapInfo.bmWidth;
+ lpbmi->bmiHeader.biHeight = ShortcutBitmapInfo.bmHeight;
+ lpbmi->bmiHeader.biPlanes = 1;
+ lpbmi->bmiHeader.biBitCount = 32;
+
+ if(!GetDIBits(TargetDC, ShortcutIconInfo.hbmColor, 0, ShortcutBitmapInfo.bmHeight, bits, lpbmi, DIB_RGB_COLORS))
+ {
+ ERR("GetBIBits failed!\n");
+ HeapFree(GetProcessHeap(), 0, bits);
+ goto fail;
+ }
+
+ pixel = (PULONG)bits;
+ /* Remove alpha channel component or make it totally opaque */
+ for(i=0; i<ShortcutBitmapInfo.bmHeight; i++)
+ {
+ for(j=0; j<ShortcutBitmapInfo.bmWidth; j++)
+ {
+ if(add_alpha) *pixel++ |= 0xFF000000;
+ else *pixel++ &= 0x00FFFFFF;
+ }
+ }
+
+ /* GetDIBits return BI_BITFIELDS with masks set to 0, and SetDIBits fails when masks are 0. The irony... */
+ lpbmi->bmiHeader.biCompression = BI_RGB;
+
+ /* Set the bits again */
+ if(!SetDIBits(TargetDC, ShortcutIconInfo.hbmColor, 0, ShortcutBitmapInfo.bmHeight, bits, lpbmi, DIB_RGB_COLORS))
+ {
+ ERR("SetBIBits failed!, %lu\n", GetLastError());
+ HeapFree(GetProcessHeap(), 0, bits);
+ goto fail;
+ }
+ HeapFree(GetProcessHeap(), 0, bits);
+ }
+
+ /* Now do the copy. We overwrite the original icon data */
+ if (NULL == SelectObject(ShortcutDC, ShortcutIconInfo.hbmColor) ||
+ NULL == SelectObject(TargetDC, TargetIconInfo.hbmColor))
+ goto fail;
+ if (!MaskBlt(TargetDC, 0, 0, ShortcutBitmapInfo.bmWidth, ShortcutBitmapInfo.bmHeight,
+ ShortcutDC, 0, 0, ShortcutIconInfo.hbmMask, 0, 0,
+ MAKEROP4(0xAA0000, SRCCOPY)))
+ {
+ goto fail;
+ }
+
+ /* Clean up, we're not goto'ing to 'fail' after this so we can be lazy and not set
+ handles to NULL */
+ SelectObject(TargetDC, OldTargetBitmap);
+ DeleteDC(TargetDC);
+ SelectObject(ShortcutDC, OldShortcutBitmap);
+ DeleteDC(ShortcutDC);
+
+ /* Create the icon using the bitmaps prepared earlier */
+ TargetIcon = CreateIconIndirect(&TargetIconInfo);
+
+ /* CreateIconIndirect copies the bitmaps, so we can release our bitmaps now */
+ DeleteObject(TargetIconInfo.hbmColor);
+ DeleteObject(TargetIconInfo.hbmMask);
+ /* Delete what GetIconInfo gave us */
+ DeleteObject(ShortcutIconInfo.hbmColor);
+ DeleteObject(ShortcutIconInfo.hbmMask);
+ DestroyIcon(ShortcutIcon);
+
+ return TargetIcon;
+
+fail:
+ /* Clean up scratch resources we created */
+ if (NULL != OldTargetBitmap) SelectObject(TargetDC, OldTargetBitmap);
+ if (NULL != TargetDC) DeleteDC(TargetDC);
+ if (NULL != OldShortcutBitmap) SelectObject(ShortcutDC, OldShortcutBitmap);
+ if (NULL != ShortcutDC) DeleteDC(ShortcutDC);
+ if (NULL != TargetIconInfo.hbmColor) DeleteObject(TargetIconInfo.hbmColor);
+ if (NULL != TargetIconInfo.hbmMask) DeleteObject(TargetIconInfo.hbmMask);
+ if (NULL != ShortcutIconInfo.hbmColor) DeleteObject(ShortcutIconInfo.hbmColor);
++ if (NULL != ShortcutIconInfo.hbmMask) DeleteObject(ShortcutIconInfo.hbmMask);
+ if (NULL != ShortcutIcon) DestroyIcon(ShortcutIcon);
+
+ return NULL;
+}
+
+/*****************************************************************************
+ * SIC_IconAppend [internal]
+ *
+ * NOTES
+ * appends an icon pair to the end of the cache
+ */
+static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallIcon, HICON hBigIcon, DWORD dwFlags)
+{
+ LPSIC_ENTRY lpsice;
+ INT ret, index, index1, indexDPA;
+ WCHAR path[MAX_PATH];
+ TRACE("%s %i %p %p\n", debugstr_w(sSourceFile), dwSourceIndex, hSmallIcon ,hBigIcon);
+
+ lpsice = (LPSIC_ENTRY) SHAlloc (sizeof (SIC_ENTRY));
+
+ GetFullPathNameW(sSourceFile, MAX_PATH, path, NULL);
+ lpsice->sSourceFile = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, (wcslen(path)+1)*sizeof(WCHAR) );
+ wcscpy( lpsice->sSourceFile, path );
+
+ lpsice->dwSourceIndex = dwSourceIndex;
+ lpsice->dwFlags = dwFlags;
+
+ EnterCriticalSection(&SHELL32_SicCS);
+
+ indexDPA = DPA_Search (sic_hdpa, lpsice, 0, SIC_CompareEntries, 0, DPAS_SORTED|DPAS_INSERTAFTER);
+ indexDPA = DPA_InsertPtr(sic_hdpa, indexDPA, lpsice);
+ if ( -1 == indexDPA )
+ {
+ ret = INVALID_INDEX;
+ goto leave;
+ }
+
+ index = ImageList_AddIcon (ShellSmallIconList, hSmallIcon);
+ index1= ImageList_AddIcon (ShellBigIconList, hBigIcon);
+
+ /* Something went wrong when allocating a new image in the list. Abort. */
+ if((index == -1) || (index1 == -1))
+ {
+ WARN("Something went wrong when adding the icon to the list: small - 0x%x, big - 0x%x.\n",
+ index, index1);
+ if(index != -1) ImageList_Remove(ShellSmallIconList, index);
+ if(index1 != -1) ImageList_Remove(ShellBigIconList, index1);
+ ret = INVALID_INDEX;
+ goto leave;
+ }
+
+ if (index!=index1)
+ {
+ FIXME("iconlists out of sync 0x%x 0x%x\n", index, index1);
+ /* What to do ???? */
+ }
+ lpsice->dwListIndex = index;
+ ret = lpsice->dwListIndex;
+
+leave:
+ if(ret == INVALID_INDEX)
+ {
+ if(indexDPA != -1) DPA_DeletePtr(sic_hdpa, indexDPA);
+ HeapFree(GetProcessHeap(), 0, lpsice->sSourceFile);
+ SHFree(lpsice);
+ }
+ LeaveCriticalSection(&SHELL32_SicCS);
+ return ret;
+}
+/****************************************************************************
+ * SIC_LoadIcon [internal]
+ *
+ * NOTES
+ * gets small/big icon by number from a file
+ */
+static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags)
+{
+ HICON hiconLarge=0;
+ HICON hiconSmall=0;
+ UINT ret;
+ static UINT (WINAPI*PrivateExtractIconExW)(LPCWSTR,int,HICON*,HICON*,UINT) = NULL;
+
+ if (!PrivateExtractIconExW)
+ {
+ HMODULE hUser32 = GetModuleHandleA("user32");
+ PrivateExtractIconExW = (UINT(WINAPI*)(LPCWSTR,int,HICON*,HICON*,UINT)) GetProcAddress(hUser32, "PrivateExtractIconExW");
+ }
+
+ if (PrivateExtractIconExW)
+ {
+ PrivateExtractIconExW(sSourceFile, dwSourceIndex, &hiconLarge, &hiconSmall, 1);
+ }
+ else
+ {
+ PrivateExtractIconsW(sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, NULL, 1, 0);
+ PrivateExtractIconsW(sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, NULL, 1, 0);
+ }
+
+ if ( !hiconLarge || !hiconSmall)
+ {
+ WARN("failure loading icon %i from %s (%p %p)\n", dwSourceIndex, debugstr_w(sSourceFile), hiconLarge, hiconSmall);
+ if(hiconLarge) DestroyIcon(hiconLarge);
+ if(hiconSmall) DestroyIcon(hiconSmall);
+ return INVALID_INDEX;
+