[devhelp/wip/swilmet/misc-improvements: 3/10] 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: 3/10] sidebar: use GDK_EVENT_STOP and GDK_EVENT_PROPAGATE
- Date: Sat, 30 May 2015 12:35:10 +0000 (UTC)
commit 010359d3e32972d17f38783803ebc8c5bb33a69a
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.
https://bugzilla.gnome.org/show_bug.cgi?id=749797
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 db477e1..f6573c3 100644
--- a/src/dh-sidebar.c
+++ b/src/dh-sidebar.c
@@ -209,7 +209,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);
@@ -223,10 +223,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
@@ -243,7 +243,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 ||
@@ -268,11 +269,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]