diff --git a/packages/flutter_tools/templates/app/linux.tmpl/CMakeLists.txt.tmpl b/packages/flutter_tools/templates/app/linux.tmpl/CMakeLists.txt.tmpl index 95d5c2d853..a1f3142d3e 100644 --- a/packages/flutter_tools/templates/app/linux.tmpl/CMakeLists.txt.tmpl +++ b/packages/flutter_tools/templates/app/linux.tmpl/CMakeLists.txt.tmpl @@ -36,7 +36,6 @@ pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) add_executable(${BINARY_NAME} "main.cc" "my_application.cc" - "window_configuration.cc" "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" ) apply_standard_settings(${BINARY_NAME}) diff --git a/packages/flutter_tools/templates/app/linux.tmpl/my_application.cc b/packages/flutter_tools/templates/app/linux.tmpl/my_application.cc.tmpl similarity index 86% rename from packages/flutter_tools/templates/app/linux.tmpl/my_application.cc rename to packages/flutter_tools/templates/app/linux.tmpl/my_application.cc.tmpl index be5b5ff708..6fe3050515 100644 --- a/packages/flutter_tools/templates/app/linux.tmpl/my_application.cc +++ b/packages/flutter_tools/templates/app/linux.tmpl/my_application.cc.tmpl @@ -3,7 +3,6 @@ #include #include "flutter/generated_plugin_registrant.h" -#include "window_configuration.h" struct _MyApplication { GtkApplication parent_instance; @@ -17,11 +16,10 @@ static void my_application_activate(GApplication* application) { GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); GtkHeaderBar *header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, kFlutterWindowTitle); + gtk_header_bar_set_title(header_bar, "{{projectName}}"); gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); - gtk_window_set_default_size(window, kFlutterWindowWidth, - kFlutterWindowHeight); + gtk_window_set_default_size(window, 1280, 720); gtk_widget_show(GTK_WIDGET(window)); g_autoptr(FlDartProject) project = fl_dart_project_new(); diff --git a/packages/flutter_tools/templates/app/linux.tmpl/window_configuration.cc.tmpl b/packages/flutter_tools/templates/app/linux.tmpl/window_configuration.cc.tmpl deleted file mode 100644 index 7893f4ab3a..0000000000 --- a/packages/flutter_tools/templates/app/linux.tmpl/window_configuration.cc.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -#include "window_configuration.h" - -const char *kFlutterWindowTitle = "{{projectName}}"; -const unsigned int kFlutterWindowWidth = 1280; -const unsigned int kFlutterWindowHeight = 720; diff --git a/packages/flutter_tools/templates/app/linux.tmpl/window_configuration.h b/packages/flutter_tools/templates/app/linux.tmpl/window_configuration.h deleted file mode 100644 index 8592c5b706..0000000000 --- a/packages/flutter_tools/templates/app/linux.tmpl/window_configuration.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef WINDOW_CONFIGURATION_ -#define WINDOW_CONFIGURATION_ - -// This is a temporary approach to isolate common customizations from main.cc, -// where the APIs are still in flux. This should simplify re-creating the -// runner while preserving local changes. -// -// Longer term there should be simpler configuration options for common -// customizations like this, without requiring native code changes. - -extern const char *kFlutterWindowTitle; -extern const unsigned int kFlutterWindowWidth; -extern const unsigned int kFlutterWindowHeight; - -#endif // WINDOW_CONFIGURATION_