[nautilus/wip/antoniof/gtk4-preparation-drop-outgoing-api: 34/49] window: Drop gtk_window_has_toplevel_focus()
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gtk4-preparation-drop-outgoing-api: 34/49] window: Drop gtk_window_has_toplevel_focus()
- Date: Sun, 15 Aug 2021 19:37:37 +0000 (UTC)
commit 32d5a7c467fa3daa108aa13c23370c0e742feeb0
Author: Ernestas Kulik <ernestask gnome org>
Date: Fri Jul 13 13:15:18 2018 +0300
window: 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.
src/nautilus-window.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 4a127fbe7..d9470dd4d 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1582,7 +1582,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);
@@ -1599,7 +1599,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;
@@ -1678,7 +1678,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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]