diff options
author | Ernestas Kulik <ernestask@gnome.org> | 2018-07-13 13:15:18 +0300 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2021-11-22 15:16:18 +0000 |
commit | cd0299b20e38cc0fa69383357c17823bc24b176d (patch) | |
tree | f842bb074679420495a71f23342f12b63f207d47 | |
parent | 8576d45c5965d5116a5bb58a8748ffdca74b8efd (diff) | |
download | nautilus-cd0299b20e38cc0fa69383357c17823bc24b176d.tar.gz |
general: Drop gtk_window_has_toplevel_focus()
It’s identical to gtk_window_is_active() as far as we are concerned.
Also, it's gone in GTK4.
-rw-r--r-- | src/nautilus-progress-persistence-handler.c | 2 | ||||
-rw-r--r-- | src/nautilus-window.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/nautilus-progress-persistence-handler.c b/src/nautilus-progress-persistence-handler.c index e6060ac61..b10795d3e 100644 --- a/src/nautilus-progress-persistence-handler.c +++ b/src/nautilus-progress-persistence-handler.c @@ -184,7 +184,7 @@ progress_info_finished_cb (NautilusProgressInfo *info, } else { - if ((last_active_window == NULL) || !gtk_window_has_toplevel_focus (last_active_window)) + if ((last_active_window == NULL) || !gtk_window_is_active (last_active_window)) { progress_persistence_handler_hide_notification (self); progress_persistence_handler_show_complete_notification (self); diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 4a800d3f7..d60db7e3a 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -1587,7 +1587,7 @@ nautilus_window_on_undo_changed (NautilusFileUndoManager *manager, /* Don't pop up a notification if user canceled the operation or the focus * is not in the this window. This is an easy way to know from which window * was the delete operation made */ - if (files != NULL && gtk_window_has_toplevel_focus (GTK_WINDOW (window))) + if (files != NULL && gtk_window_is_active (GTK_WINDOW (window))) { popup_notification = TRUE; label = in_app_notification_undo_deleted_get_label (undo_info); @@ -1604,7 +1604,7 @@ nautilus_window_on_undo_changed (NautilusFileUndoManager *manager, * window. This is an easy way to know from which window was the * unstart operation made */ if (eel_uri_is_starred (g_file_get_uri (location)) && - gtk_window_has_toplevel_focus (GTK_WINDOW (window)) && + gtk_window_is_active (GTK_WINDOW (window)) && !nautilus_file_undo_info_starred_is_starred (NAUTILUS_FILE_UNDO_INFO_STARRED (undo_info))) { popup_notification = TRUE; @@ -1683,7 +1683,7 @@ nautilus_window_show_operation_notification (NautilusWindow *window, } current_location = nautilus_window_slot_get_location (window->active_slot); - if (gtk_window_has_toplevel_focus (GTK_WINDOW (window))) + if (gtk_window_is_active (GTK_WINDOW (window))) { remove_notifications (window); gtk_label_set_text (GTK_LABEL (window->notification_operation_label), |