ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2018
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
24 participants
240 discussions
Start a n
N
ew thread
01/01: [EXPLORER] Update French translation
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6061c78e91474e47ef49f…
commit 6061c78e91474e47ef49f83726f6f6ae6bcd9329 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Fri Feb 16 19:36:25 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Fri Feb 16 19:36:25 2018 +0100 [EXPLORER] Update French translation --- base/shell/explorer/lang/fr-FR.rc | 86 +++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/base/shell/explorer/lang/fr-FR.rc b/base/shell/explorer/lang/fr-FR.rc index 15669f2e02..47a2b5e940 100644 --- a/base/shell/explorer/lang/fr-FR.rc +++ b/base/shell/explorer/lang/fr-FR.rc @@ -100,88 +100,88 @@ END IDD_NOTIFICATIONS_CUSTOMIZE DIALOGEX 0, 0, 232, 240 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_DLGFRAME EXSTYLE WS_EX_CONTEXTHELP -CAPTION "Customize Notifications" +CAPTION "Personnaliser les notifications" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS displays icons for active and urgent notifications, and hides inactive ones. You can change this behavior for items in the list below.", IDC_STATIC, 6, 6, 220, 30 - LTEXT "Select an item, then choose its notification behavior:", IDC_STATIC, 6, 40, 220, 10 + LTEXT "ReactOS affiche les icônes pour les notifications actives ou urgentes, et cache les inactives. Vous pouvez changer ce comportement pour les éléments dans la liste ci-dessous.", IDC_STATIC, 6, 6, 220, 30 + LTEXT "Sélectionnez un élément, puis choisissez le comportement de ses notifications :", IDC_STATIC, 6, 40, 220, 10 CONTROL "", IDC_NOTIFICATION_LIST, "SysListView32", WS_CLIPSIBLINGS | WS_BORDER | 0x00008005, 6, 50, 220, 128 COMBOBOX IDC_NOTIFICATION_BEHAVIOUR, 103, 178, 78, 200, CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_CLIPSIBLINGS - PUSHBUTTON "&Restore Defaults", IDC_TASKBARPROP_NOTIREST, 164, 188, 62, 14 + PUSHBUTTON "&Restaurer les paramètres par défaut", IDC_TASKBARPROP_NOTIREST, 164, 188, 62, 14 DEFPUSHBUTTON "OK", IDOK, 122, 220, 50, 14 - PUSHBUTTON "Cancel", IDCANCEL, 176, 220, 50, 14 + PUSHBUTTON "Annuler", IDCANCEL, 176, 220, 50, 14 END IDD_CLASSICSTART_CUSTOMIZE DIALOGEX 0, 0, 232, 240, 0 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_DLGFRAME -CAPTION "Customize Classic Start Menu" +CAPTION "Personnalisez le Menu Démarrer Classique" FONT 8, "MS Shell Dlg" { - GROUPBOX "Start menu", IDC_STATIC, 8, 7, 218, 114 + GROUPBOX "Menu démarrer", IDC_STATIC, 8, 7, 218, 114 ICON IDI_STARTMENU2, IDC_STATIC, 19, 17, 20, 20 - LTEXT "You can customize your Start menu by adding or removing items.", IDC_STATIC, 48, 17, 108, 39 - PUSHBUTTON "A&dd...", IDC_CLASSICSTART_ADD, 162, 18, 53, 14 - PUSHBUTTON "&Remove...", IDC_CLASSICSTART_REMOVE, 162, 33, 53, 14 - PUSHBUTTON "Ad&vanced", IDC_CLASSICSTART_ADVANCED, 162, 49, 53, 14 - PUSHBUTTON "&Sort", IDC_CLASSICSTART_SORT, 162, 65, 53, 14 + LTEXT "Vous pouvez personnaliser votre menu Démarrer en ajoutant ou en retirant des éléments.", IDC_STATIC, 48, 17, 108, 39 + PUSHBUTTON "&Ajouter...", IDC_CLASSICSTART_ADD, 162, 18, 53, 14 + PUSHBUTTON "&Supprimer...", IDC_CLASSICSTART_REMOVE, 162, 33, 53, 14 + PUSHBUTTON "A&vancé", IDC_CLASSICSTART_ADVANCED, 162, 49, 53, 14 + PUSHBUTTON "&Trier", IDC_CLASSICSTART_SORT, 162, 65, 53, 14 ICON IDI_RECYCLEBIN, IDC_STATIC, 20, 85, 20, 20 - LTEXT "To remove records of recently accessed documents, programs, and Web sites, click Clear.", IDC_STATIC, 49, 85, 108, 33 - PUSHBUTTON "&Clear", IDC_CLASSICSTART_CLEAR, 162, 94, 53, 14 - LTEXT "Advanced S&tart menu options:", IDC_STATIC, 8, 129, 150, 8 - CONTROL "StartMenuSe&ttings", IDC_CLASSICSTART_SETTINGS, "SysTreeView32", WS_BORDER | 0x00000001, 8, 139, 218, 72, WS_EX_CLIENTEDGE + LTEXT "Pour vider la liste des documents, programmes et sites web récemment accédés, cliquez sur Nettoyer.", IDC_STATIC, 49, 85, 108, 33 + PUSHBUTTON "&Nettoyer", IDC_CLASSICSTART_CLEAR, 162, 94, 53, 14 + LTEXT "&Options avancées du Menu démarrer :", IDC_STATIC, 8, 129, 150, 8 + CONTROL "&Paramètres du Menu Démarrer", IDC_CLASSICSTART_SETTINGS, "SysTreeView32", WS_BORDER | 0x00000001, 8, 139, 218, 72, WS_EX_CLIENTEDGE DEFPUSHBUTTON "OK", IDOK, 122, 220, 50, 14 - PUSHBUTTON "Cancel", IDCANCEL, 176, 220, 50, 14 + PUSHBUTTON "Annuler", IDCANCEL, 176, 220, 50, 14 } IDD_FILENAME_WARNING DIALOGEX 0, 0, 272, 81, 0 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUPWINDOW | WS_DLGFRAME -CAPTION "File Name Warning" +CAPTION "Attention au nom de fichier" FONT 8, "MS Shell Dlg" { - DEFPUSHBUTTON "&Ignore", IDIGNORE, 215, 60, 50, 14 - PUSHBUTTON "&Rename", IDC_FILE_RENAME, 159, 60, 50, 14 + DEFPUSHBUTTON "&Ignorer", IDIGNORE, 215, 60, 50, 14 + PUSHBUTTON "&Renommer", IDC_FILE_RENAME, 159, 60, 50, 14 LTEXT "", IDC_STATIC, 7, 51, 258, 1, NOT WS_GROUP - AUTOCHECKBOX "&Don't perform this check at startup", IDC_NOTCHECK, 7, 62, 139, 10 + AUTOCHECKBOX "&Ne pas réaliser cette vérification au démarrage", IDC_NOTCHECK, 7, 62, 139, 10 ICON 32515, IDC_STATIC, 7, 7, 21, 20 - LTEXT "There is a file or folder on your computer called %s which could cause certain applications to not function correctly. Renaming it to %s would solve this problem. Would you like to rename it now?", IDC_STATIC, 34, 7, 224, 37 + LTEXT "Il y a un fichier ou un répertoire sur votre ordinateur appelé %s ce qui pourrait conduire certaines applications à dysfonctionner. Le renommer en %s résoudrait le problème. Voulez-vous le renommer maintenant ?", IDC_STATIC, 34, 7, 224, 37 } IDD_MODERNSTART_ADVANCED DIALOGEX 0, 0, 251, 198, 0 STYLE DS_SETFONT | WS_CAPTION | WS_CHILD | WS_DISABLED -CAPTION "Advanced" +CAPTION "Avancé" FONT 8, "MS Shell Dlg" { - GROUPBOX "Start menu settings ", IDC_STATIC, 7, 7, 238, 42 - AUTOCHECKBOX "&Open submenus when I pause on them with my mouse", IDC_AUTOOPEN, 14, 21, 224, 10 - AUTOCHECKBOX "Highlight &newly installed programs", IDC_HIGHLIGHT, 14, 35, 224, 10 - LTEXT "Start &menu items:", IDC_STATIC, 7, 53, 238, 8 - CONTROL "StartMenuSe&ttings", IDC_ITEMS, "SysTreeView32", WS_BORDER | 0x00000001, 7, 63, 238, 67, WS_EX_CLIENTEDGE - GROUPBOX "Recent documents ", IDC_STATIC, 7, 133, 238, 56 - LTEXT "Select this option to provide quick access to the documents you opened most recently. Clearing this list does not delete the documents.", IDC_STATIC, 14, 144, 224, 21 - AUTOCHECKBOX "List my most &recently opened documents", IDC_RECENTLY, 14, 168, 147, 10 - PUSHBUTTON "&Clear List", IDC_CLEAR, 182, 168, 55, 14 + GROUPBOX "Paramètres du menu démarrer", IDC_STATIC, 7, 7, 238, 42 + AUTOCHECKBOX "&Ouvrir les sous-menus quand je m'arrête dessus avec la souris", IDC_AUTOOPEN, 14, 21, 224, 10 + AUTOCHECKBOX "&Mettre en surbrillance les éléments nouvellement installés", IDC_HIGHLIGHT, 14, 35, 224, 10 + LTEXT "&Eléments du menu démarrer :", IDC_STATIC, 7, 53, 238, 8 + CONTROL "&Paramètres du Menu Démarrer", IDC_ITEMS, "SysTreeView32", WS_BORDER | 0x00000001, 7, 63, 238, 67, WS_EX_CLIENTEDGE + GROUPBOX "Documents récents ", IDC_STATIC, 7, 133, 238, 56 + LTEXT "&Sélectionnez cette option pour fournir un accès rapide aux documents que vous avez ouvert le plus récemment. Vider cette liste ne supprime pas les documents.", IDC_STATIC, 14, 144, 224, 21 + AUTOCHECKBOX "&Lister les documents que j'ai ouvert le plus récemment", IDC_RECENTLY, 14, 168, 147, 10 + PUSHBUTTON "&Nettoyer la liste", IDC_CLEAR, 182, 168, 55, 14 } IDD_MODERNSTART_GENERAL DIALOGEX 0, 0, 251, 198 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_DLGFRAME -CAPTION "General" +CAPTION "Général" FONT 8, "MS Shell Dlg" { - GROUPBOX "Select an icon size for programs ", IDC_STATIC, 7, 7, 238, 37 + GROUPBOX "Sélectionnez une taille d'icône pour les programmes ", IDC_STATIC, 7, 7, 238, 37 ICON IDC_LARGEICON, 17, 18, 20, 20, SS_CENTERIMAGE ICON IDC_SMALLICON, 151, 18, 20, 20, SS_CENTERIMAGE - AUTORADIOBUTTON "&Large icons", IDC_CHOOSELARGE, 43, 25, 53, 10 - AUTORADIOBUTTON "&Small icons", IDC_CHOOSESMALL, 177, 25, 51, 10, NOT WS_TABSTOP - GROUPBOX "Programs ", IDC_STATIC, 7, 49, 238, 70 - LTEXT "The Start menu contains shortcuts to the programs you use most often. Clearing the list of shortcuts does not delete the programs.", IDC_STATIC, 14, 63, 224, 20 - LTEXT "&Number of programs on Start menu:", IDC_STATIC, 14, 86, 112, 8 + AUTORADIOBUTTON "&Grandes icônes", IDC_CHOOSELARGE, 43, 25, 53, 10 + AUTORADIOBUTTON "&Petites icônes", IDC_CHOOSESMALL, 177, 25, 51, 10, NOT WS_TABSTOP + GROUPBOX "Programmes ", IDC_STATIC, 7, 49, 238, 70 + LTEXT "Le menu Démarrer contient des raccourcis vers les programmes que vous utilisez le plus souvent. Nettoyer cette liste ne supprime pas les programmes.", IDC_STATIC, 14, 63, 224, 20 + LTEXT "&Nombre de programmes dans le menu Démarrer :", IDC_STATIC, 14, 86, 112, 8 EDITTEXT IDC_NUMBEROFPROGRAMS, 133, 84, 27, 12, ES_LEFT | ES_RIGHT | ES_NUMBER CONTROL "", IDC_NUMBERUPDOWN, "msctls_updown32", WS_BORDER | 0x000000B6, 160, 84, 11, 12 - PUSHBUTTON "&Clear List", IDC_CLEARLIST, 182, 98, 57, 14 - GROUPBOX "Show on Start menu ", IDC_STATIC, 7, 126, 238, 63 - AUTOCHECKBOX "&Internet:", IDC_SHOWINTERNET, 14, 140, 42, 10 + PUSHBUTTON "&Vider la liste", IDC_CLEARLIST, 182, 98, 57, 14 + GROUPBOX "Montrer dans le menu Démarrer ", IDC_STATIC, 7, 126, 238, 63 + AUTOCHECKBOX "&Internet :", IDC_SHOWINTERNET, 14, 140, 42, 10 COMBOBOX IDC_INTERNETDEFAULTAPP, 98, 138, 140, 200, CBS_DROPDOWNLIST | WS_VSCROLL - AUTOCHECKBOX "&E-mail:", IDC_SHOWEMAIL, 14, 157, 37, 10 + AUTOCHECKBOX "&E-mail :", IDC_SHOWEMAIL, 14, 157, 37, 10 COMBOBOX IDC_EMAILDEFAULTAPP, 98, 155, 140, 200, CBS_DROPDOWNLIST | WS_VSCROLL }
6 years, 10 months
1
0
0
0
01/01: improve SHGetFileInfo (#118)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=338799bf8bf98698f3e4c…
commit 338799bf8bf98698f3e4c1c2b885d724a9a929da Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Feb 16 20:00:08 2018 +0900 Commit: Ged Murphy <gedmurphy(a)reactos.org> CommitDate: Fri Feb 16 11:00:08 2018 +0000 improve SHGetFileInfo (#118) This patch reduces failures of SHGetFileInfo function. CORE-7159 * improve WideByteToWideChar calls * fix bugs related to file attributes and SHGFI_EXETYPE * SHGFI_USEFILEATTRIBUTES and SHGFI_ICON fix * s/sizeof(temppsfi)/0/ --- dll/win32/shell32/wine/shell32_main.c | 81 +++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/dll/win32/shell32/wine/shell32_main.c b/dll/win32/shell32/wine/shell32_main.c index b5638f0582..e64ef7f6fb 100644 --- a/dll/win32/shell32/wine/shell32_main.c +++ b/dll/win32/shell32/wine/shell32_main.c @@ -3,6 +3,7 @@ * * Copyright 1998 Marcus Meissner * Copyright 1998 Juergen Schmied (jsch) * <juergen.schmied(a)metronet.de> + * Copyright 2017 Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -433,7 +434,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, { psfi->szDisplayName[0] = '\0'; psfi->szTypeName[0] = '\0'; - psfi->iIcon = 0; + psfi->hIcon = NULL; } if (!(flags & SHGFI_PIDL)) @@ -449,12 +450,24 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, lstrcpynW(szFullPath, path, MAX_PATH); } } + else + { + SHGetPathFromIDListW((LPITEMIDLIST)path, szFullPath); + } if (flags & SHGFI_EXETYPE) { - if (flags != SHGFI_EXETYPE) - return 0; - return shgfi_get_exe_type(szFullPath); + if (!(flags & SHGFI_SYSICONINDEX)) + { + if (flags & SHGFI_USEFILEATTRIBUTES) + { + return TRUE; + } + else if (GetFileAttributesW(szFullPath) != INVALID_FILE_ATTRIBUTES) + { + return shgfi_get_exe_type(szFullPath); + } + } } /* @@ -488,6 +501,8 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, (LPCITEMIDLIST*)&pidlLast ); if (SUCCEEDED(hr)) pidlLast = ILClone(pidlLast); + else + hr = S_OK; ILFree(pidl); } else @@ -505,8 +520,18 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, psfi->dwAttributes = 0xffffffff; } if (psfParent) - IShellFolder_GetAttributesOf( psfParent, 1, (LPCITEMIDLIST*)&pidlLast, - &(psfi->dwAttributes) ); + { + IShellFolder_GetAttributesOf(psfParent, 1, (LPCITEMIDLIST*)&pidlLast, + &(psfi->dwAttributes)); + } + } + + if (flags & SHGFI_USEFILEATTRIBUTES) + { + if (flags & SHGFI_ICON) + { + psfi->dwAttributes = 0; + } } /* get the displayname */ @@ -516,7 +541,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, { lstrcpyW (psfi->szDisplayName, PathFindFileNameW(szFullPath)); } - else + else if (psfParent) { STRRET str; hr = IShellFolder_GetDisplayNameOf( psfParent, pidlLast, @@ -618,7 +643,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, ret = FALSE; } } - else + else if (psfParent) { hr = IShellFolder_GetUIObjectOf(psfParent, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconW, @@ -694,7 +719,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, } } } - else + else if (psfParent) { if (!(PidlToSicIndex(psfParent, pidlLast, !(flags & SHGFI_SMALLICON), uGilFlags, &(psfi->iIcon)))) @@ -769,33 +794,25 @@ DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes, pathW = temppath; } - if (psfi && (flags & SHGFI_ATTR_SPECIFIED)) - temppsfi.dwAttributes=psfi->dwAttributes; + if (psfi) + { + temppsfi.hIcon = psfi->hIcon; + temppsfi.iIcon = psfi->iIcon; + temppsfi.dwAttributes = psfi->dwAttributes; - if (psfi == NULL) - ret = SHGetFileInfoW(pathW, dwFileAttributes, NULL, 0, flags); - else ret = SHGetFileInfoW(pathW, dwFileAttributes, &temppsfi, sizeof(temppsfi), flags); + psfi->hIcon = temppsfi.hIcon; + psfi->iIcon = temppsfi.iIcon; + psfi->dwAttributes = temppsfi.dwAttributes; - if (psfi) - { - if(flags & SHGFI_ICON) - psfi->hIcon=temppsfi.hIcon; - if(flags & (SHGFI_SYSICONINDEX|SHGFI_ICON|SHGFI_ICONLOCATION)) - psfi->iIcon=temppsfi.iIcon; - if(flags & SHGFI_ATTRIBUTES) - psfi->dwAttributes=temppsfi.dwAttributes; - if(flags & (SHGFI_DISPLAYNAME|SHGFI_ICONLOCATION)) - { - WideCharToMultiByte(CP_ACP, 0, temppsfi.szDisplayName, -1, - psfi->szDisplayName, sizeof(psfi->szDisplayName), NULL, NULL); - } - if(flags & SHGFI_TYPENAME) - { - WideCharToMultiByte(CP_ACP, 0, temppsfi.szTypeName, -1, - psfi->szTypeName, sizeof(psfi->szTypeName), NULL, NULL); - } + WideCharToMultiByte(CP_ACP, 0, temppsfi.szDisplayName, -1, + psfi->szDisplayName, sizeof(psfi->szDisplayName), NULL, NULL); + + WideCharToMultiByte(CP_ACP, 0, temppsfi.szTypeName, -1, + psfi->szTypeName, sizeof(psfi->szTypeName), NULL, NULL); } + else + ret = SHGetFileInfoW(pathW, dwFileAttributes, NULL, 0, flags); HeapFree(GetProcessHeap(), 0, temppath);
6 years, 10 months
1
0
0
0
01/01: [D3D9][ARPING] Add missing va_start() and va_end() (#371)
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cd4db318d0a205be9b76d…
commit cd4db318d0a205be9b76d40431b82a588cd72428 Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com> AuthorDate: Fri Feb 16 10:28:25 2018 +0100 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Fri Feb 16 10:28:25 2018 +0100 [D3D9][ARPING] Add missing va_start() and va_end() (#371) --- dll/directx/d3d9/d3d9_helpers.c | 1 + modules/rosapps/applications/cmdutils/arping/arping.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dll/directx/d3d9/d3d9_helpers.c b/dll/directx/d3d9/d3d9_helpers.c index 6231f4031c..2747eab96d 100644 --- a/dll/directx/d3d9/d3d9_helpers.c +++ b/dll/directx/d3d9/d3d9_helpers.c @@ -48,6 +48,7 @@ HRESULT SafeFormatString(OUT LPSTR Buffer, IN DWORD BufferSize, IN LPCSTR Format va_start(vargs, FormatString); BytesWritten = _vsnprintf(Buffer, BufferSize-1, FormatString, vargs); + va_end(vargs); if (BytesWritten < BufferSize) return DDERR_GENERIC; diff --git a/modules/rosapps/applications/cmdutils/arping/arping.c b/modules/rosapps/applications/cmdutils/arping/arping.c index 461abbf5c3..8836f52352 100644 --- a/modules/rosapps/applications/cmdutils/arping/arping.c +++ b/modules/rosapps/applications/cmdutils/arping/arping.c @@ -59,26 +59,26 @@ void FormatOutput(UINT uID, ...) } va_start(valist, uID); - DataLength = FormatMessage(FORMAT_MESSAGE_FROM_STRING, Format, 0, 0, Buf,\ - sizeof(Buf) / sizeof(WCHAR), &valist); + sizeof(Buf) / sizeof(WCHAR), &valist); + va_end(valist); if(!DataLength) { if(GetLastError() != ERROR_INSUFFICIENT_BUFFER) { - va_end(valist); return; } + va_start(valist, uID); DataLength = FormatMessage(FORMAT_MESSAGE_FROM_STRING |\ FORMAT_MESSAGE_ALLOCATE_BUFFER,\ - Format, 0, 0, (LPWSTR)&pBuf, 0, &valist); + Format, 0, 0, (LPWSTR)&pBuf, 0, &valist); + va_end(valist); } if(!DataLength) { - va_end(valist); return; }
6 years, 10 months
1
0
0
0
01/01: [COM_APITEST] Reenable two known interfaces (#367). Caught by Thomas.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d1265b932c85bb5971b33…
commit d1265b932c85bb5971b331f4d0ca65831ce42166 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Fri Feb 16 00:15:41 2018 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Fri Feb 16 00:15:41 2018 +0100 [COM_APITEST] Reenable two known interfaces (#367). Caught by Thomas. --- modules/rostests/apitests/com/com_apitest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rostests/apitests/com/com_apitest.c b/modules/rostests/apitests/com/com_apitest.c index f9aac66049..bd1ec684c6 100644 --- a/modules/rostests/apitests/com/com_apitest.c +++ b/modules/rostests/apitests/com/com_apitest.c @@ -413,8 +413,8 @@ static KNOWN_INTERFACE KnownInterfaces[] = { ID_NAME(IID_IQueryContinue) }, { ID_NAME(IID_IUserNotification) }, -// { ID_NAME(IID_IUserNotificationCallback) }, // On Vista+ -// { ID_NAME(IID_IUserNotification2) }, // On Vista+ + { ID_NAME(IID_IUserNotificationCallback) }, // On Vista+ + { ID_NAME(IID_IUserNotification2) }, // On Vista+ { ID_NAME(IID_IAggregateFilterCondition), TRUE }, { ID_NAME(IID_IAliasRegistrationCallback), TRUE },
6 years, 10 months
1
0
0
0
01/01: [I8042PRT] Apply a workaround for Dell Latitude D610 CORE-14324
by Doug Lyons
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8ea42001d92bff2039801…
commit 8ea42001d92bff20398015db04556a4115e03f6a Author: Doug Lyons <douglyons(a)douglyons.com> AuthorDate: Thu Feb 15 22:48:01 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Thu Feb 15 22:49:39 2018 +0100 [I8042PRT] Apply a workaround for Dell Latitude D610 CORE-14324 --- drivers/input/i8042prt/hwhacks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/i8042prt/hwhacks.c b/drivers/input/i8042prt/hwhacks.c index 386a601073..c7915e16fd 100644 --- a/drivers/input/i8042prt/hwhacks.c +++ b/drivers/input/i8042prt/hwhacks.c @@ -64,6 +64,7 @@ const HARDWARE_TABLE i8042HardwareTable[] = { {{SYS_VENDOR, "Dell Inc."}, {SYS_PRODUCT, "Latitude D530 "}}, FL_INITHACK }, { {{SYS_VENDOR, "Dell Inc."}, {SYS_PRODUCT, "Latitude D531 "}}, FL_INITHACK }, { {{SYS_VENDOR, "Dell Inc."}, {SYS_PRODUCT, "Latitude D600 "}}, FL_INITHACK }, + { {{SYS_VENDOR, "Dell Inc."}, {SYS_PRODUCT, "Latitude D610 "}}, FL_INITHACK }, { {{SYS_VENDOR, "Dell Inc."}, {SYS_PRODUCT, "Latitude D620 "}}, FL_INITHACK }, { {{SYS_VENDOR, "Dell Inc."}, {SYS_PRODUCT, "Latitude D630 "}}, FL_INITHACK }, { {{SYS_VENDOR, "Dell Inc."}, {SYS_PRODUCT, "Latitude D810 "}}, FL_INITHACK },
6 years, 10 months
1
0
0
0
04/04: [SHELL32_APITEST] Add a test for the CUserNotification implementation. CORE-13177
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=02d17df0315c663a5374b…
commit 02d17df0315c663a5374bdc941ec3ac07881292c Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Thu Feb 15 01:17:32 2018 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Feb 15 22:38:38 2018 +0100 [SHELL32_APITEST] Add a test for the CUserNotification implementation. CORE-13177 --- modules/rostests/apitests/shell32/CMakeLists.txt | 1 + .../apitests/shell32/CUserNotification.cpp | 179 +++++++++++++++++++++ modules/rostests/apitests/shell32/testlist.c | 2 + 3 files changed, 182 insertions(+) diff --git a/modules/rostests/apitests/shell32/CMakeLists.txt b/modules/rostests/apitests/shell32/CMakeLists.txt index a30f8db886..e2c5e0c663 100644 --- a/modules/rostests/apitests/shell32/CMakeLists.txt +++ b/modules/rostests/apitests/shell32/CMakeLists.txt @@ -12,6 +12,7 @@ list(APPEND SOURCE CMyComputer.cpp CShellDesktop.cpp CShellLink.cpp + CUserNotification.cpp menu.cpp PathResolve.cpp SHCreateFileExtractIconW.cpp diff --git a/modules/rostests/apitests/shell32/CUserNotification.cpp b/modules/rostests/apitests/shell32/CUserNotification.cpp new file mode 100644 index 0000000000..b10185cee9 --- /dev/null +++ b/modules/rostests/apitests/shell32/CUserNotification.cpp @@ -0,0 +1,179 @@ +/* + * PROJECT: ReactOS API tests + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Test for CUserNotification + * COPYRIGHT: Copyright 2018 Hermes Belusca-Maito + */ + +#include "shelltest.h" + +#define NDEBUG +#include <debug.h> + +#define ok_hr(status, expected) ok_hex(status, expected) + +#define HRESULT_CANCELLED HRESULT_FROM_WIN32(ERROR_CANCELLED) + + +/* An implementation of the IQueryContinue interface */ +class CQueryContinue : public IQueryContinue +{ +private: + HRESULT m_hContinue; + +public: + CQueryContinue(HRESULT hContinue = S_OK) : m_hContinue(hContinue) {} + ~CQueryContinue() {} + + CQueryContinue& operator=(const CQueryContinue& qc) + { + if (this != &qc) + m_hContinue = qc.m_hContinue; + return *this; + } + + CQueryContinue& operator=(HRESULT hContinue) + { + m_hContinue = hContinue; + return *this; + } + + operator HRESULT() + { + return m_hContinue; + } + +public: + // IUnknown + virtual ULONG STDMETHODCALLTYPE AddRef() + { + return 1; + } + + virtual ULONG STDMETHODCALLTYPE Release() + { + return 0; + } + + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject) + { + return S_OK; + } + + // IQueryContinue + virtual HRESULT STDMETHODCALLTYPE QueryContinue(void) + { + // TRACE("IQueryContinue::QueryContinue() returning 0x%lx\n", m_hContinue); + return m_hContinue; + } +}; + + +static void +TestNotification(void) +{ + HRESULT hr; + CComPtr<IUserNotification> pUserNotif; + CQueryContinue queryContinue(S_OK); + + // hr = pUserNotif.CoCreateInstance(CLSID_UserNotification); + hr = ::CoCreateInstance(CLSID_UserNotification, NULL, CLSCTX_ALL, + /*IID_PPV_ARG(IUserNotification, &pUserNotif)*/ + IID_IUserNotification, (void**)&pUserNotif); + ok(hr == S_OK, "CoCreateInstance, hr = 0x%lx\n", hr); + if (FAILED(hr)) + { + skip("Could not instantiate IUserNotification\n"); + return; + } + + /* Set an invalid icon for the notification icon */ + hr = pUserNotif->SetIconInfo((HICON)0xdeadbeef, L"Tooltip text"); + ok_hr(hr, S_OK); + +#if 0 + /* Seting an invalid string would crash the application */ + hr = pUserNotif->SetIconInfo(NULL, (LPCWSTR)0xdeadbeef); + ok_hr(hr, S_OK); +#endif + + /* Set a default icon for the notification icon */ + hr = pUserNotif->SetIconInfo(NULL, L"Tooltip text"); + ok_hr(hr, S_OK); + + /* + * Since just displaying a notification icon without balloon hangs (expected), + * for making this test automatable we instead just test balloon functionality + * where timeouts can be programmed. + */ + + /* Set up a balloon associated to the notification icon */ + hr = pUserNotif->SetBalloonInfo(L"Balloon title", L"Balloon text", NIIF_ERROR); + ok_hr(hr, S_OK); + + /* + * Try to display twice the balloon if the user cancels it. + * Without setting balloon retry, we would wait for a very long time... + */ + hr = pUserNotif->SetBalloonRetry(2000, 1000, 2); + ok_hr(hr, S_OK); + + /* Display the balloon and also the tooltip if one points on the icon */ + hr = pUserNotif->Show(NULL, 0); + ok_hr(hr, HRESULT_CANCELLED); + + /* + * Setting icon information *after* having enabled balloon info, + * allows to automatically set the notification icon according + * to the dwInfoFlags passed to SetBalloonInfo() and by giving + * NULL to the hIcon parameter of SetIconInfo(). + */ + hr = pUserNotif->SetIconInfo(NULL, NULL); + ok_hr(hr, S_OK); + + /* Display the balloon and also the tooltip if one points on the icon */ + hr = pUserNotif->Show(NULL, 0); + ok_hr(hr, HRESULT_CANCELLED); + + /* + * This line shows the balloon, but without title nor icon in it. + * Note that the balloon icon is not displayed when not setting any title. + */ + hr = pUserNotif->SetBalloonInfo(NULL, L"Balloon text", NIIF_WARNING); + ok_hr(hr, S_OK); + + hr = pUserNotif->Show(NULL, 0); + ok_hr(hr, HRESULT_CANCELLED); + + + /* Test support of the IQueryContinue interface */ + + hr = pUserNotif->SetBalloonInfo(L"Balloon title", L"Balloon text", NIIF_WARNING); + ok_hr(hr, S_OK); + + hr = pUserNotif->Show(&queryContinue, 2000); /* Timeout of 2 seconds */ + ok_hr(hr, HRESULT_CANCELLED); + +#if 0 // Commented because this test (the Show() call) is unreliable. + /* Try to hide the balloon by setting an empty string (can use either NULL or L"") */ + hr = pUserNotif->SetBalloonInfo(L"Balloon title", NULL, NIIF_WARNING); + ok_hr(hr, S_OK); + + hr = pUserNotif->Show(&queryContinue, 2000); /* Timeout of 2 seconds */ + ok_hr(hr, HRESULT_CANCELLED); +#endif + + hr = pUserNotif->SetBalloonInfo(L"Balloon title", L"Balloon text", NIIF_WARNING); + ok_hr(hr, S_OK); + + queryContinue = S_FALSE; + hr = pUserNotif->Show(&queryContinue, 2000); /* Timeout of 2 seconds */ + ok_hr(hr, S_FALSE); +} + +START_TEST(CUserNotification) +{ + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + TestNotification(); + CoUninitialize(); +} diff --git a/modules/rostests/apitests/shell32/testlist.c b/modules/rostests/apitests/shell32/testlist.c index b0a8638046..792bf49503 100644 --- a/modules/rostests/apitests/shell32/testlist.c +++ b/modules/rostests/apitests/shell32/testlist.c @@ -9,6 +9,7 @@ extern void func_CFSFolder(void); extern void func_CMyComputer(void); extern void func_CShellDesktop(void); extern void func_CShellLink(void); +extern void func_CUserNotification(void); extern void func_menu(void); extern void func_PathResolve(void); extern void func_SHCreateFileExtractIconW(void); @@ -23,6 +24,7 @@ const struct test winetest_testlist[] = { "CMyComputer", func_CMyComputer }, { "CShellDesktop", func_CShellDesktop }, { "CShellLink", func_CShellLink }, + { "CUserNotification", func_CUserNotification }, { "menu", func_menu }, { "PathResolve", func_PathResolve }, { "SHCreateFileExtractIconW", func_SHCreateFileExtractIconW },
6 years, 10 months
1
0
0
0
03/04: [SHELL32] Implement the CUserNotification class, which implements the IUserNotification interface. CORE-13177
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fe4704fa64eab91615913…
commit fe4704fa64eab916159131a5ec3bc8074958b9f2 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Wed Feb 7 02:20:26 2018 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Feb 15 22:38:22 2018 +0100 [SHELL32] Implement the CUserNotification class, which implements the IUserNotification interface. CORE-13177 --- dll/win32/shell32/CMakeLists.txt | 1 + dll/win32/shell32/CUserNotification.cpp | 478 +++++++++++++++++++++++++ dll/win32/shell32/CUserNotification.h | 111 ++++++ dll/win32/shell32/precomp.h | 1 + dll/win32/shell32/res/rgs/usernotification.rgs | 43 +++ dll/win32/shell32/rgs_res.rc | 1 + dll/win32/shell32/shell32.cpp | 5 +- dll/win32/shell32/shresdef.h | 3 +- dll/win32/shell32/systray.cpp | 2 +- 9 files changed, 641 insertions(+), 4 deletions(-) diff --git a/dll/win32/shell32/CMakeLists.txt b/dll/win32/shell32/CMakeLists.txt index 8bdf3ee56f..76ebf226e3 100644 --- a/dll/win32/shell32/CMakeLists.txt +++ b/dll/win32/shell32/CMakeLists.txt @@ -67,6 +67,7 @@ list(APPEND SOURCE CDefViewBckgrndMenu.cpp stubs.cpp systray.cpp + CUserNotification.cpp CDefaultContextMenu.cpp COpenWithMenu.cpp CNewMenu.cpp diff --git a/dll/win32/shell32/CUserNotification.cpp b/dll/win32/shell32/CUserNotification.cpp new file mode 100644 index 0000000000..c76bd0b10f --- /dev/null +++ b/dll/win32/shell32/CUserNotification.cpp @@ -0,0 +1,478 @@ +/* + * Copyright 2018 Hermes Belusca-Maito + * + * Pass on icon notification messages to the systray implementation + * in the currently running shell. + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "precomp.h" + +#include <mmsystem.h> +#undef PlaySound + +WINE_DEFAULT_DEBUG_CHANNEL(shell_notify); + + +/* Use Windows-compatible window callback message */ +#define WM_TRAYNOTIFY (WM_USER + 100) + +/* Notification icon ID */ +#define ID_NOTIFY_ICON 0 + +/* Balloon timers */ +#define ID_BALLOON_TIMEOUT 1 +#define ID_BALLOON_DELAYREMOVE 2 +#define ID_BALLOON_QUERYCONT 3 +#define ID_BALLOON_SHOWTIME 4 + +#define BALLOON_DELAYREMOVE_TIMEOUT 250 // milliseconds + + +CUserNotification::CUserNotification() : + m_hWorkerWnd(NULL), + m_hIcon(NULL), + m_dwInfoFlags(0), + m_uShowTime(15000), + m_uInterval(10000), + m_cRetryCount(-1), + m_uContinuePoolInterval(0), + m_bIsShown(FALSE), + m_hRes(S_OK), + m_pqc(NULL) +{ +} + +CUserNotification::~CUserNotification() +{ + /* If we have a notification window... */ + if (m_hWorkerWnd) + { + /* ... remove the notification icon and destroy the window */ + RemoveIcon(); + ::DestroyWindow(m_hWorkerWnd); + m_hWorkerWnd = NULL; + } + + /* Destroy our local icon copy */ + if (m_hIcon) + ::DestroyIcon(m_hIcon); +} + +VOID CUserNotification::RemoveIcon() +{ + NOTIFYICONDATAW nid = {0}; + + nid.cbSize = NOTIFYICONDATAW_V3_SIZE; // sizeof(nid); + nid.hWnd = m_hWorkerWnd; + nid.uID = ID_NOTIFY_ICON; + + /* Remove the notification icon */ + ::Shell_NotifyIconW(NIM_DELETE, &nid); +} + +VOID CUserNotification::DelayRemoveIcon(IN HRESULT hRes) +{ + /* Set the return value for CUserNotification::Show() and defer icon removal */ + m_hRes = hRes; + ::SetTimer(m_hWorkerWnd, ID_BALLOON_DELAYREMOVE, + BALLOON_DELAYREMOVE_TIMEOUT, NULL); +} + +VOID CUserNotification::TimeoutIcon() +{ + /* + * The balloon timed out, we need to wait before showing it again. + * If we retried too many times, delete the notification icon. + */ + if (m_cRetryCount > 0) + { + /* Decrement the retry count */ + --m_cRetryCount; + + /* Set the timeout interval timer */ + ::SetTimer(m_hWorkerWnd, ID_BALLOON_TIMEOUT, m_uInterval, NULL); + } + else + { + /* No other retry: delete the notification icon */ + DelayRemoveIcon(HRESULT_FROM_WIN32(ERROR_CANCELLED)); + } +} + +VOID CUserNotification::SetUpNotifyData( + IN UINT uFlags, + IN OUT PNOTIFYICONDATAW pnid) +{ + pnid->cbSize = NOTIFYICONDATAW_V3_SIZE; // sizeof(nid); + pnid->hWnd = m_hWorkerWnd; + pnid->uID = ID_NOTIFY_ICON; + // pnid->uVersion = NOTIFYICON_VERSION; + + if (uFlags & NIF_MESSAGE) + { + pnid->uFlags |= NIF_MESSAGE; + pnid->uCallbackMessage = WM_TRAYNOTIFY; + } + + if (uFlags & NIF_ICON) + { + pnid->uFlags |= NIF_ICON; + /* Use a default icon if we do not have one already */ + pnid->hIcon = (m_hIcon ? m_hIcon : LoadIcon(NULL, IDI_WINLOGO)); + } + + if (uFlags & NIF_TIP) + { + pnid->uFlags |= NIF_TIP; + ::StringCchCopyW(pnid->szTip, _countof(pnid->szTip), m_szTip); + } + + if (uFlags & NIF_INFO) + { + pnid->uFlags |= NIF_INFO; + + // pnid->uTimeout = m_uShowTime; // NOTE: Deprecated + pnid->dwInfoFlags = m_dwInfoFlags; + + ::StringCchCopyW(pnid->szInfo, _countof(pnid->szInfo), m_szInfo); + ::StringCchCopyW(pnid->szInfoTitle, _countof(pnid->szInfoTitle), m_szInfoTitle); + } +} + + +/* IUserNotification Implementation */ + +HRESULT STDMETHODCALLTYPE +CUserNotification::SetBalloonInfo( + IN LPCWSTR pszTitle, + IN LPCWSTR pszText, + IN DWORD dwInfoFlags) +{ + NOTIFYICONDATAW nid = {0}; + + m_szInfo = pszText; + m_szInfoTitle = pszTitle; + m_dwInfoFlags = dwInfoFlags; + + /* Update the notification icon if we have one */ + if (!m_hWorkerWnd) + return S_OK; + + /* Modify the notification icon */ + SetUpNotifyData(NIF_INFO, &nid); + if (::Shell_NotifyIconW(NIM_MODIFY, &nid)) + return S_OK; + else + return E_FAIL; +} + +HRESULT STDMETHODCALLTYPE +CUserNotification::SetBalloonRetry( + IN DWORD dwShowTime, // Time intervals in milliseconds + IN DWORD dwInterval, + IN UINT cRetryCount) +{ + m_uShowTime = dwShowTime; + m_uInterval = dwInterval; + m_cRetryCount = cRetryCount; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE +CUserNotification::SetIconInfo( + IN HICON hIcon, + IN LPCWSTR pszToolTip) +{ + NOTIFYICONDATAW nid = {0}; + + /* Destroy our local icon copy */ + if (m_hIcon) + ::DestroyIcon(m_hIcon); + + if (hIcon) + { + /* Copy the icon from the user */ + m_hIcon = ::CopyIcon(hIcon); + } + else + { + /* Use the same icon as the one for the balloon if specified */ + UINT uIcon = (m_dwInfoFlags & NIIF_ICON_MASK); + LPCWSTR pIcon = NULL; + + if (uIcon == NIIF_INFO) + pIcon = IDI_INFORMATION; + else if (uIcon == NIIF_WARNING) + pIcon = IDI_WARNING; + else if (uIcon == NIIF_ERROR) + pIcon = IDI_ERROR; + else if (uIcon == NIIF_USER) + pIcon = NULL; + + m_hIcon = (pIcon ? ::LoadIconW(NULL, pIcon) : NULL); + } + + m_szTip = pszToolTip; + + /* Update the notification icon if we have one */ + if (!m_hWorkerWnd) + return S_OK; + + /* Modify the notification icon */ + SetUpNotifyData(NIF_ICON | NIF_TIP, &nid); + if (::Shell_NotifyIconW(NIM_MODIFY, &nid)) + return S_OK; + else + return E_FAIL; +} + + +LRESULT CALLBACK +CUserNotification::WorkerWndProc( + IN HWND hWnd, + IN UINT uMsg, + IN WPARAM wParam, + IN LPARAM lParam) +{ + /* Retrieve the current user notification object stored in the window extra bits */ + CUserNotification* pThis = reinterpret_cast<CUserNotification*>(::GetWindowLongPtrW(hWnd, 0)); + ASSERT(pThis); + ASSERT(hWnd == pThis->m_hWorkerWnd); + + TRACE("Msg = 0x%x\n", uMsg); + switch (uMsg) + { + /* + * We do not receive any WM_(NC)CREATE message since worker windows + * are first created using the default window procedure DefWindowProcW. + * The window procedure is changed only subsequently to the user one. + * We however receive WM_(NC)DESTROY messages. + */ + case WM_DESTROY: + { + /* Post a WM_QUIT message only if the Show() method's message loop is running */ + if (pThis->m_bIsShown) + ::PostQuitMessage(0); + return 0; + } + + case WM_NCDESTROY: + { + ::SetWindowLongPtrW(hWnd, 0, (LONG_PTR)NULL); + pThis->m_hWorkerWnd = NULL; + return 0; + } + + case WM_QUERYENDSESSION: + { + /* + * User session is ending or a shutdown is occurring: perform cleanup. + * Set the return value for CUserNotification::Show() and remove the notification. + */ + pThis->m_hRes = HRESULT_FROM_WIN32(ERROR_CANCELLED); + pThis->RemoveIcon(); + ::DestroyWindow(pThis->m_hWorkerWnd); + return TRUE; + } + + case WM_TIMER: + { + TRACE("WM_TIMER(0x%lx)\n", wParam); + + /* Destroy the associated timer */ + ::KillTimer(hWnd, (UINT_PTR)wParam); + + if (wParam == ID_BALLOON_TIMEOUT) + { + /* Timeout interval timer expired: display the balloon again */ + NOTIFYICONDATAW nid = {0}; + pThis->SetUpNotifyData(NIF_INFO, &nid); + ::Shell_NotifyIconW(NIM_MODIFY, &nid); + } + else if (wParam == ID_BALLOON_DELAYREMOVE) + { + /* Delay-remove timer expired: remove the notification */ + pThis->RemoveIcon(); + ::DestroyWindow(pThis->m_hWorkerWnd); + } + else if (wParam == ID_BALLOON_QUERYCONT) + { + /* + * Query-continue timer expired: ask the user whether the + * notification should continue to be displayed or not. + */ + if (pThis->m_pqc && pThis->m_pqc->QueryContinue() == S_OK) + { + /* The notification can be displayed */ + ::SetTimer(hWnd, ID_BALLOON_QUERYCONT, pThis->m_uContinuePoolInterval, NULL); + } + else + { + /* The notification should be removed */ + pThis->DelayRemoveIcon(S_FALSE); + } + } + else if (wParam == ID_BALLOON_SHOWTIME) + { + /* Show-time timer expired: wait before showing the balloon again */ + pThis->TimeoutIcon(); + } + return 0; + } + + /* + * Shell User Notification message. + * We use NOTIFYICON_VERSION == 0 or 3 callback version, with: + * wParam == identifier of the taskbar icon in which the event occurred; + * lParam == holds the mouse or keyboard message associated with the event. + */ + case WM_TRAYNOTIFY: + { + TRACE("WM_TRAYNOTIFY - wParam = 0x%lx ; lParam = 0x%lx\n", wParam, lParam); + ASSERT(wParam == ID_NOTIFY_ICON); + + switch (lParam) + { + case NIN_BALLOONSHOW: + TRACE("NIN_BALLOONSHOW\n"); + break; + + case NIN_BALLOONHIDE: + TRACE("NIN_BALLOONHIDE\n"); + break; + + /* The balloon timed out, or the user closed it by clicking on the 'X' button */ + case NIN_BALLOONTIMEOUT: + { + TRACE("NIN_BALLOONTIMEOUT\n"); + pThis->TimeoutIcon(); + break; + } + + /* The user clicked on the balloon: delete the notification icon */ + case NIN_BALLOONUSERCLICK: + TRACE("NIN_BALLOONUSERCLICK\n"); + /* Fall back to icon click behaviour */ + + /* The user clicked on the notification icon: delete it */ + case WM_LBUTTONDOWN: + case WM_RBUTTONDOWN: + { + pThis->DelayRemoveIcon(S_OK); + break; + } + + default: + break; + } + + return 0; + } + } + + return ::DefWindowProcW(hWnd, uMsg, wParam, lParam); +} + + +// Blocks until the notification times out. +HRESULT STDMETHODCALLTYPE +CUserNotification::Show( + IN IQueryContinue* pqc, + IN DWORD dwContinuePollInterval) +{ + NOTIFYICONDATAW nid = {0}; + MSG msg; + + /* Create the hidden notification message worker window if we do not have one already */ + if (!m_hWorkerWnd) + { + m_hWorkerWnd = ::SHCreateWorkerWindowW(CUserNotification::WorkerWndProc, + NULL, 0, 0, NULL, (LONG_PTR)this); + if (!m_hWorkerWnd) + { + FAILED_UNEXPECTEDLY(E_FAIL); + return E_FAIL; + } + + /* Add and display the notification icon */ + SetUpNotifyData(NIF_MESSAGE | NIF_ICON | NIF_TIP | NIF_INFO, &nid); + if (!::Shell_NotifyIconW(NIM_ADD, &nid)) + { + ::DestroyWindow(m_hWorkerWnd); + m_hWorkerWnd = NULL; + return E_FAIL; + } + } + + m_hRes = S_OK; + + /* Set up the user-continue callback mechanism */ + m_pqc = pqc; + if (pqc) + { + m_uContinuePoolInterval = dwContinuePollInterval; + ::SetTimer(m_hWorkerWnd, ID_BALLOON_QUERYCONT, m_uContinuePoolInterval, NULL); + } + + /* Control how long the balloon notification is displayed */ + if ((nid.uFlags & NIF_INFO) && !*nid.szInfo /* && !*nid.szInfoTitle */) + ::SetTimer(m_hWorkerWnd, ID_BALLOON_SHOWTIME, m_uShowTime, NULL); + + /* Dispatch messsages to the worker window */ + m_bIsShown = TRUE; + while (::GetMessageW(&msg, NULL, 0, 0)) + { + ::TranslateMessage(&msg); + ::DispatchMessageW(&msg); + } + m_bIsShown = FALSE; + + /* Reset the user-continue callback mechanism */ + if (pqc) + { + ::KillTimer(m_hWorkerWnd, ID_BALLOON_QUERYCONT); + m_uContinuePoolInterval = 0; + } + m_pqc = NULL; + + /* Return the notification error code */ + return m_hRes; +} + +#if 0 // IUserNotification2 +// Blocks until the notification times out. +HRESULT STDMETHODCALLTYPE +CUserNotification::Show( + IN IQueryContinue* pqc, + IN DWORD dwContinuePollInterval, + IN IUserNotificationCallback* pSink) +{ + return S_OK; +} +#endif + +HRESULT STDMETHODCALLTYPE +CUserNotification::PlaySound( + IN LPCWSTR pszSoundName) +{ + /* Call the Win32 API - Ignore the PlaySoundW() return value as on Windows */ + ::PlaySoundW(pszSoundName, + NULL, + SND_ALIAS | SND_APPLICATION | + SND_NOSTOP | SND_NODEFAULT | SND_ASYNC); + return S_OK; +} diff --git a/dll/win32/shell32/CUserNotification.h b/dll/win32/shell32/CUserNotification.h new file mode 100644 index 0000000000..4f01e0c9be --- /dev/null +++ b/dll/win32/shell32/CUserNotification.h @@ -0,0 +1,111 @@ +/* + * Copyright 2018 Hermes Belusca-Maito + * + * Pass on icon notification messages to the systray implementation + * in the currently running shell. + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef _USERNOTIFICATION_H_ +#define _USERNOTIFICATION_H_ + +#undef PlaySound + +class CUserNotification : + public CComCoClass<CUserNotification, &CLSID_UserNotification>, + public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IUserNotification +// public IUserNotification2 // On Vista+ +{ +private: + HWND m_hWorkerWnd; + HICON m_hIcon; + DWORD m_dwInfoFlags; + UINT m_uShowTime; + UINT m_uInterval; + UINT m_cRetryCount; + UINT m_uContinuePoolInterval; + BOOL m_bIsShown; + HRESULT m_hRes; + IQueryContinue* m_pqc; + CStringW m_szTip; + CStringW m_szInfo; + CStringW m_szInfoTitle; + +private: + VOID RemoveIcon(); + VOID DelayRemoveIcon(IN HRESULT hRes); + VOID TimeoutIcon(); + + VOID SetUpNotifyData( + IN UINT uFlags, + IN OUT PNOTIFYICONDATAW pnid); + + static LRESULT CALLBACK + WorkerWndProc( + IN HWND hWnd, + IN UINT uMsg, + IN WPARAM wParam, + IN LPARAM lParam); + +public: + CUserNotification(); + ~CUserNotification(); + + // IUserNotification + virtual HRESULT STDMETHODCALLTYPE SetBalloonInfo( + IN LPCWSTR pszTitle, + IN LPCWSTR pszText, + IN DWORD dwInfoFlags); + + virtual HRESULT STDMETHODCALLTYPE SetBalloonRetry( + IN DWORD dwShowTime, // Time intervals in milliseconds + IN DWORD dwInterval, + IN UINT cRetryCount); + + virtual HRESULT STDMETHODCALLTYPE SetIconInfo( + IN HICON hIcon, + IN LPCWSTR pszToolTip); + + // Blocks until the notification times out. + virtual HRESULT STDMETHODCALLTYPE Show( + IN IQueryContinue* pqc, + IN DWORD dwContinuePollInterval); + + virtual HRESULT STDMETHODCALLTYPE PlaySound( + IN LPCWSTR pszSoundName); + +#if 0 + // IUserNotification2 + // Blocks until the notification times out. + virtual HRESULT STDMETHODCALLTYPE Show( + IN IQueryContinue* pqc, + IN DWORD dwContinuePollInterval, + IN IUserNotificationCallback* pSink); +#endif + + DECLARE_REGISTRY_RESOURCEID(IDR_USERNOTIFICATION) + DECLARE_NOT_AGGREGATABLE(CUserNotification) + + DECLARE_PROTECT_FINAL_CONSTRUCT() + + BEGIN_COM_MAP(CUserNotification) + COM_INTERFACE_ENTRY_IID(IID_IUserNotification , IUserNotification ) + // COM_INTERFACE_ENTRY_IID(IID_IUserNotification2, IUserNotification2) + END_COM_MAP() +}; + +#endif /* _USERNOTIFICATION_H_ */ diff --git a/dll/win32/shell32/precomp.h b/dll/win32/shell32/precomp.h index f059e5b0b9..f85423ea85 100644 --- a/dll/win32/shell32/precomp.h +++ b/dll/win32/shell32/precomp.h @@ -84,6 +84,7 @@ #include "shellmenu/CMenuSite.h" #include "shellmenu/CMergedFolder.h" #include "shellmenu/shellmenu.h" +#include "CUserNotification.h" #include <wine/debug.h> #include <wine/unicode.h> diff --git a/dll/win32/shell32/res/rgs/usernotification.rgs b/dll/win32/shell32/res/rgs/usernotification.rgs new file mode 100644 index 0000000000..61c585f432 --- /dev/null +++ b/dll/win32/shell32/res/rgs/usernotification.rgs @@ -0,0 +1,43 @@ +HKCR +{ + NoRemove AppID + { + {0010890E-8789-413C-ADBC-48F5B511B3AF} + { + val DllSurrogate = s '' + val RunAs = s 'Interactive User' + } + } + NoRemove CLSID + { + ForceRemove {0010890E-8789-413C-ADBC-48F5B511B3AF} = s 'User Notification' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + val AppID = s '{0010890E-8789-413C-ADBC-48F5B511B3AF}' + } + NoRemove Interface + { + ForceRemove {7307055C-B24A-486B-9F25-163E597A28A9} = s 'IQueryContinue' + { + NumMethods = s '4' + { + } + ProxyStubClsid32 = s '{B8DA6310-E19B-11D0-933C-00A0C90DCAA9}' + { + } + } + ForceRemove {BA9711BA-5893-4787-A7E1-41277151550B} = s 'IUserNotification' + { + NumMethods = s '8' + { + } + ProxyStubClsid32 = s '{B8DA6310-E19B-11D0-933C-00A0C90DCAA9}' + { + } + } + } + } +} diff --git a/dll/win32/shell32/rgs_res.rc b/dll/win32/shell32/rgs_res.rc index 118eb51e01..67e072d530 100644 --- a/dll/win32/shell32/rgs_res.rc +++ b/dll/win32/shell32/rgs_res.rc @@ -26,4 +26,5 @@ IDR_DRVDEFEXT REGISTRY "res/rgs/shelldrvdefext.rgs" IDR_EXEDROPHANDLER REGISTRY "res/rgs/exedrophandler.rgs" IDR_MERGEDFOLDER REGISTRY "res/rgs/mergedfolder.rgs" IDR_REBARBANDSITE REGISTRY "res/rgs/rebarbandsite.rgs" +IDR_USERNOTIFICATION REGISTRY "res/rgs/usernotification.rgs" IDR_SHELL REGISTRY "res/rgs/shell.rgs" diff --git a/dll/win32/shell32/shell32.cpp b/dll/win32/shell32/shell32.cpp index 12c5a1e24d..ac0a3bd08c 100644 --- a/dll/win32/shell32/shell32.cpp +++ b/dll/win32/shell32/shell32.cpp @@ -253,9 +253,10 @@ BEGIN_OBJECT_MAP(ObjectMap) OBJECT_ENTRY(CLSID_MergedFolder, CMergedFolder) OBJECT_ENTRY(CLSID_ExeDropHandler, CExeDropHandler) OBJECT_ENTRY(CLSID_QueryAssociations, CQueryAssociations) + OBJECT_ENTRY(CLSID_UserNotification, CUserNotification) END_OBJECT_MAP() -CShell32Module gModule; +CShell32Module gModule; /*********************************************************************** @@ -311,7 +312,7 @@ STDAPI DllGetVersion(DLLVERSIONINFO *pdvi) * all are once per process * */ -HINSTANCE shell32_hInstance; +HINSTANCE shell32_hInstance; /************************************************************************* * SHELL32 DllMain diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h index 5b607a6943..53e4896713 100644 --- a/dll/win32/shell32/shresdef.h +++ b/dll/win32/shell32/shresdef.h @@ -689,4 +689,5 @@ #define IDR_QUERYASSOCIATIONS 152 #define IDR_MERGEDFOLDER 153 #define IDR_REBARBANDSITE 154 -#define IDR_SHELL 155 +#define IDR_USERNOTIFICATION 155 +#define IDR_SHELL 156 diff --git a/dll/win32/shell32/systray.cpp b/dll/win32/shell32/systray.cpp index 482abf0e1b..a64d68950c 100644 --- a/dll/win32/shell32/systray.cpp +++ b/dll/win32/shell32/systray.cpp @@ -22,7 +22,7 @@ #include "precomp.h" -WINE_DEFAULT_DEBUG_CHANNEL(shell); +WINE_DEFAULT_DEBUG_CHANNEL(shell_notify); /************************************************************************* * Shell_NotifyIcon [SHELL32.296]
6 years, 10 months
1
0
0
0
02/04: [COM_APITEST] Add tests for IUserNotification. CORE-13177
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=70bbdca202b1c2eac59f4…
commit 70bbdca202b1c2eac59f4660128ed4036c99f50c Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Wed Feb 7 02:14:07 2018 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Feb 15 22:37:32 2018 +0100 [COM_APITEST] Add tests for IUserNotification. CORE-13177 --- modules/rostests/apitests/com/com_apitest.c | 5 +++++ modules/rostests/apitests/com/shell32.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/modules/rostests/apitests/com/com_apitest.c b/modules/rostests/apitests/com/com_apitest.c index 1627084a3d..f9aac66049 100644 --- a/modules/rostests/apitests/com/com_apitest.c +++ b/modules/rostests/apitests/com/com_apitest.c @@ -411,6 +411,11 @@ static KNOWN_INTERFACE KnownInterfaces[] = { ID_NAME(CLSID_ShellDesktop), TRUE }, + { ID_NAME(IID_IQueryContinue) }, + { ID_NAME(IID_IUserNotification) }, +// { ID_NAME(IID_IUserNotificationCallback) }, // On Vista+ +// { ID_NAME(IID_IUserNotification2) }, // On Vista+ + { ID_NAME(IID_IAggregateFilterCondition), TRUE }, { ID_NAME(IID_IAliasRegistrationCallback), TRUE }, { ID_NAME(IID_IAssociationArrayInitialize), TRUE }, diff --git a/modules/rostests/apitests/com/shell32.c b/modules/rostests/apitests/com/shell32.c index 0b6e63c1a3..c7bae24ba2 100644 --- a/modules/rostests/apitests/com/shell32.c +++ b/modules/rostests/apitests/com/shell32.c @@ -613,6 +613,14 @@ static const CLASS_AND_INTERFACES ExpectedInterfaces[] = { 0xc, &IID_IServiceProvider }, } }, + { + ID_NAME(CLSID_UserNotification), + { + { 0x0, &IID_IUserNotification }, + { 0x0, &IID_IUnknown }, +// { 0x4, &IID_IUserNotification2 }, // On Vista+ + } + }, }; static const INT ExpectedInterfaceCount = RTL_NUMBER_OF(ExpectedInterfaces);
6 years, 10 months
1
0
0
0
01/04: [PSDK] Add definitions for IUserNotification, IQueryContinue, and IUserNotification2 and IUserNotificationCallback (Vista+). CORE-13177
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cd83ed1ac51de4b8522f6…
commit cd83ed1ac51de4b8522f61411cbf9fa10d7d2a56 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Wed Feb 7 02:15:41 2018 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Feb 15 22:36:50 2018 +0100 [PSDK] Add definitions for IUserNotification, IQueryContinue, and IUserNotification2 and IUserNotificationCallback (Vista+). CORE-13177 --- sdk/include/psdk/shobjidl.idl | 121 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) diff --git a/sdk/include/psdk/shobjidl.idl b/sdk/include/psdk/shobjidl.idl index a7bbf3d756..cd5374357c 100644 --- a/sdk/include/psdk/shobjidl.idl +++ b/sdk/include/psdk/shobjidl.idl @@ -36,6 +36,10 @@ import "objectarray.idl"; cpp_quote("/* FIXME: #include <sherrors.h> */") +cpp_quote("#ifdef WINE_NO_UNICODE_MACROS") +cpp_quote("#undef PlaySound") +cpp_quote("#endif") + /***************************************************************************** * IPersistFolder interface @@ -4432,6 +4436,17 @@ library ShellObjects { interface IApplicationActivationManager; } + +#ifdef __REACTOS__ + [ + uuid(0010890e-8789-413c-adbc-48f5b511b3af) + ] + coclass UserNotification + { + interface IUserNotification; + } +#endif // __REACTOS__ + } enum _OPPROGDLGF @@ -4625,3 +4640,109 @@ interface IFolderBandPriv : IUnknown HRESULT SetNoText([in] BOOL fNoText); } + + +#ifdef __REACTOS__ +/***************************************************************************** + * IQueryContinue interface + */ + +[ + uuid(7307055c-b24a-486b-9f25-163e597a28a9), + object, + pointer_default(unique) +] +interface IQueryContinue : IUnknown +{ + // Returns S_OK if the operation should continue, and S_FALSE if not. + HRESULT QueryContinue(); +} + + +/***************************************************************************** + * IUserNotification interface + */ + +[ + uuid(ba9711ba-5893-4787-a7e1-41277151550b), + object, + pointer_default(unique) +] +interface IUserNotification : IUnknown +{ + HRESULT SetBalloonInfo( + [in, unique, string] LPCWSTR pszTitle, + [in, unique, string] LPCWSTR pszText, + [in] DWORD dwInfoFlags); + + HRESULT SetBalloonRetry( + [in] DWORD dwShowTime, // Time intervals in milliseconds + [in] DWORD dwInterval, + [in] UINT cRetryCount); + + HRESULT SetIconInfo( + [in, unique] HICON hIcon, + [in, unique, string] LPCWSTR pszToolTip); + + // Blocks until the notification times out. + HRESULT Show( + [in, unique] IQueryContinue *pqc, + [in] DWORD dwContinuePollInterval); + + HRESULT PlaySound( + [in, string] LPCWSTR pszSoundName); +}; + + +/***************************************************************************** + * IUserNotificationCallback interface (Vista+) + */ + +[ + uuid(19108294-0441-4aff-8013-fa0a730b0bea), + object +] +interface IUserNotificationCallback : IUnknown +{ + HRESULT OnBalloonUserClick([in] POINT * pt); + HRESULT OnLeftClick([in] POINT * pt); + HRESULT OnContextMenu([in] POINT * pt); +}; + + +/***************************************************************************** + * IUserNotification2 interface (Vista+) + */ + +[ + uuid(215913cc-57eb-4fab-ab5a-e5fa7bea2a6c), + object, + pointer_default(unique) +] +interface IUserNotification2 : IUnknown +{ + HRESULT SetBalloonInfo( + [in, unique, string] LPCWSTR pszTitle, + [in, unique, string] LPCWSTR pszText, + [in] DWORD dwInfoFlags); + + HRESULT SetBalloonRetry( + [in] DWORD dwShowTime, // Time intervals in milliseconds + [in] DWORD dwInterval, + [in] UINT cRetryCount); + + HRESULT SetIconInfo( + [in, unique] HICON hIcon, + [in, unique, string] LPCWSTR pszToolTip); + + // Blocks until the notification times out. + HRESULT Show( + [in, unique] IQueryContinue *pqc, + [in] DWORD dwContinuePollInterval, + [in, unique] IUserNotificationCallback *pSink); + + HRESULT PlaySound( + [in, string] LPCWSTR pszSoundName); +}; + +#endif // __REACTOS__
6 years, 10 months
1
0
0
0
01/01: [SC] Disable debug messages on user interface (#382)
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=46f96733bd176b5cf8438…
commit 46f96733bd176b5cf84381fba1e7792143946c28 Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com> AuthorDate: Thu Feb 15 14:58:17 2018 +0100 Commit: Ged Murphy <gedmurphy(a)reactos.org> CommitDate: Thu Feb 15 13:58:17 2018 +0000 [SC] Disable debug messages on user interface (#382) --- base/applications/sc/sc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/applications/sc/sc.h b/base/applications/sc/sc.h index 3357475d43..3dbacee0c8 100644 --- a/base/applications/sc/sc.h +++ b/base/applications/sc/sc.h @@ -14,7 +14,8 @@ #include <ndk/setypes.h> -#define SCDBG +// Uncomment to enable debug messages on user interface. +// #define SCDBG typedef struct {
6 years, 10 months
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
24
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Results per page:
10
25
50
100
200