aboutsummaryrefslogtreecommitdiff
path: root/CPP/7zip/UI/FileManager/OverwriteDialog.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CPP/7zip/UI/FileManager/OverwriteDialog.h52
1 files changed, 31 insertions, 21 deletions
diff --git a/CPP/7zip/UI/FileManager/OverwriteDialog.h b/CPP/7zip/UI/FileManager/OverwriteDialog.h
index a9ca991..9f0801d 100644
--- a/CPP/7zip/UI/FileManager/OverwriteDialog.h
+++ b/CPP/7zip/UI/FileManager/OverwriteDialog.h
@@ -12,68 +12,78 @@ namespace NOverwriteDialog
12{ 12{
13 struct CFileInfo 13 struct CFileInfo
14 { 14 {
15 bool SizeIsDefined; 15 bool Size_IsDefined;
16 bool TimeIsDefined; 16 bool Time_IsDefined;
17 bool Is_FileSystemFile;
17 UInt64 Size; 18 UInt64 Size;
18 FILETIME Time; 19 FILETIME Time;
19 UString Name; 20 UString Path;
21
22 void SetTime(const FILETIME &t)
23 {
24 Time = t;
25 Time_IsDefined = true;
26 }
20 27
21 void SetTime(const FILETIME *t) 28 void SetTime2(const FILETIME *t)
22 { 29 {
23 if (!t) 30 if (!t)
24 TimeIsDefined = false; 31 Time_IsDefined = false;
25 else 32 else
26 { 33 SetTime(*t);
27 TimeIsDefined = true;
28 Time = *t;
29 }
30 } 34 }
31 35
32 void SetSize(UInt64 size) 36 void SetSize(UInt64 size)
33 { 37 {
34 SizeIsDefined = true;
35 Size = size; 38 Size = size;
39 Size_IsDefined = true;
36 } 40 }
37 41
38 void SetSize(const UInt64 *size) 42 void SetSize2(const UInt64 *size)
39 { 43 {
40 if (!size) 44 if (!size)
41 SizeIsDefined = false; 45 Size_IsDefined = false;
42 else 46 else
43 SetSize(*size); 47 SetSize(*size);
44 } 48 }
49
50 CFileInfo():
51 Size_IsDefined(false),
52 Time_IsDefined(false),
53 Is_FileSystemFile(false)
54 {}
45 }; 55 };
46} 56}
47 57
48class COverwriteDialog: public NWindows::NControl::CModalDialog 58class COverwriteDialog: public NWindows::NControl::CModalDialog
49{ 59{
60#ifdef UNDER_CE
50 bool _isBig; 61 bool _isBig;
62#endif
51 63
52 void SetFileInfoControl(unsigned textID, unsigned iconID, const NOverwriteDialog::CFileInfo &fileInfo); 64 void SetItemIcon(unsigned iconID, HICON hIcon);
65 void SetFileInfoControl(const NOverwriteDialog::CFileInfo &fileInfo, unsigned textID, unsigned iconID, unsigned iconID_2);
53 virtual bool OnInit() Z7_override; 66 virtual bool OnInit() Z7_override;
67 virtual bool OnDestroy() Z7_override;
54 virtual bool OnButtonClicked(unsigned buttonID, HWND buttonHWND) Z7_override; 68 virtual bool OnButtonClicked(unsigned buttonID, HWND buttonHWND) Z7_override;
55 void ReduceString(UString &s); 69 void ReduceString(UString &s);
56 70
57public: 71public:
58 bool ShowExtraButtons; 72 bool ShowExtraButtons;
59 bool DefaultButton_is_NO; 73 bool DefaultButton_is_NO;
60 74 NOverwriteDialog::CFileInfo OldFileInfo;
75 NOverwriteDialog::CFileInfo NewFileInfo;
61 76
62 COverwriteDialog(): ShowExtraButtons(true), DefaultButton_is_NO(false) {} 77 COverwriteDialog(): ShowExtraButtons(true), DefaultButton_is_NO(false) {}
63 78
64 INT_PTR Create(HWND parent = NULL) 79 INT_PTR Create(HWND parent = NULL)
65 { 80 {
81#ifdef UNDER_CE
66 BIG_DIALOG_SIZE(280, 200); 82 BIG_DIALOG_SIZE(280, 200);
67 #ifdef UNDER_CE
68 _isBig = isBig; 83 _isBig = isBig;
69 #else 84#endif
70 _isBig = true;
71 #endif
72 return CModalDialog::Create(SIZED_DIALOG(IDD_OVERWRITE), parent); 85 return CModalDialog::Create(SIZED_DIALOG(IDD_OVERWRITE), parent);
73 } 86 }
74
75 NOverwriteDialog::CFileInfo OldFileInfo;
76 NOverwriteDialog::CFileInfo NewFileInfo;
77}; 87};
78 88
79#endif 89#endif