<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,8 @@
+2009-02-08  Jes&#250;s Barbero Rodr&#237;guez &lt;chuchiperriman@gmail.com&gt;
+
+	* gtksourcecompletion/gsc-completion.c:
+	Added gsc_completion_get_trigger
+
 2009-02-07  Jes&#250;s Barbero Rodr&#237;guez &lt;chuchiperriman@gmail.com&gt;
 
 	* gtksourcecompletion/gsc-completion.c:</diff>
      <filename>ChangeLog</filename>
    </modified>
    <modified>
      <diff>@@ -15,3 +15,12 @@ New manager TODO
 [ ] Add autoselect feature
 [ ] Create a GscView to show what gtksourceview functions we need and show
     how the new gtksourceview looks.
+
+Tests TODO
+============
+
+[ ] Test with a custom info widget
+[ ] Test enable-disable completion &quot;on-the-fly&quot;
+[ ] Test disconnecting manage-completion-keys and manage it with another function
+[ ] Test completion filters
+[ ] Test add a filter widget to the completion </diff>
      <filename>TODO</filename>
    </modified>
    <modified>
      <diff>@@ -7,5 +7,5 @@ Name: @PACKAGE_NAME@
 Description: Adds completion support to GtkSourceView 
 Version: @PACKAGE_VERSION@
 Requires: gtksourceview-2.0
-Libs: -L${libdir} -lgtksourcecompletion-1.0
-Cflags: -I${includedir}/gtksourcecompletion-1.0
+Libs: -L${libdir} -lgtksourcecompletion-2.0
+Cflags: -I${includedir}/gtksourcecompletion-2.0</diff>
      <filename>gtksourcecompletion-2.0.pc.in</filename>
    </modified>
    <modified>
      <diff>@@ -70,29 +70,29 @@ G_DEFINE_TYPE(GscCompletion, gsc_completion, GTK_TYPE_WINDOW);
  * Gsc in GtkSourceView
  */
 
-static GHashTable *completion_map = NULL;
+static GHashTable *gsccompletion_map = NULL;
 
 static GscCompletion* 
 completion_control_get_completion (GtkTextView *view)
 {
-	if (completion_map == NULL)
-		completion_map = g_hash_table_new (g_direct_hash,
+	if (gsccompletion_map == NULL)
+		gsccompletion_map = g_hash_table_new (g_direct_hash,
 						   g_direct_equal);
 
-	return g_hash_table_lookup (completion_map, view);
+	return g_hash_table_lookup (gsccompletion_map, view);
 }
 
 static void 
 completion_control_add_completion (GtkTextView *view,
 				   GscCompletion *comp)
 {
-	g_hash_table_insert (completion_map, view, comp);
+	g_hash_table_insert (gsccompletion_map, view, comp);
 }
 
 static void 
 completion_control_remove_completion (GtkTextView *view)
 {
-	g_hash_table_remove (completion_map, view);
+	g_hash_table_remove (gsccompletion_map, view);
 }
 /* ********************************************************************* */
 
@@ -563,6 +563,8 @@ gsc_completion_finalize (GObject *object)
 		g_list_free (self-&gt;priv-&gt;prov_trig);
 	}
 	
+	completion_control_remove_completion(self-&gt;priv-&gt;view);
+	
 	g_debug (&quot;completion finalize&quot;);
 	
 	G_OBJECT_CLASS (gsc_completion_parent_class)-&gt;finalize (object);
@@ -1103,6 +1105,9 @@ gsc_completion_new (GtkTextView *view)
 				    &quot;type&quot;, GTK_WINDOW_POPUP,
 				    NULL));
 	self-&gt;priv-&gt;view = view;
+	
+	completion_control_add_completion(view,self);
+	
 	return GTK_WIDGET (self);
 }
 
@@ -1359,6 +1364,7 @@ gsc_completion_trigger_event (GscCompletion *self,
 	{
 		if (GTK_WIDGET_VISIBLE (self))
 			end_completion (self);
+		return FALSE;
 	}
 	
 	data_list = final_list;
@@ -1550,15 +1556,48 @@ gsc_completion_deactivate (GscCompletion *self)
 	self-&gt;priv-&gt;active = FALSE;
 }
 
+/*FIXME Doc*/
 GtkWidget*
 gsc_completion_get_bottom_bar (GscCompletion *self)
 {
 	return self-&gt;priv-&gt;bottom_bar;
 }
+
+/*FIXME Doc*/
 GscInfo*
 gsc_completion_get_info_widget (GscCompletion *self)
 {
 	return GSC_INFO (self-&gt;priv-&gt;info_window);
 }
 
+/*FIXME Doc*/
+GscTrigger*
+gsc_completion_get_trigger (GscCompletion *self,
+			    const gchar *trigger_name)
+{
+
+	GList *l;
+	GscTrigger *trigger;
+	g_return_val_if_fail (GSC_IS_COMPLETION (self), NULL);
+
+	for (l = self-&gt;priv-&gt;triggers; l != NULL; l = g_list_next (l))
+	{
+		trigger =  GSC_TRIGGER (l-&gt;data);
+		
+		if (g_strcmp0 (gsc_trigger_get_name (trigger), trigger_name) == 0)
+			return trigger;
+	}
+	
+	return NULL;
+}
+
+/*FIXME This will be removed*/
+GscCompletion*
+gsc_completion_get_from_view(GtkTextView *view)
+{
+        return completion_control_get_completion(view);
+}
+
+
+
 </diff>
      <filename>gtksourcecompletion/gsc-completion.c</filename>
    </modified>
    <modified>
      <diff>@@ -82,6 +82,9 @@ GtkWidget	*gsc_completion_new			(GtkTextView *view);
 
 GtkTextView	*gsc_completion_get_view		(GscCompletion *self);
 
+GscTrigger	*gsc_completion_get_trigger		(GscCompletion *self,
+							 const gchar *trigger_name);
+
 gboolean	 gsc_completion_register_provider	(GscCompletion *self,
 							 GscProvider *provider,
 							 GscTrigger *trigger);</diff>
      <filename>gtksourcecompletion/gsc-completion.h</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>gtksourcecompletion/gsc-manager.c</filename>
    </removed>
    <removed>
      <filename>gtksourcecompletion/gsc-manager.h</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>65990a39d827e9a78d6a0b345d06b521e9a96a72</id>
    </parent>
  </parents>
  <author>
    <name>Jes&#250;s Barbero Rodr&#237;guez</name>
    <email>chuchiperriman@gmail.com</email>
  </author>
  <url>http://github.com/chuchiperriman/gtksourcecompletion/commit/5e632c3e95c6d8a0c7b05f6ee452653a4e10d9bc</url>
  <id>5e632c3e95c6d8a0c7b05f6ee452653a4e10d9bc</id>
  <committed-date>2009-02-08T10:23:27-08:00</committed-date>
  <authored-date>2009-02-08T10:23:27-08:00</authored-date>
  <message>Added gsc_completion_get_trigger</message>
  <tree>8b651ab7d073ab7a405f796a3615233d1301ad1e</tree>
  <committer>
    <name>Jes&#250;s Barbero Rodr&#237;guez</name>
    <email>chuchiperriman@gmail.com</email>
  </committer>
</commit>
