aboutsummaryrefslogtreecommitdiffstats
path: root/src/ppview-toolbar.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/ppview-toolbar.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/ppview-toolbar.c')
-rwxr-xr-xsrc/ppview-toolbar.c44
1 files changed, 19 insertions, 25 deletions
diff --git a/src/ppview-toolbar.c b/src/ppview-toolbar.c
index 76978414b..ec4e72d6d 100755
--- a/src/ppview-toolbar.c
+++ b/src/ppview-toolbar.c
@@ -25,12 +25,12 @@
#include "ephy-bonobo-extensions.h"
#include "ephy-string.h"
#include "ephy-gui.h"
-#include "egg-menu-merge.h"
#include <string.h>
#include <bonobo/bonobo-i18n.h>
#include <gtk/gtkentry.h>
#include <gtk/gtkmenu.h>
+#include <gtk/gtkuimanager.h>
static void ppview_toolbar_class_init (PPViewToolbarClass *klass);
static void ppview_toolbar_init (PPViewToolbar *t);
@@ -85,27 +85,27 @@ static void
toolbar_cmd_ppv_close (GtkUIManager *merge,
PPViewToolbar *t);
-static GtkActionGroupEntry entries [] = {
- { "PPVGotoFirst", N_("First"),
- GTK_STOCK_GOTO_FIRST, NULL,
+static GtkActionEntry entries [] = {
+ { "PPVGotoFirst", GTK_STOCK_GOTO_FIRST,
+ N_("First"), NULL,
N_("Go to the first page"),
- (GCallback)toolbar_cmd_ppv_goto_first, NULL },
- { "PPVGotoLast", N_("Last"),
- GTK_STOCK_GOTO_LAST, NULL,
+ (GCallback)toolbar_cmd_ppv_goto_first },
+ { "PPVGotoLast", GTK_STOCK_GOTO_LAST,
+ N_("Last"), NULL,
N_("Go to the last page"),
- (GCallback)toolbar_cmd_ppv_goto_last, NULL },
- { "PPVGoBack", N_("Previous"),
- GTK_STOCK_GO_BACK, NULL,
+ (GCallback)toolbar_cmd_ppv_goto_last },
+ { "PPVGoBack", GTK_STOCK_GO_BACK,
+ N_("Previous"), NULL,
N_("Go to the previous page"),
- (GCallback)toolbar_cmd_ppv_go_back, NULL },
- { "PPVGoForward", N_("Next"),
- GTK_STOCK_GO_FORWARD, NULL,
+ (GCallback)toolbar_cmd_ppv_go_back },
+ { "PPVGoForward", GTK_STOCK_GO_FORWARD,
+ N_("Next"), NULL,
N_("Go to next page"),
- (GCallback)toolbar_cmd_ppv_go_forward, NULL },
- { "PPVClose", N_("Close"),
- GTK_STOCK_CLOSE, NULL,
+ (GCallback)toolbar_cmd_ppv_go_forward },
+ { "PPVClose", GTK_STOCK_CLOSE,
+ N_("Close"), NULL,
N_("Close print preview"),
- (GCallback)toolbar_cmd_ppv_close, NULL },
+ (GCallback)toolbar_cmd_ppv_close },
};
static guint n_entries = G_N_ELEMENTS (entries);
@@ -238,7 +238,8 @@ ppview_toolbar_set_window (PPViewToolbar *t, EphyWindow *window)
t->priv->original_mask = ephy_window_get_chrome (window);
t->priv->action_group = gtk_action_group_new ("PPViewActions");
- gtk_action_group_add_actions (t->priv->action_group, entries, n_entries);
+ gtk_action_group_add_actions (t->priv->action_group, entries,
+ n_entries, t);
gtk_ui_manager_insert_action_group (t->priv->ui_merge,
t->priv->action_group, 0);
t->priv->ui_id = gtk_ui_manager_add_ui_from_string
@@ -250,18 +251,11 @@ ppview_toolbar_set_window (PPViewToolbar *t, EphyWindow *window)
static void
ppview_toolbar_init (PPViewToolbar *t)
{
- int i;
-
t->priv = g_new0 (PPViewToolbarPrivate, 1);
t->priv->window = NULL;
t->priv->ui_merge = NULL;
t->priv->current_page = 1;
-
- for (i = 0; i < n_entries; i++)
- {
- entries[i].user_data = t;
- }
}
static void