]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.cpp
Fixes:
[crea.git] / lib / creaDevManagerLib / wxCDMLibraryDescriptionPanel.cpp
index 52d0d2714da3ebaf698f1ab1fb7465a20262a2db..4892b64a8c6cc3f71ca9d8a269eee6cf71125268 100644 (file)
@@ -91,16 +91,17 @@ void wxCDMLibraryDescriptionPanel::CreateControls()
   //Links to return
   wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
   std::vector<modelCDMIProjectTreeNode*> parents = this->library->GetParents();
-  for (int i = 0; i < parents.size(); i++)
+  for (int i = 0; i < (int)(parents.size()); i++)
     {
-      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
-      returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
+      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+      returnLnk->SetWindowStyle(wxNO_BORDER);
+         returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
       linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
-      if (i < parents.size()-1)
-        {
-          linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
-        }
+      linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
     }
+
+  linksSizer->Add(new wxStaticText(this, wxID_ANY, crea::std2wx(this->library->GetName())), 0, wxALIGN_CENTER, 0);
+
   sizer->Add(linksSizer, 0, wxALIGN_CENTER | wxALL, 5);
 
   //Header
@@ -154,14 +155,14 @@ void wxCDMLibraryDescriptionPanel::CreateControls()
   wxButton* createClassbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_CLASS, _T("A. Create Class"));
   createClassbt->SetToolTip(wxT("Create a new class for this library."));
   actionsGridSizer->Add(createClassbt, 1, wxALL | wxEXPAND, 5);
-  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File"));
+  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("B. Open Library Folder"));
+  openFolderbt->SetToolTip(wxT("Open the library folder in the file explorer."));
+  actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5);
+  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("C. Edit CMakeLists File"));
   editCMakebt->SetToolTip(wxT("Edit the CMakeLists.txt of this library in the default text editor."));
   editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMLibraryDescriptionPanel::OnCMakeMouseEnter,NULL,this);
   editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMLibraryDescriptionPanel::OnCMakeMouseExit,NULL,this);
   actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5);
-  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Library Folder"));
-  openFolderbt->SetToolTip(wxT("Open the library folder in the file explorer."));
-  actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5);
   wxButton* createFolderbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_FOLDER, _T("Create Folder (Optional)"));
   createFolderbt->SetToolTip(wxT("Create a new folder for this library."));
   actionsGridSizer->Add(createFolderbt, 1, wxALL | wxEXPAND, 5);
@@ -191,7 +192,7 @@ void wxCDMLibraryDescriptionPanel::OnBtnReturn(wxHyperlinkEvent& event)
   std::vector<modelCDMIProjectTreeNode*> parents = this->library->GetParents();
     std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
     //std::cout << parentURL << std::endl;
-    for (int i = 0; i < parents.size(); i++)
+    for (int i = 0; i < (int)(parents.size()); i++)
       {
         if (parents[i]->GetPath() == parentURL)
           {