Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
dc6ca178
Commit
dc6ca178
authored
Jan 11, 2006
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jan 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Simplify code a bit.
Enable apply button when needed and don't enable when nothing changed.
parent
848f67e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
28 deletions
+10
-28
driveui.c
programs/winecfg/driveui.c
+10
-28
No files found.
programs/winecfg/driveui.c
View file @
dc6ca178
...
@@ -270,8 +270,7 @@ static int fill_drives_list(HWND dialog)
...
@@ -270,8 +270,7 @@ static int fill_drives_list(HWND dialog)
for
(
i
=
0
;
i
<
26
;
i
++
)
for
(
i
=
0
;
i
<
26
;
i
++
)
{
{
LVITEM
item
;
LVITEM
item
;
char
*
letter
=
0
;
char
letter
[
4
];
int
len
;
/* skip over any unused drives */
/* skip over any unused drives */
if
(
!
drives
[
i
].
in_use
)
if
(
!
drives
[
i
].
in_use
)
...
@@ -280,34 +279,19 @@ static int fill_drives_list(HWND dialog)
...
@@ -280,34 +279,19 @@ static int fill_drives_list(HWND dialog)
if
(
drives
[
i
].
letter
==
'C'
)
if
(
drives
[
i
].
letter
==
'C'
)
drivec_present
=
TRUE
;
drivec_present
=
TRUE
;
len
=
snprintf
(
letter
,
0
,
"%c:"
,
'A'
+
i
);
snprintf
(
letter
,
sizeof
(
letter
),
"%c:"
,
'A'
+
i
);
len
++
;
/* add a byte for the trailing null */
letter
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
snprintf
(
letter
,
len
,
"%c:"
,
'A'
+
i
);
memset
(
&
item
,
0
,
sizeof
(
item
));
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
mask
=
LVIF_TEXT
;
item
.
mask
=
LVIF_TEXT
|
LVIF_PARAM
;
item
.
iItem
=
count
;
item
.
iItem
=
count
;
item
.
iSubItem
=
0
;
item
.
iSubItem
=
0
;
item
.
pszText
=
letter
;
item
.
pszText
=
letter
;
item
.
cchTextMax
=
lstrlen
(
item
.
pszText
);
item
.
cchTextMax
=
lstrlen
(
item
.
pszText
);
item
.
lParam
=
(
LPARAM
)
&
drives
[
i
];
lv_insert_item
(
dialog
,
&
item
);
lv_insert_item
(
dialog
,
&
item
);
lv_set_item_text
(
dialog
,
count
,
1
,
drives
[
i
].
unixpath
);
item
.
iSubItem
=
1
;
item
.
pszText
=
drives
[
i
].
unixpath
;
item
.
cchTextMax
=
lstrlen
(
item
.
pszText
);
lv_set_item
(
dialog
,
&
item
);
item
.
mask
=
LVIF_PARAM
;
item
.
iSubItem
=
0
;
item
.
lParam
=
(
LPARAM
)
&
drives
[
i
];
lv_set_item
(
dialog
,
&
item
);
HeapFree
(
GetProcessHeap
(),
0
,
letter
);
count
++
;
count
++
;
}
}
...
@@ -331,6 +315,8 @@ static void on_options_click(HWND dialog)
...
@@ -331,6 +315,8 @@ static void on_options_click(HWND dialog)
set_reg_key
(
config_key
,
""
,
"ShowDotFiles"
,
"Y"
);
set_reg_key
(
config_key
,
""
,
"ShowDotFiles"
,
"Y"
);
else
else
set_reg_key
(
config_key
,
""
,
"ShowDotFiles"
,
"N"
);
set_reg_key
(
config_key
,
""
,
"ShowDotFiles"
,
"N"
);
SendMessage
(
GetParent
(
dialog
),
PSM_CHANGED
,
0
,
0
);
}
}
static
void
on_add_click
(
HWND
dialog
)
static
void
on_add_click
(
HWND
dialog
)
...
@@ -659,11 +645,8 @@ static void browse_for_folder(HWND dialog)
...
@@ -659,11 +645,8 @@ static void browse_for_folder(HWND dialog)
hr
=
StrRetToStr
(
&
strSelectedPath
,
pidlSelectedPath
,
&
pszSelectedPath
);
hr
=
StrRetToStr
(
&
strSelectedPath
,
pidlSelectedPath
,
&
pszSelectedPath
);
SHFree
(
pidlSelectedPath
);
SHFree
(
pidlSelectedPath
);
if
(
!
SUCCEEDED
(
hr
))
return
;
if
(
!
SUCCEEDED
(
hr
))
return
;
HeapFree
(
GetProcessHeap
(),
0
,
current_drive
->
unixpath
);
set_text
(
dialog
,
IDC_EDIT_PATH
,
pszSelectedPath
);
current_drive
->
unixpath
=
strdupA
(
pszSelectedPath
);
fill_drives_list
(
dialog
);
update_controls
(
dialog
);
CoTaskMemFree
(
pszSelectedPath
);
CoTaskMemFree
(
pszSelectedPath
);
}
}
...
@@ -736,8 +719,6 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
...
@@ -736,8 +719,6 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
break
;
break
;
case
BN_CLICKED
:
case
BN_CLICKED
:
SendMessage
(
GetParent
(
dialog
),
PSM_CHANGED
,
0
,
0
);
switch
(
LOWORD
(
wParam
))
switch
(
LOWORD
(
wParam
))
{
{
case
IDC_SHOW_DOT_FILES
:
case
IDC_SHOW_DOT_FILES
:
...
@@ -773,6 +754,7 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
...
@@ -773,6 +754,7 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
case
IDC_BUTTON_AUTODETECT
:
case
IDC_BUTTON_AUTODETECT
:
autodetect_drives
();
autodetect_drives
();
fill_drives_list
(
dialog
);
fill_drives_list
(
dialog
);
SendMessage
(
GetParent
(
dialog
),
PSM_CHANGED
,
0
,
0
);
break
;
break
;
case
IDC_BUTTON_SHOW_HIDE_ADVANCED
:
case
IDC_BUTTON_SHOW_HIDE_ADVANCED
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment