[gtksourceview] Completion: remove block_count struct field
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Completion: remove block_count struct field
- Date: Fri, 15 Feb 2013 23:35:22 +0000 (UTC)
commit 44c9fc371ac6d114850714566d67420d70d13c4f
Author: SÃbastien Wilmet <swilmet gnome org>
Date: Fri Feb 15 23:37:19 2013 +0100
Completion: remove block_count struct field
It is already handled by g_signal_handler_block/unblock().
gtksourceview/gtksourcecompletion.c | 27 ++++-----------------------
1 files changed, 4 insertions(+), 23 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index cf1bce1..4c49f71 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -202,8 +202,6 @@ struct _GtkSourceCompletionPrivate
GList *auto_completion_selection;
GtkSourceCompletionContext *auto_completion_context;
- gint block_count;
-
/*************
* Properties
*************/
@@ -290,33 +288,16 @@ static void
completion_begin_block (GtkSourceCompletion *completion,
GtkSourceBuffer *buffer)
{
- if (completion->priv->block_count == 0)
- {
- g_signal_handler_block (buffer,
- completion->priv->signals_ids[TEXT_BUFFER_INSERT_TEXT]);
- g_signal_handler_block (buffer,
- completion->priv->signals_ids[TEXT_BUFFER_DELETE_RANGE]);
- }
-
- ++completion->priv->block_count;
+ g_signal_handler_block (buffer, completion->priv->signals_ids[TEXT_BUFFER_INSERT_TEXT]);
+ g_signal_handler_block (buffer, completion->priv->signals_ids[TEXT_BUFFER_DELETE_RANGE]);
}
static void
completion_end_block (GtkSourceCompletion *completion,
GtkSourceBuffer *buffer)
{
- if (completion->priv->block_count == 0)
- {
- return;
- }
-
- if (--completion->priv->block_count == 0)
- {
- g_signal_handler_unblock (buffer,
- completion->priv->signals_ids[TEXT_BUFFER_INSERT_TEXT]);
- g_signal_handler_unblock (buffer,
- completion->priv->signals_ids[TEXT_BUFFER_DELETE_RANGE]);
- }
+ g_signal_handler_unblock (buffer, completion->priv->signals_ids[TEXT_BUFFER_INSERT_TEXT]);
+ g_signal_handler_unblock (buffer, completion->priv->signals_ids[TEXT_BUFFER_DELETE_RANGE]);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]