Skip to content

Commit 84c32eb

Browse files
committed
Split pretranslate.cpp into UI and non-UI files
1 parent 0104c2d commit 84c32eb

File tree

10 files changed

+398
-271
lines changed

10 files changed

+398
-271
lines changed

Poedit.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
<ClCompile Include="src\cat_sorting.cpp" />
125125
<ClCompile Include="src\cat_update.cpp" />
126126
<ClCompile Include="src\layout_helpers.cpp" />
127+
<ClCompile Include="src\pretranslate_ui.cpp" />
127128
<ClCompile Include="src\progress.cpp" />
128129
<ClCompile Include="src\progress_ui.cpp" />
129130
<ClCompile Include="src\subprocess.cpp" />
@@ -203,6 +204,7 @@
203204
<ClInclude Include="src\cat_sorting.h" />
204205
<ClInclude Include="src\cat_update.h" />
205206
<ClInclude Include="src\layout_helpers.h" />
207+
<ClInclude Include="src\pretranslate_ui.h" />
206208
<ClInclude Include="src\progress.h" />
207209
<ClInclude Include="src\progress_ui.h" />
208210
<ClInclude Include="src\subprocess.h" />

Poedit.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@
234234
<ClCompile Include="src\layout_helpers.cpp">
235235
<Filter>Source Files</Filter>
236236
</ClCompile>
237+
<ClCompile Include="src\pretranslate_ui.cpp">
238+
<Filter>Source Files</Filter>
239+
</ClCompile>
237240
</ItemGroup>
238241
<ItemGroup>
239242
<ClInclude Include="src\attentionbar.h">
@@ -470,6 +473,9 @@
470473
<ClInclude Include="src\layout_helpers.h">
471474
<Filter>Header Files</Filter>
472475
</ClInclude>
476+
<ClInclude Include="src\pretranslate_ui.h">
477+
<Filter>Header Files</Filter>
478+
</ClInclude>
473479
</ItemGroup>
474480
<ItemGroup>
475481
<ResourceCompile Include="src\poedit.rc">

