summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-06-02 03:16:03 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-06-02 03:16:03 +0000
commitd5f3cb140955ee9b95c1cbdcebe90ca321c3b18a (patch)
tree12c85df90fa1c371e59df54202d825121b82f082 /gtk
parent018511c3aa10a7f53a787734bcdceb420bebc9d1 (diff)
downloadgtk+-d5f3cb140955ee9b95c1cbdcebe90ca321c3b18a.tar.gz
Rename function parameters from index to index_ to prevent clash with BSD
Tue Jun 1 23:14:46 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtktoolbar.h: * gtk/gtktoolbar.c: * gtk/gtkentrycompletion.h: * gtk/gtkentrycompletion.c: * gtk/gtkcombobox.h: * gtk/gtkcombobox.c: Rename function parameters from index to index_ to prevent clash with BSD index(). (#143001)
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcombobox.c14
-rw-r--r--gtk/gtkcombobox.h2
-rw-r--r--gtk/gtkentrycompletion.c26
-rw-r--r--gtk/gtkentrycompletion.h8
-rw-r--r--gtk/gtktoolbar.c23
-rw-r--r--gtk/gtktoolbar.h2
6 files changed, 38 insertions, 37 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index cf0288bbf6..08d32ef962 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1948,13 +1948,13 @@ gtk_combo_box_menu_destroy (GtkComboBox *combo_box)
static void
gtk_combo_box_item_get_size (GtkComboBox *combo_box,
- gint index,
+ gint index_,
gint *cols,
gint *rows)
{
GtkTreeIter iter;
- gtk_tree_model_iter_nth_child (combo_box->priv->model, &iter, NULL, index);
+ gtk_tree_model_iter_nth_child (combo_box->priv->model, &iter, NULL, index_);
if (cols)
{
@@ -3372,7 +3372,7 @@ gtk_combo_box_get_active (GtkComboBox *combo_box)
/**
* gtk_combo_box_set_active:
* @combo_box: A #GtkComboBox.
- * @index: An index in the model passed during construction, or -1 to have
+ * @index_: An index in the model passed during construction, or -1 to have
* no active item.
*
* Sets the active item of @combo_box to be the item at @index.
@@ -3381,16 +3381,16 @@ gtk_combo_box_get_active (GtkComboBox *combo_box)
*/
void
gtk_combo_box_set_active (GtkComboBox *combo_box,
- gint index)
+ gint index_)
{
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
/* -1 means "no item selected" */
- g_return_if_fail (index >= -1);
+ g_return_if_fail (index_ >= -1);
- if (combo_box->priv->active_item == index)
+ if (combo_box->priv->active_item == index_)
return;
- gtk_combo_box_set_active_internal (combo_box, index);
+ gtk_combo_box_set_active_internal (combo_box, index_);
}
static void
diff --git a/gtk/gtkcombobox.h b/gtk/gtkcombobox.h
index ce7cc18877..7ecccbfd74 100644
--- a/gtk/gtkcombobox.h
+++ b/gtk/gtkcombobox.h
@@ -83,7 +83,7 @@ void gtk_combo_box_set_add_tearoffs (GtkComboBox *combo_box,
/* get/set active item */
gint gtk_combo_box_get_active (GtkComboBox *combo_box);
void gtk_combo_box_set_active (GtkComboBox *combo_box,
- gint index);
+ gint index_);
gboolean gtk_combo_box_get_active_iter (GtkComboBox *combo_box,
GtkTreeIter *iter);
void gtk_combo_box_set_active_iter (GtkComboBox *combo_box,
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index 70fbb4af1b..4747cb3a81 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -972,10 +972,10 @@ gtk_entry_completion_insert_action (GtkEntryCompletion *completion,
/**
* gtk_entry_completion_insert_action_text:
* @completion: A #GtkEntryCompletion.
- * @index: The index of the item to insert.
+ * @index_: The index of the item to insert.
* @text: Text of the item to insert.
*
- * Inserts an action in @completion's action item list at position @index
+ * Inserts an action in @completion's action item list at position @index_
* with text @text. If you want the action item to have markup, use
* gtk_entry_completion_insert_action_markup().
*
@@ -983,57 +983,57 @@ gtk_entry_completion_insert_action (GtkEntryCompletion *completion,
*/
void
gtk_entry_completion_insert_action_text (GtkEntryCompletion *completion,
- gint index,
+ gint index_,
const gchar *text)
{
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
g_return_if_fail (text != NULL);
- gtk_entry_completion_insert_action (completion, index, text, FALSE);
+ gtk_entry_completion_insert_action (completion, index_, text, FALSE);
}
/**
* gtk_entry_completion_insert_action_markup:
* @completion: A #GtkEntryCompletion.
- * @index: The index of the item to insert.
+ * @index_: The index of the item to insert.
* @markup: Markup of the item to insert.
*
- * Inserts an action in @completion's action item list at position @index
+ * Inserts an action in @completion's action item list at position @index_
* with markup @markup.
*
* Since: 2.4
*/
void
gtk_entry_completion_insert_action_markup (GtkEntryCompletion *completion,
- gint index,
+ gint index_,
const gchar *markup)
{
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
g_return_if_fail (markup != NULL);
- gtk_entry_completion_insert_action (completion, index, markup, TRUE);
+ gtk_entry_completion_insert_action (completion, index_, markup, TRUE);
}
/**
* gtk_entry_completion_delete_action:
* @completion: A #GtkEntryCompletion.
- * @index: The index of the item to Delete.
+ * @index_: The index of the item to Delete.
*
- * Deletes the action at @index from @completion's action list.
+ * Deletes the action at @index_ from @completion's action list.
*
* Since: 2.4
*/
void
gtk_entry_completion_delete_action (GtkEntryCompletion *completion,
- gint index)
+ gint index_)
{
GtkTreeIter iter;
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
- g_return_if_fail (index >= 0);
+ g_return_if_fail (index_ >= 0);
gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (completion->priv->actions),
- &iter, NULL, index);
+ &iter, NULL, index_);
gtk_list_store_remove (completion->priv->actions, &iter);
}
diff --git a/gtk/gtkentrycompletion.h b/gtk/gtkentrycompletion.h
index 1a3cacf499..5bdcc4c1ca 100644
--- a/gtk/gtkentrycompletion.h
+++ b/gtk/gtkentrycompletion.h
@@ -62,7 +62,7 @@ struct _GtkEntryCompletionClass
GtkTreeModel *model,
GtkTreeIter *iter);
void (* action_activated) (GtkEntryCompletion *completion,
- gint index);
+ gint index_);
/* Padding for future expansion */
void (*_gtk_reserved0) (void);
@@ -91,13 +91,13 @@ gint gtk_entry_completion_get_minimum_key_length (GtkEntryComplet
void gtk_entry_completion_complete (GtkEntryCompletion *completion);
void gtk_entry_completion_insert_action_text (GtkEntryCompletion *completion,
- gint index,
+ gint index_,
const gchar *text);
void gtk_entry_completion_insert_action_markup (GtkEntryCompletion *completion,
- gint index,
+ gint index_,
const gchar *markup);
void gtk_entry_completion_delete_action (GtkEntryCompletion *completion,
- gint index);
+ gint index_);
/* convenience */
void gtk_entry_completion_set_text_column (GtkEntryCompletion *completion,
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 6bc61aa413..82bd8e9860 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -2013,11 +2013,12 @@ logical_to_physical (GtkToolbar *toolbar,
* gtk_toolbar_set_drop_highlight_item:
* @toolbar: a #GtkToolbar
* @tool_item: a #GtkToolItem, or %NULL to turn of highlighting
- * @index: a position on @toolbar
+ * @index_: a position on @toolbar
*
* Highlights @toolbar to give an idea of what it would look like
- * if @item was added to @toolbar at position indicated by @index. If @item
- * is %NULL, highlighting is turned off. In that case @index is ignored.
+ * if @item was added to @toolbar at the position indicated by @index_.
+ * If @item is %NULL, highlighting is turned off. In that case @index_
+ * is ignored.
*
* The @tool_item passed to this function must not be part of any widget
* hierarchy. When an item is set as drop highlight item it can not
@@ -2029,7 +2030,7 @@ logical_to_physical (GtkToolbar *toolbar,
void
gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
GtkToolItem *tool_item,
- gint index)
+ gint index_)
{
ToolbarContent *content;
GtkToolbarPrivate *priv;
@@ -2060,8 +2061,8 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
}
n_items = gtk_toolbar_get_n_items (toolbar);
- if (index < 0 || index > n_items)
- index = n_items;
+ if (index_ < 0 || index_ > n_items)
+ index_ = n_items;
if (tool_item != priv->highlight_tool_item)
{
@@ -2077,15 +2078,15 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
GTK_WIDGET (toolbar));
}
- index = logical_to_physical (toolbar, index);
+ index_ = logical_to_physical (toolbar, index_);
- content = g_list_nth_data (priv->content, index);
+ content = g_list_nth_data (priv->content, index_);
- if (index > 0)
+ if (index_ > 0)
{
ToolbarContent *prev_content;
- prev_content = g_list_nth_data (priv->content, index - 1);
+ prev_content = g_list_nth_data (priv->content, index_ - 1);
if (prev_content && toolbar_content_is_placeholder (prev_content))
content = prev_content;
@@ -2099,7 +2100,7 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
content = toolbar_content_new_tool_item (toolbar,
GTK_TOOL_ITEM (placeholder),
- TRUE, index);
+ TRUE, index_);
gtk_widget_show (placeholder);
}
diff --git a/gtk/gtktoolbar.h b/gtk/gtktoolbar.h
index 1bf6ee9d6f..3b005bb930 100644
--- a/gtk/gtktoolbar.h
+++ b/gtk/gtktoolbar.h
@@ -162,7 +162,7 @@ gint gtk_toolbar_get_drop_index (GtkToolbar *toolbar,
gint y);
void gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
GtkToolItem *tool_item,
- gint index);
+ gint index_);
/* internal functions */
gchar * _gtk_toolbar_elide_underscores (const gchar *original);