diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-04-25 23:23:09 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-04-25 23:23:09 +0800 |
commit | 7fcf1690b730892033993c1001c08666448f90b1 (patch) | |
tree | e1080fc2e0b87abacd9fee7aec64d377ab525bdf /src/window-commands.c | |
parent | 33a47e1d4cc08edd1006d3bfd85b7a15d350119d (diff) | |
download | gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.tar gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.tar.gz gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.tar.bz2 gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.tar.lz gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.tar.xz gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.tar.zst gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.zip |
Get back toolbar editing functionalities. More work on the bookmarks
2003-04-25 Marco Pesenti Gritti <marco@it.gnome.org>
* data/ui/epiphany-toolbar.xml.in:
* data/ui/epiphany-ui.xml.in:
* lib/egg/egg-editable-toolbar.c: (egg_editable_toolbar_hide),
(egg_editable_toolbar_set_drag_dest):
* lib/egg/egg-editable-toolbar.h:
* src/bookmarks/ephy-topic-action.c: (create_tool_item):
* src/ephy-shell.c: (save_toolbars), (ephy_shell_finalize),
(ephy_shell_get_toolbars_model):
* src/ephy-toolbars-model.c: (impl_add_item),
(ephy_toolbars_model_class_init):
* src/ephy-toolbars-model.h:
* src/ephy-window.c: (ephy_window_set_chrome):
* src/toolbar.c: (ensure_bookmark_action), (toolbar_ensure_action),
(action_added_cb), (init_bookmarks_toolbar), (toolbar_set_window),
(toolbar_new), (toolbar_set_visibility):
* src/toolbar.h:
* src/window-commands.c: (toolbar_editor_destroy_cb),
(window_cmd_edit_toolbar):
Get back toolbar editing functionalities.
More work on the bookmarks toolbars implementation.
The toolbars context menus are regressed but it's not my fault :/
The signal on EggToolbar is borked.
Diffstat (limited to 'src/window-commands.c')
-rw-r--r-- | src/window-commands.c | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/src/window-commands.c b/src/window-commands.c index 28c2f725b..8e128e775 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -36,7 +36,10 @@ #include "ephy-new-bookmark.h" #include "egg-toggle-action.h" #include "egg-editable-toolbar.h" +#include "egg-toolbar-editor.h" +#include "ephy-file-helpers.h" #include "toolbar.h" +#include "ephy-state.h" #include <string.h> #include <libgnomevfs/gnome-vfs-uri.h> @@ -638,19 +641,41 @@ window_cmd_edit_prefs (EggAction *action, gtk_widget_show (GTK_WIDGET(dialog)); } +static void +toolbar_editor_destroy_cb (GtkWidget *tbe, + Toolbar *t) +{ + egg_editable_toolbar_set_edit_mode (EGG_EDITABLE_TOOLBAR (t), FALSE); +} + void window_cmd_edit_toolbar (EggAction *action, EphyWindow *window) { - Toolbar *toolbar; + GtkWidget *editor; + EphyToolbarsModel *model; + Toolbar *t; - toolbar = ephy_window_get_toolbar (window); -/* - egg_editable_toolbar_edit (EGG_EDITABLE_TOOLBAR (toolbar), - GTK_WIDGET (window));*/ + model = ephy_shell_get_toolbars_model (ephy_shell); + t = ephy_window_get_toolbar (window); + + editor = egg_toolbar_editor_new + (EGG_MENU_MERGE (window->ui_merge), + EGG_TOOLBARS_MODEL (model)); + ephy_state_add_window (editor, + "toolbar_editor", + 500, 330); + g_signal_connect (editor, "destroy", + G_CALLBACK (toolbar_editor_destroy_cb), + t); + egg_toolbar_editor_load_actions (EGG_TOOLBAR_EDITOR (editor), + ephy_file ("epiphany-toolbar.xml")); + gtk_widget_show (editor); + + egg_editable_toolbar_set_edit_mode (EGG_EDITABLE_TOOLBAR (t), TRUE); } -void +void window_cmd_help_contents (EggAction *action, EphyWindow *window) { |