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)
This commit is contained in:
Matthias Clasen 2004-06-02 03:16:03 +00:00 committed by Matthias Clasen
parent 018511c3aa
commit d5f3cb1409
10 changed files with 78 additions and 37 deletions

View File

@ -1,3 +1,13 @@
Tue Jun 1 23:00:20 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)
Tue Jun 1 22:45:42 2004 Matthias Clasen <maclas@gmx.de> Tue Jun 1 22:45:42 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenu.c (get_accel_path): Handle accel_closure being * gtk/gtkmenu.c (get_accel_path): Handle accel_closure being

View File

@ -1,3 +1,13 @@
Tue Jun 1 23:00:20 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)
Tue Jun 1 22:45:42 2004 Matthias Clasen <maclas@gmx.de> Tue Jun 1 22:45:42 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenu.c (get_accel_path): Handle accel_closure being * gtk/gtkmenu.c (get_accel_path): Handle accel_closure being

View File

@ -1,3 +1,13 @@
Tue Jun 1 23:00:20 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)
Tue Jun 1 22:45:42 2004 Matthias Clasen <maclas@gmx.de> Tue Jun 1 22:45:42 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenu.c (get_accel_path): Handle accel_closure being * gtk/gtkmenu.c (get_accel_path): Handle accel_closure being

View File

@ -1,3 +1,13 @@
Tue Jun 1 23:00:20 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)
Tue Jun 1 22:45:42 2004 Matthias Clasen <maclas@gmx.de> Tue Jun 1 22:45:42 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenu.c (get_accel_path): Handle accel_closure being * gtk/gtkmenu.c (get_accel_path): Handle accel_closure being

View File

