diff --git a/clientgui/DlgItemProperties.cpp b/clientgui/DlgItemProperties.cpp index d4cd89838c..fe049c583b 100644 --- a/clientgui/DlgItemProperties.cpp +++ b/clientgui/DlgItemProperties.cpp @@ -33,6 +33,19 @@ BEGIN_EVENT_TABLE(CDlgItemProperties, wxDialog) END_EVENT_TABLE() +typedef enum _ITEM_TYPE { + ItemTypeSection, + ItemTypeProperty +} ITEM_TYPE; + +struct ITEM { + ITEM(ITEM_TYPE _item_type, const wxString &_name, const wxString &_value = wxEmptyString) : + item_type(_item_type), name(_name), value(_value) {} + ITEM_TYPE item_type; + wxString name; + wxString value; +}; + /* Constructor */ CDlgItemProperties::CDlgItemProperties(wxWindow* parent) : wxDialog( parent, ID_ANYDIALOG, wxEmptyString, wxDefaultPosition, @@ -51,14 +64,11 @@ CDlgItemProperties::CDlgItemProperties(wxWindow* parent) : wxBoxSizer* m_bSizer2; m_bSizer2 = new wxBoxSizer( wxVERTICAL ); - m_gbSizer = new wxGridBagSizer( 0, 0 ); - m_gbSizer->SetCols(2); - m_gbSizer->AddGrowableCol( 1 ); - m_gbSizer->SetFlexibleDirection( wxBOTH ); - m_gbSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_bSizer2->Add( m_gbSizer, 1, wxEXPAND, 5 ); - + const long style = wxBORDER_NONE; + m_txtInformation = new wxHtmlWindow( m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, style, "" ); + + m_bSizer2->Add( m_txtInformation, 1, wxEXPAND, 5 ); + m_scrolledWindow->SetSizer( m_bSizer2 ); m_scrolledWindow->Layout(); m_bSizer2->Fit( m_scrolledWindow ); @@ -71,8 +81,6 @@ CDlgItemProperties::CDlgItemProperties(wxWindow* parent) : SetSizer( m_bSizer1 ); Layout(); - m_current_row=0; - int currentTabView = pFrame->GetCurrentViewPage(); switch(currentTabView) { case VW_PROJ: @@ -348,7 +356,7 @@ void CDlgItemProperties::renderInfos(PROJECT* project_in) { dt.Set((time_t)project->last_rpc_time); addProperty(_("Last scheduler reply"), dt.Format()); } - m_gbSizer->Layout(); + renderInfos(); m_scrolledWindow->FitInside(); } @@ -420,7 +428,7 @@ void CDlgItemProperties::renderInfos(RESULT* result) { if (avp) { addProperty(_("Executable"), wxString(avp->exec_filename, wxConvUTF8)); } - m_gbSizer->Layout(); + renderInfos(); m_scrolledWindow->FitInside(); } @@ -495,24 +503,44 @@ wxString CDlgItemProperties::FormatApplicationName(RESULT* result ) { } +void CDlgItemProperties::renderInfos() { + std::string content; + content += ""; + content += "
"; + content += ""; + content += ""; + content += m_items[i].name; + content += ""; + content += " | "; + content += "|
"; + content += m_items[i].name; + content += " | "; + content += ""; + content += m_items[i].value; + content += " | "; + content += "