1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:17:35 +00:00

Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"

I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:

- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar

This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
This commit is contained in:
Andreas Kling 2021-04-13 16:18:20 +02:00
parent 86bdfa1edf
commit a2baab38fd
141 changed files with 518 additions and 518 deletions

View file

@ -4,12 +4,12 @@
spacing: 2
}
@GUI::ToolBarContainer {
@GUI::ToolbarContainer {
name: "toolbar_container"
@GUI::ToolBar {
@GUI::Toolbar {
name: "main_toolbar"
}
@GUI::ToolBar {
@GUI::Toolbar {
name: "location_toolbar"
visible: false
@ -23,7 +23,7 @@
fixed_height: 22
}
}
@GUI::ToolBar {
@GUI::Toolbar {
name: "breadcrumb_toolbar"
@GUI::Label {
@ -31,8 +31,8 @@
autosize: true
}
@GUI::BreadcrumbBar {
name: "breadcrumb_bar"
@GUI::Breadcrumbbar {
name: "breadcrumbbar"
}
}
}
@ -47,10 +47,10 @@
}
@GUI::StatusBar {
@GUI::Statusbar {
name: "statusbar"
@GUI::ProgressBar {
@GUI::Progressbar {
name: "progressbar"
text: "Generating thumbnails: "
visible: false

View file

@ -36,9 +36,9 @@
}
}
@GUI::ProgressBar {
@GUI::Progressbar {
fixed_height: 22
name: "current_file_progress_bar"
name: "current_file_progressbar"
min: 0
}
@ -62,9 +62,9 @@
}
}
@GUI::ProgressBar {
@GUI::Progressbar {
fixed_height: 22
name: "overall_progress_bar"
name: "overall_progressbar"
min: 0
}

View file

@ -31,7 +31,7 @@
#include <LibGUI/Button.h>
#include <LibGUI/Label.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/ProgressBar.h>
#include <LibGUI/Progressbar.h>
#include <LibGUI/Window.h>
namespace FileManager {
@ -99,17 +99,17 @@ void FileOperationProgressWidget::did_error()
void FileOperationProgressWidget::did_progress([[maybe_unused]] off_t bytes_done, [[maybe_unused]] 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)
{
auto& current_file_label = *find_descendant_of_type_named<GUI::Label>("current_file_label");
auto& current_file_progress_bar = *find_descendant_of_type_named<GUI::ProgressBar>("current_file_progress_bar");
auto& current_file_progressbar = *find_descendant_of_type_named<GUI::Progressbar>("current_file_progressbar");
auto& overall_progress_label = *find_descendant_of_type_named<GUI::Label>("overall_progress_label");
auto& overall_progress_bar = *find_descendant_of_type_named<GUI::ProgressBar>("overall_progress_bar");
auto& overall_progressbar = *find_descendant_of_type_named<GUI::Progressbar>("overall_progressbar");
current_file_label.set_text(current_file_name);
current_file_progress_bar.set_max(current_file_size);
current_file_progress_bar.set_value(current_file_done);
current_file_progressbar.set_max(current_file_size);
current_file_progressbar.set_value(current_file_done);
overall_progress_label.set_text(String::formatted("{} of {}", files_done, total_file_count));
overall_progress_bar.set_max(total_file_count);
overall_progress_bar.set_value(files_done);
overall_progressbar.set_max(total_file_count);
overall_progressbar.set_value(files_done);
}
void FileOperationProgressWidget::close_pipe()

View file

@ -42,7 +42,7 @@
#include <LibGUI/ActionGroup.h>
#include <LibGUI/Application.h>
#include <LibGUI/BoxLayout.h>
#include <LibGUI/BreadcrumbBar.h>
#include <LibGUI/Breadcrumbbar.h>
#include <LibGUI/Clipboard.h>
#include <LibGUI/Desktop.h>
#include <LibGUI/FileIconProvider.h>
@ -50,15 +50,15 @@
#include <LibGUI/InputBox.h>
#include <LibGUI/Label.h>
#include <LibGUI/Menu.h>
#include <LibGUI/MenuBar.h>
#include <LibGUI/Menubar.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/Painter.h>
#include <LibGUI/ProgressBar.h>
#include <LibGUI/Progressbar.h>
#include <LibGUI/Splitter.h>
#include <LibGUI/StatusBar.h>
#include <LibGUI/Statusbar.h>
#include <LibGUI/TextEditor.h>
#include <LibGUI/ToolBar.h>
#include <LibGUI/ToolBarContainer.h>
#include <LibGUI/Toolbar.h>
#include <LibGUI/ToolbarContainer.h>
#include <LibGUI/TreeView.h>
#include <LibGUI/Widget.h>
#include <LibGUI/Window.h>
@ -411,16 +411,16 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
widget.load_from_gml(file_manager_window_gml);
auto& toolbar_container = *widget.find_descendant_of_type_named<GUI::ToolBarContainer>("toolbar_container");
auto& main_toolbar = *widget.find_descendant_of_type_named<GUI::ToolBar>("main_toolbar");
auto& location_toolbar = *widget.find_descendant_of_type_named<GUI::ToolBar>("location_toolbar");
auto& toolbar_container = *widget.find_descendant_of_type_named<GUI::ToolbarContainer>("toolbar_container");
auto& main_toolbar = *widget.find_descendant_of_type_named<GUI::Toolbar>("main_toolbar");
auto& location_toolbar = *widget.find_descendant_of_type_named<GUI::Toolbar>("location_toolbar");
location_toolbar.layout()->set_margins({ 6, 3, 6, 3 });
auto& location_textbox = *widget.find_descendant_of_type_named<GUI::TextBox>("location_textbox");
auto& breadcrumb_toolbar = *widget.find_descendant_of_type_named<GUI::ToolBar>("breadcrumb_toolbar");
auto& breadcrumb_toolbar = *widget.find_descendant_of_type_named<GUI::Toolbar>("breadcrumb_toolbar");
breadcrumb_toolbar.layout()->set_margins({ 6, 0, 6, 0 });
auto& breadcrumb_bar = *widget.find_descendant_of_type_named<GUI::BreadcrumbBar>("breadcrumb_bar");
auto& breadcrumbbar = *widget.find_descendant_of_type_named<GUI::Breadcrumbbar>("breadcrumbbar");
auto& splitter = *widget.find_descendant_of_type_named<GUI::HorizontalSplitter>("splitter");
auto& tree_view = *widget.find_descendant_of_type_named<GUI::TreeView>("tree_view");
@ -446,10 +446,10 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
// Open the root directory. FIXME: This is awkward.
tree_view.toggle_index(directories_model->index(0, 0, {}));
auto& statusbar = *widget.find_descendant_of_type_named<GUI::StatusBar>("statusbar");
auto& statusbar = *widget.find_descendant_of_type_named<GUI::Statusbar>("statusbar");
auto& progressbar = *widget.find_descendant_of_type_named<GUI::ProgressBar>("progressbar");
progressbar.set_format(GUI::ProgressBar::Format::ValueSlashMax);
auto& progressbar = *widget.find_descendant_of_type_named<GUI::Progressbar>("progressbar");
progressbar.set_format(GUI::Progressbar::Format::ValueSlashMax);
progressbar.set_frame_shape(Gfx::FrameShape::Panel);
progressbar.set_frame_shadow(Gfx::FrameShadow::Sunken);
progressbar.set_frame_thickness(1);
@ -537,11 +537,11 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
layout_statusbar_action = GUI::Action::create_checkable("&Status Bar", [&](auto& action) {
action.is_checked() ? statusbar.set_visible(true) : statusbar.set_visible(false);
config->write_bool_entry("Layout", "ShowStatusBar", action.is_checked());
config->write_bool_entry("Layout", "ShowStatusbar", action.is_checked());
config->sync();
});
auto show_statusbar = config->read_bool_entry("Layout", "ShowStatusBar", true);
auto show_statusbar = config->read_bool_entry("Layout", "ShowStatusbar", true);
layout_statusbar_action->set_checked(show_statusbar);
statusbar.set_visible(show_statusbar);
@ -751,7 +751,7 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
refresh_tree_view();
});
auto menubar = GUI::MenuBar::construct();
auto menubar = GUI::Menubar::construct();
auto& app_menu = menubar->add_menu("&File");
app_menu.add_action(mkdir_action);
@ -845,20 +845,20 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
{
LexicalPath lexical_path(new_path);
auto segment_index_of_new_path_in_breadcrumb_bar = [&]() -> Optional<size_t> {
for (size_t i = 0; i < breadcrumb_bar.segment_count(); ++i) {
if (breadcrumb_bar.segment_data(i) == new_path)
auto segment_index_of_new_path_in_breadcrumbbar = [&]() -> Optional<size_t> {
for (size_t i = 0; i < breadcrumbbar.segment_count(); ++i) {
if (breadcrumbbar.segment_data(i) == new_path)
return i;
}
return {};
}();
if (segment_index_of_new_path_in_breadcrumb_bar.has_value()) {
breadcrumb_bar.set_selected_segment(segment_index_of_new_path_in_breadcrumb_bar.value());
if (segment_index_of_new_path_in_breadcrumbbar.has_value()) {
breadcrumbbar.set_selected_segment(segment_index_of_new_path_in_breadcrumbbar.value());
} else {
breadcrumb_bar.clear_segments();
breadcrumbbar.clear_segments();
breadcrumb_bar.append_segment("/", GUI::FileIconProvider::icon_for_path("/").bitmap_for_size(16), "/", "/");
breadcrumbbar.append_segment("/", GUI::FileIconProvider::icon_for_path("/").bitmap_for_size(16), "/", "/");
StringBuilder builder;
for (auto& part : lexical_path.parts()) {
@ -866,13 +866,13 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
builder.append('/');
builder.append(part);
breadcrumb_bar.append_segment(part, GUI::FileIconProvider::icon_for_path(builder.string_view()).bitmap_for_size(16), builder.string_view(), builder.string_view());
breadcrumbbar.append_segment(part, GUI::FileIconProvider::icon_for_path(builder.string_view()).bitmap_for_size(16), builder.string_view(), builder.string_view());
}
breadcrumb_bar.set_selected_segment(breadcrumb_bar.segment_count() - 1);
breadcrumbbar.set_selected_segment(breadcrumbbar.segment_count() - 1);
breadcrumb_bar.on_segment_click = [&](size_t segment_index) {
directory_view.open(breadcrumb_bar.segment_data(segment_index));
breadcrumbbar.on_segment_click = [&](size_t segment_index) {
directory_view.open(breadcrumbbar.segment_data(segment_index));
};
}
}
@ -1045,18 +1045,18 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
refresh_tree_view();
};
breadcrumb_bar.on_segment_drop = [&](size_t segment_index, const GUI::DropEvent& event) {
breadcrumbbar.on_segment_drop = [&](size_t segment_index, const GUI::DropEvent& event) {
if (!event.mime_data().has_urls())
return;
copy_urls_to_directory(event.mime_data().urls(), breadcrumb_bar.segment_data(segment_index));
copy_urls_to_directory(event.mime_data().urls(), breadcrumbbar.segment_data(segment_index));
};
breadcrumb_bar.on_segment_drag_enter = [&](size_t, GUI::DragEvent& event) {
breadcrumbbar.on_segment_drag_enter = [&](size_t, GUI::DragEvent& event) {
if (event.mime_types().contains_slow("text/uri-list"))
event.accept();
};
breadcrumb_bar.on_doubleclick = [&](const GUI::MouseEvent&) {
breadcrumbbar.on_doubleclick = [&](const GUI::MouseEvent&) {
go_to_location_action->activate();
};