Commit 5e23d97d authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

new function

2001-06-05  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktoolbar.c (gtk_toolbar_remove_space): new function
parent b32e7c9b
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c (gtk_toolbar_remove_space): new function
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_set_range): clamp the value
......
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c (gtk_toolbar_remove_space): new function
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_set_range): clamp the value
......
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c (gtk_toolbar_remove_space): new function
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_set_range): clamp the value
......
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c (gtk_toolbar_remove_space): new function
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_set_range): clamp the value
......
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c (gtk_toolbar_remove_space): new function
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_set_range): clamp the value
......
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c (gtk_toolbar_remove_space): new function
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_set_range): clamp the value
......
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c (gtk_toolbar_remove_space): new function
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_set_range): clamp the value
......
......@@ -1159,6 +1159,46 @@ gtk_toolbar_insert_space (GtkToolbar *toolbar,
position);
}
void
gtk_toolbar_remove_space (GtkToolbar *toolbar,
gint position)
{
GList *children;
GtkToolbarChild *child;
gint i;
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
i = 0;
for (children = toolbar->children; children; children = children->next)
{
child = children->data;
if (i == position)
{
if (child->type == GTK_TOOLBAR_CHILD_SPACE)
{
toolbar->children = g_list_remove_link (toolbar->children, children);
g_free (child);
g_list_free (children);
toolbar->num_children--;
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
}
else
{
g_warning ("Toolbar position %d is not a space", position);
}
return;
}
++i;
}
g_warning ("Toolbar position %d doesn't exist", position);
}
void
gtk_toolbar_append_widget (GtkToolbar *toolbar,
GtkWidget *widget,
......
......@@ -153,6 +153,8 @@ void gtk_toolbar_append_space (GtkToolbar *toolbar);
void gtk_toolbar_prepend_space (GtkToolbar *toolbar);
void gtk_toolbar_insert_space (GtkToolbar *toolbar,
gint position);
void gtk_toolbar_remove_space (GtkToolbar *toolbar,
gint position);
/* Any element type */
GtkWidget* gtk_toolbar_append_element (GtkToolbar *toolbar,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment