aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-history-window.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-08-30 20:34:34 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-08-30 20:34:34 +0800
commit676d6d40cf906f7fd2c626ec21ef66e28c5aa3f0 (patch)
tree5912819b0ffde208dca101c2237342226e7a203c /src/ephy-history-window.c
parenta03cfa7451bad9af112897db73bd7eecc43e2f2c (diff)
downloadgsoc2013-epiphany-676d6d40cf906f7fd2c626ec21ef66e28c5aa3f0.tar
gsoc2013-epiphany-676d6d40cf906f7fd2c626ec21ef66e28c5aa3f0.tar.gz
gsoc2013-epiphany-676d6d40cf906f7fd2c626ec21ef66e28c5aa3f0.tar.bz2
gsoc2013-epiphany-676d6d40cf906f7fd2c626ec21ef66e28c5aa3f0.tar.lz
gsoc2013-epiphany-676d6d40cf906f7fd2c626ec21ef66e28c5aa3f0.tar.xz
gsoc2013-epiphany-676d6d40cf906f7fd2c626ec21ef66e28c5aa3f0.tar.zst
gsoc2013-epiphany-676d6d40cf906f7fd2c626ec21ef66e28c5aa3f0.zip
Complete gtk 2.3 port. It doesnt run here but it could be my env.
2003-08-30 Marco Pesenti Gritti <marco@gnome.org> * src/ephy-encoding-menu.c: (ephy_encoding_menu_verb_cb): * src/ephy-favicon-action.c: (create_tool_item): * src/ephy-favicon-action.h: * src/ephy-favorites-menu.c: (ephy_favorites_menu_clean): * src/ephy-go-action.c: (create_tool_item), (create_menu_proxy_cb): * src/ephy-go-action.h: * src/ephy-history-window.c: (ephy_history_window_construct): * src/ephy-location-action.c: (ephy_location_action_get_widget): * src/ephy-location-action.h: * src/ephy-navigation-action.c: * src/ephy-navigation-action.h: * src/ephy-spinner-action.c: (create_tool_item), (item_parent_set_cb): * src/ephy-spinner-action.h: * src/ephy-tab.c: (ephy_tab_init): * src/ephy-tabs-menu.c: (ephy_tabs_menu_clean), (tab_set_action_accelerator), (ephy_tabs_menu_update): * src/ephy-window.c: (ephy_window_state_event_cb), (setup_window), (update_layout_toggles): * src/popup-commands.c: * src/ppview-toolbar.c: (ppview_toolbar_set_window), (ppview_toolbar_init): * src/toolbar.c: (toolbar_activate_location): * src/window-commands.c: (window_cmd_view_bookmarks_bar), (window_cmd_view_toolbar), (window_cmd_view_statusbar), (window_cmd_view_fullscreen): Complete gtk 2.3 port. It doesnt run here but it could be my env.
Diffstat (limited to 'src/ephy-history-window.c')
-rw-r--r--src/ephy-history-window.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 495d0e2f1..26a2cdf43 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -27,6 +27,9 @@
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkvbox.h>
+#include <gtk/gtkactiongroup.h>
+#include <gtk/gtktoggleaction.h>
+#include <gtk/gtkuimanager.h>
#include <gdk/gdkkeysyms.h>
#include <bonobo/bonobo-i18n.h>
#include <libgnomeui/gnome-stock-icons.h>
@@ -37,9 +40,6 @@
#include "ephy-history-window.h"
#include "ephy-shell.h"
#include "ephy-dnd.h"
-#include "egg-action-group.h"
-#include "egg-toggle-action.h"
-#include "egg-menu-merge.h"
#include "ephy-state.h"
#include "window-commands.h"
#include "ephy-file-helpers.h"
@@ -119,7 +119,7 @@ enum
static GObjectClass *parent_class = NULL;
-static GtkActionGroupEntry ephy_history_ui_entries [] = {
+static GtkActionEntry ephy_history_ui_entries [] = {
/* Toplevel */
{ "File", NULL, N_("_File") },
{ "Edit", NULL, N_("_Edit") },
@@ -141,24 +141,24 @@ static GtkActionGroupEntry ephy_history_ui_entries [] = {
G_CALLBACK (cmd_bookmark_link) },
{ "Close", GTK_STOCK_CLOSE, N_("_Close"), "<control>W",
N_("Close the history window"),
- G_CALLBACK (cmd_close), NULL },
+ G_CALLBACK (cmd_close) },
/* Edit Menu */
{ "Cut", GTK_STOCK_CUT, N_("Cu_t"), "<control>X",
N_("Cut the selection"),
- G_CALLBACK (cmd_cut), NULL },
+ G_CALLBACK (cmd_cut) },
{ "Copy", GTK_STOCK_COPY, N_("_Copy"), "<control>C",
N_("Copy the selection"),
- G_CALLBACK (cmd_copy), NULL },
+ G_CALLBACK (cmd_copy) },
{ "Paste", GTK_STOCK_PASTE, N_("_Paste"), "<control>V",
N_("Paste the clipboard"),
- G_CALLBACK (cmd_paste), NULL },
+ G_CALLBACK (cmd_paste) },
{ "SelectAll", NULL, N_("Select _All"), "<control>A",
N_("Select all history links or text"),
- G_CALLBACK (cmd_select_all), NULL },
+ G_CALLBACK (cmd_select_all) },
{ "Clear", GTK_STOCK_CLEAR, N_("C_lear History"), NULL,
N_("Clear your browsing history"),
- G_CALLBACK (cmd_clear), NULL },
+ G_CALLBACK (cmd_clear) },
/* View Menu */
/* { "ViewTitle", NULL, N_("_Title"), NULL,
@@ -177,7 +177,7 @@ static GtkActionGroupEntry ephy_history_ui_entries [] = {
G_CALLBACK (cmd_help_contents) },
{ "HelpAbout", GNOME_STOCK_ABOUT, N_("_About"), NULL,
N_("Display credits for the web browser creators"),
- G_CALLBACK (window_cmd_help_about), NULL },
+ G_CALLBACK (window_cmd_help_about) },
};
static guint ephy_history_ui_n_entries = G_N_ELEMENTS (ephy_history_ui_entries);
@@ -945,7 +945,7 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
GtkActionGroup *action_group;
GtkAction *action;
GdkPixbuf *icon;
- int i, col_id;
+ int col_id;
gtk_window_set_title (GTK_WINDOW (editor), _("History"));
@@ -958,11 +958,6 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
g_signal_connect (editor, "delete_event",
G_CALLBACK (delete_event_cb), NULL);
- for (i = 0; i < ephy_history_ui_n_entries; i++)
- {
- ephy_history_ui_entries[i].user_data = editor;
- }
-
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);
@@ -971,20 +966,21 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
g_signal_connect (ui_merge, "add_widget", G_CALLBACK (add_widget), editor);
action_group = gtk_action_group_new ("PopupActions");
gtk_action_group_add_actions (action_group, ephy_history_ui_entries,
- ephy_history_ui_n_entries);
+ ephy_history_ui_n_entries, editor);
gtk_ui_manager_insert_action_group (ui_merge,
action_group, 0);
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), ui_merge->accel_group);
- gtk_ui_manager_ensure_update (ui_merge);
+ 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");
- egg_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE);
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE);
hpaned = gtk_hpaned_new ();
gtk_container_set_border_width (GTK_CONTAINER (hpaned), 0);