Skip to content

Commit

Permalink
Remoty plugin fixes
Browse files Browse the repository at this point in the history
- On the welcome page, display the remote host on which the workspace exists
- When choosing: "Open workspace" with "Remote", in the "Account" drop down box, display all available accounts

Signed-off-by: Eran Ifrah <[email protected]>
  • Loading branch information
eranif committed Oct 9, 2024
1 parent 2573736 commit 84dd6dd
Show file tree
Hide file tree
Showing 5 changed files with 640 additions and 654 deletions.
34 changes: 17 additions & 17 deletions CodeLiteIDE-macOS.workspace
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"workspace_type": "File System Workspace",
"name": "CodeLiteIDE-Linux",
"configs": [{
"name": "Debug",
"targets": [["Run CMake - Debug", "mkdir -p build-debug && cd build-debug && cmake -DCMAKE_BUILD_TYPE=Debug .. -Wno-dev"], ["build", "cd build-debug && make -j8 install"], ["clean", "cd build-debug && make -j8 clean"]],
"file_extensions": "*.cpp;*.c;*.txt;*.json;*.hpp;*.cc;*.cxx;*.xml;*.h;*.wxcp;*.xrc;*.py",
"excludeFilesPattern": "*.o;*.pyc;*.obj;*.workspace;*.o.d;*.exe;*.dll;*.project",
"excludePaths": "codelite-cli;codelite-icons;codelite-icons-dark;codelite-icons-fresh-farm;codelite-stdio;codelite_echo;codelite_launcher;codelite_make;bitmaps;bitmaps-dark;bitmaps-light;build-release;CallGraph",
"debugger": "lldb-vscode"
}, {
"name": "Release",
"targets": [["Run CMake - Release", "mkdir -p build-release && cd build-release && cmake -DCMAKE_BUILD_TYPE=Release .. -Wno-dev"], ["build", "cd build-release && make -j8 install"], ["clean", "cd build-release && make -j8 clean"]],
"file_extensions": "*.cpp;*.c;*.txt;*.json;*.hpp;*.cc;*.cxx;*.xml;*.h;*.wxcp;.*.xrc;*.cmake;*.rc;*.py",
"excludeFilesPattern": "*.o;*.pyc;*.obj;*.workspace;*.o.d;*.exe;*.dll;*.project",
"excludePaths": "codelite-cli;codelite-icons;codelite-icons-dark;codelite-icons-fresh-farm;codelite-stdio;codelite_echo;codelite_launcher;codelite_make;bitmaps;bitmaps-dark;bitmaps-light;build-release;CallGraph",
"debugger": "lldb-vscode"
}]
"workspace_type": "File System Workspace",
"name": "CodeLiteIDE-Linux",
"configs": [{
"name": "Debug",
"targets": [["Run CMake - Debug", "mkdir -p build-debug && cd build-debug && cmake -DCMAKE_BUILD_TYPE=Debug .. -Wno-dev"], ["build", "cd build-debug && make -j8 install"], ["clean", "cd build-debug && make -j8 clean"]],
"file_extensions": "*.cpp;*.c;*.txt;*.json;*.hpp;*.cc;*.cxx;*.xml;*.h;*.wxcp;*.xrc;*.py",
"excludeFilesPattern": "*.o;*.pyc;*.obj;*.workspace;*.o.d;*.exe;*.dll;*.project",
"excludePaths": "codelite-cli;codelite-icons;codelite-icons-dark;codelite-icons-fresh-farm;codelite-stdio;codelite_echo;codelite_launcher;codelite_make;bitmaps;bitmaps-dark;bitmaps-light;build-release;CallGraph",
"debugger": "lldb-vscode"
}, {
"name": "Release",
"targets": [["Run CMake - Release", "mkdir -p build-release && cd build-release && cmake -DCMAKE_BUILD_TYPE=Release .. -Wno-dev"], ["build", "cd build-release && make -j8 install"], ["clean", "cd build-release && make -j8 clean"]],
"file_extensions": "*.cpp;*.c;*.txt;*.json;*.hpp;*.cc;*.cxx;*.xml;*.h;*.wxcp;.*.xrc;*.cmake;*.rc;*.py",
"excludeFilesPattern": "*.o;*.pyc;*.obj;*.workspace;*.o.d;*.exe;*.dll;*.project",
"excludePaths": "codelite-cli;codelite-icons;codelite-icons-dark;codelite-icons-fresh-farm;codelite-stdio;codelite_echo;codelite_launcher;codelite_make;bitmaps;bitmaps-dark;bitmaps-light;build-release;CallGraph",
"debugger": "lldb-vscode"
}]
}
16 changes: 8 additions & 8 deletions LiteEditor/WelcomePage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "bitmap_loader.h"
#include "clSystemSettings.h"
#include "cl_defs.h"
#include "editor_config.h"
#include "event_notifier.h"
#include "fileextmanager.h"
#include "frame.h"
Expand All @@ -38,8 +37,6 @@
#include "manager.h"
#include "plugin.h"
#include "pluginmanager.h"
#include "window_locker.h"
#include "wxStringHash.h"

