summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-29 21:46:15 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-29 22:16:18 +0200
commit7ae7170d6140f7cad730f05f84b53437058b82f4 (patch)
tree79caaefa15a1e4ae1c60def7a40425983206c281 /Userland/Applications
parentdef1f1444aeee2caf6d47d0eb96a18ffc476c3f9 (diff)
downloadserenity-7ae7170d6140f7cad730f05f84b53437058b82f4.zip
Everywhere: "file name" => "filename"
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Debugger/main.cpp2
-rw-r--r--Userland/Applications/FileManager/FileOperationProgressWidget.cpp4
-rw-r--r--Userland/Applications/FileManager/FileOperationProgressWidget.h2
-rw-r--r--Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp20
-rw-r--r--Userland/Applications/KeyboardMapper/KeyboardMapperWidget.h2
-rw-r--r--Userland/Applications/KeyboardSettings/CharacterMapFileListModel.h14
-rw-r--r--Userland/Applications/Terminal/main.cpp4
7 files changed, 24 insertions, 24 deletions
diff --git a/Userland/Applications/Debugger/main.cpp b/Userland/Applications/Debugger/main.cpp
index 1d4e3469eb..0f4976d0f9 100644
--- a/Userland/Applications/Debugger/main.cpp
+++ b/Userland/Applications/Debugger/main.cpp
@@ -90,7 +90,7 @@ static bool insert_breakpoint_at_source_position(const String& file, size_t line
warnln("Could not insert breakpoint at {}:{}", file, line);
return false;
}
- outln("Breakpoint inserted [{}:{} ({}:{:p})]", result.value().file_name, result.value().line_number, result.value().library_name, result.value().address);
+ outln("Breakpoint inserted [{}:{} ({}:{:p})]", result.value().filename, result.value().line_number, result.value().library_name, result.value().address);
return true;
}
diff --git a/Userland/Applications/FileManager/FileOperationProgressWidget.cpp b/Userland/Applications/FileManager/FileOperationProgressWidget.cpp
index 0f6b84a8aa..8098c98f52 100644
--- a/Userland/Applications/FileManager/FileOperationProgressWidget.cpp
+++ b/Userland/Applications/FileManager/FileOperationProgressWidget.cpp
@@ -134,14 +134,14 @@ String FileOperationProgressWidget::estimate_time(off_t bytes_done, off_t total_
return String::formatted("{} hours and {} minutes", hours_remaining, minutes_remaining);
}
-void FileOperationProgressWidget::did_progress(off_t bytes_done, off_t total_byte_count, size_t files_done, size_t total_file_count, [[maybe_unused]] off_t current_file_done, [[maybe_unused]] off_t current_file_size, const StringView& current_file_name)
+void FileOperationProgressWidget::did_progress(off_t bytes_done, off_t total_byte_count, size_t files_done, size_t total_file_count, [[maybe_unused]] off_t current_file_done, [[maybe_unused]] off_t current_file_size, const StringView& current_filename)
{
auto& files_copied_label = *find_descendant_of_type_named<GUI::Label>("files_copied_label");
auto& current_file_label = *find_descendant_of_type_named<GUI::Label>("current_file_label");
auto& overall_progressbar = *find_descendant_of_type_named<GUI::Progressbar>("overall_progressbar");
auto& estimated_time_label = *find_descendant_of_type_named<GUI::Label>("estimated_time_label");
- current_file_label.set_text(current_file_name);
+ current_file_label.set_text(current_filename);
files_copied_label.set_text(String::formatted("Copying file {} of {}", files_done, total_file_count));
estimated_time_label.set_text(estimate_time(bytes_done, total_byte_count));
diff --git a/Userland/Applications/FileManager/FileOperationProgressWidget.h b/Userland/Applications/FileManager/FileOperationProgressWidget.h
index 7a55f5833b..6f9b692334 100644
--- a/Userland/Applications/FileManager/FileOperationProgressWidget.h
+++ b/Userland/Applications/FileManager/FileOperationProgressWidget.h
@@ -22,7 +22,7 @@ private:
void did_finish();
void did_error(String message);
- void did_progress(off_t bytes_done, off_t total_byte_count, size_t files_done, size_t total_file_count, off_t current_file_done, off_t current_file_size, const StringView& current_file_name);
+ void did_progress(off_t bytes_done, off_t total_byte_count, size_t files_done, size_t total_file_count, off_t current_file_done, off_t current_file_size, const StringView& current_filename);
void close_pipe();
diff --git a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp
index d85e5c5963..6f72a18e43 100644
--- a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp
+++ b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp
@@ -123,12 +123,12 @@ void KeyboardMapperWidget::create_frame()
bottom_widget.layout()->add_spacer();
}
-void KeyboardMapperWidget::load_from_file(String file_name)
+void KeyboardMapperWidget::load_from_file(String filename)
{
- auto result = Keyboard::CharacterMapFile::load_from_file(file_name);
+ auto result = Keyboard::CharacterMapFile::load_from_file(filename);
VERIFY(result.has_value());
- m_file_name = file_name;
+ m_filename = filename;
m_character_map = result.value();
set_current_map("map");
@@ -145,7 +145,7 @@ void KeyboardMapperWidget::load_from_system()
auto result = Keyboard::CharacterMap::fetch_system_map();
VERIFY(!result.is_error());
- m_file_name = String::formatted("/res/keymaps/{}.json", result.value().character_map_name());
+ m_filename = String::formatted("/res/keymaps/{}.json", result.value().character_map_name());
m_character_map = result.value().character_map_data();
set_current_map("map");
@@ -159,10 +159,10 @@ void KeyboardMapperWidget::load_from_system()
void KeyboardMapperWidget::save()
{
- save_to_file(m_file_name);
+ save_to_file(m_filename);
}
-void KeyboardMapperWidget::save_to_file(const StringView& file_name)
+void KeyboardMapperWidget::save_to_file(const StringView& filename)
{
JsonObject map_json;
@@ -188,12 +188,12 @@ void KeyboardMapperWidget::save_to_file(const StringView& file_name)
// Write to file.
String file_content = map_json.to_string();
- auto file = Core::File::construct(file_name);
+ auto file = Core::File::construct(filename);
file->open(Core::IODevice::WriteOnly);
if (!file->is_open()) {
StringBuilder sb;
sb.append("Failed to open ");
- sb.append(file_name);
+ sb.append(filename);
sb.append(" for write. Error: ");
sb.append(file->error_string());
@@ -213,7 +213,7 @@ void KeyboardMapperWidget::save_to_file(const StringView& file_name)
}
m_modified = false;
- m_file_name = file_name;
+ m_filename = filename;
update_window_title();
}
@@ -274,7 +274,7 @@ void KeyboardMapperWidget::set_current_map(const String current_map)
void KeyboardMapperWidget::update_window_title()
{
StringBuilder sb;
- sb.append(m_file_name);
+ sb.append(m_filename);
if (m_modified)
sb.append(" (*)");
sb.append(" - KeyboardMapper");
diff --git a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.h b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.h
index cdff3cc074..1c11dc17ca 100644
--- a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.h
+++ b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.h
@@ -34,7 +34,7 @@ private:
Vector<KeyButton*> m_keys;
RefPtr<GUI::Widget> m_map_group;
- String m_file_name;
+ String m_filename;
Keyboard::CharacterMapData m_character_map;
String m_current_map_name;
bool m_modified { false };
diff --git a/Userland/Applications/KeyboardSettings/CharacterMapFileListModel.h b/Userland/Applications/KeyboardSettings/CharacterMapFileListModel.h
index d0585e1c46..2dc6f3df04 100644
--- a/Userland/Applications/KeyboardSettings/CharacterMapFileListModel.h
+++ b/Userland/Applications/KeyboardSettings/CharacterMapFileListModel.h
@@ -11,16 +11,16 @@
class CharacterMapFileListModel final : public GUI::Model {
public:
- static NonnullRefPtr<CharacterMapFileListModel> create(Vector<String>& file_names)
+ static NonnullRefPtr<CharacterMapFileListModel> create(Vector<String>& filenames)
{
- return adopt_ref(*new CharacterMapFileListModel(file_names));
+ return adopt_ref(*new CharacterMapFileListModel(filenames));
}
virtual ~CharacterMapFileListModel() override { }
virtual int row_count(const GUI::ModelIndex&) const override
{
- return m_file_names.size();
+ return m_filenames.size();
}
virtual int column_count(const GUI::ModelIndex&) const override
@@ -34,7 +34,7 @@ public:
VERIFY(index.column() == 0);
if (role == GUI::ModelRole::Display)
- return m_file_names.at(index.row());
+ return m_filenames.at(index.row());
return {};
}
@@ -45,10 +45,10 @@ public:
}
private:
- explicit CharacterMapFileListModel(Vector<String>& file_names)
- : m_file_names(file_names)
+ explicit CharacterMapFileListModel(Vector<String>& filenames)
+ : m_filenames(filenames)
{
}
- Vector<String>& m_file_names;
+ Vector<String>& m_filenames;
};
diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp
index 8f733ecdcf..71b0cc81da 100644
--- a/Userland/Applications/Terminal/main.cpp
+++ b/Userland/Applications/Terminal/main.cpp
@@ -329,7 +329,7 @@ int main(int argc, char** argv)
}
RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("Terminal");
- Core::File::ensure_parent_directories(config->file_name());
+ Core::File::ensure_parent_directories(config->filename());
pid_t shell_pid = 0;
@@ -485,7 +485,7 @@ int main(int argc, char** argv)
return 1;
}
- if (unveil(config->file_name().characters(), "rwc") < 0) {
+ if (unveil(config->filename().characters(), "rwc") < 0) {
perror("unveil");
return 1;
}