From ea31e65db4c491145e08104c85c74ca997d6a818 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sat, 25 Apr 2026 13:17:18 +0200 Subject: [PATCH] gitignore macOS entitlements and dugite binary, add Linux picker handler DebugProfile.entitlements gitignored (machine-specific sandbox paths). native/dugite/ gitignored (downloaded at build time). Linux runner: add pickDirectory handler using GtkFileChooserDialog in the existing clide/window method channel. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitignore | 6 ++++++ linux/runner/my_application.cc | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/.gitignore b/.gitignore index 47d0e90c..7afcc413 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# -- macOS sandbox (machine-specific paths; template is committed) ------ +/macos/Runner/DebugProfile.entitlements + # -- Flutter / Dart (single package at repo root) ----------------------- /.dart_tool/ /.packages @@ -27,6 +30,9 @@ tools/ui/.serve.pid /ptyc/bin/ /ptyc/*.o +# -- dugite-native (bundled git, downloaded at build time) --------------- +/native/dugite/ + # -- Test, coverage, profile output ------------------------------------ *.test *.out diff --git a/linux/runner/my_application.cc b/linux/runner/my_application.cc index 0093b338..58e4b758 100644 --- a/linux/runner/my_application.cc +++ b/linux/runner/my_application.cc @@ -219,6 +219,25 @@ static void my_application_activate(GApplication* application) { } else if (g_strcmp0(method, "isMaximized") == 0) { response = FL_METHOD_RESPONSE(fl_method_success_response_new( fl_value_new_bool(gtk_window_is_maximized(w)))); + } else if (g_strcmp0(method, "pickDirectory") == 0) { + GtkWidget* dialog = gtk_file_chooser_dialog_new( + "Select a project folder", w, + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, + "_Cancel", GTK_RESPONSE_CANCEL, + "_Open", GTK_RESPONSE_ACCEPT, + nullptr); + gint res = gtk_dialog_run(GTK_DIALOG(dialog)); + if (res == GTK_RESPONSE_ACCEPT) { + g_autofree gchar* folder = + gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); + g_autoptr(FlValue) val = fl_value_new_string(folder); + response = FL_METHOD_RESPONSE( + fl_method_success_response_new(val)); + } else { + response = FL_METHOD_RESPONSE( + fl_method_success_response_new(fl_value_new_null())); + } + gtk_widget_destroy(dialog); } else { response = FL_METHOD_RESPONSE(fl_method_not_implemented_response_new()); }