[epiphany/overview] ephy-overview: remove active store
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/overview] ephy-overview: remove active store
- Date: Mon, 20 Aug 2012 16:12:39 +0000 (UTC)
commit 1b68846ade5d5470d9826dc7aba4fd6d4cf45dcf
Author: Claudio Saavedra <csaavedra igalia com>
Date: Mon Aug 20 12:45:52 2012 +0300
ephy-overview: remove active store
For 3.6 release we won't be adding this, so leave only the frecent
store for now.
embed/ephy-overview.c | 41 ++++++++++++++---------------------------
embed/ephy-overview.h | 4 +---
src/ephy-window.c | 2 +-
3 files changed, 16 insertions(+), 31 deletions(-)
---
diff --git a/embed/ephy-overview.c b/embed/ephy-overview.c
index 8173f598..6466571 100644
--- a/embed/ephy-overview.c
+++ b/embed/ephy-overview.c
@@ -20,12 +20,10 @@
*/
#include "config.h"
-#include "ephy-active-store.h"
#include "ephy-frecent-store.h"
#include "ephy-snapshot-service.h"
#include "ephy-history-service.h"
#include "ephy-overview.h"
-#include "ephy-shell.h"
#include <glib/gi18n.h>
#include <gtk/gtk.h>
@@ -35,14 +33,11 @@
enum
{
PROP_0,
- PROP_PARENT_WINDOW,
};
struct _EphyOverviewPrivate
{
- EphyWindow *parent_window;
GtkWidget *frecent_view;
- GtkWidget *active_view;
};
G_DEFINE_TYPE (EphyOverview, ephy_overview, GTK_TYPE_GRID)
@@ -57,9 +52,6 @@ ephy_overview_set_property (GObject *object,
switch (prop_id)
{
- case PROP_PARENT_WINDOW:
- overview->priv->parent_window = g_value_get_object (value);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -76,15 +68,13 @@ ephy_overview_get_property (GObject *object,
switch (prop_id)
{
- case PROP_PARENT_WINDOW:
- g_value_set_object (value, overview->priv->parent_window);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
+#if 0
static gboolean
active_view_item_deleted (GtkWidget *widget,
const gchar *path,
@@ -111,6 +101,7 @@ active_view_item_deleted (GtkWidget *widget,
return TRUE;
}
+#endif
static gboolean
frecent_view_item_deleted (GtkWidget *widget,
@@ -134,7 +125,7 @@ static void
main_view_item_activated (GtkWidget *widget,
gchar *id,
GtkTreePath *path,
- EphyWindow *window)
+ EphyOverview *overview)
{
guint position;
GtkTreeModel *model;
@@ -143,6 +134,7 @@ main_view_item_activated (GtkWidget *widget,
model = gd_main_view_get_model (GD_MAIN_VIEW (widget));
gtk_tree_model_get_iter (model, &iter, path);
+#if 0
if (EPHY_IS_ACTIVE_STORE (model)) {
gtk_tree_model_get (model, &iter,
EPHY_ACTIVE_STORE_TAB_POS, &position,
@@ -151,15 +143,20 @@ main_view_item_activated (GtkWidget *widget,
position);
ephy_window_set_overview_mode (window, FALSE);
} else {
+#endif
gtk_tree_model_get (model, &iter,
EPHY_OVERVIEW_STORE_URI, &url,
-1);
+#if 0
ephy_shell_new_tab (ephy_shell, window, NULL, url,
EPHY_NEW_TAB_OPEN_PAGE |
EPHY_NEW_TAB_JUMP |
EPHY_NEW_TAB_IN_EXISTING_WINDOW);
+#endif
g_free (url);
+#if 0
}
+#endif
}
static GdkPixbuf *
@@ -188,36 +185,33 @@ ephy_overview_get_icon (const gchar *icon_name)
static void
ephy_overview_constructed (GObject *object)
{
- EphyHistoryService *service;
EphyOverviewStore *store;
- EphyNotebook *notebook;
EphyOverview *self = EPHY_OVERVIEW (object);
GdkPixbuf *default_icon;
if (G_OBJECT_CLASS (ephy_overview_parent_class)->constructed)
G_OBJECT_CLASS (ephy_overview_parent_class)->constructed (object);
- service = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (EPHY_EMBED_SHELL (ephy_shell)));
default_icon = ephy_overview_get_icon ("text-html");
self->priv->frecent_view = GTK_WIDGET (gd_main_view_new (GD_MAIN_VIEW_ICON));
g_signal_connect (self->priv->frecent_view, "item-activated",
- G_CALLBACK (main_view_item_activated), self->priv->parent_window);
+ G_CALLBACK (main_view_item_activated), object);
g_signal_connect (self->priv->frecent_view, "item-deleted",
G_CALLBACK (frecent_view_item_deleted), NULL);
store = EPHY_OVERVIEW_STORE (ephy_frecent_store_new ());
g_object_set (G_OBJECT (store),
- "history-service", service,
"default-icon", default_icon,
NULL);
gd_main_view_set_model (GD_MAIN_VIEW (self->priv->frecent_view),
GTK_TREE_MODEL (store));
gtk_grid_attach (GTK_GRID (self), self->priv->frecent_view,
0, 0, 1, 1);
- gtk_widget_set_vexpand (self->priv->frecent_view, FALSE);
+ gtk_widget_set_vexpand (self->priv->frecent_view, TRUE);
gtk_widget_set_size_request (self->priv->frecent_view, -1, 320);
+#if 0
self->priv->active_view = GTK_WIDGET (gd_main_view_new (GD_MAIN_VIEW_ICON));
g_signal_connect (self->priv->active_view, "item-activated",
G_CALLBACK (main_view_item_activated),
@@ -234,6 +228,7 @@ ephy_overview_constructed (GObject *object)
GTK_TREE_MODEL (store));
gtk_grid_attach (GTK_GRID (self), self->priv->active_view,
0, 1, 1, 1);
+#endif
gtk_widget_show_all (GTK_WIDGET (self));
g_object_unref (default_icon);
@@ -248,13 +243,6 @@ ephy_overview_class_init (EphyOverviewClass *klass)
object_class->get_property = ephy_overview_get_property;
object_class->constructed = ephy_overview_constructed;
- g_object_class_install_property (object_class,
- PROP_PARENT_WINDOW,
- g_param_spec_object ("parent-window",
- "Parent window",
- "parent window",
- EPHY_TYPE_WINDOW,
- G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
g_type_class_add_private (object_class, sizeof (EphyOverviewPrivate));
}
@@ -268,9 +256,8 @@ ephy_overview_init (EphyOverview *self)
}
GtkWidget *
-ephy_overview_new (EphyWindow *parent_window)
+ephy_overview_new (void)
{
return g_object_new (EPHY_TYPE_OVERVIEW,
- "parent-window", parent_window,
NULL);
}
diff --git a/embed/ephy-overview.h b/embed/ephy-overview.h
index 40bffe3..0b99016 100644
--- a/embed/ephy-overview.h
+++ b/embed/ephy-overview.h
@@ -22,8 +22,6 @@
#ifndef _EPHY_OVERVIEW_H
#define _EPHY_OVERVIEW_H
-#include "ephy-window.h"
-
#include <gtk/gtk.h>
G_BEGIN_DECLS
@@ -53,7 +51,7 @@ struct _EphyOverviewClass {
};
GType ephy_overview_get_type (void) G_GNUC_CONST;
-GtkWidget * ephy_overview_new (EphyWindow *parent_window);
+GtkWidget * ephy_overview_new (void);
G_END_DECLS
diff --git a/src/ephy-window.c b/src/ephy-window.c
index c141d0f..1448647 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -3570,7 +3570,7 @@ ephy_window_constructor (GType type,
gtk_box_pack_start (GTK_BOX (priv->main_vbox),
GTK_WIDGET (priv->find_toolbar), FALSE, FALSE, 0);
- priv->overview = ephy_overview_new (EPHY_WINDOW (window));
+ priv->overview = ephy_overview_new ();
gtk_box_pack_start (GTK_BOX (priv->main_vbox),
priv->overview, TRUE, TRUE, 0);
g_object_bind_property (window, "overview-mode",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]