From 99c744669b9993376f479063788a55bcf06b170c Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 6 Oct 2015 07:15:47 +0200 Subject: [PATCH 1/4] Add missing locales and fix localization strings cfr Ubuntu LP bug: #1315614, #1502568 Debian bug: #800838) --- locale/Makefile.am | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/locale/Makefile.am b/locale/Makefile.am index 0affdb2f3c..28d7ebb028 100644 --- a/locale/Makefile.am +++ b/locale/Makefile.am @@ -16,16 +16,20 @@ locale_dirs = \ el \ es \ fa \ + fa_IR \ fi \ fr \ gl \ + he \ hr \ hu \ it_IT \ ja \ + ka \ ko \ lt \ lv \ + ms \ nb \ nl \ nn \ @@ -36,7 +40,7 @@ locale_dirs = \ ru \ sk \ sl \ - sv_SE \ + sv \ tr \ uk \ zh_CN \ @@ -45,12 +49,12 @@ locale_dirs = \ install-data-hook: mydir=$(DESTDIR)$(datadir) ;\ for ldir in $(locale_dirs) ; do \ - $(INSTALL) -d $$mydir/$$ldir ; \ + $(INSTALL) -d $$mydir/$$ldir/LC_MESSAGES ; \ if [ -f $$ldir/BOINC-Manager.mo ] ; then \ - $(INSTALL_DATA) $$ldir/BOINC-Manager.mo $$mydir/$$ldir/BOINC-Manager.mo ; \ + $(INSTALL_DATA) $$ldir/BOINC-Manager.mo $$mydir/$$ldir/LC_MESSAGES/BOINC-Manager.mo ; \ fi ;\ if [ -f $$ldir/BOINC-Client.mo ] ; then \ - $(INSTALL_DATA) $$ldir/BOINC-Client.mo $$mydir/$$ldir/BOINC-Client.mo ; \ + $(INSTALL_DATA) $$ldir/BOINC-Client.mo $$mydir/$$ldir/LC_MESSAGES/BOINC-Client.mo ; \ fi ;\ done From e14497bc43a1ddc7a351922e320a43726b78ff9d Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 6 Oct 2015 07:19:33 +0200 Subject: [PATCH 2/4] Remove "cy" locale, not available anymore --- locale/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/locale/Makefile.am b/locale/Makefile.am index 28d7ebb028..6bd93e4dff 100644 --- a/locale/Makefile.am +++ b/locale/Makefile.am @@ -10,7 +10,6 @@ locale_dirs = \ bg \ ca \ cs \ - cy \ da \ de \ el \ From 06ee26166710b56b2dc9180bd9917714fed505af Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 6 Oct 2015 07:22:01 +0200 Subject: [PATCH 3/4] Fix warning about unsigned int --- clientgui/ProjectInfoPage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientgui/ProjectInfoPage.cpp b/clientgui/ProjectInfoPage.cpp index 426d620230..115a6ad06b 100644 --- a/clientgui/ProjectInfoPage.cpp +++ b/clientgui/ProjectInfoPage.cpp @@ -248,7 +248,7 @@ void CProjectInfoPage::CreateControls() // Get the project list m_apl = new ALL_PROJECTS_LIST; pDoc->rpc.get_all_projects_list(*m_apl); - for (int i=0; iprojects.size(); i++) { + for (unsigned int i=0; iprojects.size(); i++) { wxString strGeneralArea = wxGetTranslation(wxString(m_apl->projects[i]->general_area.c_str(), wxConvUTF8)); aCategories.Add(strGeneralArea); } From 72fa38391b172677fd88d07dbb3f3f72021aebed Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Tue, 6 Oct 2015 06:34:16 -0700 Subject: [PATCH 4/4] MGR: In Event Log, work around a wxWidgets 3.0 bug in wxGenericListCtrl (Linux only) which causes headers to be misaligned after horizontal scrolling. --- clientgui/DlgEventLog.cpp | 11 ++++++++- clientgui/DlgEventLogListCtrl.cpp | 39 +++++++++++++++++++++++++++++-- clientgui/DlgEventLogListCtrl.h | 27 ++++++++++++++++++++- 3 files changed, 73 insertions(+), 4 deletions(-) diff --git a/clientgui/DlgEventLog.cpp b/clientgui/DlgEventLog.cpp index a186bc0c5b..fb63e3d7fe 100644 --- a/clientgui/DlgEventLog.cpp +++ b/clientgui/DlgEventLog.cpp @@ -99,13 +99,22 @@ CDlgEventLog::CDlgEventLog( wxWindow* parent, wxWindowID id, const wxString& cap Create(parent, id, caption, pos, size, style); +#ifdef __WXGTK__ + m_pList->SaveEventHandler((m_pList->GetMainWin())->GetEventHandler()); + (m_pList->GetMainWin())->PushEventHandler(new MyEvtLogEvtHandler(m_pList)); +#endif + wxLogTrace(wxT("Function Start/End"), wxT("CDlgEventLog::CDlgEventLog - Constructor Function End")); } CDlgEventLog::~CDlgEventLog() { wxLogTrace(wxT("Function Start/End"), wxT("CDlgEventLog::CDlgEventLog - Destructor Function Begin")); - + +#ifdef __WXGTK__ + m_pList->PopEventHandler(true); +#endif + if (m_pMessageInfoAttr) { delete m_pMessageInfoAttr; m_pMessageInfoAttr = NULL; diff --git a/clientgui/DlgEventLogListCtrl.cpp b/clientgui/DlgEventLogListCtrl.cpp index 1efa746943..d5a7d83f33 100644 --- a/clientgui/DlgEventLogListCtrl.cpp +++ b/clientgui/DlgEventLogListCtrl.cpp @@ -32,6 +32,42 @@ #include "DlgEventLogListCtrl.h" #include "DlgEventLog.h" +#ifdef __WXGTK__ +IMPLEMENT_DYNAMIC_CLASS(MyEvtLogEvtHandler, wxEvtHandler) + +BEGIN_EVENT_TABLE(MyEvtLogEvtHandler, wxEvtHandler) + EVT_PAINT(MyEvtLogEvtHandler::OnPaint) +END_EVENT_TABLE() + +MyEvtLogEvtHandler::MyEvtLogEvtHandler() {} + +MyEvtLogEvtHandler::MyEvtLogEvtHandler(wxGenericListCtrl *theListControl) { + m_listCtrl = theListControl; + m_view_startX = 0; +} + +void MyEvtLogEvtHandler::OnPaint(wxPaintEvent & event) +{ + if (m_listCtrl) { + // Work around a wxWidgets 3.0 bug in wxGenericListCtrl (Linux + // only) which causes headers to be misaligned after horizontal + // scrolling due to wxListHeaderWindow::OnPaint() calling + // parent->GetViewStart() before the parent window has been + // scrolled to the new position. + int view_startX; + ((CDlgEventLogListCtrl*)m_listCtrl)->savedHandler->ProcessEvent(event); + m_listCtrl->GetViewStart( &view_startX, NULL ); + if (view_startX != m_view_startX) { + m_view_startX = view_startX; + ((wxWindow *)m_listCtrl->m_headerWin)->Refresh(); + ((wxWindow *)m_listCtrl->m_headerWin)->Update(); + } + } else { + event.Skip(); + } +} +#endif + IMPLEMENT_DYNAMIC_CLASS(CDlgEventLogListCtrl, DLG_LISTCTRL_BASE) @@ -40,6 +76,7 @@ BEGIN_EVENT_TABLE(CDlgEventLogListCtrl, DLG_LISTCTRL_BASE) #ifdef __WXMAC__ EVT_SIZE(CDlgEventLogListCtrl::OnSize) #endif + END_EVENT_TABLE() @@ -55,10 +92,8 @@ CDlgEventLogListCtrl::CDlgEventLogListCtrl(CDlgEventLog* pView, wxWindowID iList #ifdef __WXMAC__ m_fauxHeaderView = NULL; m_fauxBodyView = NULL; -#ifdef __WXMAC__ SetupMacAccessibilitySupport(); #endif -#endif } diff --git a/clientgui/DlgEventLogListCtrl.h b/clientgui/DlgEventLogListCtrl.h index 1ce6978272..79652e5e8c 100644 --- a/clientgui/DlgEventLogListCtrl.h +++ b/clientgui/DlgEventLogListCtrl.h @@ -22,7 +22,7 @@ #pragma interface "DlgEventLogListCtrl.cpp" #endif -#ifdef __WXMAC__ +#if (defined(__WXMAC__) || defined(__WXGTK__)) #define DLG_LISTCTRL_BASE wxGenericListCtrl #else #define DLG_LISTCTRL_BASE wxListView @@ -46,6 +46,12 @@ public: ~CDlgEventLogListCtrl(); #endif +#ifdef __WXGTK__ + void SaveEventHandler(wxEvtHandler *stdHandler) { savedHandler = stdHandler; } + wxEvtHandler* savedHandler; + wxScrolledWindow* GetMainWin(void) { return (wxScrolledWindow*) m_mainWin; } +#endif + private: virtual wxString OnGetItemText(long item, long column) const; @@ -70,4 +76,23 @@ private: #endif }; +#ifdef __WXGTK__ +// Define a custom event handler +class MyEvtLogEvtHandler : public wxEvtHandler +{ + DECLARE_DYNAMIC_CLASS(MyEvtLogEvtHandler) + +public: + MyEvtLogEvtHandler(); + MyEvtLogEvtHandler(wxGenericListCtrl *theListControl); + void OnPaint(wxPaintEvent & event); + +private: + wxGenericListCtrl * m_listCtrl; + int m_view_startX; + + DECLARE_EVENT_TABLE() +}; +#endif + #endif