aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-10-30 04:53:49 +0800
committerChristian Persch <chpe@src.gnome.org>2004-10-30 04:53:49 +0800
commitb1d9cd1f773f6f2fc6fe054d964bf71179388f91 (patch)
treed11bb18400a3624a72d51627f8c172c1e7cc7a7d /src/ephy-window.c
parentefd191cf64c092e8f47997b8731d6eb52a6f5326 (diff)
downloadgsoc2013-epiphany-b1d9cd1f773f6f2fc6fe054d964bf71179388f91.tar
gsoc2013-epiphany-b1d9cd1f773f6f2fc6fe054d964bf71179388f91.tar.gz
gsoc2013-epiphany-b1d9cd1f773f6f2fc6fe054d964bf71179388f91.tar.bz2
gsoc2013-epiphany-b1d9cd1f773f6f2fc6fe054d964bf71179388f91.tar.lz
gsoc2013-epiphany-b1d9cd1f773f6f2fc6fe054d964bf71179388f91.tar.xz
gsoc2013-epiphany-b1d9cd1f773f6f2fc6fe054d964bf71179388f91.tar.zst
gsoc2013-epiphany-b1d9cd1f773f6f2fc6fe054d964bf71179388f91.zip
Slightly refactor bookmarks menu, to take a configurable path where to
2004-10-29 Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-bookmarks-menu.c: (open_bookmark_cb), (open_bookmark_in_tab_cb), (add_action_for_bookmark), (create_submenu), (ephy_bookmarks_menu_rebuild), (ephy_bookmarks_menu_set_property), (ephy_bookmarks_menu_get_property), (ephy_bookmarks_menu_constructor), (ephy_bookmarks_menu_finalize), (ephy_bookmarks_menu_class_init), (ephy_bookmarks_menu_new): * src/bookmarks/ephy-bookmarks-menu.h: * src/ephy-window.c: (open_bookmark_cb), (ephy_window_init): Slightly refactor bookmarks menu, to take a configurable path where to merge its UI.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 4d7942014..73495a6fd 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -329,6 +329,8 @@ static guint ephy_popups_n_entries = G_N_ELEMENTS (ephy_popups_entries);
#define CONF_DESKTOP_BG_PICTURE "/desktop/gnome/background/picture_filename"
#define INSANE_NUMBER_OF_URLS 20
+#define BOOKMARKS_MENU_PATH "/menubar/BookmarksMenu"
+
#define EPHY_WINDOW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_WINDOW, EphyWindowPrivate))
struct _EphyWindowPrivate
@@ -2290,6 +2292,15 @@ action_request_forward_cb (GObject *toolbar,
}
static void
+open_bookmark_cb (EphyBookmarksMenu *menu,
+ const char *location,
+ gboolean open_in_new,
+ EphyWindow *window)
+{
+ ephy_window_load_url (window, location);
+}
+
+static void
ephy_window_init (EphyWindow *window)
{
EphyExtension *manager;
@@ -2326,7 +2337,11 @@ ephy_window_init (EphyWindow *window)
window->priv->tabs_menu = ephy_tabs_menu_new (window);
window->priv->fav_menu = ephy_favorites_menu_new (window);
window->priv->enc_menu = ephy_encoding_menu_new (window);
- window->priv->bmk_menu = ephy_bookmarks_menu_new (window);
+
+ window->priv->bmk_menu = ephy_bookmarks_menu_new (window->priv->manager,
+ BOOKMARKS_MENU_PATH);
+ g_signal_connect (window->priv->bmk_menu, "open",
+ G_CALLBACK (open_bookmark_cb), window);
/* get the toolbars model *before* getting the bookmarksbar model
* (via ephy_bookmarsbar_new()), so that the toolbars model is