[gtksourceview/gtksourcecompletion] Renamed gtk_source_completion_proposal_get_action to get_text.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtksourceview/gtksourcecompletion] Renamed gtk_source_completion_proposal_get_action to get_text.
- Date: Sun, 3 May 2009 07:28:53 -0400 (EDT)
commit 33ae023dedc2a70e6c01039550b193929d3e1798
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sun May 3 13:26:14 2009 +0200
Renamed gtk_source_completion_proposal_get_action to get_text.
---
gtksourceview/gtksourcecompletion.c | 6 +-
gtksourceview/gtksourcecompletionitem.c | 55 ++++++++++++++-------------
gtksourceview/gtksourcecompletionproposal.c | 16 ++++----
gtksourceview/gtksourcecompletionproposal.h | 4 +-
4 files changed, 41 insertions(+), 40 deletions(-)
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 0ddf501..3b27897 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -176,7 +176,7 @@ activate_current_proposal (GtkSourceCompletion *completion)
GtkSourceCompletionProposal *proposal = NULL;
GtkSourceCompletionProvider *provider = NULL;
GtkTextBuffer *buffer;
- const gchar *action;
+ const gchar *text;
if (!get_selected_proposal (completion, &iter, &proposal))
{
@@ -197,9 +197,9 @@ activate_current_proposal (GtkSourceCompletion *completion)
if (!activated)
{
- action = gtk_source_completion_proposal_get_action (proposal);
+ text = gtk_source_completion_proposal_get_text (proposal);
gtk_source_completion_utils_replace_current_word (GTK_SOURCE_BUFFER (buffer),
- action ? action : NULL,
+ text ? text : NULL,
-1);
}
diff --git a/gtksourceview/gtksourcecompletionitem.c b/gtksourceview/gtksourcecompletionitem.c
index 9775238..407f587 100644
--- a/gtksourceview/gtksourcecompletionitem.c
+++ b/gtksourceview/gtksourcecompletionitem.c
@@ -31,9 +31,9 @@ struct _GtkSourceCompletionItemPrivate
{
gchar *label;
gchar *markup;
- gchar *action;
+ gchar *text;
gchar *info;
- GdkPixbuf *icon;
+ GdkPixbuf *icon;
};
/* Properties */
@@ -42,7 +42,7 @@ enum
PROP_0,
PROP_LABEL,
PROP_MARKUP,
- PROP_ACTION,
+ PROP_TEXT,
PROP_ICON,
PROP_INFO
};
@@ -68,9 +68,9 @@ gtk_source_completion_proposal_get_markup_impl (GtkSourceCompletionProposal *sel
}
static const gchar *
-gtk_source_completion_proposal_get_action_impl (GtkSourceCompletionProposal *self)
+gtk_source_completion_proposal_get_text_impl (GtkSourceCompletionProposal *self)
{
- return GTK_SOURCE_COMPLETION_ITEM (self)->priv->action;
+ return GTK_SOURCE_COMPLETION_ITEM (self)->priv->text;
}
static GdkPixbuf *
@@ -94,7 +94,7 @@ gtk_source_completion_proposal_iface_init (gpointer g_iface,
/* Interface data getter implementations */
iface->get_label = gtk_source_completion_proposal_get_label_impl;
iface->get_markup = gtk_source_completion_proposal_get_markup_impl;
- iface->get_action = gtk_source_completion_proposal_get_action_impl;
+ iface->get_text = gtk_source_completion_proposal_get_text_impl;
iface->get_icon = gtk_source_completion_proposal_get_icon_impl;
iface->get_info = gtk_source_completion_proposal_get_info_impl;
}
@@ -106,7 +106,7 @@ gtk_source_completion_item_finalize (GObject *object)
g_free (self->priv->label);
g_free (self->priv->markup);
- g_free (self->priv->action);
+ g_free (self->priv->text);
g_free (self->priv->info);
@@ -138,8 +138,8 @@ gtk_source_completion_item_get_property (GObject *object,
case PROP_MARKUP:
g_value_set_string (value, self->priv->markup);
break;
- case PROP_ACTION:
- g_value_set_string (value, self->priv->action);
+ case PROP_TEXT:
+ g_value_set_string (value, self->priv->text);
break;
case PROP_INFO:
g_value_set_string (value, self->priv->info);
@@ -185,9 +185,9 @@ gtk_source_completion_item_set_property (GObject *object,
emit_changed (self);
break;
- case PROP_ACTION:
- g_free (self->priv->action);
- self->priv->action = g_value_dup_string (value);
+ case PROP_TEXT:
+ g_free (self->priv->text);
+ self->priv->text = g_value_dup_string (value);
break;
case PROP_INFO:
g_free (self->priv->info);
@@ -246,15 +246,15 @@ gtk_source_completion_item_class_init (GtkSourceCompletionItemClass *klass)
G_PARAM_READWRITE));
/**
- * GtkSourceCompletionItem:action:
+ * GtkSourceCompletionItem:text:
*
- * Proposal action.
+ * Proposal text.
*/
g_object_class_install_property (object_class,
- PROP_ACTION,
- g_param_spec_string ("action",
- _("Action"),
- _("Item action"),
+ PROP_TEXT,
+ g_param_spec_string ("text",
+ _("Text"),
+ _("Item text"),
NULL,
G_PARAM_READWRITE));
@@ -296,7 +296,7 @@ gtk_source_completion_item_init (GtkSourceCompletionItem *self)
/**
* gtk_source_completion_item_new:
* @label: The item label
- * @action: The item action
+ * @text: The item text
* @icon: The item icon
* @info: The item extra information
*
@@ -309,13 +309,13 @@ gtk_source_completion_item_init (GtkSourceCompletionItem *self)
*/
GtkSourceCompletionItem *
gtk_source_completion_item_new (const gchar *label,
- const gchar *action,
+ const gchar *text,
GdkPixbuf *icon,
const gchar *info)
{
return g_object_new (GTK_TYPE_SOURCE_COMPLETION_ITEM,
"label", label,
- "action", action,
+ "text", text,
"icon", icon,
"info", info,
NULL);
@@ -324,7 +324,7 @@ gtk_source_completion_item_new (const gchar *label,
/**
* gtk_source_completion_item_new_with_markup:
* @markup: The item markup label
- * @action: The item action
+ * @text: The item text
* @icon: The item icon
* @info: The item extra information
*
@@ -337,13 +337,13 @@ gtk_source_completion_item_new (const gchar *label,
*/
GtkSourceCompletionItem *
gtk_source_completion_item_new_with_markup (const gchar *markup,
- const gchar *action,
+ const gchar *text,
GdkPixbuf *icon,
const gchar *info)
{
return g_object_new (GTK_TYPE_SOURCE_COMPLETION_ITEM,
"markup", markup,
- "action", action,
+ "text", text,
"icon", icon,
"info", info,
NULL);
@@ -352,6 +352,7 @@ gtk_source_completion_item_new_with_markup (const gchar *markup,
/**
* gtk_source_completion_item_new_from_stock:
* @label: The item label
+ * @text: The item text
* @stock: The stock icon
* @info: The item extra information
*
@@ -363,7 +364,7 @@ gtk_source_completion_item_new_with_markup (const gchar *markup,
*/
GtkSourceCompletionItem *
gtk_source_completion_item_new_from_stock (const gchar *label,
- const gchar *action,
+ const gchar *text,
const gchar *stock,
const gchar *info)
{
@@ -396,12 +397,12 @@ gtk_source_completion_item_new_from_stock (const gchar *label,
icon = NULL;
}
- item = gtk_source_completion_item_new (label, action, icon, info);
+ item = gtk_source_completion_item_new (label, text, icon, info);
if (icon != NULL)
{
g_object_unref (icon);
}
- return item;
+ return item;
}
diff --git a/gtksourceview/gtksourcecompletionproposal.c b/gtksourceview/gtksourcecompletionproposal.c
index 65edd0c..fd1352e 100644
--- a/gtksourceview/gtksourcecompletionproposal.c
+++ b/gtksourceview/gtksourcecompletionproposal.c
@@ -57,7 +57,7 @@ gtk_source_completion_proposal_get_markup_default (GtkSourceCompletionProposal *
}
static const gchar *
-gtk_source_completion_proposal_get_action_default (GtkSourceCompletionProposal *proposal)
+gtk_source_completion_proposal_get_text_default (GtkSourceCompletionProposal *proposal)
{
return NULL;
}
@@ -81,7 +81,7 @@ gtk_source_completion_proposal_init (GtkSourceCompletionProposalIface *iface)
iface->get_label = gtk_source_completion_proposal_get_label_default;
iface->get_markup = gtk_source_completion_proposal_get_markup_default;
- iface->get_action = gtk_source_completion_proposal_get_action_default;
+ iface->get_text = gtk_source_completion_proposal_get_text_default;
iface->get_icon = gtk_source_completion_proposal_get_icon_default;
iface->get_info = gtk_source_completion_proposal_get_info_default;
@@ -176,21 +176,21 @@ gtk_source_completion_proposal_get_markup (GtkSourceCompletionProposal *proposal
}
/**
- * gtk_source_completion_proposal_get_action:
+ * gtk_source_completion_proposal_get_text:
* @proposal: A #GtkSourceCompletionProposal
*
- * Gets the action of @proposal. The action is the text that is inserted into
+ * Gets the text of @proposal. The text that is inserted into
* the text buffer when the proposal is activated by the default activation.
* You are free to implement a custom activation handler in the provider and
* not implement this function.
*
- * Returns: The action of @proposal.
+ * Returns: The text of @proposal.
*/
const gchar *
-gtk_source_completion_proposal_get_action (GtkSourceCompletionProposal *proposal)
+gtk_source_completion_proposal_get_text (GtkSourceCompletionProposal *proposal)
{
- g_return_val_if_fail (GTK_IS_SOURCE_COMPLETION_PROPOSAL (proposal), NULL);
- return GTK_SOURCE_COMPLETION_PROPOSAL_GET_INTERFACE (proposal)->get_action (proposal);
+ g_return_val_if_fail (GTK_IS_SOURCE_COMPLETION_PROPOSAL (proposal), NULL);
+ return GTK_SOURCE_COMPLETION_PROPOSAL_GET_INTERFACE (proposal)->get_text (proposal);
}
/**
diff --git a/gtksourceview/gtksourcecompletionproposal.h b/gtksourceview/gtksourcecompletionproposal.h
index e2fd6b9..abb147a 100644
--- a/gtksourceview/gtksourcecompletionproposal.h
+++ b/gtksourceview/gtksourcecompletionproposal.h
@@ -44,7 +44,7 @@ struct _GtkSourceCompletionProposalIface
/* Interface functions */
const gchar *(*get_label) (GtkSourceCompletionProposal *proposal);
const gchar *(*get_markup) (GtkSourceCompletionProposal *proposal);
- const gchar *(*get_action) (GtkSourceCompletionProposal *proposal);
+ const gchar *(*get_text) (GtkSourceCompletionProposal *proposal);
GdkPixbuf *(*get_icon) (GtkSourceCompletionProposal *proposal);
const gchar *(*get_info) (GtkSourceCompletionProposal *proposal);
@@ -57,7 +57,7 @@ GType gtk_source_completion_proposal_get_type (void) G_GNUC_CONST;
const gchar *gtk_source_completion_proposal_get_label (GtkSourceCompletionProposal *proposal);
const gchar *gtk_source_completion_proposal_get_markup (GtkSourceCompletionProposal *proposal);
-const gchar *gtk_source_completion_proposal_get_action (GtkSourceCompletionProposal *proposal);
+const gchar *gtk_source_completion_proposal_get_text (GtkSourceCompletionProposal *proposal);
GdkPixbuf *gtk_source_completion_proposal_get_icon (GtkSourceCompletionProposal *proposal);
const gchar *gtk_source_completion_proposal_get_info (GtkSourceCompletionProposal *proposal);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]