[gtksourceview/wip/completion-model: 6/19] Completion: remove begin/end delete signals



commit 3f791eb29dcb9afc1fe4a3aae57689a302bad9b1
Author: SÃbastien Wilmet <swilmet gnome org>
Date:   Sun Jan 20 21:18:33 2013 +0100

    Completion: remove begin/end delete signals
    
    It was for performances reasons with the previous model implementation.

 gtksourceview/gtksourcecompletion.c      |   47 ------------------------------
 gtksourceview/gtksourcecompletionmodel.c |   24 ---------------
 gtksourceview/gtksourcecompletionmodel.h |    2 -
 3 files changed, 0 insertions(+), 73 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index be58f14..aa846a7 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -2911,43 +2911,6 @@ info_button_style_updated (GtkWidget           *button,
 }
 
 static void
-on_begin_delete (GtkSourceCompletionModel *model,
-                 GtkSourceCompletion      *completion)
-{
-	GtkTreeSelection *selection;
-
-	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (completion->priv->tree_view_proposals));
-
-	g_signal_handlers_block_by_func (completion->priv->model_proposals,
-	                                 G_CALLBACK (on_row_deleted_cb),
-	                                 completion);
-
-	g_signal_handlers_block_by_func (selection,
-	                                 G_CALLBACK (selection_changed_cb),
-	                                 completion);
-}
-
-static void
-on_end_delete (GtkSourceCompletionModel *model,
-                 GtkSourceCompletion      *completion)
-{
-	GtkTreeSelection *selection;
-
-	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (completion->priv->tree_view_proposals));
-
-	g_signal_handlers_unblock_by_func (completion->priv->model_proposals,
-	                                   G_CALLBACK (on_row_deleted_cb),
-	                                   completion);
-
-	g_signal_handlers_unblock_by_func (selection,
-	                                   G_CALLBACK (selection_changed_cb),
-	                                   completion);
-
-	check_first_selected (completion);
-}
-
-
-static void
 initialize_ui (GtkSourceCompletion *completion)
 {
 	GtkBuilder *builder;
@@ -3053,16 +3016,6 @@ initialize_ui (GtkSourceCompletion *completion)
 	                        G_CALLBACK (on_row_deleted_cb),
 	                        completion);
 
-	g_signal_connect_after (completion->priv->model_proposals,
-	                        "begin-delete",
-	                        G_CALLBACK (on_begin_delete),
-	                        completion);
-
-	g_signal_connect_after (completion->priv->model_proposals,
-	                        "end-delete",
-	                        G_CALLBACK (on_end_delete),
-	                        completion);
-
 	g_signal_connect (completion->priv->model_proposals,
 	                  "providers-changed",
 	                  G_CALLBACK (on_providers_changed),
diff --git a/gtksourceview/gtksourcecompletionmodel.c b/gtksourceview/gtksourcecompletionmodel.c
index 1f0ca43..be570a4 100644
--- a/gtksourceview/gtksourcecompletionmodel.c
+++ b/gtksourceview/gtksourcecompletionmodel.c
@@ -70,8 +70,6 @@ struct _GtkSourceCompletionModelPrivate
 enum
 {
 	PROVIDERS_CHANGED,
-	BEGIN_DELETE,
-	END_DELETE,
 	NUM_SIGNALS
 };
 
@@ -713,28 +711,6 @@ gtk_source_completion_model_class_init (GtkSourceCompletionModelClass *klass)
 		              G_TYPE_NONE,
 		              0);
 
-	signals[BEGIN_DELETE] =
-		g_signal_new ("begin-delete",
-		              G_TYPE_FROM_CLASS (klass),
-		              G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-		              G_STRUCT_OFFSET (GtkSourceCompletionModelClass, begin_delete),
-		              NULL,
-		              NULL,
-		              g_cclosure_marshal_VOID__VOID,
-		              G_TYPE_NONE,
-		              0);
-
-	signals[END_DELETE] =
-		g_signal_new ("end-delete",
-		              G_TYPE_FROM_CLASS (klass),
-		              G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-		              G_STRUCT_OFFSET (GtkSourceCompletionModelClass, end_delete),
-		              NULL,
-		              NULL,
-		              g_cclosure_marshal_VOID__VOID,
-		              G_TYPE_NONE,
-		              0);
-
 	g_type_class_add_private (object_class, sizeof(GtkSourceCompletionModelPrivate));
 }
 
diff --git a/gtksourceview/gtksourcecompletionmodel.h b/gtksourceview/gtksourcecompletionmodel.h
index 9a19f11..3c1b34d 100644
--- a/gtksourceview/gtksourcecompletionmodel.h
+++ b/gtksourceview/gtksourcecompletionmodel.h
@@ -49,8 +49,6 @@ struct _GtkSourceCompletionModelClass {
 	GObjectClass parent_class;
 
 	void (*providers_changed) 	(GtkSourceCompletionModel *model);
-	void (*begin_delete)		(GtkSourceCompletionModel *model);
-	void (*end_delete)		(GtkSourceCompletionModel *model);
 };
 
 enum



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]