aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-navigation-action.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-10-05 22:51:04 +0800
committerChristian Persch <chpe@src.gnome.org>2004-10-05 22:51:04 +0800
commit4a908fdf31de0e6af305beac5eb95e3f471fefdd (patch)
tree5b8cf4f93795ed06e000c89782dcfc24eef3a195 /src/ephy-navigation-action.c
parent3d7629fc67819da501b38ad3a85cf1f616e5d27b (diff)
downloadgsoc2013-epiphany-4a908fdf31de0e6af305beac5eb95e3f471fefdd.tar
gsoc2013-epiphany-4a908fdf31de0e6af305beac5eb95e3f471fefdd.tar.gz
gsoc2013-epiphany-4a908fdf31de0e6af305beac5eb95e3f471fefdd.tar.bz2
gsoc2013-epiphany-4a908fdf31de0e6af305beac5eb95e3f471fefdd.tar.lz
gsoc2013-epiphany-4a908fdf31de0e6af305beac5eb95e3f471fefdd.tar.xz
gsoc2013-epiphany-4a908fdf31de0e6af305beac5eb95e3f471fefdd.tar.zst
gsoc2013-epiphany-4a908fdf31de0e6af305beac5eb95e3f471fefdd.zip
R lib/egg/eggdropdowntoolbutton.c: R lib/egg/eggdropdowntoolbutton.h:
2004-10-05 Christian Persch <chpe@cvs.gnome.org> * configure.ac: * lib/egg/Makefile.am: R lib/egg/eggdropdowntoolbutton.c: R lib/egg/eggdropdowntoolbutton.h: * src/ephy-navigation-action.c: (menu_activated_cb), (connect_proxy), (ephy_navigation_action_class_init): Port to GtkMenuToolButton.
Diffstat (limited to 'src/ephy-navigation-action.c')
-rw-r--r--src/ephy-navigation-action.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c
index b186d3caa..8c1588621 100644
--- a/src/ephy-navigation-action.c
+++ b/src/ephy-navigation-action.c
@@ -28,7 +28,6 @@
#include "ephy-favicon-cache.h"
#include "ephy-history.h"
#include "ephy-embed-shell.h"
-#include "eggdropdowntoolbutton.h"
#include "ephy-debug.h"
#include <gtk/gtkimage.h>
@@ -36,6 +35,7 @@
#include <gtk/gtkimagemenuitem.h>
#include <gtk/gtkmenushell.h>
#include <gtk/gtkmenu.h>
+#include <gtk/gtkmenutoolbutton.h>
#define NTH_DATA_KEY "GoNTh"
#define URL_DATA_KEY "GoURL"
@@ -267,7 +267,7 @@ build_up_menu (EphyNavigationAction *action)
}
static void
-menu_activated_cb (EggDropdownToolButton *button,
+menu_activated_cb (GtkMenuToolButton *button,
EphyNavigationAction *action)
{
GtkMenuShell *menu = NULL;
@@ -288,7 +288,7 @@ menu_activated_cb (EggDropdownToolButton *button,
break;
}
- egg_dropdown_tool_button_set_menu (button, menu);
+ gtk_menu_tool_button_set_menu (button, menu);
}
static void
@@ -296,9 +296,15 @@ connect_proxy (GtkAction *action, GtkWidget *proxy)
{
LOG ("Connect navigation action proxy")
- if (EGG_IS_DROPDOWN_TOOL_BUTTON (proxy))
+ if (GTK_IS_MENU_TOOL_BUTTON (proxy))
{
- g_signal_connect (proxy, "menu-activated",
+ GtkWidget *menu;
+
+ /* set dummy menu so the arrow gets sensitive */
+ menu = gtk_menu_new ();
+ gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (proxy), menu);
+
+ g_signal_connect (proxy, "show-menu",
G_CALLBACK (menu_activated_cb), action);
}
@@ -364,7 +370,7 @@ ephy_navigation_action_class_init (EphyNavigationActionClass *class)
parent_class = g_type_class_peek_parent (class);
- action_class->toolbar_item_type = EGG_TYPE_DROPDOWN_TOOL_BUTTON;
+ action_class->toolbar_item_type = GTK_TYPE_MENU_TOOL_BUTTON;
action_class->connect_proxy = connect_proxy;
g_object_class_install_property (object_class,