summaryrefslogtreecommitdiff
path: root/community/poedit/build-fix.patch
blob: fb582bf2ba912d0d1928268cbb990d5eaedfaa0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
diff -wbBur poedit-1.6.4/src/edapp.cpp poedit-1.6.4.my/src/edapp.cpp
--- poedit-1.6.4/src/edapp.cpp	2014-02-07 22:03:55.000000000 +0400
+++ poedit-1.6.4.my/src/edapp.cpp	2014-02-13 14:49:30.231324614 +0400
@@ -67,7 +67,6 @@
 
 #include "edapp.h"
 #include "edframe.h"
-#include "aboutbox.h"
 #include "manager.h"
 #include "prefsdlg.h"
 #include "parser.h"
@@ -666,7 +665,7 @@
     about.SetCopyright(L"Copyright \u00a9 1999-2014 Václav Slavík");
     about.SetWebSite("http://www.poedit.net");
 
-    PoeditAboutBox(about);
+//    PoeditAboutBox(about);
 }
 
 
@@ -792,7 +791,7 @@
 void PoeditApp::EmailSupport(const wxString& subject, const wxString& body)
 {
     wxString body2(body);
-    wxString appname(HasLicense() ? "Poedit Pro" : "Poedit");
+    wxString appname("Poedit");
 
 #ifdef __WXOSX__
     NSString *s = [[NSProcessInfo processInfo] operatingSystemVersionString];
@@ -927,31 +926,8 @@
 
 void PoeditApp::OnLicense(wxCommandEvent&)
 {
-    ShowLicenseInformation();
 }
 
 void PoeditApp::ImportLicenseKey(const wxString& url)
 {
-    PoeditLicense lic = PoeditLicense::FromURL(url);
-
-    if (lic.IsValid())
-    {
-        lic.Store(); // save valid license
-        ShowLicenseInformation(nullptr, &lic); // ...and thank the user
-    }
-    else if (!lic.Key().empty())
-    {
-        // if we at least parsed the data, even if invalid, show it and let the
-        // user correct them
-        ShowLicenseInformation(nullptr, &lic);
-    }
-    else
-    {
-        wxMessageDialog dlg(nullptr, _("Invalid license data."), _("Poedit"), wxOK | wxICON_ERROR);
-        dlg.SetExtendedMessage(wxString::Format(_("The link doesn't contain valid Poedit license. Try entering it manually or contact support at help@poedit.net.\n\n(%s)"), url));
-        dlg.ShowModal();
-    }
-
-    if (wxTopLevelWindows.empty())
-        OpenNewFile();
 }
diff -wbBur poedit-1.6.4/src/edapp.h poedit-1.6.4.my/src/edapp.h
--- poedit-1.6.4/src/edapp.h	2014-02-07 22:03:55.000000000 +0400
+++ poedit-1.6.4.my/src/edapp.h	2014-02-13 14:49:08.831324860 +0400
@@ -27,8 +27,6 @@
 #ifndef _EDAPP_H_
 #define _EDAPP_H_
 
-#include "licensing.h"
-
 #include <wx/app.h>
 #include <wx/string.h>
 #include <wx/intl.h>
diff -wbBur poedit-1.6.4/src/edframe.cpp poedit-1.6.4.my/src/edframe.cpp
--- poedit-1.6.4/src/edframe.cpp	2014-02-07 22:03:55.000000000 +0400
+++ poedit-1.6.4.my/src/edframe.cpp	2014-02-13 14:49:20.301324729 +0400
@@ -85,9 +85,7 @@
 #include "errorbar.h"
 #include "utility.h"
 #include "languagectrl.h"
-#include "statistics.h"
 #include "welcomescreen.h"
-#include "wordpress.h"
 #include "errors.h"
 
 #include <wx/listimpl.cpp>
@@ -1374,8 +1372,6 @@
 
 void PoeditFrame::OnNewForWordpress(wxCommandEvent&)
 {
-    CHECK_LICENSE(Wordpress);
-
     DoIfCanDiscardCurrentDoc([=]{
         NewForWordpress();
     });
@@ -1466,73 +1462,6 @@
 void PoeditFrame::NewForWordpress()
 {
     // TODO: share code with NewFromPOT()
-
-    wxDirDialog dirdlg(this,
-                    _("Select the folder with the WordPress theme or plugin"),
-                    "",
-                    wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
-    if (dirdlg.ShowModal() != wxID_OK)
-        return;
-
-    try
-    {
-        std::unique_ptr<ProgressInfo> progress(new ProgressInfo(this, _("WordPress")));
-        progress->UpdateMessage(_("Analyzing WordPress code..."));
-
-        auto wpInfo = WordpressInfo::Analyze(dirdlg.GetPath());
-        auto catalog = wpInfo.CreateCatalog();
-
-        delete m_catalog;
-        m_catalog = catalog.release();
-
-        m_fileName = wpInfo.GetPOFilePath("LANG");
-        m_catalog->SetFileName(m_fileName);
-        m_fileExistsOnDisk = false;
-        m_modified = true;
-
-        EnsureContentView(Content::PO);
-        m_list->CatalogChanged(m_catalog);
-
-        UpdateTitle();
-        UpdateMenu();
-        UpdateStatusBar();
-        InitSpellchecker();
-
-        progress.reset();
-
-        UpdateCatalog();
-
-        // Choose the language:
-        wxWindowPtr<LanguageDialog> dlg(new LanguageDialog(this));
-
-        dlg->ShowWindowModalThenDo([=](int retcode){
-            if (retcode == wxID_OK)
-            {
-                Language lang = dlg->GetLang();
-                m_catalog->Header().Lang = lang;
-                m_catalog->Header().SetHeaderNotEmpty("Plural-Forms", lang.DefaultPluralFormsExpr());
-
-                m_fileName = wpInfo.GetPOFilePath(lang.Code());
-                m_catalog->SetFileName(m_fileName);
-                m_fileExistsOnDisk = false;
-                m_modified = true;
-
-                UpdateTitle();
-                UpdateMenu();
-                UpdateStatusBar();
-                RecreatePluralTextCtrls();
-                InitSpellchecker();
-                if (m_list)
-                    m_list->CatalogChanged(m_catalog); // refresh language column
-            }
-        });
-    }
-    catch (const WordpressException& e)
-    {
-        WordpressErrorDialog dlg(this, e);
-        dlg.ShowModal();
-        return;
-    }
 }
 
 
@@ -1728,10 +1657,6 @@
 
 void PoeditFrame::OnStatistics(wxCommandEvent&)
 {
-    CHECK_LICENSE(Statistics);
-
-    wxWindowPtr<wxDialog> dlg(new StatisticsWindow(this, *m_catalog));
-    dlg->ShowWindowModalThenDo([dlg](int){});
 }
 
 
diff -wbBur poedit-1.6.4/src/tm/tm_migrate.cpp poedit-1.6.4.my/src/tm/tm_migrate.cpp
--- poedit-1.6.4/src/tm/tm_migrate.cpp	2014-02-01 22:10:12.000000000 +0400
+++ poedit-1.6.4.my/src/tm/tm_migrate.cpp	2014-02-13 14:15:57.734681082 +0400
@@ -92,7 +92,7 @@
     return path.GetFullPath();
   #endif
 #else
-    return wxStandardPaths::Get().GetInstallPrefix() + "/libexec/poedit-dump-legacy-tm";
+    return wxStandardPaths::Get().GetInstallPrefix() + "/lib/poedit/poedit-dump-legacy-tm";
 #endif
 }
 
diff -wbBur poedit-1.6.4/src/welcomescreen.cpp poedit-1.6.4.my/src/welcomescreen.cpp
--- poedit-1.6.4/src/welcomescreen.cpp	2014-02-07 22:03:55.000000000 +0400
+++ poedit-1.6.4.my/src/welcomescreen.cpp	2014-02-13 14:48:36.421325233 +0400
@@ -118,11 +118,10 @@
 #endif
 
 
-class UpgradeSizer : public wxBoxSizer, public LicenseObserver
+class UpgradeSizer : public wxBoxSizer
 {
 public:
     UpgradeSizer(int orient) : wxBoxSizer(orient) {}
-    virtual void OnLicenseEntered() { ShowItems(false); }
 };
 
 } // anonymous namespace
@@ -203,26 +202,6 @@
 
     sizer->AddSpacer(20);
 
-    if (!HasLicense())
-    {
-        auto upgradeSizer = new UpgradeSizer(wxHORIZONTAL);
-        sizer->Add(upgradeSizer, wxSizerFlags().Align(wxALIGN_RIGHT).Border());
-        auto upgradeBtn = new wxBitmapButton(this, wxID_ANY, wxArtProvider::GetBitmap("UpgradeBanner"), wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxDefaultValidator, "Upgrade to Pro");
-        upgradeBtn->SetBitmapCurrent(wxArtProvider::GetBitmap("UpgradeBannerHighlight"));
-        upgradeBtn->SetToolTip(_("Upgrade to the Pro version of Poedit with more features."));
-        upgradeSizer->Add(upgradeBtn);
-        auto upgradeInfoBtn = new wxBitmapButton(this, wxID_ANY, wxArtProvider::GetBitmap("UpgradeBannerInfo"), wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxDefaultValidator, "Upgrade to Pro Info");
-        upgradeInfoBtn->SetBitmapCurrent(wxArtProvider::GetBitmap("UpgradeBannerInfoHighlight"));
-        upgradeSizer->Add(upgradeInfoBtn);
-
-        upgradeBtn->Bind(wxEVT_BUTTON, [=](wxCommandEvent&){
-            PurchaseUpgrade(UpgradeSource::WelcomeScreen_Upgrade, /*certain=*/false, parent);
-        });
-        upgradeInfoBtn->Bind(wxEVT_BUTTON, [=](wxCommandEvent&){
-            AskUserToUpgradeIfAppliable(UpgradeSource::WelcomeScreen_Info, parent);
-        });
-    }
-
     sizer->Add(new ActionButton(
                        this, wxID_OPEN,
                        _("Edit a translation"),