diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index ef5beb7..4bff20e 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + + KiriMemo + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index a821fdb..076a937 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -7,7 +7,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Mobile + KiriMemo CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -15,7 +15,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - mobile + KiriMemo CFBundlePackageType APPL CFBundleShortVersionString diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index ee0ab5c..109105f 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -8,6 +8,10 @@ set(BINARY_NAME "mobile") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID set(APPLICATION_ID "cn.saltworks.kirimemo.mobile") +# Human-readable application name, shown in the window title bar. +# Keep it in sync with the Android `app_name` string resource and the +# `CFBundleDisplayName` / `CFBundleName` entries in ios/Runner/Info.plist. +set(APPLICATION_TITLE "KiriMemo") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/linux/runner/CMakeLists.txt b/linux/runner/CMakeLists.txt index e97dabc..236f08d 100644 --- a/linux/runner/CMakeLists.txt +++ b/linux/runner/CMakeLists.txt @@ -16,8 +16,10 @@ add_executable(${BINARY_NAME} # that need different build settings. apply_standard_settings(${BINARY_NAME}) -# Add preprocessor definitions for the application ID. +# Add preprocessor definitions for the application ID and title. The values come +# from the top-level CMakeLists.txt so they are not duplicated in C++ sources. add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") +add_definitions(-DAPPLICATION_TITLE="${APPLICATION_TITLE}") # Add dependency libraries. Add any application-specific dependencies here. target_link_libraries(${BINARY_NAME} PRIVATE flutter) diff --git a/linux/runner/my_application.cc b/linux/runner/my_application.cc index 2d2b91d..abb52a4 100644 --- a/linux/runner/my_application.cc +++ b/linux/runner/my_application.cc @@ -31,7 +31,10 @@ static void my_application_activate(GApplication* application) { // out of place and noticeably thicker than the native title bar. Relying on // the compositor gives the native Breeze/KWin decoration on Plasma, and the // desktop's own title bar everywhere else. - gtk_window_set_title(window, "KiriMemo"); + // The title comes from APPLICATION_TITLE in linux/CMakeLists.txt (passed as a + // preprocessor definition by linux/runner/CMakeLists.txt), so the name lives + // in the project configuration instead of being duplicated here. + gtk_window_set_title(window, APPLICATION_TITLE); gtk_window_set_default_size(window, 1280, 720);