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) <noreply@anthropic.com>
This commit is contained in:
Jeroen Schweitzer
2026-04-25 13:18:39 +02:00
co-authored by Claude Opus 4.6
parent b0d9fab0c6
commit ea31e65db4
2 changed files with 25 additions and 0 deletions
+6
View File
@@ -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
+19
View File
@@ -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());
}