@ -1948,13 +1948,13 @@ gtk_combo_box_menu_destroy (GtkComboBox *combo_box)
static void static void
gtk_combo_box_item_get_size (GtkComboBox *combo_box, gtk_combo_box_item_get_size (GtkComboBox *combo_box,
gint index, gint index_,
gint *cols, gint *cols,
gint *rows) gint *rows)
{ {
GtkTreeIter iter; 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) if (cols)
{ {
@ -3372,7 +3372,7 @@ gtk_combo_box_get_active (GtkComboBox *combo_box)
/** /**
* gtk_combo_box_set_active: * gtk_combo_box_set_active:
* @combo_box: A #GtkComboBox. * @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. * no active item.
* *
* Sets the active item of @combo_box to be the item at @index. * 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 void
gtk_combo_box_set_active (GtkComboBox *combo_box, gtk_combo_box_set_active (GtkComboBox *combo_box,
gint index) gint index_)
{ {
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box)); g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
/* -1 means "no item selected" */ /* -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; return;
gtk_combo_box_set_active_internal (combo_box, index); gtk_combo_box_set_active_internal (combo_box, index_);
} }
static void static void

View File

@ -83,7 +83,7 @@ void gtk_combo_box_set_add_tearoffs (GtkComboBox *combo_box,
/* get/set active item */ /* get/set active item */
gint gtk_combo_box_get_active (GtkComboBox *combo_box); gint gtk_combo_box_get_active (GtkComboBox *combo_box);
void gtk_combo_box_set_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, gboolean gtk_combo_box_get_active_iter (GtkComboBox *combo_box,
GtkTreeIter *iter); GtkTreeIter *iter);
void gtk_combo_box_set_active_iter (GtkComboBox *combo_box, void gtk_combo_box_set_active_iter (GtkComboBox *combo_box,

View File

@ -972,10 +972,10 @@ gtk_entry_completion_insert_action (GtkEntryCompletion *completion,
/** /**
* gtk_entry_completion_insert_action_text: * gtk_entry_completion_insert_action_text:
* @completion: A #GtkEntryCompletion. * @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. * @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 * with text @text. If you want the action item to have markup, use
* gtk_entry_completion_insert_action_markup(). * gtk_entry_completion_insert_action_markup().
* *
@ -983,57 +983,57 @@ gtk_entry_completion_insert_action (GtkEntryCompletion *completion,
*/ */
void void
gtk_entry_completion_insert_action_text (GtkEntryCompletion *completion, gtk_entry_completion_insert_action_text (GtkEntryCompletion *completion,
gint index, gint index_,
const gchar *text) const gchar *text)
{ {
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion)); g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
g_return_if_fail (text != NULL); 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: * gtk_entry_completion_insert_action_markup:
* @completion: A #GtkEntryCompletion. * @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. * @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. * with markup @markup.
* *
* Since: 2.4 * Since: 2.4
*/ */
void void
gtk_entry_completion_insert_action_markup (GtkEntryCompletion *completion, gtk_entry_completion_insert_action_markup (GtkEntryCompletion *completion,
gint index, gint index_,
const gchar *markup) const gchar *markup)
{ {
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion)); g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
g_return_if_fail (markup != NULL); 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: * gtk_entry_completion_delete_action:
* @completion: A #GtkEntryCompletion. * @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 * Since: 2.4
*/ */
void void
gtk_entry_completion_delete_action (GtkEntryCompletion *completion, gtk_entry_completion_delete_action (GtkEntryCompletion *completion,
gint index) gint index_)
{ {
GtkTreeIter iter; GtkTreeIter iter;
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion)); 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), 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); gtk_list_store_remove (completion->priv->actions, &iter);
} }

View File

@ -62,7 +62,7 @@ struct _GtkEntryCompletionClass
GtkTreeModel *model, GtkTreeModel *model,
GtkTreeIter *iter); GtkTreeIter *iter);
void (* action_activated) (GtkEntryCompletion *completion, void (* action_activated) (GtkEntryCompletion *completion,
gint index); gint index_);
/* Padding for future expansion */ /* Padding for future expansion */
void (*_gtk_reserved0) (void); 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_complete (GtkEntryCompletion *completion);
void gtk_entry_completion_insert_action_text (GtkEntryCompletion *completion, void gtk_entry_completion_insert_action_text (GtkEntryCompletion *completion,
gint index, gint index_,
const gchar *text); const gchar *text);
void gtk_entry_completion_insert_action_markup (GtkEntryCompletion *completion, void gtk_entry_completion_insert_action_markup (GtkEntryCompletion *completion,
gint index, gint index_,
const gchar *markup); const gchar *markup);
void gtk_entry_completion_delete_action (GtkEntryCompletion *completion, void gtk_entry_completion_delete_action (GtkEntryCompletion *completion,
gint index); gint index_);
/* convenience */ /* convenience */
void gtk_entry_completion_set_text_column (GtkEntryCompletion *completion, void gtk_entry_completion_set_text_column (GtkEntryCompletion *completion,

View File

@ -2013,11 +2013,12 @@ logical_to_physical (GtkToolbar *toolbar,
* gtk_toolbar_set_drop_highlight_item: * gtk_toolbar_set_drop_highlight_item:
* @toolbar: a #GtkToolbar * @toolbar: a #GtkToolbar
* @tool_item: a #GtkToolItem, or %NULL to turn of highlighting * @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 * 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 * if @item was added to @toolbar at the position indicated by @index_.
* is %NULL, highlighting is turned off. In that case @index is ignored. * 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 * 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 * hierarchy. When an item is set as drop highlight item it can not
@ -2029,7 +2030,7 @@ logical_to_physical (GtkToolbar *toolbar,
void void
gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar, gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
GtkToolItem *tool_item, GtkToolItem *tool_item,
gint index) gint index_)
{ {
ToolbarContent *content; ToolbarContent *content;
GtkToolbarPrivate *priv; GtkToolbarPrivate *priv;
@ -2060,8 +2061,8 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
} }
n_items = gtk_toolbar_get_n_items (toolbar); n_items = gtk_toolbar_get_n_items (toolbar);
if (index < 0 || index > n_items) if (index_ < 0 || index_ > n_items)
index = n_items; index_ = n_items;
if (tool_item != priv->highlight_tool_item) if (tool_item != priv->highlight_tool_item)
{ {
@ -2077,15 +2078,15 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
GTK_WIDGET (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; 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)) if (prev_content && toolbar_content_is_placeholder (prev_content))
content = prev_content; content = prev_content;
@ -2099,7 +2100,7 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
content = toolbar_content_new_tool_item (toolbar, content = toolbar_content_new_tool_item (toolbar,
GTK_TOOL_ITEM (placeholder), GTK_TOOL_ITEM (placeholder),
TRUE, index); TRUE, index_);
gtk_widget_show (placeholder); gtk_widget_show (placeholder);
} }

View File

@ -162,7 +162,7 @@ gint gtk_toolbar_get_drop_index (GtkToolbar *toolbar,
gint y); gint y);
void gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar, void gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
GtkToolItem *tool_item, GtkToolItem *tool_item,
gint index); gint index_);
/* internal functions */ /* internal functions */
gchar * _gtk_toolbar_elide_underscores (const gchar *original); gchar * _gtk_toolbar_elide_underscores (const gchar *original);