#include <wx/arrstr.h>
#include <wx/clntdata.h>
Expand All @@ -65,6 +62,7 @@ WelcomePage::WelcomePage(wxWindow* parent)
EventNotifier::Get()->Bind(wxEVT_BITMAPS_UPDATED, &WelcomePage::OnThemeChanged, this);

m_dvTreeCtrlWorkspaces->AddHeader(_("Name"));
m_dvTreeCtrlWorkspaces->AddHeader(_("Account"));
m_dvTreeCtrlWorkspaces->AddHeader(_("Type"));
m_dvTreeCtrlWorkspaces->AddHeader(_("Path"));

Expand Down Expand Up @@ -213,12 +211,13 @@ void WelcomePage::UpdateRecentWorkspaces()
cd->type = WorkspaceSource::BUILTIN;
cd->path = fn.GetFullPath();
auto workspaceItem = m_dvTreeCtrlWorkspaces->AppendItem(locals, fn.GetName(), image_index, image_index, cd);
m_dvTreeCtrlWorkspaces->SetItemText(workspaceItem, workspace_type, 1);
m_dvTreeCtrlWorkspaces->SetItemText(workspaceItem, filepath, 2);
m_dvTreeCtrlWorkspaces->SetItemText(workspaceItem, "localhost", 1);
m_dvTreeCtrlWorkspaces->SetItemText(workspaceItem, workspace_type, 2);
m_dvTreeCtrlWorkspaces->SetItemText(workspaceItem, filepath, 3);
}
m_dvTreeCtrlWorkspaces->Expand(locals);

// add the plugin base workspaces
// Add the plugin base workspaces
auto other_workspaces = other_workspaces_event.GetWorkspaces();
std::unordered_map<wxString, std::vector<RecentWorkspace>> M;
for (const auto& e : other_workspaces) {
Expand All @@ -243,8 +242,9 @@ void WelcomePage::UpdateRecentWorkspaces()
name = name.BeforeLast('.');

auto workspaceItem = m_dvTreeCtrlWorkspaces->AppendItem(parent_item, name, image_index, image_index, cd);
m_dvTreeCtrlWorkspaces->SetItemText(workspaceItem, _("Other"), 1);
m_dvTreeCtrlWorkspaces->SetItemText(workspaceItem, w.path, 2);
m_dvTreeCtrlWorkspaces->SetItemText(workspaceItem, cd->account, 1);
m_dvTreeCtrlWorkspaces->SetItemText(workspaceItem, _("Other"), 2);
m_dvTreeCtrlWorkspaces->SetItemText(workspaceItem, w.path, 3);
}
m_dvTreeCtrlWorkspaces->Expand(parent_item);
}
Expand Down
Loading

0 comments on commit 84dd6dd

Please sign in to comment.