[devhelp/wip/swilmet/misc-improvements] sidebar: use GDK_EVENT_STOP and GDK_EVENT_PROPAGATE
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp/wip/swilmet/misc-improvements] sidebar: use GDK_EVENT_STOP and GDK_EVENT_PROPAGATE
- Date: Mon, 25 May 2015 16:20:05 +0000 (UTC)
commit c4678380ac4f3de2dbc49ebceb8e9e5793c0b628
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon May 25 17:53:22 2015 +0200
sidebar: use GDK_EVENT_STOP and GDK_EVENT_PROPAGATE
It's more meaningful than TRUE and FALSE.
src/dh-sidebar.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/dh-sidebar.c b/src/dh-sidebar.c
index caab7c4..e08d822 100644
--- a/src/dh-sidebar.c
+++ b/src/dh-sidebar.c
@@ -204,7 +204,7 @@ sidebar_tree_button_press_cb (GtkTreeView *view,
gtk_tree_view_get_path_at_pos (view, event->x, event->y, &path,
NULL, NULL, NULL);
if (!path)
- return FALSE;
+ return GDK_EVENT_PROPAGATE;
gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path);
gtk_tree_path_free (path);
@@ -218,10 +218,10 @@ sidebar_tree_button_press_cb (GtkTreeView *view,
g_signal_emit (sidebar, signals[LINK_SELECTED], 0, link);
- /* Always return FALSE so the tree view gets the event and can update
+ /* Always propagate the event so the tree view can update
* the selection etc.
*/
- return FALSE;
+ return GDK_EVENT_PROPAGATE;
}
static gboolean
@@ -238,7 +238,8 @@ sidebar_entry_key_press_event_cb (GtkEntry *entry,
gtk_editable_set_position (GTK_EDITABLE (entry), -1);
gtk_editable_select_region (GTK_EDITABLE (entry), -1, -1);
}
- return TRUE;
+
+ return GDK_EVENT_STOP;
}
if (event->keyval == GDK_KEY_Return ||
@@ -263,11 +264,11 @@ sidebar_entry_key_press_event_cb (GtkEntry *entry,
g_signal_emit (sidebar, signals[LINK_SELECTED], 0, link);
- return TRUE;
+ return GDK_EVENT_STOP;
}
}
- return FALSE;
+ return GDK_EVENT_PROPAGATE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]