[epiphany/wip/exalm/timestamps: 4/9] Remove redundant gtk_window_present_with_time() uses




commit 751e229ecb275a0a8fae307ced239f691541b519
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Mar 18 02:25:06 2022 +0400

    Remove redundant gtk_window_present_with_time() uses
    
    gtk_window_present_with_time() along with gtk_get_current_event_time() as
    the timestamp is already what gtk_window_present() is.
    
    Additionally, gtk_get_current_event_time() is gone in GTK4 so we'll have
    to drop it anyway.

 src/ephy-firefox-sync-dialog.c       | 2 +-
 src/ephy-session.c                   | 2 +-
 src/preferences/prefs-general-page.c | 4 ++--
 src/window-commands.c                | 8 ++++----
 4 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/ephy-firefox-sync-dialog.c b/src/ephy-firefox-sync-dialog.c
index 7d5b58d8c..51eff3114 100644
--- a/src/ephy-firefox-sync-dialog.c
+++ b/src/ephy-firefox-sync-dialog.c
@@ -538,7 +538,7 @@ on_sync_synced_tabs_button_clicked (GtkWidget             *button,
   synced_tabs_dialog = synced_tabs_dialog_new (manager);
   gtk_window_set_transient_for (GTK_WINDOW (synced_tabs_dialog), GTK_WINDOW (sync_dialog));
   gtk_window_set_modal (GTK_WINDOW (synced_tabs_dialog), TRUE);
-  gtk_window_present_with_time (GTK_WINDOW (synced_tabs_dialog), gtk_get_current_event_time ());
+  gtk_window_present (GTK_WINDOW (synced_tabs_dialog));
 }
 
 static void
diff --git a/src/ephy-session.c b/src/ephy-session.c
index e399826cb..764ed1a19 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -278,7 +278,7 @@ ephy_session_undo_close_tab (EphySession *session)
   }
 
   gtk_widget_grab_focus (GTK_WIDGET (new_tab));
-  gtk_window_present_with_time (GTK_WINDOW (window), gtk_get_current_event_time ());
+  gtk_window_present (GTK_WINDOW (window));
 
   closed_tab_free (tab);
 
diff --git a/src/preferences/prefs-general-page.c b/src/preferences/prefs-general-page.c
index ba795bdf3..42ee99969 100644
--- a/src/preferences/prefs-general-page.c
+++ b/src/preferences/prefs-general-page.c
@@ -288,7 +288,7 @@ language_editor_add_button_release_event (GtkWidget        *button,
       (gpointer *)add_lang_dialog);
   }
 
-  gtk_window_present_with_time (GTK_WINDOW (general_page->add_lang_dialog), gtk_get_current_event_time ());
+  gtk_window_present (GTK_WINDOW (general_page->add_lang_dialog));
 }
 
 static void
@@ -1067,7 +1067,7 @@ on_manage_webapp_additional_urls_button_clicked (GtkWidget        *button,
 
   gtk_window_set_transient_for (GTK_WINDOW (urls_dialog), prefs_dialog);
   gtk_window_set_modal (GTK_WINDOW (urls_dialog), TRUE);
-  gtk_window_present_with_time (GTK_WINDOW (urls_dialog), gtk_get_current_event_time ());
+  gtk_window_present (GTK_WINDOW (urls_dialog));
 }
 
 static void
diff --git a/src/window-commands.c b/src/window-commands.c
index c36b80fe2..c1c377ca2 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -860,7 +860,7 @@ window_cmd_show_history (GSimpleAction *action,
   if (GTK_WINDOW (user_data) != gtk_window_get_transient_for (GTK_WINDOW (dialog)))
     gtk_window_set_transient_for (GTK_WINDOW (dialog),
                                   GTK_WINDOW (user_data));
-  gtk_window_present_with_time (GTK_WINDOW (dialog), gtk_get_current_event_time ());
+  gtk_window_present (GTK_WINDOW (dialog));
 }
 
 void
@@ -875,7 +875,7 @@ window_cmd_show_firefox_sync (GSimpleAction *action,
   if (GTK_WINDOW (user_data) != gtk_window_get_transient_for (GTK_WINDOW (dialog)))
     gtk_window_set_transient_for (GTK_WINDOW (dialog),
                                   GTK_WINDOW (user_data));
-  gtk_window_present_with_time (GTK_WINDOW (dialog), gtk_get_current_event_time ());
+  gtk_window_present (GTK_WINDOW (dialog));
 }
 
 void
@@ -891,7 +891,7 @@ window_cmd_show_preferences (GSimpleAction *action,
     gtk_window_set_transient_for (dialog,
                                   GTK_WINDOW (user_data));
 
-  gtk_window_present_with_time (dialog, gtk_get_current_event_time ());
+  gtk_window_present (dialog);
 }
 
 void
@@ -937,7 +937,7 @@ window_cmd_show_shortcuts (GSimpleAction *action,
   if (gtk_window_get_transient_for (GTK_WINDOW (shortcuts_window)) != GTK_WINDOW (user_data))
     gtk_window_set_transient_for (GTK_WINDOW (shortcuts_window), GTK_WINDOW (user_data));
 
-  gtk_window_present_with_time (GTK_WINDOW (shortcuts_window), gtk_get_current_event_time ());
+  gtk_window_present (GTK_WINDOW (shortcuts_window));
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]