[epiphany] downloads: Remove the EphyDownload widget property
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] downloads: Remove the EphyDownload widget property
- Date: Mon, 26 Oct 2015 11:11:14 +0000 (UTC)
commit 05e33667ec7378b452ffaa66a1177c75ddd9c7da
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Wed Oct 7 11:40:43 2015 +0200
downloads: Remove the EphyDownload widget property
It's currently unused.
embed/ephy-download.c | 72 +-----------------------------------
embed/ephy-download.h | 4 --
lib/widgets/ephy-download-widget.c | 2 -
3 files changed, 1 insertions(+), 77 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index ae9b3e0..9c91997 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -55,7 +55,6 @@ struct _EphyDownloadPrivate
GError *error;
GtkWindow *window;
- GtkWidget *widget;
guint inhibitor_cookie;
};
@@ -67,8 +66,7 @@ enum
PROP_DESTINATION,
PROP_ACTION,
PROP_START_TIME,
- PROP_WINDOW,
- PROP_WIDGET
+ PROP_WINDOW
};
enum
@@ -95,9 +93,6 @@ ephy_download_get_property (GObject *object,
priv = download->priv;
switch (property_id) {
- case PROP_WIDGET:
- g_value_set_object (value, priv->widget);
- break;
case PROP_WINDOW:
g_value_set_object (value, priv->window);
break;
@@ -138,9 +133,6 @@ ephy_download_set_property (GObject *object,
case PROP_WINDOW:
download->priv->window = g_value_dup_object (value);
break;
- case PROP_WIDGET:
- ephy_download_set_widget (download, g_value_get_object (value));
- break;
case PROP_DOWNLOAD:
case PROP_START_TIME:
default:
@@ -391,46 +383,6 @@ ephy_download_set_action (EphyDownload *download,
}
/**
- * ephy_download_set_widget:
- * @download: an #EphyDownload
- * @widget: a #GtkWidget
- *
- * Sets @widget to be associated with @download as its UI.
- **/
-void
-ephy_download_set_widget (EphyDownload *download,
- GtkWidget *widget)
-{
- g_return_if_fail (EPHY_IS_DOWNLOAD (download));
-
- if (download->priv->widget != NULL)
- g_object_unref (download->priv->widget);
-
- download->priv->widget = NULL;
-
- if (widget != NULL)
- download->priv->widget = g_object_ref (widget);
-
- g_object_notify (G_OBJECT (download), "widget");
-}
-
-/**
- * ephy_download_get_widget:
- * @download: an #EphyDownload
- *
- * Gets the #GtkWidget associated to this download.
- *
- * Returns: (transfer none): a #GtkWidget.
- **/
-GtkWidget *
-ephy_download_get_widget (EphyDownload *download)
-{
- g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), NULL);
-
- return download->priv->widget;
-}
-
-/**
* ephy_download_get_webkit_download:
* @download: an #EphyDownload
*
@@ -675,11 +627,6 @@ ephy_download_dispose (GObject *object)
priv->window = NULL;
}
- if (priv->widget) {
- g_object_unref (priv->widget);
- priv->widget = NULL;
- }
-
g_clear_error(&priv->error);
G_OBJECT_CLASS (ephy_download_parent_class)->dispose (object);
@@ -778,22 +725,6 @@ ephy_download_class_init (EphyDownloadClass *klass)
G_PARAM_STATIC_BLURB));
/**
- * EphyDownload::widget:
- *
- * An EphyDownloadWidget -or any other GtkWidget- that is representing this
- * EphyDownload to the user.
- */
- g_object_class_install_property (object_class, PROP_WIDGET,
- g_param_spec_object ("widget",
- "A GtkWidget",
- "GtkWidget showing this download.",
- GTK_TYPE_WIDGET,
- G_PARAM_READWRITE |
- G_PARAM_STATIC_NAME |
- G_PARAM_STATIC_NICK |
- G_PARAM_STATIC_BLURB));
-
- /**
* EphyDownload::filename-suggested:
*
* The ::filename-suggested signal is emitted when we have received the
@@ -851,7 +782,6 @@ ephy_download_init (EphyDownload *download)
download->priv->start_time = gtk_get_current_event_time ();
download->priv->window = NULL;
- download->priv->widget = NULL;
}
static void
diff --git a/embed/ephy-download.h b/embed/ephy-download.h
index 2cc6fb1..0f6053a 100644
--- a/embed/ephy-download.h
+++ b/embed/ephy-download.h
@@ -97,10 +97,6 @@ void ephy_download_set_action (EphyDownload *download,
gboolean ephy_download_do_download_action (EphyDownload *download,
EphyDownloadActionType action);
-GtkWidget *ephy_download_get_widget (EphyDownload *download);
-void ephy_download_set_widget (EphyDownload *download,
- GtkWidget *widget);
-
G_END_DECLS
#endif /* _EPHY_DOWNLOAD_H */
diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c
index 416d6a5..6734a5e 100644
--- a/lib/widgets/ephy-download-widget.c
+++ b/lib/widgets/ephy-download-widget.c
@@ -393,7 +393,6 @@ ephy_download_widget_dispose (GObject *object)
NULL, NULL, widget);
g_signal_handlers_disconnect_matched (widget->priv->download, G_SIGNAL_MATCH_DATA, 0, 0,
NULL, NULL, widget);
- ephy_download_set_widget (widget->priv->download, NULL);
g_object_unref (widget->priv->download);
widget->priv->download = NULL;
}
@@ -491,7 +490,6 @@ ephy_download_widget_constructed (GObject *object)
g_signal_connect (priv->download, "error",
G_CALLBACK (download_failed_cb),
widget);
- ephy_download_set_widget (priv->download, GTK_WIDGET (widget));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]