Poedit.xcodeproj/project.pbxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@
197197
B2F287C0170DCC63004C1F41 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B248B2DF170D765100EBA58E /* CoreFoundation.framework */; };
198198
B2F3C2912B891644008E0593 /* app_updates.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2F3C28F2B891644008E0593 /* app_updates.cpp */; };
199199
B2FE296B1AC85FFF005588E4 /* keytar_mac.cc in Sources */ = {isa = PBXBuildFile; fileRef = B2FE29691AC85FFF005588E4 /* keytar_mac.cc */; };
200+
B8E98168860C06B0F4D3D1C8 /* pretranslate_ui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C4A45BD39DED9301D1BDBB8 /* pretranslate_ui.cpp */; };
200201
BF1EDE1EB234996AAD0D9164 /* catalog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B28F1CAC16F629D30018AF7E /* catalog.cpp */; };
201202
CE84DDEAB7912A33832B960D /* ThumbnailProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E3E2780DE9804824D0B5FF4 /* ThumbnailProvider.m */; };
202203
F9A6A70A2A290ADC67FF625D /* QuicklookPreview.appex in Copy Gettext bundle and extensions */ = {isa = PBXBuildFile; fileRef = F99D32BE79516DF3871487AD /* QuicklookPreview.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
@@ -332,10 +333,12 @@
332333
2E49B156226EE8BCE26F9F19 /* QuicklookThumbnails.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = QuicklookThumbnails.appex; sourceTree = BUILT_PRODUCTS_DIR; };
333334
34FA28979129DBB07074526F /* hy */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hy; path = macos/nib/hy.lproj/MainToolbar.strings; sourceTree = "<group>"; };
334335
37C153480C38B76B9F26CB04 /* af */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = af; path = macos/nib/af.lproj/MainToolbar.strings; sourceTree = "<group>"; };
336+
3C4A45BD39DED9301D1BDBB8 /* pretranslate_ui.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = pretranslate_ui.cpp; sourceTree = "<group>"; };
335337
3E062ED24D3E4BA3F60921BB /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = macos/nib/es.lproj/MainToolbar.strings; sourceTree = "<group>"; };
336338
4007B79994B0C47EB483F8D1 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = macos/nib/nl.lproj/MainToolbar.strings; sourceTree = "<group>"; };
337339
4087DD55F226A5FACE92E939 /* sr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sr; path = macos/nib/sr.lproj/MainToolbar.strings; sourceTree = "<group>"; };
338340
40F053E7BEFB8D605E64EEBD /* en-GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-GB"; path = "macos/nib/en-GB.lproj/MainToolbar.strings"; sourceTree = "<group>"; };
341+
422204F8CE8AF5BAD89D1E7D /* pretranslate_ui.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = pretranslate_ui.h; sourceTree = "<group>"; };
339342
42A5059AF0EA6425563FCB12 /* progress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = progress.h; sourceTree = "<group>"; };
340343
4483FC30798043AF01DCDD15 /* uz */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uz; path = macos/nib/uz.lproj/MainToolbar.strings; sourceTree = "<group>"; };
341344
44BA22CA76913ABABC364255 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = macos/nib/ko.lproj/MainToolbar.strings; sourceTree = "<group>"; };
@@ -924,6 +927,8 @@
924927
2241A28E05DC663462EE36F4 /* layout_helpers.cpp */,
925928
DC4652614515FE3A9BC28919 /* layout_helpers.h */,
926929
52E75B6286F2003BAE62A12F /* wx_translatable_strings.h */,
930+
3C4A45BD39DED9301D1BDBB8 /* pretranslate_ui.cpp */,
931+
422204F8CE8AF5BAD89D1E7D /* pretranslate_ui.h */,
927932
);
928933
name = GUI;
929934
path = src;
@@ -1785,6 +1790,7 @@
17851790
80FBB464B5B4DC5E6B59B25C /* cat_operations.cpp in Sources */,
17861791
0C1409B0135C562587776FC7 /* MainToolbar.mm in Sources */,
17871792
3F4B67D91AD57C28FAE1531E /* layout_helpers.cpp in Sources */,
1793+
B8E98168860C06B0F4D3D1C8 /* pretranslate_ui.cpp in Sources */,
17881794
);
17891795
runOnlyForDeploymentPostprocessing = 0;
17901796
};

src/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ poedit_SOURCES = \
6464
menus.h menus.cpp \
6565
pluralforms/pl_evaluate.cpp pluralforms/pl_evaluate.h \
6666
prefsdlg.cpp prefsdlg.h \
67-
pretranslate.cpp pretranslate.h \
67+
pretranslate.cpp pretranslate.h pretranslate_ui.cpp pretranslate_ui.h \
6868
progress.h progress_ui.h progress.cpp progress_ui.cpp \
6969
propertiesdlg.cpp propertiesdlg.h \
7070
qa_checks.cpp qa_checks.h \

src/edframe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
#include "commentdlg.h"
8080
#include "main_toolbar.h"
8181
#include "manager.h"
82-
#include "pretranslate.h"
82+
#include "pretranslate_ui.h"
8383
#include "attentionbar.h"
8484
#include "utility.h"
8585
#include "languagectrl.h"

src/edlistctrl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ class PoeditListCtrl : public wxDataViewCtrl
110110
return ListItemToCatalogItem(GetCurrentItem());
111111
}
112112

113-
std::vector<CatalogItemPtr> GetSelectedCatalogItems() const
113+
CatalogItemArray GetSelectedCatalogItems() const
114114
{
115115
auto catalog = m_model->m_catalog;
116-
std::vector<CatalogItemPtr> s;
116+
CatalogItemArray s;
117117
for (auto i: GetSelectedCatalogItemIndexes())
118118
s.push_back((*catalog)[i]);
119119
return s;

0 commit comments

Comments
 (0)