TextEditor: Rename {Main => TextEditor}Window.gml

Calling the file MainWindow.gml (and subsequently using MainWindowGML.h
for the generated file's name) suggests that's possible for every
application, but having a second one anywhere results in the following
CMake error:

    add_custom_target cannot create target "generate_MainWindowGML.h"
    because another target with the same name already exists. The
    existing target is a custom target created in source directory [...]

It's now also more consistent with the other applications already using
GML, namely "BrowserWindow.gml" and "FileManagerWindow.gml".
This commit is contained in:
Linus Groh 2020-12-23 01:12:27 +01:00 committed by Andreas Kling
parent 8653128ca8
commit 488a613858
Notes: sideshowbarker 2024-07-19 00:39:46 +09:00
3 changed files with 4 additions and 4 deletions

View file

@ -1,9 +1,9 @@
compile_gml(MainWindow.gml MainWindowGML.h main_window_gml)
compile_gml(TextEditorWindow.gml TextEditorWindowGML.h text_editor_window_gml)
set(SOURCES
main.cpp
TextEditorWidget.cpp
MainWindowGML.h
TextEditorWindowGML.h
)
serenity_app(TextEditor ICON app-text-editor)

View file

@ -30,7 +30,7 @@
#include <AK/Optional.h>
#include <AK/StringBuilder.h>
#include <AK/URL.h>
#include <Applications/TextEditor/MainWindowGML.h>
#include <Applications/TextEditor/TextEditorWindowGML.h>
#include <LibCore/File.h>
#include <LibCore/MimeData.h>
#include <LibDesktop/Launcher.h>
@ -62,7 +62,7 @@
TextEditorWidget::TextEditorWidget()
{
load_from_gml(main_window_gml);
load_from_gml(text_editor_window_gml);
auto& toolbar = static_cast<GUI::ToolBar&>(*find_descendant_by_name("toolbar"));