aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-04-20 19:03:42 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-04-20 19:03:42 +0800
commitd5eed5f210049e0b3b4332ddb36b0fde6b50a76e (patch)
tree060439e101e1399c1f0cf05cc6b37a2af90f4128 /src/ephy-window.c
parent1ae8286ebfe005b34e1ebe7068fc364aa3a4cb09 (diff)
downloadgsoc2013-epiphany-d5eed5f210049e0b3b4332ddb36b0fde6b50a76e.tar
gsoc2013-epiphany-d5eed5f210049e0b3b4332ddb36b0fde6b50a76e.tar.gz
gsoc2013-epiphany-d5eed5f210049e0b3b4332ddb36b0fde6b50a76e.tar.bz2
gsoc2013-epiphany-d5eed5f210049e0b3b4332ddb36b0fde6b50a76e.tar.lz
gsoc2013-epiphany-d5eed5f210049e0b3b4332ddb36b0fde6b50a76e.tar.xz
gsoc2013-epiphany-d5eed5f210049e0b3b4332ddb36b0fde6b50a76e.tar.zst
gsoc2013-epiphany-d5eed5f210049e0b3b4332ddb36b0fde6b50a76e.zip
Update
2003-04-20 Marco Pesenti Gritti <marco@it.gnome.org> * lib/egg/egg-editable-toolbar.c: Update * data/epiphany.schemas.in: * data/ui/epiphany-ui.xml.in: * lib/egg/egg-editable-toolbar.h: * lib/ephy-prefs.h: * src/bookmarks/Makefile.am: * src/bookmarks/ephy-bookmark-properties.c: (update_checkbox), (update_window_title), (toolbar_checkbox_changed_cb), (set_window_icon), (build_ui): * src/bookmarks/ephy-bookmarks.h: * src/ephy-window.c: (add_widget), (ephy_window_init), (save_window_chrome), (ephy_window_finalize), (translate_default_chrome), (update_layout_toggles), (ephy_window_set_chrome): * src/window-commands.c: (window_cmd_view_bookmarks_toolbar): * src/window-commands.h: First implementation of the new bookmarks toolbar thing. Still doesnt work properly ... old bmk toolbars are still there though. Dave I dont like much the position of the checkbox in properties :/ Maybe a different tab dunno ....
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c46
1 files changed, 29 insertions, 17 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 610356357..433b18288 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -21,6 +21,7 @@
#endif
#include "ephy-window.h"
+#include "ephy-bookmarks-toolbar.h"
#include "ephy-favorites-menu.h"
#include "ephy-state.h"
#include "ephy-gobject-misc.h"
@@ -129,6 +130,9 @@ static EggActionGroupEntry ephy_menu_entries [] = {
{ "ViewToolbar", N_("_Toolbar"), NULL, "<shift><control>T",
N_("Show or hide toolbar"),
G_CALLBACK (window_cmd_view_toolbar), NULL, TOGGLE_ACTION },
+ { "ViewBookmarksToolbar", N_("_Bookmarks Toolbar"), NULL, NULL,
+ N_("Show or hide bookmarks toolbar"),
+ G_CALLBACK (window_cmd_view_bookmarks_toolbar), NULL, TOGGLE_ACTION },
{ "ViewStatusbar", N_("St_atusbar"), NULL, NULL,
N_("Show or hide statusbar"),
G_CALLBACK (window_cmd_view_statusbar), NULL, TOGGLE_ACTION },
@@ -253,10 +257,10 @@ struct EphyWindowPrivate
GtkWidget *menu_dock;
GtkWidget *menubar;
Toolbar *toolbar;
- GList *toolbars;
GtkWidget *statusbar;
EggActionGroup *action_group;
EggActionGroup *popups_action_group;
+ EphyBookmarksToolbar *bmk_toolbar;
EphyFavoritesMenu *fav_menu;
EphyEncodingMenu *enc_menu;
PPViewToolbar *ppview_toolbar;
@@ -390,11 +394,6 @@ add_widget (EggMenuMerge *merge, GtkWidget *widget, EphyWindow *window)
{
window->priv->menubar = widget;
}
- else
- {
- window->priv->toolbars = g_list_append
- (window->priv->toolbars, widget);
- }
gtk_box_pack_start (GTK_BOX (window->priv->menu_dock),
widget, FALSE, FALSE, 0);
@@ -567,11 +566,11 @@ ephy_window_init (EphyWindow *window)
window->priv->chrome_mask = 0;
window->priv->closing = FALSE;
window->priv->ppview_toolbar = NULL;
- window->priv->toolbars = NULL;
/* Setup the window and connect verbs */
setup_window (window);
+ window->priv->bmk_toolbar = ephy_bookmarks_toolbar_new (window);
window->priv->fav_menu = ephy_favorites_menu_new (window);
window->priv->enc_menu = ephy_encoding_menu_new (window);
@@ -613,6 +612,8 @@ save_window_chrome (EphyWindow *window)
}
else
{
+ eel_gconf_set_boolean (CONF_WINDOWS_SHOW_PERSONAL_TOOLBAR,
+ flags & EMBED_CHROME_PERSONALTOOLBARON);
eel_gconf_set_boolean (CONF_WINDOWS_SHOW_TOOLBARS,
flags & EMBED_CHROME_TOOLBARON);
eel_gconf_set_boolean (CONF_WINDOWS_SHOW_STATUSBAR,
@@ -662,11 +663,6 @@ ephy_window_finalize (GObject *object)
g_object_unref (window->priv->ppview_toolbar);
}
- if (window->priv->toolbars)
- {
- g_list_free (window->priv->toolbars);
- }
-
g_object_unref (window->priv->action_group);
egg_menu_merge_remove_action_group (EGG_MENU_MERGE (window->ui_merge),
window->priv->action_group);
@@ -778,8 +774,11 @@ translate_default_chrome (EmbedChromeMask *chrome_mask)
{
*chrome_mask |= EMBED_CHROME_TOOLBARON;
}
+ if (eel_gconf_get_boolean (CONF_WINDOWS_SHOW_PERSONAL_TOOLBAR))
+ {
+ *chrome_mask |= EMBED_CHROME_PERSONALTOOLBARON;
+ }
- *chrome_mask |= EMBED_CHROME_PERSONALTOOLBARON;
*chrome_mask |= EMBED_CHROME_MENUBARON;
}
}
@@ -795,6 +794,10 @@ update_layout_toggles (EphyWindow *window)
egg_toggle_action_set_active (EGG_TOGGLE_ACTION (action),
mask & EMBED_CHROME_TOOLBARON);
+ action = egg_action_group_get_action (action_group, "ViewBookmarksToolbar");
+ egg_toggle_action_set_active (EGG_TOGGLE_ACTION (action),
+ mask & EMBED_CHROME_PERSONALTOOLBARON);
+
action = egg_action_group_get_action (action_group, "ViewStatusbar");
egg_toggle_action_set_active (EGG_TOGGLE_ACTION (action),
mask & EMBED_CHROME_STATUSBARON);
@@ -822,15 +825,24 @@ ephy_window_set_chrome (EphyWindow *window,
gtk_widget_hide (window->priv->menubar);
}
+ if (flags & EMBED_CHROME_PERSONALTOOLBARON)
+ {
+ ephy_bookmarks_toolbar_show (window->priv->bmk_toolbar);
+ }
+ else
+ {
+ ephy_bookmarks_toolbar_hide (window->priv->bmk_toolbar);
+ }
+
if (flags & EMBED_CHROME_TOOLBARON)
{
- g_list_foreach (window->priv->toolbars,
- (GFunc)gtk_widget_show, NULL);
+ egg_editable_toolbar_show
+ (EGG_EDITABLE_TOOLBAR (window->priv->toolbar));
}
else
{
- g_list_foreach (window->priv->toolbars,
- (GFunc)gtk_widget_hide, NULL);
+ egg_editable_toolbar_hide
+ (EGG_EDITABLE_TOOLBAR (window->priv->toolbar));
}
if (flags & EMBED_CHROME_STATUSBARON)