[anjuta] sourceview: Implement "cancelled" signal for IAnjutaEditorAssist



commit 4f594c08021f85684a18e818a16c0610af306326
Author: Johannes Schmid <jhs gnome org>
Date:   Sun Aug 8 12:13:56 2010 +0200

    sourceview: Implement "cancelled" signal for IAnjutaEditorAssist

 plugins/sourceview/sourceview-provider.c |    3 +++
 plugins/sourceview/sourceview.c          |    3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/plugins/sourceview/sourceview-provider.c b/plugins/sourceview/sourceview-provider.c
index 9a398b8..67a4ac9 100644
--- a/plugins/sourceview/sourceview-provider.c
+++ b/plugins/sourceview/sourceview-provider.c
@@ -36,6 +36,9 @@ static void
 on_context_cancelled (GtkSourceCompletionContext* context, SourceviewProvider* provider)
 {
 	g_signal_handlers_disconnect_by_func (context, on_context_cancelled, provider);
+
+	g_signal_emit_by_name (provider->sv, "cancelled");
+	
 	provider->cancelled = TRUE;
 	provider->context = NULL;
 }
diff --git a/plugins/sourceview/sourceview.c b/plugins/sourceview/sourceview.c
index ef771f9..e396d40 100644
--- a/plugins/sourceview/sourceview.c
+++ b/plugins/sourceview/sourceview.c
@@ -2186,8 +2186,7 @@ iassist_proposals(IAnjutaEditorAssist* iassist,
 		prov = SOURCEVIEW_PROVIDER(node->data);
 		if (prov->iprov == provider)
 		{
-			if (prov->cancelled)
-				break;
+			g_return_if_fail (!prov->cancelled);
 
 			GList* prop;
 			GList* items = NULL;



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