summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-02 17:55:18 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-02 17:55:18 +0300
commit1bd627ccc1014b3d9c611815663145d9a6094461 (patch)
tree416b764eb1cb107bc2148ede72ac3e269cd47827
parentdfdc051334916e5c794388e74b526cd897f9fbdf (diff)
added explicit flag for checking duplicates
-rw-r--r--plugins/Import/import.vcxproj5
-rw-r--r--plugins/Import/res/resource.rc22
-rw-r--r--plugins/Import/src/miranda.cpp16
-rw-r--r--plugins/Import/src/resource.h12
-rw-r--r--plugins/Import/src/stdafx.h1
-rw-r--r--plugins/Import/src/wizard.cpp2
6 files changed, 37 insertions, 21 deletions
diff --git a/plugins/Import/import.vcxproj b/plugins/Import/import.vcxproj
index 444582b9fd..fe74dbadbd 100644
--- a/plugins/Import/import.vcxproj
+++ b/plugins/Import/import.vcxproj
@@ -53,7 +53,10 @@
<ItemGroup>
<ClInclude Include="src\dbrw\*.h" />
</ItemGroup>
- <ItemDefinitionGroup>
+ <ItemGroup>
+ <Image Include="res\import.ico" />
+ </ItemGroup>
+ <ItemDefinitionGroup>
<ClCompile>
<ExceptionHandling>Sync</ExceptionHandling>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\libs\sqlite3\src;$(ProjectDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
diff --git a/plugins/Import/res/resource.rc b/plugins/Import/res/resource.rc
index ead48a41b2..14cfda2d20 100644
--- a/plugins/Import/res/resource.rc
+++ b/plugins/Import/res/resource.rc
@@ -74,18 +74,18 @@ BEGIN
LISTBOX IDC_STATUS,5,38,210,71,NOT LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP
END
-IDD_WIZARD DIALOGEX 0, 0, 220, 143
+IDD_WIZARD DIALOGEX 0, 0, 220, 158
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Import Information Wizard"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- DEFPUSHBUTTON "&Next >",IDOK,120,124,45,13
- PUSHBUTTON "Cancel",IDCANCEL,170,124,45,13
- PUSHBUTTON "< &Back",IDC_BACK,75,124,45,13
- CONTROL "",IDC_SPLITTER,"Static",SS_ETCHEDHORZ,-7,120,234,1
+ DEFPUSHBUTTON "&Next >",IDOK,120,140,45,13
+ PUSHBUTTON "Cancel",IDCANCEL,170,140,45,13
+ PUSHBUTTON "< &Back",IDC_BACK,75,140,45,13
+ CONTROL "",IDC_SPLITTER,"Static",SS_ETCHEDHORZ,-7,136,234,1
END
-IDD_OPTIONS DIALOGEX 0, 0, 220, 120
+IDD_OPTIONS DIALOGEX 0, 0, 220, 138
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
@@ -100,6 +100,7 @@ BEGIN
LTEXT "Imports only contacts and history, and a few settings. Ideal for synchronizing.",IDC_STATIC_ALL,26,48,187,16
LTEXT "Imports contacts only, doesn't import any message history.",IDC_STATIC_CONTACTS,26,78,187,16
LTEXT "Custom schema: you can choose what to import.",IDC_STATIC_CUSTOM,26,108,187,8,WS_DISABLED
+ CONTROL "Check duplicates",IDC_CHECK_DUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,122,207,10
END
IDD_ADVOPTIONS DIALOGEX 0, 0, 220, 114
@@ -230,7 +231,7 @@ BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 215
TOPMARGIN, 7
- BOTTOMMARGIN, 137
+ BOTTOMMARGIN, 153
END
IDD_OPTIONS, DIALOG
@@ -238,7 +239,7 @@ BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 213
TOPMARGIN, 7
- BOTTOMMARGIN, 117
+ BOTTOMMARGIN, 132
END
IDD_ADVOPTIONS, DIALOG
@@ -314,6 +315,11 @@ BEGIN
0
END
+IDD_OPTIONS AFX_DIALOG_LAYOUT
+BEGIN
+ 0
+END
+
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp
index 7d4c1e4e34..9a517d341c 100644
--- a/plugins/Import/src/miranda.cpp
+++ b/plugins/Import/src/miranda.cpp
@@ -178,7 +178,8 @@ void CMirandaPageDlg::SearchForLists(const wchar_t *mirandaPath, const wchar_t *
CMirandaOptionsPageDlg::CMirandaOptionsPageDlg() :
CWizardPageDlg(IDD_OPTIONS),
- btnBack(this, IDC_BACK)
+ btnBack(this, IDC_BACK),
+ chkDups(this, IDC_CHECK_DUPS)
{
btnBack.OnClick = Callback(this, &CMirandaOptionsPageDlg::onClick_Back);
}
@@ -216,20 +217,24 @@ void CMirandaOptionsPageDlg::onClick_Back(CCtrlButton*)
void CMirandaOptionsPageDlg::OnNext()
{
+ int iFlags = chkDups.IsChecked() ? IOPT_CHECKDUPS : 0;
+
if (IsDlgButtonChecked(m_hwnd, IDC_RADIO_COMPLETE)) {
- g_iImportOptions = IOPT_ADDUNKNOWN | IOPT_COMPLETE | IOPT_CHECKDUPS;
+ g_iImportOptions = IOPT_ADDUNKNOWN | IOPT_COMPLETE | iFlags;
PostMessage(m_hwndParent, WIZM_GOTOPAGE, IDD_PROGRESS, (LPARAM)new CProgressPageDlg());
}
else if (IsDlgButtonChecked(m_hwnd, IDC_RADIO_ALL)) {
- g_iImportOptions = IOPT_HISTORY | IOPT_SYSTEM | IOPT_GROUPS | IOPT_CONTACTS | IOPT_CHECKDUPS;
+ g_iImportOptions = IOPT_HISTORY | IOPT_SYSTEM | IOPT_GROUPS | IOPT_CONTACTS | iFlags;
PostMessage(m_hwndParent, WIZM_GOTOPAGE, IDD_PROGRESS, (LPARAM)new CProgressPageDlg());
}
else if (IsDlgButtonChecked(m_hwnd, IDC_RADIO_CONTACTS)) {
g_iImportOptions = IOPT_CONTACTS;
PostMessage(m_hwndParent, WIZM_GOTOPAGE, IDD_PROGRESS, (LPARAM)new CProgressPageDlg());
}
- else if (IsDlgButtonChecked(m_hwnd, IDC_RADIO_CUSTOM))
+ else if (IsDlgButtonChecked(m_hwnd, IDC_RADIO_CUSTOM)) {
+ g_iImportOptions = iFlags;
PostMessage(m_hwndParent, WIZM_GOTOPAGE, IDD_ADVOPTIONS, (LPARAM)new CMirandaAdvOptionsPageDlg());
+ }
}
//=======================================================================================
@@ -281,7 +286,8 @@ void CMirandaAdvOptionsPageDlg::onClick_Back(CCtrlButton*)
void CMirandaAdvOptionsPageDlg::OnNext()
{
- g_iImportOptions = 0;
+ // clear all another flags but duplicates
+ g_iImportOptions &= IOPT_CHECKDUPS;
if (IsDlgButtonChecked(m_hwnd, IDC_CONTACTS))
g_iImportOptions |= IOPT_CONTACTS | IOPT_GROUPS;
diff --git a/plugins/Import/src/resource.h b/plugins/Import/src/resource.h
index bc81fde5fe..42ef6867ee 100644
--- a/plugins/Import/src/resource.h
+++ b/plugins/Import/src/resource.h
@@ -23,10 +23,10 @@
#define IDC_FILENAME 1007
#define IDC_PROGRESS 1008
#define IDC_STATUS 1009
-#define IDC_SPLITTER 1010
-#define IDC_STATICTEXT1 1011
-#define IDC_STATICTEXT2 1012
-#define IDC_STATICTEXT3 1013
+#define IDC_SPLITTER 1010
+#define IDC_STATICTEXT1 1011
+#define IDC_STATICTEXT2 1012
+#define IDC_STATICTEXT3 1013
#define IDC_RADIO_ALL 1016
#define IDC_RADIO_CONTACTS 1017
#define IDC_RADIO_CUSTOM 1018
@@ -61,9 +61,9 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 115
+#define _APS_NEXT_RESOURCE_VALUE 116
#define _APS_NEXT_COMMAND_VALUE 40002
-#define _APS_NEXT_CONTROL_VALUE 1044
+#define _APS_NEXT_CONTROL_VALUE 1045
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/plugins/Import/src/stdafx.h b/plugins/Import/src/stdafx.h
index 19259ba0c0..8d2c5f3c2b 100644
--- a/plugins/Import/src/stdafx.h
+++ b/plugins/Import/src/stdafx.h
@@ -147,6 +147,7 @@ public:
class CMirandaOptionsPageDlg : public CWizardPageDlg
{
CCtrlButton btnBack;
+ CCtrlCheck chkDups;
public:
CMirandaOptionsPageDlg();
diff --git a/plugins/Import/src/wizard.cpp b/plugins/Import/src/wizard.cpp
index 869fc81bf7..8d99fcd3ab 100644
--- a/plugins/Import/src/wizard.cpp
+++ b/plugins/Import/src/wizard.cpp
@@ -223,7 +223,7 @@ public:
{
LPMINMAXINFO lpMMI = (LPMINMAXINFO)lParam;
lpMMI->ptMinTrackSize.x = 330;
- lpMMI->ptMinTrackSize.y = 232;
+ lpMMI->ptMinTrackSize.y = 286;
}
return 1;