[epiphany/wip/exalm/timestamps: 9/9] file-helpers: Drop unused timestamp params
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/timestamps: 9/9] file-helpers: Drop unused timestamp params
- Date: Tue, 22 Mar 2022 16:14:24 +0000 (UTC)
commit 902e41dc7613d386022b9fe2c2ad8c2d074bd9c5
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Mar 22 20:14:06 2022 +0400
file-helpers: Drop unused timestamp params
embed/ephy-download.c | 6 +++---
lib/ephy-file-helpers.c | 21 ++++++---------------
lib/ephy-file-helpers.h | 7 ++-----
src/ephy-window.c | 6 ++----
src/preferences/prefs-appearance-page.c | 4 ++--
5 files changed, 15 insertions(+), 29 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index ba8a02235..ca81083c3 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -419,13 +419,13 @@ ephy_download_do_download_action (EphyDownload *download,
case EPHY_DOWNLOAD_ACTION_BROWSE_TO:
LOG ("ephy_download_do_download_action: browse_to");
/* Must not use this action type under sandbox! */
- ret = ephy_file_browse_to (destination, GDK_CURRENT_TIME);
+ ret = ephy_file_browse_to (destination);
break;
case EPHY_DOWNLOAD_ACTION_OPEN:
LOG ("ephy_download_do_download_action: open");
- ret = ephy_file_launch_handler (destination, GDK_CURRENT_TIME);
+ ret = ephy_file_launch_handler (destination);
if (!ret)
- ret = ephy_file_browse_to (destination, GDK_CURRENT_TIME);
+ ret = ephy_file_browse_to (destination);
break;
case EPHY_DOWNLOAD_ACTION_NONE:
LOG ("ephy_download_do_download_action: none");
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 06ad8cbe9..1e4f827c4 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -583,8 +583,7 @@ ephy_ensure_dir_exists (const char *dir,
static gboolean
launch_application (GAppInfo *app,
- GList *files,
- guint32 user_time)
+ GList *files)
{
g_autoptr (GdkAppLaunchContext) context = NULL;
g_autoptr (GError) error = NULL;
@@ -597,7 +596,6 @@ launch_application (GAppInfo *app,
context = gdk_display_get_app_launch_context (display);
gdk_app_launch_context_set_screen (context, screen);
- gdk_app_launch_context_set_timestamp (context, user_time);
res = g_app_info_launch (app, files,
G_APP_LAUNCH_CONTEXT (context), &error);
@@ -632,7 +630,6 @@ launch_via_uri_handler (GFile *file)
/**
* ephy_file_launch_handler:
* @file: a #GFile to pass as argument
- * @user_time: user time to prevent focus stealing
*
* Launches @file with its default handler application, if @mime_type is %NULL
* then @file will be queried for its type.
@@ -640,8 +637,7 @@ launch_via_uri_handler (GFile *file)
* Returns: %TRUE on success
**/
gboolean
-ephy_file_launch_handler (GFile *file,
- guint32 user_time)
+ephy_file_launch_handler (GFile *file)
{
GAppInfo *app = NULL;
gboolean ret = FALSE;
@@ -665,7 +661,7 @@ ephy_file_launch_handler (GFile *file,
}
list = g_list_append (list, file);
- ret = launch_application (app, list, user_time);
+ ret = launch_application (app, list);
return ret;
}
@@ -673,7 +669,6 @@ ephy_file_launch_handler (GFile *file,
static gboolean
open_in_default_handler (const char *uri,
const char *mime_type,
- guint32 timestamp,
GdkScreen *screen)
{
g_autoptr (GdkAppLaunchContext) context = NULL;
@@ -683,7 +678,6 @@ open_in_default_handler (const char *uri,
context = gdk_display_get_app_launch_context (screen ? gdk_screen_get_display (screen) :
gdk_display_get_default ());
gdk_app_launch_context_set_screen (context, screen);
- gdk_app_launch_context_set_timestamp (context, timestamp);
appinfo = g_app_info_get_default_for_type (mime_type, TRUE);
if (!appinfo) {
@@ -704,20 +698,18 @@ open_in_default_handler (const char *uri,
gboolean
ephy_file_open_uri_in_default_browser (const char *uri,
- guint32 user_time,
GdkScreen *screen)
{
if (ephy_is_running_inside_sandbox ()) {
ephy_open_uri_via_flatpak_portal (uri);
return TRUE;
}
- return open_in_default_handler (uri, "x-scheme-handler/http", user_time, screen);
+ return open_in_default_handler (uri, "x-scheme-handler/http", screen);
}
/**
* ephy_file_browse_to:
* @file: a #GFile
- * @user_time: user_time to prevent focus stealing
*
* Launches the default application for browsing directories to point to
* @file. E.g. nautilus will jump to @file within its directory and
@@ -726,8 +718,7 @@ ephy_file_open_uri_in_default_browser (const char *uri,
* Returns: %TRUE if the launch succeeded
**/
gboolean
-ephy_file_browse_to (GFile *file,
- guint32 user_time)
+ephy_file_browse_to (GFile *file)
{
g_autofree char *uri = g_file_get_uri (file);
@@ -736,7 +727,7 @@ ephy_file_browse_to (GFile *file,
return TRUE;
}
- return open_in_default_handler (uri, "inode/directory", user_time, NULL);
+ return open_in_default_handler (uri, "inode/directory", NULL);
}
/**
diff --git a/lib/ephy-file-helpers.h b/lib/ephy-file-helpers.h
index c089f6d4f..ccd015dcf 100644
--- a/lib/ephy-file-helpers.h
+++ b/lib/ephy-file-helpers.h
@@ -62,18 +62,15 @@ char * ephy_file_tmp_filename (const char
const char *extension);
gboolean ephy_ensure_dir_exists (const char *dir,
GError **error);
-gboolean ephy_file_launch_handler (GFile *file,
- guint32 user_time);
+gboolean ephy_file_launch_handler (GFile *file);
gboolean ephy_file_delete_dir_recursively (const char *directory,
GError **error);
char * ephy_sanitize_filename (char *filename);
void ephy_open_default_instance_window (void);
void ephy_open_incognito_window (const char *uri);
gboolean ephy_file_open_uri_in_default_browser (const char *uri,
- guint32 user_time,
GdkScreen *screen);
-gboolean ephy_file_browse_to (GFile *file,
- guint32 user_time);
+gboolean ephy_file_browse_to (GFile *file);
void ephy_copy_directory (const char *source,
const char *target);
XdpPortal * ephy_get_portal (void);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 6da695223..4deeecafe 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2117,8 +2117,7 @@ decide_navigation_policy (WebKitWebView *web_view,
if (ephy_web_application_is_uri_allowed (uri)) {
gtk_widget_show (GTK_WIDGET (window));
} else {
- ephy_file_open_uri_in_default_browser (uri, GDK_CURRENT_TIME,
- gtk_window_get_screen (GTK_WINDOW (window)));
+ ephy_file_open_uri_in_default_browser (uri, gtk_window_get_screen (GTK_WINDOW (window)));
webkit_policy_decision_ignore (decision);
gtk_widget_destroy (GTK_WIDGET (window));
@@ -2132,8 +2131,7 @@ decide_navigation_policy (WebKitWebView *web_view,
if (ephy_web_application_is_uri_allowed (uri))
return accept_navigation_policy_decision (window, decision, uri);
- ephy_file_open_uri_in_default_browser (uri, GDK_CURRENT_TIME,
- gtk_window_get_screen (GTK_WINDOW (window)));
+ ephy_file_open_uri_in_default_browser (uri, gtk_window_get_screen (GTK_WINDOW (window)));
webkit_policy_decision_ignore (decision);
return TRUE;
diff --git a/src/preferences/prefs-appearance-page.c b/src/preferences/prefs-appearance-page.c
index acd35fe06..cef02e813 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, GDK_CURRENT_TIME);
+ ephy_file_launch_handler (file);
}
}
}
@@ -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, GDK_CURRENT_TIME);
+ ephy_file_launch_handler (file);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]