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
eb2924db
Commit
eb2924db
authored
Oct 29, 2005
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Oct 29, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set list view's text directly - don't use fill_drives_list for that.
Enable "Apply" button when text changes.
parent
f9fb40e5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
driveui.c
programs/winecfg/driveui.c
+22
-8
No files found.
programs/winecfg/driveui.c
View file @
eb2924db
...
...
@@ -83,6 +83,19 @@ static void lv_set_item(HWND dialog, LVITEM *item)
SendDlgItemMessage
(
dialog
,
IDC_LIST_DRIVES
,
LVM_SETITEM
,
0
,
(
LPARAM
)
item
);
}
/* sets specified item's text */
static
void
lv_set_item_text
(
HWND
dialog
,
int
item
,
int
subItem
,
char
*
text
)
{
LVITEM
lvItem
;
if
(
item
<
0
||
subItem
<
0
)
return
;
lvItem
.
mask
=
LVIF_TEXT
;
lvItem
.
iItem
=
item
;
lvItem
.
iSubItem
=
subItem
;
lvItem
.
pszText
=
text
;
lvItem
.
cchTextMax
=
lstrlen
(
lvItem
.
pszText
);
lv_set_item
(
dialog
,
&
lvItem
);
}
/* inserts an item into the listview */
static
void
lv_insert_item
(
HWND
dialog
,
LVITEM
*
item
)
{
...
...
@@ -504,11 +517,6 @@ static void on_edit_changed(HWND dialog, WORD id)
WINE_TRACE
(
"edit id %d changed
\n
"
,
id
);
/* using fill_drives_list here is pretty lazy, but i'm tired
fortunately there are only 26 letters in the alphabet, so
we don't have to worry about efficiency too much here :) */
switch
(
id
)
{
case
IDC_EDIT_LABEL
:
...
...
@@ -521,7 +529,8 @@ static void on_edit_changed(HWND dialog, WORD id)
WINE_TRACE
(
"set label to %s
\n
"
,
current_drive
->
label
);
fill_drives_list
(
dialog
);
/* enable the apply button */
SendMessage
(
GetParent
(
dialog
),
PSM_CHANGED
,
(
WPARAM
)
dialog
,
0
);
break
;
}
...
...
@@ -535,7 +544,11 @@ static void on_edit_changed(HWND dialog, WORD id)
WINE_TRACE
(
"set path to %s
\n
"
,
current_drive
->
unixpath
);
fill_drives_list
(
dialog
);
lv_set_item_text
(
dialog
,
lv_get_curr_select
(
dialog
),
1
,
current_drive
->
unixpath
);
/* enable the apply button */
SendMessage
(
GetParent
(
dialog
),
PSM_CHANGED
,
(
WPARAM
)
dialog
,
0
);
break
;
}
...
...
@@ -549,6 +562,8 @@ static void on_edit_changed(HWND dialog, WORD id)
WINE_TRACE
(
"set serial to %s"
,
current_drive
->
serial
);
/* enable the apply button */
SendMessage
(
GetParent
(
dialog
),
PSM_CHANGED
,
(
WPARAM
)
dialog
,
0
);
break
;
}
...
...
@@ -557,7 +572,6 @@ static void on_edit_changed(HWND dialog, WORD id)
char
*
device
=
get_text
(
dialog
,
id
);
/* TODO: handle device if/when it makes sense to do so.... */
HeapFree
(
GetProcessHeap
(),
0
,
device
);
fill_drives_list
(
dialog
);
break
;
}
}
...
...
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