[epiphany/wip/exalm/timestamps: 2/6] Prefer GDK_CURRENT_TIME to gtk_get_current_event_time() where possible
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/timestamps: 2/6] Prefer GDK_CURRENT_TIME to gtk_get_current_event_time() where possible
- Date: Tue, 22 Mar 2022 16:22:07 +0000 (UTC)
commit 77665973383ffacaee7cde708cfbe62154b26c27
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Mar 18 02:37:02 2022 +0400
Prefer GDK_CURRENT_TIME to gtk_get_current_event_time() where possible
In a lot of cases these are equivalent. The only cases we can't replace are
the ones where we store a timestamp and use it later.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1096>
lib/ephy-gui.c | 2 +-
lib/widgets/ephy-download-widget.c | 2 +-
lib/widgets/ephy-downloads-popover.c | 2 +-
src/preferences/prefs-appearance-page.c | 4 ++--
src/window-commands.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c
index c342b23a0..bed4d7858 100644
--- a/lib/ephy-gui.c
+++ b/lib/ephy-gui.c
@@ -61,7 +61,7 @@ ephy_gui_help (GtkWidget *parent,
else
url = g_strdup ("help:epiphany");
- gtk_show_uri_on_window (GTK_WINDOW (parent), url, gtk_get_current_event_time (), &error);
+ gtk_show_uri_on_window (GTK_WINDOW (parent), url, GDK_CURRENT_TIME, &error);
if (error != NULL) {
GtkWidget *dialog;
diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c
index b81c567a8..7af21a9b9 100644
--- a/lib/widgets/ephy-download-widget.c
+++ b/lib/widgets/ephy-download-widget.c
@@ -273,7 +273,7 @@ widget_action_button_clicked_cb (EphyDownloadWidget *widget)
} else {
ephy_download_do_download_action (widget->download,
EPHY_DOWNLOAD_ACTION_BROWSE_TO,
- gtk_get_current_event_time ());
+ GDK_CURRENT_TIME);
}
}
diff --git a/lib/widgets/ephy-downloads-popover.c b/lib/widgets/ephy-downloads-popover.c
index 86e2541f0..767147888 100644
--- a/lib/widgets/ephy-downloads-popover.c
+++ b/lib/widgets/ephy-downloads-popover.c
@@ -52,7 +52,7 @@ download_box_row_activated_cb (EphyDownloadsPopover *popover,
ephy_download_do_download_action (download,
EPHY_DOWNLOAD_ACTION_OPEN,
- gtk_get_current_event_time ());
+ GDK_CURRENT_TIME);
}
static void
diff --git a/src/preferences/prefs-appearance-page.c b/src/preferences/prefs-appearance-page.c
index 1f3a43aaf..acd35fe06 100644
--- a/src/preferences/prefs-appearance-page.c
+++ b/src/preferences/prefs-appearance-page.c
@@ -198,7 +198,7 @@ css_file_created_cb (GObject *source,
g_autofree char *uri = g_file_get_uri (file);
ephy_open_uri_via_flatpak_portal (uri);
} else {
- ephy_file_launch_handler (file, gtk_get_current_event_time ());
+ ephy_file_launch_handler (file, GDK_CURRENT_TIME);
}
}
}
@@ -233,7 +233,7 @@ js_file_created_cb (GObject *source,
g_autofree char *uri = g_file_get_uri (file);
ephy_open_uri_via_flatpak_portal (uri);
} else {
- ephy_file_launch_handler (file, gtk_get_current_event_time ());
+ ephy_file_launch_handler (file, GDK_CURRENT_TIME);
}
}
}
diff --git a/src/window-commands.c b/src/window-commands.c
index c1c377ca2..8a7e52b91 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -2577,7 +2577,7 @@ window_cmd_send_to (GSimpleAction *action,
g_free (subject);
g_free (body);
- if (!gtk_show_uri_on_window (GTK_WINDOW (window), command, gtk_get_current_event_time (), &error)) {
+ if (!gtk_show_uri_on_window (GTK_WINDOW (window), command, GDK_CURRENT_TIME, &error)) {
g_warning ("Unable to send link by email: %s\n", error->message);
g_error_free (error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]