aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-location-action.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-03-09 07:43:31 +0800
committerChristian Persch <chpe@src.gnome.org>2004-03-09 07:43:31 +0800
commit132d798d18efdf386d7e74c505b16941406cbd01 (patch)
treedc17672b2934915a8ba47f50c6fa29a1f8014c28 /src/ephy-location-action.c
parent3cf2d7394d21eb2a65be8e6b269d8754e0157b52 (diff)
downloadgsoc2013-epiphany-132d798d18efdf386d7e74c505b16941406cbd01.tar
gsoc2013-epiphany-132d798d18efdf386d7e74c505b16941406cbd01.tar.gz
gsoc2013-epiphany-132d798d18efdf386d7e74c505b16941406cbd01.tar.bz2
gsoc2013-epiphany-132d798d18efdf386d7e74c505b16941406cbd01.tar.lz
gsoc2013-epiphany-132d798d18efdf386d7e74c505b16941406cbd01.tar.xz
gsoc2013-epiphany-132d798d18efdf386d7e74c505b16941406cbd01.tar.zst
gsoc2013-epiphany-132d798d18efdf386d7e74c505b16941406cbd01.zip
Check if the dragged item is a separator. Fixes crash when it _is_ a
2004-03-09 Christian Persch <chpe@cvs.gnome.org> * lib/egg/egg-toolbar-editor.c: (editor_drag_data_received_cb): Check if the dragged item is a separator. Fixes crash when it _is_ a separator. * lib/egg/egg-toolbars-model.c: (egg_toolbars_model_remove_toolbar): Fix logic check for removable toolbar, & instead of &&. * src/ephy-location-action.c: (create_menu_proxy_cb), (connect_proxy), (ephy_location_action_activate): Don't make a proxy menu item for the location entry. Fixes crash when trying to activate its proxy menu item.
Diffstat (limited to 'src/ephy-location-action.c')
-rw-r--r--src/ephy-location-action.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c
index 06171aaa5..dd2de1431 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -223,6 +223,16 @@ add_completion_actions (GtkAction *action, GtkWidget *proxy)
G_CALLBACK (action_activated_cb), la);
}
+static gboolean
+create_menu_proxy_cb (GtkToolItem *tool_item,
+ GtkAction *action)
+{
+ gtk_tool_item_set_proxy_menu_item
+ (tool_item, "ephy-location-action-menu-item", NULL);
+
+ return TRUE;
+}
+
static void
connect_proxy (GtkAction *action, GtkWidget *proxy)
{
@@ -258,6 +268,15 @@ connect_proxy (GtkAction *action, GtkWidget *proxy)
G_CALLBACK (user_changed_cb), action, 0);
}
+ /* we need to connect to this before chaining up, since gtkaction's
+ * connect_proxy connects a routine there which uses create_menu_item
+ * method to generate a menu proxy (and create_menu_item CANNOT return
+ * NULL. See bug #133446.
+ */
+ g_signal_connect_object (proxy, "create_menu_proxy",
+ G_CALLBACK (create_menu_proxy_cb),
+ action, 0);
+
(* GTK_ACTION_CLASS (parent_class)->connect_proxy) (action, proxy);
}
@@ -328,7 +347,7 @@ ephy_location_action_activate (GtkAction *action)
/* Note: this makes sense only for a single proxy */
proxies = gtk_action_get_proxies (action);
- if (proxies)
+ if (proxies && EPHY_IS_LOCATION_ENTRY (proxies->data))
{
ephy_location_entry_activate (EPHY_LOCATION_ENTRY (proxies->data));
}