Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

New log manager since rev. 4606

<< < (8/9) > >>

mandrav:
See, that's what happens when you copy-paste code and then don't update parts of it :).
Sorry for this, I will fix it when I return to base later.

dje:
Hi all !

From what I understood about (non)loggers management and InfoPane, I submitted a patch fixing CodeBlocksLogEvent initialisation :

--- Code: ---Index: sdk_events.cpp
===================================================================
--- sdk_events.cpp (revision 4704)
+++ sdk_events.cpp (working copy)
@@ -70,9 +70,8 @@
 
 CodeBlocksLogEvent::CodeBlocksLogEvent(wxEventType commandType, wxWindow* window, const wxString& title, wxBitmap *icon)
  : wxEvent(wxID_ANY, commandType),
- logger(0), logIndex(logIndex), icon(icon), title(title), window(window)
+ logger(0), logIndex(-1), icon(icon), title(title), window(window)
 {
- logger = Manager::Get()->GetLogManager()->Slot(logIndex).GetLogger();
 }
 
 CodeBlocksLogEvent::CodeBlocksLogEvent(const CodeBlocksLogEvent& rhs)

--- End code ---

It works on Windows (deeply functionnally tested).
I test it on Linux very soon.

Dje

dje:
Hi all !

I found another bug (12842 on BerliOS)

Content:
--- Quote ---Use ThreadSearch plugin v1.1 and enable it in Messages notebook (default behaviour).
To-do and Script console tabs are just after ThreadSearch tab.

Select the ThreadSearch tab.
Click on View/ThreadSearch. The panel is removed from Messages notebook with this code:

CodeBlocksLogEvent evt(cbEVT_REMOVE_LOG_WINDOW, m_pThreadSearchView);
Manager::Get()->ProcessEvent(evt);
m_pThreadSearchView->Reparent(Manager::Get()->GetAppWindow());
m_pThreadSearchView->Show(false);


Click on View/ThreadSearch. The panel is added to Messages notebook with this code:


wxBitmap bmp;
wxString prefix = ConfigManager::GetDataFolder() + _T("/images/16x16/");
bmp = cbLoadBitmap(prefix + _T("filefind.png"), wxBITMAP_TYPE_PNG);

// Adds log to C::B Messages notebook
CodeBlocksLogEvent evtShow(cbEVT_ADD_LOG_WINDOW, m_pThreadSearchView, wxString(_T("Thread search")), &bmp);
Manager::Get()->ProcessEvent(evtShow);

CodeBlocksLogEvent evtSwitch(cbEVT_SWITCH_TO_LOG_WINDOW, m_pThreadSearchView);
Manager::Get()->ProcessEvent(evtSwitch);


The ThreadSearch tab appears in last position.


I want to set the ThreadSearch tab with the following code

CodeBlocksLogEvent evtShow(cbEVT_SHOW_LOG_MANAGER);
Manager::Get()->ProcessEvent(evtShow);
CodeBlocksLogEvent evtSwitch(cbEVT_SWITCH_TO_LOG_WINDOW, m_pThreadSearchView);
Manager::Get()->ProcessEvent(evtSwitch);


and at this time, the To-Do tab is activated. Note that it was ThreadSearch tab first position.
--- End quote ---


Dje

olipfei:
Hello,

might not be the right forum for my issue, but as it is related to 'logger.h' I try to report it here:

During compilation of 'ThreadSearchViewManagerBase.cpp'  I get syntax error in 'logger.h', concerning DLLIMPORT in class declaration of Logger not being defined. One solution is to include 'settings.h' in above .cpp file before other headers. But wouldn't it be more reasonable to include it directly in 'logger.h', as there could be other files were 'settings.h' is included "accidentally" correctly before 'logger.h', and 'logger.h' should be "compilable" stand-alone (i.e. including 'logger.h' does not require to include 'settings.h' before)?

Regards,
olipfei

killerbot:
well looking at ThreadSearchViewManagerBase.cpp, I can already see, it shouldn't include sdk.h --> doesn't use anything out of that in the cpp file.

But about the logger : you are correct, it should include the settings.h

I will adjust accordingly.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version