mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
new function
2001-06-05 Havoc Pennington <hp@redhat.com> * gtk/gtktoolbar.c (gtk_toolbar_remove_space): new function
This commit is contained in:
parent
b32e7c9bb8
commit
5e23d97ddb
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user