mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:57:44 +00:00
LibGUI: Put all classes in the GUI namespace and remove the leading G
This took me a moment. Welcome to the new world of GUI::Widget! :^)
This commit is contained in:
parent
2d39da5405
commit
c5bd9d4ed1
337 changed files with 5400 additions and 4816 deletions
|
@ -81,11 +81,11 @@ Options parse_options(int argc, char* argv[])
|
|||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
GApplication app(argc, argv);
|
||||
GUI::Application app(argc, argv);
|
||||
|
||||
Options options = parse_options(argc, argv);
|
||||
|
||||
GClipboard& clipboard = GClipboard::the();
|
||||
auto& clipboard = GUI::Clipboard::the();
|
||||
clipboard.set_data(options.data, options.type);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
GApplication app(argc, argv);
|
||||
GUI::Application app(argc, argv);
|
||||
|
||||
auto f = Core::File::construct();
|
||||
bool success;
|
||||
|
@ -62,7 +62,7 @@ int main(int argc, char** argv)
|
|||
String html = String::copy(f->read_all());
|
||||
auto document = parse_html_document(html);
|
||||
|
||||
auto window = GWindow::construct();
|
||||
auto window = GUI::Window::construct();
|
||||
auto widget = HtmlView::construct();
|
||||
widget->set_document(document);
|
||||
if (!widget->document()->title().is_null())
|
||||
|
@ -72,17 +72,17 @@ int main(int argc, char** argv)
|
|||
window->set_main_widget(widget);
|
||||
window->show();
|
||||
|
||||
auto menubar = make<GMenuBar>();
|
||||
auto menubar = make<GUI::MenuBar>();
|
||||
|
||||
auto app_menu = GMenu::construct("HTML");
|
||||
app_menu->add_action(GCommonActions::make_quit_action([&](auto&) {
|
||||
auto app_menu = GUI::Menu::construct("HTML");
|
||||
app_menu->add_action(GUI::CommonActions::make_quit_action([&](auto&) {
|
||||
app.quit();
|
||||
}));
|
||||
menubar->add_menu(move(app_menu));
|
||||
|
||||
auto help_menu = GMenu::construct("Help");
|
||||
help_menu->add_action(GAction::create("About", [&](const GAction&) {
|
||||
GAboutDialog::show("HTML", GraphicsBitmap::load_from_file("/res/icons/32x32/filetype-html.png"), window);
|
||||
auto help_menu = GUI::Menu::construct("Help");
|
||||
help_menu->add_action(GUI::Action::create("About", [&](const GUI::Action&) {
|
||||
GUI::AboutDialog::show("HTML", GraphicsBitmap::load_from_file("/res/icons/32x32/filetype-html.png"), window);
|
||||
}));
|
||||
menubar->add_menu(move(help_menu));
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ static int handle_show_all()
|
|||
|
||||
static int handle_show_current()
|
||||
{
|
||||
printf("%s\n", GDesktop::the().wallpaper().characters());
|
||||
printf("%s\n", GUI::Desktop::the().wallpaper().characters());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ static int handle_set_pape(const String& name)
|
|||
builder.append("/res/wallpapers/");
|
||||
builder.append(name);
|
||||
String path = builder.to_string();
|
||||
if (!GDesktop::the().set_wallpaper(path)) {
|
||||
if (!GUI::Desktop::the().set_wallpaper(path)) {
|
||||
fprintf(stderr, "pape: Failed to set wallpaper %s\n", path.characters());
|
||||
return 1;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ int main(int argc, char** argv)
|
|||
args_parser.add_positional_argument(name, "Wallpaper to set", "name", Core::ArgsParser::Required::No);
|
||||
args_parser.parse(argc, argv);
|
||||
|
||||
GApplication app(argc, argv);
|
||||
GUI::Application app(argc, argv);
|
||||
|
||||
if (show_all)
|
||||
return handle_show_all();
|
||||
|
|
|
@ -41,9 +41,9 @@ int main(int argc, char* argv[])
|
|||
args_parser.add_option(no_newline, "Do not append a newline", "no-newline", 'n');
|
||||
args_parser.parse(argc, argv);
|
||||
|
||||
GApplication app(argc, argv);
|
||||
GUI::Application app(argc, argv);
|
||||
|
||||
GClipboard& clipboard = GClipboard::the();
|
||||
auto& clipboard = GUI::Clipboard::the();
|
||||
auto data_and_type = clipboard.data_and_type();
|
||||
|
||||
if (!print_type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue