[epiphany/wip/exalm/timestamps: 2/4] Prefer GDK_CURRENT_TIME to gtk_get_current_event_time() where possible
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/timestamps: 2/4] Prefer GDK_CURRENT_TIME to gtk_get_current_event_time() where possible
- Date: Mon, 21 Mar 2022 09:15:38 +0000 (UTC)
commit d6bdcdd1b0554659490fa2a85bdbf61407654234
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.
lib/ephy-gui.c | 2 +-
lib/widgets/ephy-download-widget.c | 2 +-
lib/widgets/ephy-downloads-popover.c | 2 +-
src/ephy-shell.c | 2 +-
src/preferences/prefs-appearance-page.c | 4 ++--
src/window-commands.c | 2 +-
6 files changed, 7 insertions(+), 7 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/ephy-shell.c b/src/ephy-shell.c
index 0ace095aa..493f5b0a5 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -339,7 +339,7 @@ launch_app (GSimpleAction *action,
* is disabled when running under flatpak.
*/
ephy_file_launch_desktop_file (desktop_file,
- gtk_get_current_event_time (),
+ GDK_CURRENT_TIME,
EPHY_FILE_HELPERS_I_UNDERSTAND_I_MUST_NOT_USE_THIS_FUNCTION_UNDER_FLATPAK);
}
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 d285ad691..9af5f2525 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -2612,7 +2612,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]