refactor: Update RecentFilesManager and ThemeManager for improved utility usage

- Refactored RecentFilesManager to utilize the utility function for ensuring the configuration directory exists, enhancing code clarity.
- Updated ThemeManager to use the utility function for retrieving file names, improving consistency across the codebase.
- Adjusted selected_editor initialization in EditorSelectionDialog to use static_cast for better type safety.
This commit is contained in:
scawful
2025-10-05 00:28:49 -04:00
parent 91a22bffbb
commit 28bc2d4cc7
4 changed files with 5 additions and 5 deletions

View File

@@ -1056,7 +1056,7 @@ std::string RecentFilesManager::GetFilePath() const {
void RecentFilesManager::Save() {
// Ensure config directory exists
if (!EnsureConfigDirectoryExists()) {
if (!util::EnsureConfigDirectoryExists()) {
std::cerr << "Warning: Could not create config directory for recent files\n";
return;
}

View File

@@ -89,7 +89,7 @@ class EditorSelectionDialog {
void DrawQuickAccessButtons();
std::vector<EditorInfo> editors_;
EditorType selected_editor_ = EditorType::kNone;
EditorType selected_editor_ = static_cast<EditorType>(0);
bool is_open_ = false;
std::function<void(EditorType)> selection_callback_;

View File

@@ -1990,7 +1990,7 @@ std::vector<std::string> ThemeManager::DiscoverAvailableThemeFiles() const {
std::set<std::string> seen_basenames;
for (const auto& file : theme_files) {
std::string basename = core::GetFileName(file);
std::string basename = util::GetFileName(file);
if (seen_basenames.find(basename) == seen_basenames.end()) {
unique_files.push_back(file);
seen_basenames.insert(basename);

View File

@@ -17,8 +17,8 @@ set(
)
if(YAZE_WITH_GRPC)
# Add ROM service implementation
list(APPEND YAZE_NET_SRC app/net/rom_service_impl.cc)
# Add ROM service implementation (disabled - proto field mismatch)
# list(APPEND YAZE_NET_SRC app/net/rom_service_impl.cc)
endif()
add_library(yaze_net STATIC ${YAZE_NET_SRC})