Skip to content

Commit

Permalink
2009-03-19 Ignacio Casal Quinteiro <nacho.resa@gmail.com>
Browse files Browse the repository at this point in the history
        * gtksourcecompletion/gsc-completion.c:
        Minor style fixes, and added a FIXME.
  • Loading branch information
nacho committed Mar 18, 2009
1 parent aa426a4 commit f141477
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2009-03-19 Ignacio Casal Quinteiro <nacho.resa@gmail.com>

* gtksourcecompletion/gsc-completion.c:
Minor style fixes, and added a FIXME.

2009-03-18 Jesús Barbero Rodríguez <chuchiperriman@gmail.com>

* gtksourcecompletion/gsc-info.c:
Expand Down
38 changes: 21 additions & 17 deletions gtksourcecompletion/gsc-completion.c
Expand Up @@ -351,7 +351,7 @@ selection_changed_cd (GtkTreeSelection *selection,

static GscCompletionPage *
gsc_completion_page_new (GscCompletion *self,
const gchar *tree_name)
const gchar *tree_name)
{
/*Creates the new trees*/
GscCompletionPage *page;
Expand Down Expand Up @@ -470,7 +470,7 @@ switch_page_cb (GtkNotebook *notebook,
return FALSE;
}

void
static void
show_info_cb (GtkWidget *widget,
gpointer user_data)
{
Expand All @@ -481,18 +481,18 @@ show_info_cb (GtkWidget *widget,
_gsc_completion_update_info_pos (self);
self->priv->info_visible = TRUE;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->priv->info_button),
TRUE);
TRUE);
}

void
static void
hide_info_cb (GtkWidget *widget,
gpointer user_data)
{
GscCompletion *self = GSC_COMPLETION (user_data);

self->priv->info_visible = FALSE;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->priv->info_button),
FALSE);
FALSE);
}

static gboolean
Expand Down Expand Up @@ -559,8 +559,8 @@ gsc_completion_realize (GtkWidget *widget)

static gboolean
gsc_completion_delete_event_cb (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
GdkEvent *event,
gpointer user_data)
{
/*Prevent the alt+F4 keys*/
return TRUE;
Expand Down Expand Up @@ -954,7 +954,7 @@ gsc_completion_init (GscCompletion *self)
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (self->priv->notebook), FALSE);
gtk_notebook_set_show_border (GTK_NOTEBOOK (self->priv->notebook),
FALSE);

/* Add default page */
self->priv->active_page = gsc_completion_page_new (self, DEFAULT_PAGE);

Expand Down Expand Up @@ -1211,11 +1211,11 @@ GtkWidget*
gsc_completion_new (GtkTextView *view)
{
GscCompletion *self = GSC_COMPLETION (g_object_new (GSC_TYPE_COMPLETION,
"type", GTK_WINDOW_POPUP,
NULL));
"type", GTK_WINDOW_POPUP,
NULL));
self->priv->view = view;

completion_control_add_completion(view,self);
completion_control_add_completion (view,self);

return GTK_WIDGET (self);
}
Expand Down Expand Up @@ -1495,12 +1495,16 @@ gsc_completion_trigger_event (GscCompletion *self,

g_list_free (final_list);

gint x, y;
gboolean selected = FALSE;
GtkWindow *win;

/*
* FIXME: You are always going to enter here. selected is always FALSE
*/
if (!selected)
{
gint x, y;
GtkWindow *win;

if (!GTK_WIDGET_HAS_FOCUS (self->priv->view))
return FALSE;

Expand Down Expand Up @@ -1580,8 +1584,8 @@ gsc_completion_filter_proposals (GscCompletion *self,
if (gsc_tree_get_num_proposals (GSC_TREE (page->view)) > 0)
{
gsc_tree_filter_visible (GSC_TREE (page->view),
(GscTreeFilterVisibleFunc) func,
user_data);
(GscTreeFilterVisibleFunc) func,
user_data);
}
}

Expand All @@ -1607,7 +1611,7 @@ gsc_completion_set_active (GscCompletion *self,
GscTrigger *trigger;
gint i;

g_return_if_fail (GSC_IS_COMPLETION (self));
g_return_if_fail (GSC_IS_COMPLETION (self));

if (active)
{
Expand Down Expand Up @@ -1762,7 +1766,7 @@ gsc_completion_get_provider (GscCompletion *self,
* gsc_completion_get_from_view:
* @view: The #GtkTextView associated with a #GscCompletion
*
* Returns: The #GscCompletion associated with a @view or NULL.
* Returns: The #GscCompletion associated with a @view or %NULL.
*/
GscCompletion*
gsc_completion_get_from_view(GtkTextView *view)
Expand Down

0 comments on commit f141477

Please sign in to comment.