summaryrefslogtreecommitdiff
path: root/src/caja-information-panel.c
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-11-14 07:30:55 +0200
committerJasmine Hassan <[email protected]>2012-11-14 09:42:33 +0200
commitf9c3a1bd9499c47db2b32a0487ad3c91dbafeea9 (patch)
treebd6143e773b3c56339c0ef0ca9074dc3fb66c1fe /src/caja-information-panel.c
parente96bb83cdc1ed0753d2547463a4e6ec61f41de12 (diff)
downloadcaja-f9c3a1bd9499c47db2b32a0487ad3c91dbafeea9.tar.bz2
caja-f9c3a1bd9499c47db2b32a0487ad3c91dbafeea9.tar.xz
[information-panel] don't use eel_point_in_widget()
nor in sidebar-title. the eel function is deprecated.
Diffstat (limited to 'src/caja-information-panel.c')
-rw-r--r--src/caja-information-panel.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/caja-information-panel.c b/src/caja-information-panel.c
index 8542b527..086faaee 100644
--- a/src/caja-information-panel.c
+++ b/src/caja-information-panel.c
@@ -432,12 +432,24 @@ static InformationPanelPart
hit_test (CajaInformationPanel *information_panel,
int x, int y)
{
+ GtkAllocation *allocation;
+ gboolean bg_hit;
+
if (caja_sidebar_title_hit_test_icon (information_panel->details->title, x, y))
{
return ICON_PART;
}
- if (eel_point_in_widget (GTK_WIDGET (information_panel), x, y))
+ allocation = g_new0 (GtkAllocation, 1);
+ gtk_widget_get_allocation (GTK_WIDGET (information_panel), allocation);
+
+ bg_hit = allocation != NULL
+ && x >= allocation->x && y >= allocation->y
+ && x < allocation->x + allocation->width
+ && y < allocation->y + allocation->height;
+ g_free (allocation);
+
+ if (bg_hit)
{
return BACKGROUND_PART;
}