diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-03-27 14:23:15 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-03-27 14:23:15 +0000 |
commit | 8540bea65ee5b984baf05d551e6d4e7d94012132 (patch) | |
tree | f4de47bafacc92a79ba8900e034e557e30a11775 | |
parent | c9ab7c5750b11ea6a1eba10c6ceadd92a0b1dd81 (diff) | |
parent | 8ea4721d1e280f65fe68a7e578972a0a8fd10500 (diff) | |
download | gtk+-8540bea65ee5b984baf05d551e6d4e7d94012132.tar.gz |
Merge branch 'file-chooser-fixes' into 'master'
File chooser fixes
See merge request GNOME/gtk!3356
-rw-r--r-- | gtk/gtkfilechooserwidget.c | 16 | ||||
-rw-r--r-- | gtk/gtksizerequest.c | 4 | ||||
-rwxr-xr-x | make-release.sh | 3 |
3 files changed, 19 insertions, 4 deletions
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 6f612c1c63..751357d435 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -5444,7 +5444,9 @@ gtk_file_chooser_widget_get_files (GtkFileChooser *chooser) if (info.result == NULL && impl->location_entry) goto file_entry; } - else if (impl->location_entry && current_focus == impl->location_entry) + else if (impl->location_entry && + (current_focus == impl->location_entry || + gtk_widget_is_ancestor (current_focus, impl->location_entry))) { gboolean is_well_formed, is_empty, is_file_part_empty, is_folder; @@ -6230,7 +6232,9 @@ gtk_file_chooser_widget_should_respond (GtkFileChooserWidget *impl) g_assert_not_reached (); } } - else if ((impl->location_entry != NULL) && (current_focus == impl->location_entry)) + else if ((impl->location_entry != NULL) && + (current_focus == impl->location_entry || + gtk_widget_is_ancestor (current_focus, impl->location_entry))) { GFile *file; gboolean is_well_formed, is_empty, is_file_part_empty; @@ -7719,7 +7723,13 @@ captured_key (GtkEventControllerKey *controller, GtkFileChooserWidget *impl = data; gboolean handled; - if (impl->operation_mode == OPERATION_MODE_SEARCH) + if (impl->operation_mode == OPERATION_MODE_SEARCH || + impl->operation_mode == OPERATION_MODE_ENTER_LOCATION || + (impl->operation_mode == OPERATION_MODE_BROWSE && + impl->location_mode == LOCATION_MODE_FILENAME_ENTRY)) + return GDK_EVENT_PROPAGATE; + + if (keyval == GDK_KEY_slash) return GDK_EVENT_PROPAGATE; handled = gtk_event_controller_key_forward (controller, GTK_WIDGET (impl->search_entry)); diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c index bad631c022..c614088b82 100644 --- a/gtk/gtksizerequest.c +++ b/gtk/gtksizerequest.c @@ -698,7 +698,9 @@ gtk_distribute_natural_allocation (int extra_space, int i; g_return_val_if_fail (extra_space >= 0, 0); - g_return_val_if_fail (n_requested_sizes > 0, 0); + + if (n_requested_sizes == 0) + return extra_space; spreading = g_newa (guint, n_requested_sizes); diff --git a/make-release.sh b/make-release.sh index 61b4765c5c..03d280df36 100755 --- a/make-release.sh +++ b/make-release.sh @@ -9,6 +9,9 @@ if [ -d ${release_build_dir} ]; then exit 1 fi +# make sure included subprojects are current +meson subprojects update gi-docgen + # make the release tarball meson setup --force-fallback-for gi-docgen ${release_build_dir} || exit meson dist -C${release_build_dir} --include-subprojects || exit |