[epiphany/downloads: 2/8] e-e-shell: get_downloads()
- From: Diego Escalante Urrelo <diegoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/downloads: 2/8] e-e-shell: get_downloads()
- Date: Thu, 20 Jan 2011 06:57:56 +0000 (UTC)
commit b31785d5a840dd8a9a88cb5e4456dbc23519804f
Author: Diego Escalante Urrelo <descalante igalia com>
Date: Tue Jan 18 11:10:11 2011 -0500
e-e-shell: get_downloads()
embed/ephy-embed-shell.c | 30 ++++++++++++++++++++++++++++++
embed/ephy-embed-shell.h | 2 ++
2 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 3fcf7ee..bef31b4 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -28,6 +28,7 @@
#include "downloader-view.h"
#include "ephy-adblock-manager.h"
#include "ephy-debug.h"
+#include "ephy-download.h"
#include "ephy-embed-shell.h"
#include "ephy-embed-single.h"
#include "ephy-encodings.h"
@@ -51,6 +52,7 @@ struct _EphyEmbedShellPrivate
{
EphyHistory *global_history;
DownloaderView *downloader_view;
+ GtkListStore *downloads;
EphyFaviconCache *favicon_cache;
EphyEmbedSingle *embed_single;
EphyEncodings *encodings;
@@ -94,6 +96,14 @@ ephy_embed_shell_dispose (GObject *object)
priv->downloader_view = NULL;
}
+ if (priv->downloads != NULL)
+ {
+ LOG ("Destroying downloads hash table");
+ /* FIXME: needs freeing of members */
+ g_object_unref (priv->downloads);
+ priv->downloads = NULL;
+ }
+
if (priv->favicon_cache != NULL)
{
LOG ("Unref favicon cache");
@@ -563,6 +573,26 @@ ephy_embed_shell_get_print_settings (EphyEmbedShell *shell)
return priv->print_settings;
}
+GtkListStore *
+ephy_embed_shell_get_downloads (EphyEmbedShell *shell)
+{
+ EphyEmbedShellPrivate *priv;
+
+ g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+ priv = shell->priv;
+
+ if (priv->downloads == NULL)
+ {
+ priv->downloads = gtk_list_store_new (4,
+ G_TYPE_BOOLEAN,
+ EPHY_TYPE_EMBED,
+ EPHY_TYPE_DOWNLOAD,
+ GTK_TYPE_WIDGET);
+ }
+
+ return priv->downloads;
+}
+
static void
object_notify_cb (EphyEmbedShell *shell, GObject *object)
diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h
index c58df97..45c9d3d 100644
--- a/embed/ephy-embed-shell.h
+++ b/embed/ephy-embed-shell.h
@@ -91,6 +91,8 @@ void ephy_embed_shell_set_print_settings (EphyEmbedShell *shell,
GtkPrintSettings *ephy_embed_shell_get_print_settings (EphyEmbedShell *shell);
+GtkListStore *ephy_embed_shell_get_downloads (EphyEmbedShell *shell);
+
/* Private API */
void _ephy_embed_shell_track_object (EphyEmbedShell *shell,
GObject *object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]