winehq.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
2025
February
January
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2006
----- 2025 -----
February 2025
January 2025
----- 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
651 discussions
Start a n
N
ew thread
James Hawkins : msi: Add the ability to change directories in the DirectoryList control.
by Alexandre Julliard
07 Sep '06
07 Sep '06
Module: wine Branch: master Commit: 4969ccf3af4a72d93ae13043f50f0123d37ab989 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=4969ccf3af4a72d93ae1304…
Author: James Hawkins <truiken(a)gmail.com> Date: Sun Sep 3 20:08:02 2006 -0700 msi: Add the ability to change directories in the DirectoryList control. --- dlls/msi/dialog.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 68 insertions(+), 1 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index af89e32..aa0e2ae 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -2187,13 +2187,60 @@ UINT msi_dialog_directorylist_up( msi_di return ERROR_SUCCESS; } +static UINT msi_dialog_dirlist_handler( msi_dialog *dialog, + msi_control *control, WPARAM param ) +{ + LPNMHDR nmhdr = (LPNMHDR)param; + WCHAR new_path[MAX_PATH]; + WCHAR text[MAX_PATH]; + LPWSTR path, prop; + BOOL indirect; + LVITEMW item; + int index; + + static const WCHAR backslash[] = {'\\',0}; + + if (nmhdr->code != LVN_ITEMACTIVATE) + return ERROR_SUCCESS; + + index = SendMessageW( control->hwnd, LVM_GETNEXTITEM, -1, LVNI_SELECTED ); + if ( index < 0 ) + { + ERR("No list-view item selected!\n"); + return ERROR_FUNCTION_FAILED; + } + + item.iSubItem = 0; + item.pszText = text; + item.cchTextMax = MAX_PATH; + SendMessageW( control->hwnd, LVM_GETITEMTEXTW, index, (LPARAM)&item ); + + indirect = control->attributes & msidbControlAttributesIndirect; + prop = msi_dialog_dup_property( dialog, control->property, indirect ); + path = msi_dup_property( dialog->package, prop ); + + lstrcpyW( new_path, path ); + lstrcatW( new_path, text ); + lstrcatW( new_path, backslash ); + + MSI_SetPropertyW( dialog->package, prop, new_path ); + + msi_dialog_update_directory_list( dialog, NULL ); + msi_dialog_update_directory_combo( dialog, NULL ); + msi_dialog_update_pathedit( dialog, NULL ); + + msi_free( prop ); + msi_free( path ); + return ERROR_SUCCESS; +} + static UINT msi_dialog_directory_list( msi_dialog *dialog, MSIRECORD *rec ) { msi_control *control; LPCWSTR prop; DWORD style; - style = LVS_LIST | LVS_EDITLABELS | WS_VSCROLL | LVS_SHAREIMAGELISTS | + style = LVS_LIST | WS_VSCROLL | LVS_SHAREIMAGELISTS | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_BORDER | LVS_SORTASCENDING | WS_CHILD | WS_GROUP | WS_TABSTOP; control = msi_dialog_add_control( dialog, rec, WC_LISTVIEWW, style ); @@ -2201,9 +2248,14 @@ static UINT msi_dialog_directory_list( m return ERROR_FUNCTION_FAILED; control->attributes = MSI_RecordGetInteger( rec, 8 ); + control->handler = msi_dialog_dirlist_handler; prop = MSI_RecordGetString( rec, 9 ); control->property = msi_dialog_dup_property( dialog, prop, FALSE ); + /* double click to activate an item in the list */ + SendMessageW( control->hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, + 0, LVS_EX_TWOCLICKACTIVATE ); + msi_dialog_update_directory_list( dialog, control ); return ERROR_SUCCESS; @@ -2848,6 +2900,19 @@ static LRESULT msi_dialog_oncommand( msi return 0; } +static LRESULT msi_dialog_onnotify( msi_dialog *dialog, LPARAM param ) +{ + LPNMHDR nmhdr = (LPNMHDR) param; + msi_control *control = msi_dialog_find_control_by_hwnd( dialog, nmhdr->hwndFrom ); + + TRACE("%p %p", dialog, nmhdr->hwndFrom); + + if ( control && control->handler ) + control->handler( dialog, control, param ); + + return 0; +} + static void msi_dialog_setfocus( msi_dialog *dialog ) { HWND hwnd = dialog->hWndFocus; @@ -2896,6 +2961,8 @@ static LRESULT WINAPI MSIDialog_WndProc( case WM_DESTROY: dialog->hwnd = NULL; return 0; + case WM_NOTIFY: + return msi_dialog_onnotify( dialog, lParam ); } return DefWindowProcW(hwnd, msg, wParam, lParam); }
1
0
0
0
James Hawkins : msi: Add initial implementation of the DirectoryList control.
by Alexandre Julliard
07 Sep '06
07 Sep '06
Module: wine Branch: master Commit: 01432d71652857bbd0fc506b20718941e96613d2 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=01432d71652857bbd0fc506…
Author: James Hawkins <truiken(a)gmail.com> Date: Fri Sep 1 16:00:49 2006 -0700 msi: Add initial implementation of the DirectoryList control. --- dlls/msi/dialog.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 55 insertions(+), 0 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index b9163b4..af89e32 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -2106,6 +2106,58 @@ static UINT msi_dialog_directory_combo( /******************** Directory List ***************************************/ +static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *control ) +{ + WCHAR dir_spec[MAX_PATH]; + WIN32_FIND_DATAW wfd; + LPWSTR prop, path; + BOOL indirect; + LVITEMW item; + HANDLE file; + + static const WCHAR asterisk[] = {'*',0}; + static const WCHAR dot[] = {'.',0}; + static const WCHAR dotdot[] = {'.','.',0}; + + if (!control && !(control = msi_dialog_find_control_by_type( dialog, szDirectoryList ))) + return; + + /* clear the list-view */ + SendMessageW( control->hwnd, LVM_DELETEALLITEMS, 0, 0 ); + + indirect = control->attributes & msidbControlAttributesIndirect; + prop = msi_dialog_dup_property( dialog, control->property, indirect ); + path = msi_dup_property( dialog->package, prop ); + + lstrcpyW( dir_spec, path ); + lstrcatW( dir_spec, asterisk ); + + file = FindFirstFileW( dir_spec, &wfd ); + if ( file == INVALID_HANDLE_VALUE ) + return; + + do + { + if ( wfd.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY ) + continue; + + if ( !lstrcmpW( wfd.cFileName, dot ) || !lstrcmpW( wfd.cFileName, dotdot ) ) + continue; + + item.mask = LVIF_TEXT; + item.cchTextMax = MAX_PATH; + item.iItem = 0; + item.iSubItem = 0; + item.pszText = wfd.cFileName; + + SendMessageW( control->hwnd, LVM_INSERTITEMW, 0, (LPARAM)&item ); + } while ( FindNextFileW( file, &wfd ) ); + + msi_free( prop ); + msi_free( path ); + FindClose( file ); +} + UINT msi_dialog_directorylist_up( msi_dialog *dialog ) { msi_control *control; @@ -2125,6 +2177,7 @@ UINT msi_dialog_directorylist_up( msi_di MSI_SetPropertyW( dialog->package, prop, path ); + msi_dialog_update_directory_list( dialog, NULL ); msi_dialog_update_directory_combo( dialog, NULL ); msi_dialog_update_pathedit( dialog, NULL ); @@ -2151,6 +2204,8 @@ static UINT msi_dialog_directory_list( m prop = MSI_RecordGetString( rec, 9 ); control->property = msi_dialog_dup_property( dialog, prop, FALSE ); + msi_dialog_update_directory_list( dialog, control ); + return ERROR_SUCCESS; }
1
0
0
0
James Hawkins : msi: Load and display the VolumeCostList control' s column headers.
by Alexandre Julliard
07 Sep '06
07 Sep '06
Module: wine Branch: master Commit: 8f691adf7e4ac27d8ea0f45ca19b9b695244ffc7 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=8f691adf7e4ac27d8ea0f45…
Author: James Hawkins <truiken(a)gmail.com> Date: Fri Sep 1 14:00:19 2006 -0700 msi: Load and display the VolumeCostList control's column headers. --- dlls/msi/dialog.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 85 insertions(+), 0 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 6785e77..b9163b4 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -408,6 +408,24 @@ static msi_control *msi_dialog_create_wi return control; } +static LPWSTR msi_dialog_get_uitext( msi_dialog *dialog, LPCWSTR key ) +{ + MSIRECORD *rec; + LPWSTR text; + + static const WCHAR query[] = { + 's','e','l','e','c','t',' ','*',' ', + 'f','r','o','m',' ','`','U','I','T','e','x','t','`',' ', + 'w','h','e','r','e',' ','`','K','e','y','`',' ','=',' ','\'','%','s','\'',0 + }; + + rec = MSI_QueryGetRecord( dialog->package->db, query, key ); + if (!rec) return NULL; + text = strdupW( MSI_RecordGetString( rec, 2 ) ); + msiobj_release( &rec->hdr ); + return text; +} + static MSIRECORD *msi_get_binary_record( MSIDATABASE *db, LPCWSTR name ) { static const WCHAR query[] = { @@ -2138,6 +2156,71 @@ static UINT msi_dialog_directory_list( m /******************** VolumeCost List ***************************************/ +static BOOL str_is_number( LPCWSTR str ) +{ + int i; + + for (i = 0; i < lstrlenW( str ); i++) + if (!isdigitW(str[i])) + return FALSE; + + return TRUE; +} + +WCHAR column_keys[][80] = +{ + {'V','o','l','u','m','e','C','o','s','t','V','o','l','u','m','e',0}, + {'V','o','l','u','m','e','C','o','s','t','S','i','z','e',0}, + {'V','o','l','u','m','e','C','o','s','t','A','v','a','i','l','a','b','l','e',0}, + {'V','o','l','u','m','e','C','o','s','t','R','e','q','u','i','r','e','d',0}, + {'V','o','l','u','m','e','C','o','s','t','D','i','f','f','e','r','e','n','c','e',0} +}; + +static void msi_dialog_vcl_add_columns( msi_dialog *dialog, msi_control *control, MSIRECORD *rec ) +{ + LPCWSTR text = MSI_RecordGetString( rec, 10 ); + LPCWSTR begin = text, end; + WCHAR num[10]; + LVCOLUMNW lvc; + DWORD count = 0; + LRESULT r; + + static const WCHAR zero[] = {'0',0}; + static const WCHAR negative[] = {'-',0}; + + while ((begin = strchrW( begin, '{' )) && count < 5) + { + if (!(end = strchrW( begin, '}' ))) + return; + + lstrcpynW( num, begin + 1, end - begin ); + begin += end - begin + 1; + + /* empty braces or '0' hides the column */ + if ( !num[0] || !lstrcmpW( num, zero ) ) + { + count++; + continue; + } + + /* the width must be a positive number + * if a width is invalid, all remaining columns are hidden + */ + if ( !strncmpW( num, negative, 1 ) || !str_is_number( num ) ) + return; + + lvc.mask = LVCF_FMT | LVCF_ORDER | LVCF_WIDTH | LVCF_TEXT; + lvc.iOrder = count; + lvc.pszText = msi_dialog_get_uitext( dialog, column_keys[count++] ); + lvc.cx = atolW( num ); + lvc.fmt = LVCFMT_LEFT; + + r = SendMessageW( control->hwnd, LVM_INSERTCOLUMNW, 0, (LPARAM)&lvc ); + msi_free( lvc.pszText ); + if ( r ) return; + } +} + static UINT msi_dialog_volumecost_list( msi_dialog *dialog, MSIRECORD *rec ) { msi_control *control; @@ -2150,6 +2233,8 @@ static UINT msi_dialog_volumecost_list( if (!control) return ERROR_FUNCTION_FAILED; + msi_dialog_vcl_add_columns( dialog, control, rec ); + return ERROR_SUCCESS; }
1
0
0
0
James Hawkins : msi: Store and use the center point of the dialog window in between dialogs.
by Alexandre Julliard
07 Sep '06
07 Sep '06
Module: wine Branch: master Commit: 1cfdc5185a86934b634674e7ff4654b4367aedca URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1cfdc5185a86934b634674e…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Aug 31 13:43:01 2006 -0700 msi: Store and use the center point of the dialog window in between dialogs. --- dlls/msi/dialog.c | 31 +++++++++++++++++++++++++++---- dlls/msi/msipriv.h | 2 ++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 824db78..6785e77 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -86,6 +86,7 @@ struct msi_dialog_tag BOOL finished; INT scale; DWORD attributes; + SIZE size; HWND hwnd; LPWSTR default_font; msi_font *font_list; @@ -2373,10 +2374,27 @@ static void msi_dialog_adjust_dialog_pos center.y = MulDiv( center.y, yres, 100 ); /* turn the client pos into the window rectangle */ - pos->left = center.x - sz.cx/2; - pos->right = pos->left + sz.cx; - pos->top = center.y - sz.cy/2; - pos->bottom = pos->top + sz.cy; + if (dialog->package->center_x && dialog->package->center_y) + { + pos->left = dialog->package->center_x - sz.cx / 2.0; + pos->right = pos->left + sz.cx; + pos->top = dialog->package->center_y - sz.cy / 2.0; + pos->bottom = pos->top + sz.cy; + } + else + { + pos->left = center.x - sz.cx/2; + pos->right = pos->left + sz.cx; + pos->top = center.y - sz.cy/2; + pos->bottom = pos->top + sz.cy; + + /* save the center */ + dialog->package->center_x = center.x; + dialog->package->center_y = center.y; + } + + dialog->size.cx = sz.cx; + dialog->size.cy = sz.cy; TRACE("%lu %lu %lu %lu\n", pos->left, pos->top, pos->right, pos->bottom); @@ -2709,6 +2727,11 @@ static LRESULT WINAPI MSIDialog_WndProc( switch (msg) { + case WM_MOVE: + dialog->package->center_x = LOWORD(lParam) + dialog->size.cx / 2.0; + dialog->package->center_y = HIWORD(lParam) + dialog->size.cy / 2.0; + break; + case WM_CREATE: return msi_dialog_oncreate( hwnd, (LPCREATESTRUCTW)lParam ); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 8db0074..9a9b8b4 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -231,6 +231,8 @@ typedef struct tagMSIPACKAGE UINT CurrentInstallState; msi_dialog *dialog; LPWSTR next_dialog; + float center_x; + float center_y; UINT WordCount;
1
0
0
0
James Hawkins : msi: Verify the path in the PathEdit control.
by Alexandre Julliard
07 Sep '06
07 Sep '06
Module: wine Branch: master Commit: ad559ca86d8a48e8aebeed326d360edf5306d05f URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=ad559ca86d8a48e8aebeed3…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Aug 31 13:42:57 2006 -0700 msi: Verify the path in the PathEdit control. --- dlls/msi/dialog.c | 107 +++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 86 insertions(+), 21 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index ab58219..824db78 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -1388,6 +1388,13 @@ static UINT msi_dialog_progress_bar( msi /******************** Path Edit ********************************************/ +struct msi_pathedit_info +{ + msi_dialog *dialog; + msi_control *control; + WNDPROC oldproc; +}; + static LPWSTR msi_get_window_text( HWND hwnd ) { UINT sz, r; @@ -1407,21 +1414,63 @@ static LPWSTR msi_get_window_text( HWND return buf; } -static UINT msi_dialog_pathedit_handler( msi_dialog *dialog, - msi_control *control, WPARAM param ) +static void msi_dialog_update_pathedit( msi_dialog *dialog, msi_control *control ) { - LPWSTR buf, prop; + LPWSTR prop, path; BOOL indirect; - if( HIWORD(param) != EN_KILLFOCUS ) - return ERROR_SUCCESS; + if (!control && !(control = msi_dialog_find_control_by_type( dialog, szPathEdit ))) + return; + + indirect = control->attributes & msidbControlAttributesIndirect; + prop = msi_dialog_dup_property( dialog, control->property, indirect ); + + path = msi_dup_property( dialog->package, prop ); + SetWindowTextW( control->hwnd, path ); + SendMessageW( control->hwnd, EM_SETSEL, 0, -1 ); + + msi_free( path ); + msi_free( prop ); +} + +/* FIXME: test when this should fail */ +static BOOL msi_dialog_verify_path( LPWSTR path ) +{ + if ( !lstrlenW( path ) ) + return FALSE; + + if ( PathIsRelativeW( path ) ) + return FALSE; + + return TRUE; +} + +/* returns TRUE if the path is valid, FALSE otherwise */ +static BOOL msi_dialog_onkillfocus( msi_dialog *dialog, msi_control *control ) +{ + LPWSTR buf, prop; + BOOL indirect; + BOOL valid; indirect = control->attributes & msidbControlAttributesIndirect; prop = msi_dialog_dup_property( dialog, control->property, indirect ); - /* FIXME: verify the new path */ buf = msi_get_window_text( control->hwnd ); - MSI_SetPropertyW( dialog->package, prop, buf ); + + if ( !msi_dialog_verify_path( buf ) ) + { + /* FIXME: display an error message box */ + ERR("Invalid path %s\n", debugstr_w( buf )); + valid = FALSE; + SetFocus( control->hwnd ); + } + else + { + valid = TRUE; + MSI_SetPropertyW( dialog->package, prop, buf ); + } + + msi_dialog_update_pathedit( dialog, control ); TRACE("edit %s contents changed, set %s\n", debugstr_w(control->name), debugstr_w(prop)); @@ -1429,40 +1478,56 @@ static UINT msi_dialog_pathedit_handler( msi_free( buf ); msi_free( prop ); - return ERROR_SUCCESS; + return valid; } -static void msi_dialog_update_pathedit( msi_dialog *dialog, msi_control *control ) +static LRESULT WINAPI MSIPathEdit_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { - LPWSTR prop, path; - BOOL indirect; + struct msi_pathedit_info *info = GetPropW(hWnd, szButtonData); + LRESULT r = 0; - if (!control && !(control = msi_dialog_find_control_by_type( dialog, szPathEdit ) )) - return; + TRACE("%p %04x %08x %08lx\n", hWnd, msg, wParam, lParam); - indirect = control->attributes & msidbControlAttributesIndirect; - prop = msi_dialog_dup_property( dialog, control->property, indirect ); + if ( msg == WM_KILLFOCUS ) + { + /* if the path is invalid, don't handle this message */ + if ( !msi_dialog_onkillfocus( info->dialog, info->control ) ) + return 0; + } - path = msi_dup_property( dialog->package, prop ); - SetWindowTextW( control->hwnd, path ); - SendMessageW( control->hwnd, EM_SETSEL, 0, -1 ); + r = CallWindowProcW(info->oldproc, hWnd, msg, wParam, lParam); - msi_free( path ); - msi_free( prop ); + if ( msg == WM_NCDESTROY ) + { + msi_free( info ); + RemovePropW( hWnd, szButtonData ); + } + + return r; } static UINT msi_dialog_pathedit_control( msi_dialog *dialog, MSIRECORD *rec ) { + struct msi_pathedit_info *info; msi_control *control; LPCWSTR prop; + info = msi_alloc( sizeof *info ); + if (!info) + return ERROR_FUNCTION_FAILED; + control = msi_dialog_add_control( dialog, rec, szEdit, WS_BORDER | WS_TABSTOP ); - control->handler = msi_dialog_pathedit_handler; control->attributes = MSI_RecordGetInteger( rec, 8 ); prop = MSI_RecordGetString( rec, 9 ); control->property = msi_dialog_dup_property( dialog, prop, FALSE ); + info->dialog = dialog; + info->control = control; + info->oldproc = (WNDPROC) SetWindowLongPtrW( control->hwnd, GWLP_WNDPROC, + (LONG_PTR)MSIPathEdit_WndProc ); + SetPropW( control->hwnd, szButtonData, info ); + msi_dialog_update_pathedit( dialog, control ); return ERROR_SUCCESS;
1
0
0
0
James Hawkins : msi: Search for the browse dialog controls by type instead of name.
by Alexandre Julliard
07 Sep '06
07 Sep '06
Module: wine Branch: master Commit: 9c3e640c100b90a928de7d9f45ab176dd88c7631 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=9c3e640c100b90a928de7d9…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Aug 31 13:42:54 2006 -0700 msi: Search for the browse dialog controls by type instead of name. --- dlls/msi/dialog.c | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 6c1123b..ab58219 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -63,6 +63,7 @@ struct msi_control_tag HBITMAP hBitmap; HICON hIcon; LPWSTR tabnext; + LPWSTR type; HMODULE hDll; float progress_current; float progress_max; @@ -177,6 +178,18 @@ static msi_control *msi_dialog_find_cont return NULL; } +static msi_control *msi_dialog_find_control_by_type( msi_dialog *dialog, LPCWSTR type ) +{ + msi_control *control; + + if( !type ) + return NULL; + LIST_FOR_EACH_ENTRY( control, &dialog->controls, msi_control, entry ) + if( !strcmpW( control->type, type ) ) /* FIXME: case sensitive? */ + return control; + return NULL; +} + static msi_control *msi_dialog_find_control_by_hwnd( msi_dialog *dialog, HWND hwnd ) { msi_control *control; @@ -359,6 +372,7 @@ static msi_control *msi_dialog_create_wi control->hIcon = NULL; control->hDll = NULL; control->tabnext = strdupW( MSI_RecordGetString( rec, 11) ); + control->type = strdupW( MSI_RecordGetString( rec, 3 ) ); control->progress_current = 0; control->progress_max = 100; @@ -1423,7 +1437,7 @@ static void msi_dialog_update_pathedit( LPWSTR prop, path; BOOL indirect; - if (!control && !(control = msi_dialog_find_control( dialog, szPathEdit ) )) + if (!control && !(control = msi_dialog_find_control_by_type( dialog, szPathEdit ) )) return; indirect = control->attributes & msidbControlAttributesIndirect; @@ -1967,7 +1981,7 @@ static void msi_dialog_update_directory_ LPWSTR prop, path; BOOL indirect; - if (!control && !(control = msi_dialog_find_control( dialog, szDirectoryCombo ))) + if (!control && !(control = msi_dialog_find_control_by_type( dialog, szDirectoryCombo ))) return; indirect = control->attributes & msidbControlAttributesIndirect; @@ -2014,7 +2028,7 @@ UINT msi_dialog_directorylist_up( msi_di LPWSTR prop, path, ptr; BOOL indirect; - control = msi_dialog_find_control( dialog, szDirectoryList ); + control = msi_dialog_find_control_by_type( dialog, szDirectoryList ); indirect = control->attributes & msidbControlAttributesIndirect; prop = msi_dialog_dup_property( dialog, control->property, indirect ); @@ -2863,6 +2877,7 @@ void msi_dialog_destroy( msi_dialog *dia if( t->hIcon ) DestroyIcon( t->hIcon ); msi_free( t->tabnext ); + msi_free( t->type ); msi_free( t ); if (t->hDll) FreeLibrary( t->hDll );
1
0
0
0
James Hawkins : msi: Provide the control to the dialog_update function for the case
by Alexandre Julliard
07 Sep '06
07 Sep '06
Module: wine Branch: master Commit: 4e3f6eda0e3af2a226e50044dca7baf9f97e479f URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=4e3f6eda0e3af2a226e5004…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Aug 31 13:42:50 2006 -0700 msi: Provide the control to the dialog_update function for the case when the control isn't attached to the dialog yet. --- dlls/msi/dialog.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index f3b4987..6c1123b 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -1418,15 +1418,14 @@ static UINT msi_dialog_pathedit_handler( return ERROR_SUCCESS; } -static void msi_dialog_update_pathedit( msi_dialog *dialog ) +static void msi_dialog_update_pathedit( msi_dialog *dialog, msi_control *control ) { - msi_control *control; LPWSTR prop, path; BOOL indirect; - control = msi_dialog_find_control( dialog, szPathEdit ); - if (!control) + if (!control && !(control = msi_dialog_find_control( dialog, szPathEdit ) )) return; + indirect = control->attributes & msidbControlAttributesIndirect; prop = msi_dialog_dup_property( dialog, control->property, indirect ); @@ -1450,7 +1449,7 @@ static UINT msi_dialog_pathedit_control( prop = MSI_RecordGetString( rec, 9 ); control->property = msi_dialog_dup_property( dialog, prop, FALSE ); - msi_dialog_update_pathedit( dialog ); + msi_dialog_update_pathedit( dialog, control ); return ERROR_SUCCESS; } @@ -1963,13 +1962,14 @@ static UINT msi_dialog_list_box( msi_dia /******************** Directory Combo ***************************************/ -static void msi_dialog_update_directory_combo( msi_dialog *dialog ) +static void msi_dialog_update_directory_combo( msi_dialog *dialog, msi_control *control ) { - msi_control *control; LPWSTR prop, path; BOOL indirect; - control = msi_dialog_find_control( dialog, szDirectoryCombo ); + if (!control && !(control = msi_dialog_find_control( dialog, szDirectoryCombo ))) + return; + indirect = control->attributes & msidbControlAttributesIndirect; prop = msi_dialog_dup_property( dialog, control->property, indirect ); path = msi_dup_property( dialog->package, prop ); @@ -2001,7 +2001,7 @@ static UINT msi_dialog_directory_combo( prop = MSI_RecordGetString( rec, 9 ); control->property = msi_dialog_dup_property( dialog, prop, FALSE ); - msi_dialog_update_directory_combo( dialog ); + msi_dialog_update_directory_combo( dialog, control ); return ERROR_SUCCESS; } @@ -2027,8 +2027,8 @@ UINT msi_dialog_directorylist_up( msi_di MSI_SetPropertyW( dialog->package, prop, path ); - msi_dialog_update_directory_combo( dialog ); - msi_dialog_update_pathedit( dialog ); + msi_dialog_update_directory_combo( dialog, NULL ); + msi_dialog_update_pathedit( dialog, NULL ); msi_free( path ); msi_free( prop );
1
0
0
0
James Hawkins : msi: Add more tests for the _Streams table.
by Alexandre Julliard
07 Sep '06
07 Sep '06
Module: wine Branch: master Commit: 7e86590518504b8c9046db5b080150f5f85eefb0 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=7e86590518504b8c9046db5…
Author: James Hawkins <truiken(a)gmail.com> Date: Wed Aug 30 18:10:35 2006 -0700 msi: Add more tests for the _Streams table. --- dlls/msi/tests/db.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 89 insertions(+), 1 deletions(-) diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 043d4a5..58fda00 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -945,10 +945,25 @@ static void test_longstrings(void) MsiCloseHandle(hdb); DeleteFile(msifile); } + +static void create_file(const CHAR *name) +{ + HANDLE file; + DWORD written; + + file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); + ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name); + WriteFile(file, name, strlen(name), &written, NULL); + WriteFile(file, "\n", strlen("\n"), &written, NULL); + CloseHandle(file); +} static void test_streamtable(void) { - MSIHANDLE hdb = 0, rec; + MSIHANDLE hdb = 0, rec, view; + char file[MAX_PATH]; + char buf[MAX_PATH]; + DWORD size; UINT r; hdb = create_db(); @@ -980,6 +995,79 @@ static void test_streamtable(void) } MsiCloseHandle( rec ); + + /* insert a file into the _Streams table */ + create_file( "test.txt" ); + + rec = MsiCreateRecord( 2 ); + MsiRecordSetString( rec, 1, "data" ); + + r = MsiRecordSetStream( rec, 2, "test.txt" ); + ok( r == ERROR_SUCCESS, "Failed to add stream data to the record: %d\n", r); + + DeleteFile("test.txt"); + + r = MsiDatabaseOpenView( hdb, + "INSERT INTO `_Streams` ( `Name`, `Data` ) VALUES ( ?, ? )", &view ); + todo_wine + { + ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); + } + + r = MsiViewExecute( view, rec ); + todo_wine + { + ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); + } + + MsiCloseHandle( rec ); + MsiCloseHandle( view ); + + r = MsiDatabaseOpenView( hdb, + "SELECT `Name`, `Data` FROM `_Streams`", &view ); + todo_wine + { + ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); + } + + r = MsiViewExecute( view, 0 ); + todo_wine + { + ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); + } + + r = MsiViewFetch( view, &rec ); + todo_wine + { + ok( r == ERROR_SUCCESS, "Failed to fetch record: %d\n", r); + } + + size = MAX_PATH; + r = MsiRecordGetString( rec, 1, file, &size ); + todo_wine + { + ok( r == ERROR_SUCCESS, "Failed to get string: %d\n", r); + ok( !lstrcmp(file, "data"), "Expected 'data', got %s\n", file); + } + + size = MAX_PATH; + memset(buf, 0, MAX_PATH); + r = MsiRecordReadStream( rec, 2, buf, &size ); + todo_wine + { + ok( r == ERROR_SUCCESS, "Failed to get stream: %d\n", r); + ok( !lstrcmp(buf, "test.txt\n"), "Expected 'test.txt\\n', got %s\n", buf); + } + + MsiCloseHandle( rec ); + + r = MsiViewFetch( view, &rec ); + todo_wine + { + ok( r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); + } + + MsiCloseHandle( view ); MsiCloseHandle( hdb ); DeleteFile(msifile); }
1
0
0
0
Dan Kegel : programs/wcmd: Rename to programs/cmd.
by Alexandre Julliard
07 Sep '06
07 Sep '06
Module: wine Branch: master Commit: 39857443e4159d5c9e04fb93e158603b374f1a44 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=39857443e4159d5c9e04fb9…
Author: Dan Kegel <dank(a)kegel.com> Date: Sun Sep 3 21:13:08 2006 -0700 programs/wcmd: Rename to programs/cmd. --- configure | 4 configure.ac | 2 dlls/msvcrt/process.c | 2 documentation/PACKAGING | 3 programs/.gitignore | 2 programs/Makefile.in | 5 programs/cmd/Cs.rc | 233 +++++++++ programs/cmd/De.rc | 250 ++++++++++ programs/cmd/En.rc | 229 +++++++++ programs/cmd/Es.rc | 245 ++++++++++ programs/cmd/Fr.rc | 227 +++++++++ programs/cmd/Ja.rc | 231 +++++++++ programs/cmd/Ko.rc | 222 +++++++++ programs/cmd/Makefile.in | 21 + programs/cmd/Nl.rc | 230 +++++++++ programs/cmd/No.rc | 228 +++++++++ programs/cmd/Pl.rc | 224 +++++++++ programs/cmd/Pt.rc | 437 ++++++++++++++++++ programs/cmd/README | 46 ++ programs/cmd/Ru.rc | 228 +++++++++ programs/cmd/Si.rc | 229 +++++++++ programs/cmd/Tr.rc | 231 +++++++++ programs/cmd/batch.c | 288 ++++++++++++ programs/cmd/builtins.c | 1118 +++++++++++++++++++++++++++++++++++++++++++++ programs/cmd/directory.c | 370 +++++++++++++++ programs/cmd/wcmd.h | 146 ++++++ programs/cmd/wcmdmain.c | 994 ++++++++++++++++++++++++++++++++++++++++ programs/cmd/wcmdrc.rc | 181 +++++++ programs/make_progs | 5 programs/wcmd/Cs.rc | 233 --------- programs/wcmd/De.rc | 250 ---------- programs/wcmd/En.rc | 229 --------- programs/wcmd/Es.rc | 245 ---------- programs/wcmd/Fr.rc | 227 --------- programs/wcmd/Ja.rc | 231 --------- programs/wcmd/Ko.rc | 222 --------- programs/wcmd/Makefile.in | 21 - programs/wcmd/Nl.rc | 230 --------- programs/wcmd/No.rc | 228 --------- programs/wcmd/Pl.rc | 224 --------- programs/wcmd/Pt.rc | 437 ------------------ programs/wcmd/README | 46 -- programs/wcmd/Ru.rc | 228 --------- programs/wcmd/Si.rc | 229 --------- programs/wcmd/Tr.rc | 231 --------- programs/wcmd/batch.c | 288 ------------ programs/wcmd/builtins.c | 1118 --------------------------------------------- programs/wcmd/directory.c | 370 --------------- programs/wcmd/wcmd.h | 146 ------ programs/wcmd/wcmdmain.c | 994 ---------------------------------------- programs/wcmd/wcmdrc.rc | 181 ------- tools/wine.inf | 8 52 files changed, 6622 insertions(+), 6625 deletions(-) create mode 100644 programs/cmd/Cs.rc create mode 100644 programs/cmd/De.rc create mode 100644 programs/cmd/En.rc create mode 100644 programs/cmd/Es.rc create mode 100644 programs/cmd/Fr.rc create mode 100644 programs/cmd/Ja.rc create mode 100644 programs/cmd/Ko.rc create mode 100644 programs/cmd/Makefile.in create mode 100644 programs/cmd/Nl.rc create mode 100644 programs/cmd/No.rc create mode 100644 programs/cmd/Pl.rc create mode 100644 programs/cmd/Pt.rc create mode 100644 programs/cmd/README create mode 100644 programs/cmd/Ru.rc create mode 100644 programs/cmd/Si.rc create mode 100644 programs/cmd/Tr.rc create mode 100644 programs/cmd/batch.c create mode 100644 programs/cmd/builtins.c create mode 100644 programs/cmd/directory.c create mode 100644 programs/cmd/wcmd.h create mode 100644 programs/cmd/wcmdmain.c create mode 100644 programs/cmd/wcmdrc.rc delete mode 100644 programs/wcmd/Cs.rc delete mode 100644 programs/wcmd/De.rc delete mode 100644 programs/wcmd/En.rc delete mode 100644 programs/wcmd/Es.rc delete mode 100644 programs/wcmd/Fr.rc delete mode 100644 programs/wcmd/Ja.rc delete mode 100644 programs/wcmd/Ko.rc delete mode 100644 programs/wcmd/Makefile.in delete mode 100644 programs/wcmd/Nl.rc delete mode 100644 programs/wcmd/No.rc delete mode 100644 programs/wcmd/Pl.rc delete mode 100644 programs/wcmd/Pt.rc delete mode 100644 programs/wcmd/README delete mode 100644 programs/wcmd/Ru.rc delete mode 100644 programs/wcmd/Si.rc delete mode 100644 programs/wcmd/Tr.rc delete mode 100644 programs/wcmd/batch.c delete mode 100644 programs/wcmd/builtins.c delete mode 100644 programs/wcmd/directory.c delete mode 100644 programs/wcmd/wcmd.h delete mode 100644 programs/wcmd/wcmdmain.c delete mode 100644 programs/wcmd/wcmdrc.rc Diff:
http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=39857443e4159d5c9e0…
1
0
0
0
Dmitry Timoshkov : user: Use computed icon rectangle if SS_CENTERIMAGE style is set.
by Alexandre Julliard
07 Sep '06
07 Sep '06
Module: wine Branch: master Commit: 4f28f7967d2a3a236028858b26dae0715c6a0c9a URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=4f28f7967d2a3a236028858…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Wed Sep 6 23:00:45 2006 +0900 user: Use computed icon rectangle if SS_CENTERIMAGE style is set. --- dlls/user/static.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/user/static.c b/dlls/user/static.c index 4eef677..ecfb8e4 100644 --- a/dlls/user/static.c +++ b/dlls/user/static.c @@ -760,9 +760,11 @@ static void STATIC_PaintIconfn( HWND hwn iconRect.right = iconRect.left + info->nWidth; iconRect.bottom = iconRect.top + info->nHeight; } + else + iconRect = rc; FillRect( hdc, &rc, hbrush ); - DrawIconEx( hdc, rc.left, rc.top, hIcon, rc.right - rc.left, - rc.bottom - rc.top, 0, NULL, DI_NORMAL ); + DrawIconEx( hdc, iconRect.left, iconRect.top, hIcon, iconRect.right - iconRect.left, + iconRect.bottom - iconRect.top, 0, NULL, DI_NORMAL ); } if (info) GlobalUnlock16(HICON_16(hIcon)); }
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
66
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Results per page:
10
25
50
100
200