From 861ffe47ca91ae1fa7a39c422c6941885d31bb2d Mon Sep 17 00:00:00 2001 From: David Bordoley Date: Mon, 21 Apr 2003 12:36:40 +0000 Subject: Fixed a duplicate seperator. Add a view menu. 2003-04-21 David Bordoley * data/ui/epiphany-bookmark-editor-ui.xml.in: Fixed a duplicate seperator. Add a view menu. * data/ui/epiphany-history-window-ui.xml.in: Add a view menu. * src/ephy-history-window.c: (ephy_history_window_construct): Clean up ephy_history_ui_entries[] so that it is a little more organized. Add a view menu, but still needs to be hooked up. * src/bookmarks/ephy-bookmark-properties.c: (build_ui): s/"Show in the bookmarks _toolbar"/"_Show in the bookmarks toolbar". Fixes a mnemonic collision. * src/bookmarks/ephy-bookmarks-editor.c: (ephy_bookmarks_editor_construct): Clean up ephy_bookmark_popup_entries[] so that it is a little more organized. Add a view menu, but still needs to be hooked up. Add mnemonic to the "_Show in Toolbar" menu entry. --- ChangeLog | 25 +++++++++++++++ data/ui/epiphany-bookmark-editor-ui.xml.in | 7 ++++- data/ui/epiphany-history-window-ui.xml.in | 6 ++++ src/bookmarks/ephy-bookmark-properties.c | 2 +- src/bookmarks/ephy-bookmarks-editor.c | 50 +++++++++++++++++------------- src/ephy-history-window.c | 34 ++++++++++++-------- 6 files changed, 87 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb230c9e1..38b9a76b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2003-04-21 David Bordoley + + * data/ui/epiphany-bookmark-editor-ui.xml.in: + + Fixed a duplicate seperator. Add a view menu. + + * data/ui/epiphany-history-window-ui.xml.in: + + Add a view menu. + + * src/ephy-history-window.c: (ephy_history_window_construct): + + Clean up ephy_history_ui_entries[] so that it is a little more + organized. Add a view menu, but still needs to be hooked up. + + * src/bookmarks/ephy-bookmark-properties.c: (build_ui): + + s/"Show in the bookmarks _toolbar"/"_Show in the bookmarks toolbar". + Fixes a mnemonic collision. + + * src/bookmarks/ephy-bookmarks-editor.c: (ephy_bookmarks_editor_construct): + Clean up ephy_bookmark_popup_entries[] so that it is a little more + organized. Add a view menu, but still needs to be hooked up. Add mnemonic + to the "_Show in Toolbar" menu entry. + 2003-04-20 Marco Pesenti Gritti * src/bookmarks/Makefile.am: diff --git a/data/ui/epiphany-bookmark-editor-ui.xml.in b/data/ui/epiphany-bookmark-editor-ui.xml.in index 3c09396b1..88d4044d9 100644 --- a/data/ui/epiphany-bookmark-editor-ui.xml.in +++ b/data/ui/epiphany-bookmark-editor-ui.xml.in @@ -11,7 +11,6 @@ - @@ -24,6 +23,12 @@ + + + + + + diff --git a/data/ui/epiphany-history-window-ui.xml.in b/data/ui/epiphany-history-window-ui.xml.in index 4e1c81a7f..6fe0a99b0 100644 --- a/data/ui/epiphany-history-window-ui.xml.in +++ b/data/ui/epiphany-history-window-ui.xml.in @@ -20,6 +20,12 @@ + + + + + + diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c index 1de14b433..9d6fde632 100644 --- a/src/bookmarks/ephy-bookmark-properties.c +++ b/src/bookmarks/ephy-bookmark-properties.c @@ -402,7 +402,7 @@ build_ui (EphyBookmarkProperties *editor) gtk_table_attach (GTK_TABLE (table), scrolled_window, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - checkbox = gtk_check_button_new_with_mnemonic (_("Show in the bookmarks _toolbar")); + checkbox = gtk_check_button_new_with_mnemonic (_("_Show in the bookmarks toolbar")); state = ephy_node_get_property_boolean (editor->priv->bookmark, EPHY_NODE_BMK_PROP_SHOW_IN_TOOLBAR); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox), state); diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index fceffc42a..09ddb3bce 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -39,6 +39,7 @@ #include "eel-gconf-extensions.h" #include "ephy-file-helpers.h" #include "egg-action-group.h" +#include "egg-toggle-action.h" #include "egg-menu-merge.h" #include "egg-toggle-action.h" #include "popup-commands.h" @@ -136,51 +137,51 @@ static EggActionGroupEntry ephy_bookmark_popup_entries [] = { /* Toplevel */ { "File", N_("_File"), NULL, NULL, NULL, NULL, NULL }, { "Edit", N_("_Edit"), NULL, NULL, NULL, NULL, NULL }, + { "View", N_("_View"), NULL, NULL, NULL, NULL, NULL }, { "Help", N_("_Help"), NULL, NULL, NULL, NULL, NULL }, { "FakeToplevel", (""), NULL, NULL, NULL, NULL, NULL }, + /* File Menu*/ { "NewTopic", N_("_New Topic"), GTK_STOCK_NEW, "N", NULL, G_CALLBACK (cmd_add_topic), NULL }, - { "OpenInWindow", N_("_Open in New Window"), GTK_STOCK_OPEN, "O", NULL, G_CALLBACK (cmd_open_bookmarks_in_browser), NULL }, - { "OpenInTab", N_("Open in New _Tab"), NULL, "O", NULL, G_CALLBACK (cmd_open_bookmarks_in_tabs), NULL }, - - { "ShowInToolbar", N_("Show in the Toolbar"), NULL, NULL, + { "Rename", N_("_Rename"), NULL, "F2", + NULL, G_CALLBACK (cmd_rename), NULL }, + { "Delete", N_("_Delete"), GTK_STOCK_DELETE, NULL, + NULL, G_CALLBACK (cmd_delete), NULL }, + { "ShowInToolbar", N_("_Show in the Toolbar"), NULL, NULL, NULL, G_CALLBACK (cmd_show_in_the_toolbar), NULL, TOGGLE_ACTION }, + { "Properties", N_("_Properties"), GTK_STOCK_PROPERTIES, "Return", + NULL, G_CALLBACK (cmd_bookmark_properties), NULL }, + { "Close", N_("_Close"), GTK_STOCK_CLOSE, "W", + NULL, G_CALLBACK (cmd_close), NULL }, + /* Edit Menu */ { "Cut", N_("Cu_t"), GTK_STOCK_CUT, "X", NULL, G_CALLBACK (cmd_cut), NULL }, - { "Copy", N_("_Copy"), GTK_STOCK_COPY, "C", NULL, G_CALLBACK (cmd_copy), NULL }, - { "Paste", N_("_Paste"), GTK_STOCK_PASTE, "V", NULL, G_CALLBACK (cmd_paste), NULL }, - { "SelectAll", N_("Select _All"), NULL, "A", NULL, G_CALLBACK (cmd_select_all), NULL }, - - { "Rename", N_("_Rename"), NULL, "F2", - NULL, G_CALLBACK (cmd_rename), NULL }, - - { "Delete", N_("_Delete"), GTK_STOCK_DELETE, NULL, - NULL, G_CALLBACK (cmd_delete), NULL }, - - { "Properties", N_("_Properties"), GTK_STOCK_PROPERTIES, "Return", - NULL, G_CALLBACK (cmd_bookmark_properties), NULL }, - - { "Close", N_("_Close"), GTK_STOCK_CLOSE, "W", - NULL, G_CALLBACK (cmd_close), NULL }, - + + /* View Menu */ + { "ViewTitle", N_("_Title"), NULL, NULL, + NULL, NULL, NULL, RADIO_ACTION, NULL }, + { "ViewLocation", N_("_Location"), NULL, NULL, + NULL, NULL, NULL, RADIO_ACTION, "ViewTitle" }, + { "ViewTitleLocation", N_("T_itle and Location"), NULL, NULL, + NULL, NULL, NULL, RADIO_ACTION, "ViewTitle" }, + + /* Help Menu */ { "HelpContents", N_("_Contents"), GTK_STOCK_HELP, "F1", NULL, G_CALLBACK (cmd_help_contents), NULL }, - { "HelpAbout", N_("_About"), GNOME_STOCK_ABOUT, NULL, NULL, G_CALLBACK (window_cmd_help_about), NULL }, - }; static guint ephy_bookmark_popup_n_entries = G_N_ELEMENTS (ephy_bookmark_popup_entries); @@ -958,6 +959,7 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor) char *selected_id_str; EggMenuMerge *ui_merge; EggActionGroup *action_group; + EggAction *action; const char *icon_path; int i; @@ -1004,6 +1006,10 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor) menu = egg_menu_merge_get_widget (ui_merge, "/menu/EditMenu"); g_signal_connect (menu, "activate", G_CALLBACK (menu_activate_cb), editor); + /* Fixme: We should implement gconf prefs for monitoring this setting */ + action = egg_action_group_get_action (action_group, "ViewTitle"); + egg_toggle_action_set_active (EGG_TOGGLE_ACTION (action), TRUE); + hbox = gtk_hbox_new (FALSE, 6); gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); gtk_container_add (GTK_CONTAINER (editor->priv->menu_dock), hbox); diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c index 1e8fe788d..9836f20a6 100644 --- a/src/ephy-history-window.c +++ b/src/ephy-history-window.c @@ -35,6 +35,7 @@ #include "ephy-dnd.h" #include "ephy-prefs.h" #include "egg-action-group.h" +#include "egg-toggle-action.h" #include "egg-menu-merge.h" #include "ephy-state.h" #include "window-commands.h" @@ -114,45 +115,47 @@ static EggActionGroupEntry ephy_history_ui_entries [] = { /* Toplevel */ { "File", N_("_File"), NULL, NULL, NULL, NULL, NULL }, { "Edit", N_("_Edit"), NULL, NULL, NULL, NULL, NULL }, + { "View", N_("_View"), NULL, NULL, NULL, NULL, NULL }, { "Help", N_("_Help"), NULL, NULL, NULL, NULL, NULL }, { "FakeToplevel", (""), NULL, NULL, NULL, NULL, NULL }, + /* File Menu */ { "OpenInWindow", N_("_Open in New Window"), GTK_STOCK_OPEN, "O", NULL, G_CALLBACK (cmd_open_bookmarks_in_browser), NULL }, - { "OpenInTab", N_("Open in New _Tab"), NULL, "O", NULL, G_CALLBACK (cmd_open_bookmarks_in_tabs), NULL }, - - { "Clear", N_("C_lear History"), GTK_STOCK_CLEAR, NULL, - NULL, G_CALLBACK (cmd_clear), NULL }, - { "Delete", N_("_Delete"), GTK_STOCK_DELETE, NULL, NULL, G_CALLBACK (cmd_delete), NULL}, - { "BookmarkPage", N_("Boo_kmark Page..."), EPHY_STOCK_BOOKMARK_PAGE, "D", NULL, G_CALLBACK (cmd_bookmark_page), NULL }, - { "Close", N_("_Close"), GTK_STOCK_CLOSE, "W", NULL, G_CALLBACK (cmd_close), NULL }, - + + /* Edit Menu */ { "Cut", N_("Cu_t"), GTK_STOCK_CUT, "X", NULL, G_CALLBACK (cmd_cut), NULL }, - { "Copy", N_("_Copy"), GTK_STOCK_COPY, "C", NULL, G_CALLBACK (cmd_copy), NULL }, - { "Paste", N_("_Paste"), GTK_STOCK_PASTE, "V", NULL, G_CALLBACK (cmd_paste), NULL }, - { "SelectAll", N_("Select _All"), NULL, "A", NULL, G_CALLBACK (cmd_select_all), NULL }, + { "Clear", N_("C_lear History"), GTK_STOCK_CLEAR, NULL, + NULL, G_CALLBACK (cmd_clear), NULL }, + + /* View Menu */ + { "ViewTitle", N_("_Title"), NULL, NULL, + NULL, NULL, NULL, RADIO_ACTION, NULL }, + { "ViewLocation", N_("_Location"), NULL, NULL, + NULL, NULL, NULL, RADIO_ACTION, "ViewTitle" }, + { "ViewTitleLocation", N_("T_itle and Location"), NULL, NULL, + NULL, NULL, NULL, RADIO_ACTION, "ViewTitle" }, + /* Help Menu */ { "HelpContents", N_("_Contents"), GTK_STOCK_HELP, "F1", NULL, G_CALLBACK (cmd_help_contents), NULL }, - { "HelpAbout", N_("_About"), GNOME_STOCK_ABOUT, NULL, NULL, G_CALLBACK (window_cmd_help_about), NULL }, - }; static guint ephy_history_ui_n_entries = G_N_ELEMENTS (ephy_history_ui_entries); @@ -745,6 +748,7 @@ ephy_history_window_construct (EphyHistoryWindow *editor) EphyNode *node; EggMenuMerge *ui_merge; EggActionGroup *action_group; + EggAction *action; const char *icon_path; int i; @@ -786,6 +790,10 @@ ephy_history_window_construct (EphyHistoryWindow *editor) menu = egg_menu_merge_get_widget (ui_merge, "/menu/EditMenu"); g_signal_connect (menu, "activate", G_CALLBACK (menu_activate_cb), editor); + /* Fixme: We should implement gconf prefs for monitoring this setting */ + action = egg_action_group_get_action (action_group, "ViewTitle"); + egg_toggle_action_set_active (EGG_TOGGLE_ACTION (action), TRUE); + hpaned = gtk_hpaned_new (); gtk_container_set_border_width (GTK_CONTAINER (hpaned), 6); gtk_container_add (GTK_CONTAINER (editor->priv->menu_dock), hpaned); -- cgit v1.2.3