FONT 10, "MS Sans Serif"
BEGIN
LTEXT "Please select the application you wish to uninstall:",IDC_PLEASESELECT,10,10,250,14
+ EDITTEXT IDC_FILTER,10,25,250,14,ES_AUTOHSCROLL
LISTBOX IDC_LIST,10,43,250,106,LBS_NOINTEGRALHEIGHT |
LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Uninstall",IDC_UNINSTALL,270,48,50,14
STRINGTABLE DISCARDABLE {
IDS_APPNAME, "Wine Application Unsinstaller"
IDS_ABOUT, "Wine Application Uninstaller (C) 2005 by Andreas Mohr, Hannu Valtonen and Jonathan Ernst."
- IDS_ABOUTTITLE, "About Unsinstaller"
+ IDS_ABOUTTITLE, "About Uninstaller"
IDS_REGISTRYKEYNOTAVAILABLE, "Uninstall registry key not available (yet), nothing to do !"
IDS_UNINSTALLFAILED, "Execution of uninstall command '%s' failed, perhaps due to missing executable.\r\nDo you want to remove the uninstall entry from the registry ?"
}
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * ToDo:
- * - add search box for locating entries quickly
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <time.h>
#include <windows.h>
+#include <shlwapi.h>
#include "resource.h"
#include "regstr.h"
#include "wine/debug.h"
static unsigned int numentries = 0;
static int list_need_update = 1;
static int oldsel = -1;
+static WCHAR *sFilter;
static WCHAR sAppName[MAX_STRING_LEN];
static WCHAR sAboutTitle[MAX_STRING_LEN];
static WCHAR sAbout[MAX_STRING_LEN];
'U','n','i','n','s','t','a','l','l',0 };
static const WCHAR UninstallCommandlineW[] = {'U','n','i','n','s','t','a','l','l','S','t','r','i','n','g',0};
+
/**
* Used to output program list when used with --list
*/
RegQueryValueExW(hkeyApp, UninstallCommandlineW, 0, 0, (LPBYTE)entries[numentries-1].command, &uninstlen);
WINE_TRACE("allocated entry #%d: %s (%s), %s\n",
numentries, wine_dbgstr_w(entries[numentries-1].key), wine_dbgstr_w(entries[numentries-1].descr), wine_dbgstr_w(entries[numentries-1].command));
+ if(sFilter != NULL && StrStrIW(entries[numentries-1].descr,sFilter)==NULL)
+ numentries--;
}
RegCloseKey(hkeyApp);
sizeOfSubKeyName = 255;
case WM_COMMAND:
switch(LOWORD(wParam))
{
+ case IDC_FILTER:
+ {
+ if (HIWORD(wParam) == EN_CHANGE)
+ {
+ int len = GetWindowTextLengthW(GetDlgItem(hwnd, IDC_FILTER));
+ list_need_update = 1;
+ if(len > 0)
+ {
+ sFilter = (WCHAR*)GlobalAlloc(GPTR, (len + 1)*sizeof(WCHAR));
+ GetDlgItemTextW(hwnd, IDC_FILTER, sFilter, (len + 1)*sizeof(WCHAR));
+ }
+ else sFilter = NULL;
+ UpdateList(hList);
+ }
+ break;
+ }
case IDC_UNINSTALL:
{
int count = SendMessageW(hList, LB_GETSELCOUNT, 0, 0);