new function

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

	* gtk/gtktoolbar.c (gtk_toolbar_remove_space): new function
This commit is contained in:
Havoc Pennington 2001-06-05 20:45:33 +00:00 committed by Havoc Pennington
parent b32e7c9bb8
commit 5e23d97ddb
9 changed files with 70 additions and 0 deletions

View File

@ -1,3 +1,7 @@
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

View File

@ -1,3 +1,7 @@
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

View File

@ -1,3 +1,7 @@
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

View File

@ -1,3 +1,7 @@
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

View File

@ -1,3 +1,7 @@
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

View File

@ -1,3 +1,7 @@
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

View File

@ -1,3 +1,7 @@
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

View File

@ -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,

View File

@ -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,