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
e984d7ba
Commit
e984d7ba
authored
Nov 09, 2007
by
Lei Zhang
Committed by
Alexandre Julliard
Nov 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sane.ds: Get number of options only once.
parent
4bae34cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
+7
-13
ui.c
dlls/sane.ds/ui.c
+7
-13
No files found.
dlls/sane.ds/ui.c
View file @
e984d7ba
...
...
@@ -370,10 +370,8 @@ static int create_item(HDC hdc, const SANE_Option_Descriptor *opt,
static
LPDLGTEMPLATEW
create_options_page
(
HDC
hdc
,
int
*
from_index
,
BOOL
split_tabs
)
SANE_Int
optcount
,
BOOL
split_tabs
)
{
SANE_Status
rc
;
SANE_Int
optcount
;
int
i
;
INT
y
=
2
;
LPDLGTEMPLATEW
tpl
=
NULL
;
...
...
@@ -385,15 +383,6 @@ static LPDLGTEMPLATEW create_options_page(HDC hdc, int *from_index,
int
group_offset
=
-
1
;
INT
control_count
=
0
;
rc
=
psane_control_option
(
activeDS
.
deviceHandle
,
0
,
SANE_ACTION_GET_VALUE
,
&
optcount
,
NULL
);
if
(
rc
!=
SANE_STATUS_GOOD
)
{
ERR
(
"Unable to read number of options
\n
"
);
return
NULL
;
}
for
(
i
=
*
from_index
;
i
<
optcount
;
i
++
)
{
LPDLGITEMTEMPLATEW
item_tpl
=
NULL
;
...
...
@@ -540,12 +529,17 @@ BOOL DoScannerUI(void)
memset
(
&
psp
,
0
,
sizeof
(
psp
));
rc
=
psane_control_option
(
activeDS
.
deviceHandle
,
0
,
SANE_ACTION_GET_VALUE
,
&
optcount
,
NULL
);
if
(
rc
!=
SANE_STATUS_GOOD
)
{
ERR
(
"Unable to read number of options
\n
"
);
return
FALSE
;
}
while
(
index
<
optcount
)
{
const
SANE_Option_Descriptor
*
opt
;
psp
[
page_count
].
u
.
pResource
=
create_options_page
(
hdc
,
&
index
,
TRUE
);
optcount
,
TRUE
);
opt
=
psane_get_option_descriptor
(
activeDS
.
deviceHandle
,
index
);
if
(
opt
->
type
==
SANE_TYPE_GROUP
)
...
...
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