Compare commits

...

4 Commits

Author SHA1 Message Date
0fceaf7728 Bump Wuffs
All checks were successful
Alpine 3.21 Success
Arch Linux Success
Arch Linux AUR Success
Debian Bookworm Success
Fedora 39 Success
OpenBSD 7.8 Success
openSUSE 15.5 Success
2025-11-02 02:09:28 +01:00
c46fc73c34 Prefill the 'Enter location' dialog 2025-11-02 02:09:28 +01:00
bdd18fc898 Very slightly improve file updates on macOS
Some checks reported errors
Arch Linux Success
Arch Linux AUR Success
Debian Bookworm Success
Fedora 39 Success
openSUSE 15.5 Success
OpenBSD 7.7 Success
OpenBSD 7.6 Unsupported
Alpine 3.21 Success
2025-10-18 17:47:25 +01:00
cf6ded1d03 Make browser Cmd+click open new windows on macOS
Some checks failed
Arch Linux Success
Arch Linux AUR Success
Debian Bookworm Success
Fedora 39 Success
OpenBSD 7.6 Scripts failed
openSUSE 15.5 Success
Alpine 3.21 Success
2025-10-18 15:24:36 +01:00
4 changed files with 17 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
// //
// fiv-browser.c: filesystem browsing widget // fiv-browser.c: filesystem browsing widget
// //
// Copyright (c) 2021 - 2024, Přemysl Eric Janouch <p@janouch.name> // Copyright (c) 2021 - 2025, Přemysl Eric Janouch <p@janouch.name>
// //
// Permission to use, copy, modify, and/or distribute this software for any // Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted. // purpose with or without fee is hereby granted.
@@ -1323,10 +1323,14 @@ fiv_browser_button_release_event(GtkWidget *widget, GdkEventButton *event)
if (!entry || entry != entry_at(self, event->x, event->y)) if (!entry || entry != entry_at(self, event->x, event->y))
return GDK_EVENT_PROPAGATE; return GDK_EVENT_PROPAGATE;
GdkModifierType primary = gdk_keymap_get_modifier_mask(
gdk_keymap_get_for_display(gtk_widget_get_display(widget)),
GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR);
guint state = event->state & gtk_accelerator_get_default_mod_mask(); guint state = event->state & gtk_accelerator_get_default_mod_mask();
if ((event->button == GDK_BUTTON_PRIMARY && state == 0)) if ((event->button == GDK_BUTTON_PRIMARY && state == 0))
return open_entry(widget, entry, FALSE); return open_entry(widget, entry, FALSE);
if ((event->button == GDK_BUTTON_PRIMARY && state == GDK_CONTROL_MASK) || if ((event->button == GDK_BUTTON_PRIMARY && state == primary) ||
(event->button == GDK_BUTTON_MIDDLE && state == 0)) (event->button == GDK_BUTTON_MIDDLE && state == 0))
return open_entry(widget, entry, TRUE); return open_entry(widget, entry, TRUE);
return GDK_EVENT_PROPAGATE; return GDK_EVENT_PROPAGATE;

View File

@@ -382,6 +382,9 @@ on_monitor_changed(G_GNUC_UNUSED GFileMonitor *monitor, GFile *file,
switch (event_type) { switch (event_type) {
case G_FILE_MONITOR_EVENT_CHANGED: case G_FILE_MONITOR_EVENT_CHANGED:
case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED:
// On macOS, we seem to not receive _CHANGED for child files.
// And while this seems to arrive too early, it's a mild improvement.
case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
event = MONITOR_CHANGING; event = MONITOR_CHANGING;
new_entry_file = file; new_entry_file = file;
break; break;
@@ -400,8 +403,6 @@ on_monitor_changed(G_GNUC_UNUSED GFileMonitor *monitor, GFile *file,
new_entry_file = file; new_entry_file = file;
break; break;
case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
// TODO(p): Figure out if we can't make use of _CHANGES_DONE_HINT.
case G_FILE_MONITOR_EVENT_PRE_UNMOUNT: case G_FILE_MONITOR_EVENT_PRE_UNMOUNT:
case G_FILE_MONITOR_EVENT_UNMOUNTED: case G_FILE_MONITOR_EVENT_UNMOUNTED:
// TODO(p): Figure out how to handle _UNMOUNTED sensibly. // TODO(p): Figure out how to handle _UNMOUNTED sensibly.

View File

@@ -537,6 +537,13 @@ on_show_enter_location(
g_signal_connect(entry, "changed", g_signal_connect(entry, "changed",
G_CALLBACK(on_enter_location_changed), self); G_CALLBACK(on_enter_location_changed), self);
GFile *location = fiv_io_model_get_location(self->model);
if (location) {
gchar *parse_name = g_file_get_parse_name(location);
gtk_entry_set_text(GTK_ENTRY(entry), parse_name);
g_free(parse_name);
}
// Can't have it ellipsized and word-wrapped at the same time. // Can't have it ellipsized and word-wrapped at the same time.
GtkWidget *protocols = gtk_label_new(""); GtkWidget *protocols = gtk_label_new("");
gtk_label_set_ellipsize(GTK_LABEL(protocols), PANGO_ELLIPSIZE_END); gtk_label_set_ellipsize(GTK_LABEL(protocols), PANGO_ELLIPSIZE_END);