mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 17:17:45 +00:00
Everywhere: "file name" => "filename"
This commit is contained in:
parent
def1f1444a
commit
7ae7170d61
59 changed files with 181 additions and 181 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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 };
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue