Commit ac52ccbf authored by Rom Walton's avatar Rom Walton
Browse files

Merge branch 'master' of https://github.com/BOINC/boinc

parents 7efd4b47 72fa3839
......@@ -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;
......
......@@ -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
}
......
......@@ -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
......@@ -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; i<m_apl->projects.size(); i++) {
for (unsigned int i=0; i<m_apl->projects.size(); i++) {
wxString strGeneralArea = wxGetTranslation(wxString(m_apl->projects[i]->general_area.c_str(), wxConvUTF8));
aCategories.Add(strGeneralArea);
}
......
......@@ -10,22 +10,25 @@ locale_dirs = \
bg \
ca \
cs \
cy \
da \
de \
el \
es \
fa \
fa_IR \
fi \
fr \
gl \
he \
hr \
hu \
it_IT \
ja \
ka \
ko \
lt \
lv \
ms \
nb \
nl \
nn \
......@@ -36,7 +39,7 @@ locale_dirs = \
ru \
sk \
sl \
sv_SE \
sv \
tr \
uk \
zh_CN \
......@@ -45,12 +48,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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment