Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
e2605fb0
Commit
e2605fb0
authored
Aug 23, 2007
by
Lei Zhang
Committed by
Alexandre Julliard
Aug 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gphoto2.ds: Add preview button and ability to disable import GUI.
parent
2f3805a3
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
108 additions
and
55 deletions
+108
-55
Makefile.in
dlls/gphoto2.ds/Makefile.in
+1
-1
gphoto2_De.rc
dlls/gphoto2.ds/gphoto2_De.rc
+5
-3
gphoto2_En.rc
dlls/gphoto2.ds/gphoto2_En.rc
+5
-3
gphoto2_Fr.rc
dlls/gphoto2.ds/gphoto2_Fr.rc
+5
-3
gphoto2_Ko.rc
dlls/gphoto2.ds/gphoto2_Ko.rc
+5
-3
gphoto2_Nl.rc
dlls/gphoto2.ds/gphoto2_Nl.rc
+5
-3
gphoto2_No.rc
dlls/gphoto2.ds/gphoto2_No.rc
+5
-3
gphoto2_Pl.rc
dlls/gphoto2.ds/gphoto2_Pl.rc
+5
-3
resource.h
dlls/gphoto2.ds/resource.h
+2
-0
ui.c
dlls/gphoto2.ds/ui.c
+70
-33
No files found.
dlls/gphoto2.ds/Makefile.in
View file @
e2605fb0
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
gphoto2.ds
IMPORTS
=
comctl32 user32 gdi32 kernel32 ntdll
IMPORTS
=
comctl32 user32 gdi32
advapi32
kernel32 ntdll
EXTRALIBS
=
@GPHOTO2LIBS@
EXTRAINCL
=
@GPHOTO2INCL@
...
...
dlls/gphoto2.ds/gphoto2_De.rc
View file @
e2605fb0
...
...
@@ -29,9 +29,11 @@ FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List1",IDC_LIST1,"SysListView32", LVS_ICON | WS_BORDER |
WS_TABSTOP,7,7,358,229
DEFPUSHBUTTON "Gewhlte importieren",IDC_IMPORT,225,252,56,14
PUSHBUTTON "Alle importieren",IDC_IMPORTALL,7,252,52,14
PUSHBUTTON "Beenden",IDC_EXIT,295,252,50,14
DEFPUSHBUTTON "Gewhlte importieren",IDC_IMPORT,152,252,72,14
PUSHBUTTON "Preview",IDC_FETCH,7,252,64,14
PUSHBUTTON "Alle importieren",IDC_IMPORTALL,80,252,64,14
CONTROL "Skip This Dialog",IDC_SKIP,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,230,252,76,14
PUSHBUTTON "Beenden",IDC_EXIT,315,252,50,14
END
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 46
...
...
dlls/gphoto2.ds/gphoto2_En.rc
View file @
e2605fb0
...
...
@@ -29,9 +29,11 @@ FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List1",IDC_LIST1,"SysListView32", LVS_ICON | WS_BORDER |
WS_TABSTOP,7,7,358,229
DEFPUSHBUTTON "Import Selected",IDC_IMPORT,225,252,56,14
PUSHBUTTON "Import All",IDC_IMPORTALL,7,252,52,14
PUSHBUTTON "Exit",IDC_EXIT,295,252,50,14
DEFPUSHBUTTON "Import Selected",IDC_IMPORT,152,252,72,14
PUSHBUTTON "Preview",IDC_FETCH,7,252,64,14
PUSHBUTTON "Import All",IDC_IMPORTALL,80,252,64,14
CONTROL "Skip This Dialog",IDC_SKIP,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,230,252,76,14
PUSHBUTTON "Exit",IDC_EXIT,315,252,50,14
END
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 46
...
...
dlls/gphoto2.ds/gphoto2_Fr.rc
View file @
e2605fb0
...
...
@@ -29,9 +29,11 @@ FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List1",IDC_LIST1,"SysListView32", LVS_ICON | WS_BORDER |
WS_TABSTOP,7,7,358,229
DEFPUSHBUTTON "Importer la slection",IDC_IMPORT,225,252,56,14
PUSHBUTTON "Importer tous",IDC_IMPORTALL,7,252,52,14
PUSHBUTTON "Fermer",IDC_EXIT,295,252,50,14
DEFPUSHBUTTON "Importer la slection",IDC_IMPORT,152,252,72,14
PUSHBUTTON "Preview",IDC_FETCH,7,252,64,14
PUSHBUTTON "Importer tous",IDC_IMPORTALL,80,252,64,14
CONTROL "Skip This Dialog",IDC_SKIP,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,230,252,76,14
PUSHBUTTON "Fermer",IDC_EXIT,315,252,50,14
END
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 46
...
...
dlls/gphoto2.ds/gphoto2_Ko.rc
View file @
e2605fb0
...
...
@@ -30,9 +30,11 @@ FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List1",IDC_LIST1,"SysListView32", LVS_ICON | WS_BORDER |
WS_TABSTOP,7,7,358,229
DEFPUSHBUTTON "선택된 것을 불러오기",IDC_IMPORT,225,252,56,14
PUSHBUTTON "모두 불러오기",IDC_IMPORTALL,7,252,52,14
PUSHBUTTON "나가기",IDC_EXIT,295,252,50,14
DEFPUSHBUTTON "선택된 것을 불러오기",IDC_IMPORT,152,252,72,14
PUSHBUTTON "Preview",IDC_FETCH,7,252,64,14
PUSHBUTTON "모두 불러오기",IDC_IMPORTALL,80,252,64,14
CONTROL "Skip This Dialog",IDC_SKIP,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,230,252,76,14
PUSHBUTTON "나가기",IDC_EXIT,315,252,50,14
END
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 46
...
...
dlls/gphoto2.ds/gphoto2_Nl.rc
View file @
e2605fb0
...
...
@@ -29,9 +29,11 @@ FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List1",IDC_LIST1,"SysListView32", LVS_ICON | WS_BORDER |
WS_TABSTOP,7,7,358,229
DEFPUSHBUTTON "Importeer geselecteerde bestanden",IDC_IMPORT,225,252,56,14
PUSHBUTTON "Importeer alles",IDC_IMPORTALL,7,252,52,14
PUSHBUTTON "Afsluiten",IDC_EXIT,295,252,50,14
DEFPUSHBUTTON "Importeer geselecteerde bestanden",IDC_IMPORT,120,252,120,14
PUSHBUTTON "Preview",IDC_FETCH,7,252,48,14
PUSHBUTTON "Importeer alles",IDC_IMPORTALL,60,252,56,14
CONTROL "Skip This Dialog",IDC_SKIP,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,244,252,76,14
PUSHBUTTON "Afsluiten",IDC_EXIT,315,252,50,14
END
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 46
...
...
dlls/gphoto2.ds/gphoto2_No.rc
View file @
e2605fb0
...
...
@@ -29,9 +29,11 @@ FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List1",IDC_LIST1,"SysListView32", LVS_ICON | WS_BORDER |
WS_TABSTOP,7,7,358,229
DEFPUSHBUTTON "Importer valgte",IDC_IMPORT,225,252,56,14
PUSHBUTTON "Importer alle",IDC_IMPORTALL,7,252,52,14
PUSHBUTTON "Avslutt",IDC_EXIT,295,252,50,14
DEFPUSHBUTTON "Importer valgte",IDC_IMPORT,152,252,72,14
PUSHBUTTON "Preview",IDC_FETCH,7,252,64,14
PUSHBUTTON "Importer alle",IDC_IMPORTALL,80,252,64,14
CONTROL "Skip This Dialog",IDC_SKIP,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,230,252,76,14
PUSHBUTTON "Avslutt",IDC_EXIT,315,252,50,14
END
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 46
...
...
dlls/gphoto2.ds/gphoto2_Pl.rc
View file @
e2605fb0
...
...
@@ -30,9 +30,11 @@ FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List1",IDC_LIST1,"SysListView32", LVS_ICON | WS_BORDER |
WS_TABSTOP,7,7,358,229
DEFPUSHBUTTON "Skopiuj wybrane",IDC_IMPORT,205,252,76,14
PUSHBUTTON "Skopiuj wszystkie",IDC_IMPORTALL,7,252,72,14
PUSHBUTTON "Zakocz",IDC_EXIT,295,252,50,14
DEFPUSHBUTTON "Skopiuj wybrane",IDC_IMPORT,152,252,72,14
PUSHBUTTON "Preview",IDC_FETCH,7,252,64,14
PUSHBUTTON "Skopiuj wszystkie",IDC_IMPORTALL,80,252,64,14
CONTROL "Skip This Dialog",IDC_SKIP,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,230,252,76,14
PUSHBUTTON "Zakocz",IDC_EXIT,315,252,50,14
END
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 46
...
...
dlls/gphoto2.ds/resource.h
View file @
e2605fb0
...
...
@@ -28,3 +28,5 @@
#define IDC_IMPORTALL 1002
#define IDC_EXIT 1003
#define IDC_BITMAP 1004
#define IDC_FETCH 1005
#define IDC_SKIP 1006
dlls/gphoto2.ds/ui.c
View file @
e2605fb0
...
...
@@ -31,6 +31,7 @@
#include "winuser.h"
#include "winnls.h"
#include "wingdi.h"
#include "winreg.h"
#include "commctrl.h"
#include "prsht.h"
#include "twain.h"
...
...
@@ -38,6 +39,9 @@
#include "wine/debug.h"
#include "resource.h"
LPCSTR
settings_key
=
"Software
\\
Wine
\\
Gphoto2"
;
LPCSTR
settings_value
=
"SkipUI"
;
static
BOOL
disable_dialog
;
static
HBITMAP
static_bitmap
;
static
INT_PTR
CALLBACK
ConnectingProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
...
...
@@ -45,6 +49,43 @@ static INT_PTR CALLBACK ConnectingProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
return
FALSE
;
}
static
void
on_disable_dialog_clicked
(
HWND
dialog
)
{
if
(
IsDlgButtonChecked
(
dialog
,
IDC_SKIP
)
==
BST_CHECKED
)
disable_dialog
=
TRUE
;
else
disable_dialog
=
FALSE
;
}
static
void
UI_EndDialog
(
HWND
hwnd
,
INT_PTR
rc
)
{
if
(
disable_dialog
)
{
HKEY
key
;
const
DWORD
data
=
1
;
if
(
RegCreateKeyExA
(
HKEY_CURRENT_USER
,
settings_key
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
key
,
NULL
)
==
ERROR_SUCCESS
)
{
RegSetValueExA
(
key
,
settings_value
,
0
,
REG_DWORD
,
(
const
BYTE
*
)
&
data
,
sizeof
(
DWORD
));
RegCloseKey
(
key
);
}
}
EndDialog
(
hwnd
,
rc
);
}
static
int
GetAllImages
()
{
struct
gphoto2_file
*
file
;
int
has_images
=
0
;
LIST_FOR_EACH_ENTRY
(
file
,
&
activeDS
.
files
,
struct
gphoto2_file
,
entry
)
{
if
(
strstr
(
file
->
filename
,
".JPG"
)
||
strstr
(
file
->
filename
,
".jpg"
))
file
->
download
=
TRUE
;
has_images
=
1
;
}
return
has_images
;
}
static
void
PopulateListView
(
HWND
List
)
{
struct
gphoto2_file
*
file
;
...
...
@@ -120,14 +161,8 @@ static INT_PTR CALLBACK DialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
{
case
WM_INITDIALOG
:
{
HIMAGELIST
ilist
=
0
;
HWND
list
=
GetDlgItem
(
hwnd
,
IDC_LIST1
);
disable_dialog
=
FALSE
;
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_IMPORT
),
FALSE
);
PopulateImageList
(
&
ilist
,
list
);
SendMessageA
(
list
,
LVM_SETIMAGELIST
,
LVSIL_NORMAL
,(
LPARAM
)
ilist
);
PopulateListView
(
list
);
}
break
;
case
WM_NOTIFY
:
...
...
@@ -144,8 +179,11 @@ static INT_PTR CALLBACK DialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
case
WM_COMMAND
:
switch
LOWORD
(
wParam
)
{
case
IDC_SKIP
:
on_disable_dialog_clicked
(
hwnd
);
break
;
case
IDC_EXIT
:
EndDialog
(
hwnd
,
0
);
UI_
EndDialog
(
hwnd
,
0
);
break
;
case
IDC_IMPORT
:
{
...
...
@@ -155,7 +193,7 @@ static INT_PTR CALLBACK DialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
if
(
count
==
0
)
{
EndDialog
(
hwnd
,
0
);
UI_
EndDialog
(
hwnd
,
0
);
return
FALSE
;
}
...
...
@@ -184,38 +222,28 @@ static INT_PTR CALLBACK DialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
}
}
EndDialog
(
hwnd
,
1
);
UI_
EndDialog
(
hwnd
,
1
);
}
break
;
case
IDC_IMPORTALL
:
{
HWND
list
=
GetDlgItem
(
hwnd
,
IDC_LIST1
);
int
count
=
SendMessageA
(
list
,
LVM_GETITEMCOUNT
,
0
,
0
);
int
i
;
if
(
count
==
0
)
if
(
!
GetAllImages
())
{
EndDialog
(
hwnd
,
0
);
UI_
EndDialog
(
hwnd
,
0
);
return
FALSE
;
}
UI_EndDialog
(
hwnd
,
1
);
}
break
;
case
IDC_FETCH
:
{
HIMAGELIST
ilist
=
0
;
HWND
list
=
GetDlgItem
(
hwnd
,
IDC_LIST1
);
PopulateImageList
(
&
ilist
,
list
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
LVITEMA
item
;
struct
gphoto2_file
*
file
;
item
.
mask
=
LVIF_PARAM
;
item
.
iItem
=
i
;
item
.
iSubItem
=
0
;
SendMessageA
(
list
,
LVM_GETITEMA
,
0
,(
LPARAM
)
&
item
);
file
=
(
struct
gphoto2_file
*
)
item
.
lParam
;
file
->
download
=
TRUE
;
}
EndDialog
(
hwnd
,
1
);
SendMessageA
(
list
,
LVM_SETIMAGELIST
,
LVSIL_NORMAL
,(
LPARAM
)
ilist
);
PopulateListView
(
list
);
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_FETCH
),
FALSE
);
}
break
;
}
...
...
@@ -226,6 +254,15 @@ static INT_PTR CALLBACK DialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
BOOL
DoCameraUI
(
void
)
{
HKEY
key
;
DWORD
data
=
0
;
DWORD
size
=
sizeof
(
data
);
if
(
RegOpenKeyExA
(
HKEY_CURRENT_USER
,
settings_key
,
0
,
KEY_READ
,
&
key
)
==
ERROR_SUCCESS
)
{
RegQueryValueExA
(
key
,
settings_value
,
NULL
,
NULL
,
(
LPBYTE
)
&
data
,
&
size
);
RegCloseKey
(
key
);
if
(
data
)
return
GetAllImages
();
}
return
DialogBoxW
(
GPHOTO2_instance
,
(
LPWSTR
)
MAKEINTRESOURCE
(
IDD_CAMERAUI
),
NULL
,
DialogProc
);
}
...
...
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