aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-06-11 03:05:53 +0800
committerChristian Persch <chpe@src.gnome.org>2004-06-11 03:05:53 +0800
commit27ae6e03f698835c1683c03b7cfc0e401d0f601f (patch)
treee0071b3ad7fa45afb0d97930a4deacde7c51ccaf /src/ephy-shell.c
parentee67c4e456ce1bee49da717ee86ae85e76499e6d (diff)
downloadgsoc2013-epiphany-27ae6e03f698835c1683c03b7cfc0e401d0f601f.tar
gsoc2013-epiphany-27ae6e03f698835c1683c03b7cfc0e401d0f601f.tar.gz
gsoc2013-epiphany-27ae6e03f698835c1683c03b7cfc0e401d0f601f.tar.bz2
gsoc2013-epiphany-27ae6e03f698835c1683c03b7cfc0e401d0f601f.tar.lz
gsoc2013-epiphany-27ae6e03f698835c1683c03b7cfc0e401d0f601f.tar.xz
gsoc2013-epiphany-27ae6e03f698835c1683c03b7cfc0e401d0f601f.tar.zst
gsoc2013-epiphany-27ae6e03f698835c1683c03b7cfc0e401d0f601f.zip
Merging bookmarksbar-separation branch.
2004-06-10 Christian Persch <chpe@cvs.gnome.org> Merging bookmarksbar-separation branch.
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r--src/ephy-shell.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 78060acf6..d61f6075a 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -1,5 +1,6 @@
/*
- * Copyright (C) 2000-2003 Marco Pesenti Gritti
+ * Copyright (C) 2000-2004 Marco Pesenti Gritti
+ * Copyright (C) 2003, 2004 Christian Persch
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -39,6 +40,7 @@
#include "toolbar.h"
#include "ephy-session.h"
#include "downloader-view.h"
+#include "egg-toolbars-model.h"
#include "ephy-toolbars-model.h"
#include "ephy-automation.h"
#include "print-dialog.h"
@@ -63,7 +65,7 @@ struct EphyShellPrivate
BonoboGenericFactory *automation_factory;
EphySession *session;
EphyBookmarks *bookmarks;
- EphyToolbarsModel *toolbars_model;
+ EggToolbarsModel *toolbars_model;
EggToolbarsModel *fs_toolbars_model;
EphyExtensionsManager *extensions_manager;
GtkWidget *bme;
@@ -664,11 +666,16 @@ ephy_shell_get_toolbars_model (EphyShell *shell, gboolean fullscreen)
{
if (shell->priv->fs_toolbars_model == NULL)
{
+ gboolean success;
const char *xml;
shell->priv->fs_toolbars_model = egg_toolbars_model_new ();
xml = ephy_file ("epiphany-fs-toolbar.xml");
- egg_toolbars_model_load (shell->priv->fs_toolbars_model, xml);
+ g_return_val_if_fail (xml != NULL, NULL);
+
+ success = egg_toolbars_model_load
+ (shell->priv->fs_toolbars_model, xml);
+ g_return_val_if_fail (success, NULL);
}
return G_OBJECT (shell->priv->fs_toolbars_model);
@@ -678,16 +685,22 @@ ephy_shell_get_toolbars_model (EphyShell *shell, gboolean fullscreen)
if (shell->priv->toolbars_model == NULL)
{
EphyBookmarks *bookmarks;
+ EggToolbarsModel *bookmarksbar_model;
- bookmarks = ephy_shell_get_bookmarks (shell);
+ shell->priv->toolbars_model = ephy_toolbars_model_new ();
- shell->priv->toolbars_model = ephy_toolbars_model_new (bookmarks);
+ /* get the bookmarks toolbars model. we have to do this
+ * before loading the toolbars model from disk, since
+ * this will connect the get_item_* signals
+ */
+ bookmarks = ephy_shell_get_bookmarks (shell);
+ bookmarksbar_model = ephy_bookmarks_get_toolbars_model (bookmarks);
- g_object_set (bookmarks, "toolbars_model",
- shell->priv->toolbars_model, NULL);
+ /* ok, now we can load the model */
+ ephy_toolbars_model_load
+ (EPHY_TOOLBARS_MODEL (shell->priv->toolbars_model));
}
-
return G_OBJECT (shell->priv->toolbars_model);
}
}