[epiphany] ephy-removable-pixbuf-renderer: do not emit delete on click if policy is NEVER
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-removable-pixbuf-renderer: do not emit delete on click if policy is NEVER
- Date: Mon, 3 Sep 2012 19:54:57 +0000 (UTC)
commit 51864e36d205e10752753605ca0592f39f000606
Author: Claudio Saavedra <csaavedra igalia com>
Date: Mon Sep 3 22:32:04 2012 +0300
ephy-removable-pixbuf-renderer: do not emit delete on click if policy is NEVER
It makes no sense to emit the delete signal if the delete button is
not rendered at all.
lib/widgets/ephy-removable-pixbuf-renderer.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/lib/widgets/ephy-removable-pixbuf-renderer.c b/lib/widgets/ephy-removable-pixbuf-renderer.c
index 8c113a0..c0199eb 100644
--- a/lib/widgets/ephy-removable-pixbuf-renderer.c
+++ b/lib/widgets/ephy-removable-pixbuf-renderer.c
@@ -119,6 +119,9 @@ ephy_removable_pixbuf_renderer_activate (GtkCellRenderer *cell,
GdkEventButton *ev = (GdkEventButton *) gtk_get_current_event();
EphyRemovablePixbufRendererPrivate *priv = EPHY_REMOVABLE_PIXBUF_RENDERER (cell)->priv;
+ if (priv->policy == EPHY_REMOVABLE_PIXBUF_RENDER_NEVER)
+ return FALSE;
+
get_icon_rectangle (widget, cell, cell_area, priv->close_icon, &icon_area);
if (icon_area.x <= ev->x && ev->x <= icon_area.x + icon_area.width &&
icon_area.y <= ev->y && ev->y <= icon_area.y + icon_area.height) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]