diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-09-01 02:09:43 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-09-01 02:09:43 +0800 |
commit | 3d58425833b6950f57fbc7578081f76befd17c14 (patch) | |
tree | 6519448fe32147329dc7fcecf2ad2af7c9afd03f | |
parent | 9d4c55cd61f4ab24e6c153a2fe5749d17b462ddf (diff) | |
download | gsoc2013-epiphany-3d58425833b6950f57fbc7578081f76befd17c14.tar gsoc2013-epiphany-3d58425833b6950f57fbc7578081f76befd17c14.tar.gz gsoc2013-epiphany-3d58425833b6950f57fbc7578081f76befd17c14.tar.bz2 gsoc2013-epiphany-3d58425833b6950f57fbc7578081f76befd17c14.tar.lz gsoc2013-epiphany-3d58425833b6950f57fbc7578081f76befd17c14.tar.xz gsoc2013-epiphany-3d58425833b6950f57fbc7578081f76befd17c14.tar.zst gsoc2013-epiphany-3d58425833b6950f57fbc7578081f76befd17c14.zip |
Fix problems with EphyNodeView, bookmarks and history dialogs and update
2003-08-31 Marco Pesenti Gritti <marco@gnome.org>
* data/ui/epiphany-history-window-ui.xml.in:
* data/ui/epiphany-ui.xml.in:
* lib/widgets/ephy-node-view.c: (get_selection):
* src/bookmarks/ephy-bookmarks-editor.c: (add_widget),
(ephy_bookmarks_editor_construct):
* src/bookmarks/ephy-bookmarks-menu.c: (add_bookmarks_menu),
(ephy_bookmarks_menu_rebuild):
* src/ephy-encoding-menu.c: (build_group), (build_encoding),
(ephy_encoding_menu_rebuild):
* src/ephy-favorites-menu.c: (ephy_favorites_menu_rebuild):
* src/ephy-history-window.c: (add_widget),
(ephy_history_window_construct):
* src/ephy-tabs-menu.c: (ephy_tabs_menu_clean),
(ephy_tabs_menu_update):
* src/ephy-window.c: (setup_window), (ephy_window_init):
Fix problems with EphyNodeView, bookmarks and history
dialogs and update dynamic menus to the new xml format.
-rw-r--r-- | ChangeLog | 21 | ||||
-rw-r--r-- | data/ui/epiphany-history-window-ui.xml.in | 4 | ||||
-rw-r--r-- | data/ui/epiphany-ui.xml.in | 14 | ||||
-rw-r--r-- | lib/widgets/ephy-node-view.c | 2 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmarks-menu.c | 14 | ||||
-rw-r--r-- | src/ephy-encoding-menu.c | 12 | ||||
-rw-r--r-- | src/ephy-favorites-menu.c | 6 | ||||
-rw-r--r-- | src/ephy-history-window.c | 24 | ||||
-rw-r--r-- | src/ephy-tabs-menu.c | 7 |
9 files changed, 63 insertions, 41 deletions
@@ -1,5 +1,26 @@ 2003-08-31 Marco Pesenti Gritti <marco@gnome.org> + * data/ui/epiphany-history-window-ui.xml.in: + * data/ui/epiphany-ui.xml.in: + * lib/widgets/ephy-node-view.c: (get_selection): + * src/bookmarks/ephy-bookmarks-editor.c: (add_widget), + (ephy_bookmarks_editor_construct): + * src/bookmarks/ephy-bookmarks-menu.c: (add_bookmarks_menu), + (ephy_bookmarks_menu_rebuild): + * src/ephy-encoding-menu.c: (build_group), (build_encoding), + (ephy_encoding_menu_rebuild): + * src/ephy-favorites-menu.c: (ephy_favorites_menu_rebuild): + * src/ephy-history-window.c: (add_widget), + (ephy_history_window_construct): + * src/ephy-tabs-menu.c: (ephy_tabs_menu_clean), + (ephy_tabs_menu_update): + * src/ephy-window.c: (setup_window), (ephy_window_init): + + Fix problems with EphyNodeView, bookmarks and history + dialogs and update dynamic menus to the new xml format. + +2003-08-31 Marco Pesenti Gritti <marco@gnome.org> + * src/ephy-window.c: (add_widget), (update_chromes_visibility), (setup_window), (show_embed_popup): * src/toolbar.c: (toolbar_setup_actions): diff --git a/data/ui/epiphany-history-window-ui.xml.in b/data/ui/epiphany-history-window-ui.xml.in index 8344e1d2e..3e5c80dd8 100644 --- a/data/ui/epiphany-history-window-ui.xml.in +++ b/data/ui/epiphany-history-window-ui.xml.in @@ -27,7 +27,9 @@ </menu> -<popup name="EphyHistoryWindowPopup" action="PopupMenu"> +</menubar> + +<popup name="EphyHistoryWindowPopup" action="PopupAction"> <menuitem name="OpenInWindowHST" action="OpenInWindow"/> <menuitem name="OpenInTabHST" action="OpenInTab"/> <separator name="HistoryPopupSep1"/> diff --git a/data/ui/epiphany-ui.xml.in b/data/ui/epiphany-ui.xml.in index 6193a299d..9e820d1fe 100644 --- a/data/ui/epiphany-ui.xml.in +++ b/data/ui/epiphany-ui.xml.in @@ -82,15 +82,15 @@ </menu> </menubar> -<popup name="EphyInputPopup" action="PopupMenu"> +<popup name="EphyInputPopup" action="PopupAction"> <menuitem name="EditCutIP" action="EditCut"/> <menuitem name="EditCopyIP" action="EditCopy"/> <menuitem name="EditPasteIP" action="EditPaste"/> </popup> -<popup name="EphyTextPopup" action="PopupMenu"> +<popup name="EphyTextPopup" action="PopupAction"> <menuitem name="EditCopyTP" action="EditCopy"/> </popup> -<popup name="EphyDocumentPopup" action="PopupMenu"> +<popup name="EphyDocumentPopup" action="PopupAction"> <menuitem name="GoBackDP" action="GoBack"/> <menuitem name="GoForwardDP" action="GoForward"/> <menuitem name="GoReloadDP" action="ViewReload"/> @@ -102,7 +102,7 @@ <menuitem name="BookmarkPageDP" action="ContextBookmarkPage"/> </popup> -<popup name="EphyFramedDocumentPopup" action="PopupMenu"> +<popup name="EphyFramedDocumentPopup" action="PopupAction"> <menuitem name="GoBackFDP" action="GoBack"/> <menuitem name="GoForwardFDP" action="GoForward"/> <menuitem name="GoReloadFDP" action="ViewReload"/> @@ -118,7 +118,7 @@ <menuitem name="OpenFrameInNewTabFDP" action="OpenFrameInNewTab"/> </popup> -<popup name="EphyLinkPopup" action="PopupMenu"> +<popup name="EphyLinkPopup" action="PopupAction"> <menuitem name="OpenLinkLP" action="OpenLink"/> <menuitem name="OpenLinkInNewWindowLP" action="OpenLinkInNewWindow"/> <menuitem name="OpenLinkInNewTabLP" action="OpenLinkInNewTab"/> @@ -128,7 +128,7 @@ <menuitem name="CopyLinkAddressLP" action="CopyLinkAddress"/> </popup> -<popup name="EphyImagePopup" action="PopupMenu"> +<popup name="EphyImagePopup" action="PopupAction"> <menuitem name="OpenImageIP" action="OpenImage"/> <menuitem name="OpenImageInNewWindowIP" action="OpenImageInNewWindow"/> <menuitem name="OpenImageInNewTabIP" action="OpenImageInNewTab"/> @@ -138,7 +138,7 @@ <menuitem name="CopyImageLocationIP" action="CopyImageLocation"/> </popup> -<popup name="EphyImageLinkPopup" action="PopupMenu"> +<popup name="EphyImageLinkPopup" action="PopupAction"> <menuitem name="OpenLinkILP" action="OpenLink"/> <menuitem name="OpenLinkInNewWindowILP" action="OpenLinkInNewWindow"/> <menuitem name="OpenLinkInNewTabILP" action="OpenLinkInNewTab"/> diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c index 19af1961a..9677d8384 100644 --- a/lib/widgets/ephy-node-view.c +++ b/lib/widgets/ephy-node-view.c @@ -1320,7 +1320,7 @@ get_selection (GtkTreeModel *model, gpointer *data) { GList **list = data[0]; - EphyNodeView *view = EPHY_NODE_VIEW (data); + EphyNodeView *view = EPHY_NODE_VIEW (data[1]); EphyNode *node; node = get_node_from_path (view, path); diff --git a/src/bookmarks/ephy-bookmarks-menu.c b/src/bookmarks/ephy-bookmarks-menu.c index b34056ac6..f2d4a73c4 100644 --- a/src/bookmarks/ephy-bookmarks-menu.c +++ b/src/bookmarks/ephy-bookmarks-menu.c @@ -193,7 +193,7 @@ add_bookmarks_menu (EphyBookmarksMenu *menu, EphyNode *node, GString *xml) g_string_append (xml, "<menuitem name=\""); g_string_append (xml, EMPTY_ACTION_NAME"Menu"); g_string_append (xml, "Menu"); - g_string_append (xml, "\" verb=\""); + g_string_append (xml, "\" action=\""); g_string_append (xml, EMPTY_ACTION_NAME); g_string_append (xml, "\"/>\n"); } @@ -230,7 +230,7 @@ add_bookmarks_menu (EphyBookmarksMenu *menu, EphyNode *node, GString *xml) g_string_append (xml, "<menuitem name=\""); g_string_append (xml, verb); g_string_append (xml, "Menu"); - g_string_append (xml, "\" verb=\""); + g_string_append (xml, "\" action=\""); g_string_append (xml, verb); g_string_append (xml, "\"/>\n"); @@ -267,7 +267,7 @@ ephy_bookmarks_menu_rebuild (EphyBookmarksMenu *menu) children = ephy_node_get_children (topics); xml = g_string_new (NULL); - g_string_append (xml, "<Root><menu><submenu name=\"BookmarksMenu\">" + g_string_append (xml, "<ui><menubar><menu name=\"BookmarksMenu\">" "<placeholder name=\"BookmarksTree\">" "<separator name=\"BookmarksSep1\"/>"); @@ -320,16 +320,16 @@ ephy_bookmarks_menu_rebuild (EphyBookmarksMenu *menu) gtk_action_group_add_action (p->action_group, action); g_object_unref (action); - g_string_append (xml, "<submenu name=\""); + g_string_append (xml, "<menu name=\""); g_string_append (xml, verb); g_string_append (xml, "Menu"); - g_string_append (xml, "\" verb=\""); + g_string_append (xml, "\" action=\""); g_string_append (xml, verb); g_string_append (xml, "\">\n"); add_bookmarks_menu (menu, child, xml); - g_string_append (xml, "</submenu>"); + g_string_append (xml, "</menu>"); g_free (verb); } @@ -339,7 +339,7 @@ ephy_bookmarks_menu_rebuild (EphyBookmarksMenu *menu) add_bookmarks_menu (menu, not_categorized, xml); } - g_string_append (xml, "</placeholder></submenu></menu></Root>"); + g_string_append (xml, "</placeholder></menu></menubar></ui>"); if (children->len > 0) { diff --git a/src/ephy-encoding-menu.c b/src/ephy-encoding-menu.c index 6e44952d6..d9769e87b 100644 --- a/src/ephy-encoding-menu.c +++ b/src/ephy-encoding-menu.c @@ -223,7 +223,7 @@ build_group (GtkActionGroup *action_group, gtk_action_group_add_action (action_group, action); g_object_unref (action); - tmp = g_strdup_printf ("<submenu name=\"%sItem\" verb=\"%s\">\n", + tmp = g_strdup_printf ("<menu name=\"%sItem\" action=\"%s\">\n", verb, verb); xml_string = g_string_append (xml_string, tmp); g_free (tmp); @@ -252,7 +252,7 @@ build_encoding (EphyEncodingMenu *menu, gtk_action_group_add_action (action_group, action); g_object_unref (action); - tmp = g_strdup_printf ("<menuitem name=\"%sItem\" verb=\"%s\"/>\n", + tmp = g_strdup_printf ("<menuitem name=\"%sItem\" action=\"%s\"/>\n", verb, verb); xml_string = g_string_append (xml_string, tmp); @@ -279,9 +279,9 @@ ephy_encoding_menu_rebuild (EphyEncodingMenu *wrhm) ephy_embed_single_get_language_groups (single, &groups); xml = g_string_new (NULL); - g_string_append (xml, "<Root><menu><submenu name=\"ViewMenu\">" + g_string_append (xml, "<ui><menubar><menu name=\"ViewMenu\">" "<placeholder name=\"ViewEncodingsPlaceholder\">" - "<submenu name=\"ViewEncodingMenu\" verb=\"ViewEncoding\">"); + "<menu name=\"ViewEncodingMenu\" action=\"ViewEncoding\">"); p->action_group = gtk_action_group_new ("EncodingActions"); gtk_ui_manager_insert_action_group (merge, p->action_group, 0); @@ -305,13 +305,13 @@ ephy_encoding_menu_rebuild (EphyEncodingMenu *wrhm) g_list_foreach (encodings, (GFunc) encoding_info_free, NULL); g_list_free (encodings); - g_string_append (xml, "</submenu>"); + g_string_append (xml, "</menu>"); } g_list_foreach (groups, (GFunc) language_group_info_free, NULL); g_list_free (groups); - g_string_append (xml, "</submenu></placeholder></submenu></menu></Root>"); + g_string_append (xml, "</menu></placeholder></menu></menubar></ui>"); gtk_ui_manager_add_ui_from_string (merge, xml->str, -1, NULL); diff --git a/src/ephy-favorites-menu.c b/src/ephy-favorites-menu.c index 91e28e4b9..60e477b6f 100644 --- a/src/ephy-favorites-menu.c +++ b/src/ephy-favorites-menu.c @@ -126,7 +126,7 @@ ephy_favorites_menu_rebuild (EphyFavoritesMenu *wrhm) children = ephy_node_get_children (fav); xml = g_string_new (NULL); - g_string_append (xml, "<Root><menu><submenu name=\"GoMenu\">" + g_string_append (xml, "<ui><menubar><menu name=\"GoMenu\">" "<placeholder name=\"GoFavorites\">" "<separator name=\"GoSep3\"/>"); @@ -153,7 +153,7 @@ ephy_favorites_menu_rebuild (EphyFavoritesMenu *wrhm) g_string_append (xml, "<menuitem name=\""); g_string_append (xml, verb); g_string_append (xml, "Menu"); - g_string_append (xml, "\" verb=\""); + g_string_append (xml, "\" action=\""); g_string_append (xml, verb); g_string_append (xml, "\"/>\n"); @@ -161,7 +161,7 @@ ephy_favorites_menu_rebuild (EphyFavoritesMenu *wrhm) } ephy_node_thaw (fav); - g_string_append (xml, "</placeholder></submenu></menu></Root>"); + g_string_append (xml, "</placeholder></menu></menubar></ui>"); if (children->len > 0) { diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c index 26a2cdf43..f5b26c74e 100644 --- a/src/ephy-history-window.c +++ b/src/ephy-history-window.c @@ -104,7 +104,7 @@ struct EphyHistoryWindowPrivate GtkWidget *pages_view; EphyNodeFilter *pages_filter; GtkWidget *search_entry; - GtkWidget *menu_dock; + GtkWidget *main_vbox; GtkWidget *window; GtkUIManager *ui_merge; GtkActionGroup *action_group; @@ -125,6 +125,7 @@ static GtkActionEntry ephy_history_ui_entries [] = { { "Edit", NULL, N_("_Edit") }, { "View", NULL, N_("_View") }, { "Help", NULL, N_("_Help") }, + { "PopupAction", NULL, "" }, /* File Menu */ { "OpenInWindow", GTK_STOCK_OPEN, N_("_Open in New Window"), "<control>O", @@ -890,7 +891,7 @@ build_search_box (EphyHistoryWindow *editor) static void add_widget (GtkUIManager *merge, GtkWidget *widget, EphyHistoryWindow *editor) { - gtk_box_pack_start (GTK_BOX (editor->priv->menu_dock), + gtk_box_pack_start (GTK_BOX (editor->priv->main_vbox), widget, FALSE, FALSE, 0); gtk_widget_show (widget); } @@ -943,7 +944,6 @@ ephy_history_window_construct (EphyHistoryWindow *editor) EphyNode *node; GtkUIManager *ui_merge; GtkActionGroup *action_group; - GtkAction *action; GdkPixbuf *icon; int col_id; @@ -958,12 +958,14 @@ ephy_history_window_construct (EphyHistoryWindow *editor) g_signal_connect (editor, "delete_event", G_CALLBACK (delete_event_cb), NULL); - editor->priv->menu_dock = gtk_vbox_new (FALSE, 0); - gtk_widget_show (editor->priv->menu_dock); - gtk_container_add (GTK_CONTAINER (editor), editor->priv->menu_dock); + editor->priv->main_vbox = gtk_vbox_new (FALSE, 0); + gtk_widget_show (editor->priv->main_vbox); + gtk_container_add (GTK_CONTAINER (editor), editor->priv->main_vbox); ui_merge = gtk_ui_manager_new (); g_signal_connect (ui_merge, "add_widget", G_CALLBACK (add_widget), editor); + gtk_window_add_accel_group (GTK_WINDOW (editor), + gtk_ui_manager_get_accel_group (ui_merge)); action_group = gtk_action_group_new ("PopupActions"); gtk_action_group_add_actions (action_group, ephy_history_ui_entries, ephy_history_ui_n_entries, editor); @@ -972,19 +974,17 @@ ephy_history_window_construct (EphyHistoryWindow *editor) gtk_ui_manager_add_ui_from_file (ui_merge, ephy_file ("epiphany-history-window-ui.xml"), NULL); - gtk_window_add_accel_group (GTK_WINDOW (editor), - gtk_ui_manager_get_accel_group (ui_merge)); - /* FIXME gtk_ui_manager_ensure_update (ui_merge);*/ editor->priv->ui_merge = ui_merge; editor->priv->action_group = action_group; /* Fixme: We should implement gconf prefs for monitoring this setting */ - action = gtk_action_group_get_action (action_group, "ViewTitle"); - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE); +/* action = gtk_action_group_get_action (action_group, "ViewTitle"); + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE);*/ hpaned = gtk_hpaned_new (); gtk_container_set_border_width (GTK_CONTAINER (hpaned), 0); - gtk_container_add (GTK_CONTAINER (editor->priv->menu_dock), hpaned); + gtk_box_pack_end (GTK_BOX (editor->priv->main_vbox), hpaned, + TRUE, TRUE, 0); gtk_widget_show (hpaned); g_assert (editor->priv->history); diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c index a7c9a265f..b294a20e0 100644 --- a/src/ephy-tabs-menu.c +++ b/src/ephy-tabs-menu.c @@ -167,7 +167,6 @@ ephy_tabs_menu_clean (EphyTabsMenu *menu) if (p->ui_id > 0) { gtk_ui_manager_remove_ui (merge, p->ui_id); -/* FIXME gtk_ui_manager_ensure_update (merge); */ p->ui_id = 0; } @@ -279,7 +278,7 @@ ephy_tabs_menu_update (EphyTabsMenu *menu) /* it's faster to preallocate, MIN is sanity check */ xml = g_string_sized_new (44 * MIN (num, 64) + 105); - g_string_append (xml, "<Root><menu><submenu name=\"TabsMenu\">" + g_string_append (xml, "<ui><menubar><menu name=\"TabsMenu\">" "<placeholder name=\"TabsOpen\">"); for (l = tabs; l != NULL; l = l->next) @@ -296,7 +295,7 @@ ephy_tabs_menu_update (EphyTabsMenu *menu) g_string_append (xml, "<menuitem name=\""); g_string_append (xml, action_name); - g_string_append (xml, "Menu\" verb=\""); + g_string_append (xml, "Menu\" action=\""); g_string_append (xml, action_name); g_string_append (xml, "\"/>\n"); @@ -305,7 +304,7 @@ ephy_tabs_menu_update (EphyTabsMenu *menu) g_list_free (tabs); - g_string_append (xml, "</placeholder></submenu></menu></Root>"); + g_string_append (xml, "</placeholder></menu></menubar></ui>"); gtk_ui_manager_insert_action_group (merge, p->action_group, 0); p->ui_id = gtk_ui_manager_add_ui_from_string |