[epiphany] downloads: Remove ephy_download_start()
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] downloads: Remove ephy_download_start()
- Date: Wed, 8 Jan 2014 11:31:35 +0000 (UTC)
commit 227c7f3f2dcc703133a27bf6d7848f4eec6efbb8
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Wed Jan 8 11:56:02 2014 +0100
downloads: Remove ephy_download_start()
This doesn't make sense now in WebKit2, because a WebKitDownload object
represents an already started download.
embed/ephy-download.c | 21 ++-------------------
embed/ephy-download.h | 1 -
src/popup-commands.c | 4 ----
tests/ephy-download-test.c | 1 -
4 files changed, 2 insertions(+), 25 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index b87fad5..c34c588 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -515,7 +515,7 @@ ephy_download_get_action (EphyDownload *download)
* @download: an #EphyDownload
*
* Gets the time (returned by gtk_get_current_event_time ()) when @download was
- * started with ephy_download_start (). Defaults to 0.
+ * started. Defaults to 0.
*
* Returns: the time when @download was started.
**/
@@ -528,23 +528,6 @@ ephy_download_get_start_time (EphyDownload *download)
}
/**
- * ephy_download_start:
- * @download: an #EphyDownload
- *
- * Starts the wrapped #WebKitDownload.
- **/
-void
-ephy_download_start (EphyDownload *download)
-{
- EphyDownloadPrivate *priv;
-
- g_return_if_fail (EPHY_IS_DOWNLOAD (download));
-
- priv = download->priv;
- priv->start_time = gtk_get_current_event_time ();
-}
-
-/**
* ephy_download_cancel:
* @download: an #EphyDownload
*
@@ -842,7 +825,7 @@ ephy_download_init (EphyDownload *download)
download->priv->action = EPHY_DOWNLOAD_ACTION_NONE;
- download->priv->start_time = 0;
+ download->priv->start_time = gtk_get_current_event_time ();
download->priv->window = NULL;
download->priv->widget = NULL;
diff --git a/embed/ephy-download.h b/embed/ephy-download.h
index 3d2fe7f..6e039d2 100644
--- a/embed/ephy-download.h
+++ b/embed/ephy-download.h
@@ -82,7 +82,6 @@ EphyDownload *ephy_download_new_for_download (WebKitDownload *download,
GtkWindow *parent);
-void ephy_download_start (EphyDownload *download);
void ephy_download_cancel (EphyDownload *download);
void ephy_download_set_destination_uri (EphyDownload *download,
diff --git a/src/popup-commands.c b/src/popup-commands.c
index efc3b07..7d6f58d 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -161,8 +161,6 @@ save_property_url_to_destination (EphyWindow *window,
if (destination)
ephy_download_set_destination_uri (download, destination);
-
- ephy_download_start (download);
}
static void
@@ -320,8 +318,6 @@ popup_cmd_set_image_as_background (GtkAction *action,
g_signal_connect (download, "completed",
G_CALLBACK (background_download_completed), window);
- ephy_download_start (download);
-
g_value_unset (&value);
g_free (base);
g_free (base_converted);
diff --git a/tests/ephy-download-test.c b/tests/ephy-download-test.c
index 3e5557e..196f9fd 100644
--- a/tests/ephy-download-test.c
+++ b/tests/ephy-download-test.c
@@ -152,7 +152,6 @@ test_ephy_download_start (Fixture *fixture, gconstpointer data)
G_CALLBACK (completed_cb), fixture);
ephy_download_set_action (fixture->download, EPHY_DOWNLOAD_ACTION_DO_NOTHING);
- ephy_download_start (fixture->download);
g_main_loop_run (fixture->loop);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]