Commit 139026de authored by Federico Mena Quintero's avatar Federico Mena Quintero Committed by Arturo Espinosa

Fixed child->icon and child->label == NULL bugs.

1998-01-13  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gtk/gtktoolbar.c: (gtk_real_toolbar_style_changed): Fixed
	child->icon and child->label == NULL bugs.

	* gtk/gtktoolbar.h: Added some new functions:
		gtk_toolbar_append_widget()
		gtk_toolbar_prepend_widget()
		gtk_toolbar_insert_widget()
	These let the user insert any kind of widget in the toolbar.  Also
	changed the gtk_toolbar_*_item() functions to return a
	GtkWidget * so that the user can do things with the toolbar buttons.

	* gtk/gtktoolbar.c: Now the toolbar supports its own buttons and
	arbitrary widgets as well.  Geometry management has been changed
	accordingly.  Added gtk_toolbar_remove() function, so container
	functionality should be complete now.

	* gtk/testgtk.c (create_toolbar): Added an entry widget to test
	the new toolbar.

	* Most of these changes are adapted from the
	gtk-lupus-970112-0-patch (should be 970112... :-)
parent 284882b8
1998-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c: (gtk_real_toolbar_style_changed): Fixed
child->icon and child->label == NULL bugs.
* gtk/gtktoolbar.h: Added some new functions:
gtk_toolbar_append_widget()
gtk_toolbar_prepend_widget()
gtk_toolbar_insert_widget()
These let the user insert any kind of widget in the toolbar. Also
changed the gtk_toolbar_*_item() functions to return a
GtkWidget * so that the user can do things with the toolbar buttons.
* gtk/gtktoolbar.c: Now the toolbar supports its own buttons and
arbitrary widgets as well. Geometry management has been changed
accordingly. Added gtk_toolbar_remove() function, so container
functionality should be complete now.
* gtk/testgtk.c (create_toolbar): Added an entry widget to test
the new toolbar.
* Most of these changes are adapted from the
gtk-lupus-970112-0-patch (should be 970112... :-)
Sat Jan 9 20:52:00 PST 1998 Ian Main <imain@gimp.org>
* gtk/gtkfilesel.c: Changed a few tests in the path correcting
function. Hopefully this helps the filesel stability.
......
1998-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c: (gtk_real_toolbar_style_changed): Fixed
child->icon and child->label == NULL bugs.
* gtk/gtktoolbar.h: Added some new functions:
gtk_toolbar_append_widget()
gtk_toolbar_prepend_widget()
gtk_toolbar_insert_widget()
These let the user insert any kind of widget in the toolbar. Also
changed the gtk_toolbar_*_item() functions to return a
GtkWidget * so that the user can do things with the toolbar buttons.
* gtk/gtktoolbar.c: Now the toolbar supports its own buttons and
arbitrary widgets as well. Geometry management has been changed
accordingly. Added gtk_toolbar_remove() function, so container
functionality should be complete now.
* gtk/testgtk.c (create_toolbar): Added an entry widget to test
the new toolbar.
* Most of these changes are adapted from the
gtk-lupus-970112-0-patch (should be 970112... :-)
Sat Jan 9 20:52:00 PST 1998 Ian Main <imain@gimp.org>
* gtk/gtkfilesel.c: Changed a few tests in the path correcting
function. Hopefully this helps the filesel stability.
......
1998-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c: (gtk_real_toolbar_style_changed): Fixed
child->icon and child->label == NULL bugs.
* gtk/gtktoolbar.h: Added some new functions:
gtk_toolbar_append_widget()
gtk_toolbar_prepend_widget()
gtk_toolbar_insert_widget()
These let the user insert any kind of widget in the toolbar. Also
changed the gtk_toolbar_*_item() functions to return a
GtkWidget * so that the user can do things with the toolbar buttons.
* gtk/gtktoolbar.c: Now the toolbar supports its own buttons and
arbitrary widgets as well. Geometry management has been changed
accordingly. Added gtk_toolbar_remove() function, so container
functionality should be complete now.
* gtk/testgtk.c (create_toolbar): Added an entry widget to test
the new toolbar.
* Most of these changes are adapted from the
gtk-lupus-970112-0-patch (should be 970112... :-)
Sat Jan 9 20:52:00 PST 1998 Ian Main <imain@gimp.org>
* gtk/gtkfilesel.c: Changed a few tests in the path correcting
function. Hopefully this helps the filesel stability.
......
1998-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c: (gtk_real_toolbar_style_changed): Fixed
child->icon and child->label == NULL bugs.
* gtk/gtktoolbar.h: Added some new functions:
gtk_toolbar_append_widget()
gtk_toolbar_prepend_widget()
gtk_toolbar_insert_widget()
These let the user insert any kind of widget in the toolbar. Also
changed the gtk_toolbar_*_item() functions to return a
GtkWidget * so that the user can do things with the toolbar buttons.
* gtk/gtktoolbar.c: Now the toolbar supports its own buttons and
arbitrary widgets as well. Geometry management has been changed
accordingly. Added gtk_toolbar_remove() function, so container
functionality should be complete now.
* gtk/testgtk.c (create_toolbar): Added an entry widget to test
the new toolbar.
* Most of these changes are adapted from the
gtk-lupus-970112-0-patch (should be 970112... :-)
Sat Jan 9 20:52:00 PST 1998 Ian Main <imain@gimp.org>
* gtk/gtkfilesel.c: Changed a few tests in the path correcting
function. Hopefully this helps the filesel stability.
......
1998-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c: (gtk_real_toolbar_style_changed): Fixed
child->icon and child->label == NULL bugs.
* gtk/gtktoolbar.h: Added some new functions:
gtk_toolbar_append_widget()
gtk_toolbar_prepend_widget()
gtk_toolbar_insert_widget()
These let the user insert any kind of widget in the toolbar. Also
changed the gtk_toolbar_*_item() functions to return a
GtkWidget * so that the user can do things with the toolbar buttons.
* gtk/gtktoolbar.c: Now the toolbar supports its own buttons and
arbitrary widgets as well. Geometry management has been changed
accordingly. Added gtk_toolbar_remove() function, so container
functionality should be complete now.
* gtk/testgtk.c (create_toolbar): Added an entry widget to test
the new toolbar.
* Most of these changes are adapted from the
gtk-lupus-970112-0-patch (should be 970112... :-)
Sat Jan 9 20:52:00 PST 1998 Ian Main <imain@gimp.org>
* gtk/gtkfilesel.c: Changed a few tests in the path correcting
function. Hopefully this helps the filesel stability.
......
1998-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c: (gtk_real_toolbar_style_changed): Fixed
child->icon and child->label == NULL bugs.
* gtk/gtktoolbar.h: Added some new functions:
gtk_toolbar_append_widget()
gtk_toolbar_prepend_widget()
gtk_toolbar_insert_widget()
These let the user insert any kind of widget in the toolbar. Also
changed the gtk_toolbar_*_item() functions to return a
GtkWidget * so that the user can do things with the toolbar buttons.
* gtk/gtktoolbar.c: Now the toolbar supports its own buttons and
arbitrary widgets as well. Geometry management has been changed
accordingly. Added gtk_toolbar_remove() function, so container
functionality should be complete now.
* gtk/testgtk.c (create_toolbar): Added an entry widget to test
the new toolbar.
* Most of these changes are adapted from the
gtk-lupus-970112-0-patch (should be 970112... :-)
Sat Jan 9 20:52:00 PST 1998 Ian Main <imain@gimp.org>
* gtk/gtkfilesel.c: Changed a few tests in the path correcting
function. Hopefully this helps the filesel stability.
......
1998-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c: (gtk_real_toolbar_style_changed): Fixed
child->icon and child->label == NULL bugs.
* gtk/gtktoolbar.h: Added some new functions:
gtk_toolbar_append_widget()
gtk_toolbar_prepend_widget()
gtk_toolbar_insert_widget()
These let the user insert any kind of widget in the toolbar. Also
changed the gtk_toolbar_*_item() functions to return a
GtkWidget * so that the user can do things with the toolbar buttons.
* gtk/gtktoolbar.c: Now the toolbar supports its own buttons and
arbitrary widgets as well. Geometry management has been changed
accordingly. Added gtk_toolbar_remove() function, so container
functionality should be complete now.
* gtk/testgtk.c (create_toolbar): Added an entry widget to test
the new toolbar.
* Most of these changes are adapted from the
gtk-lupus-970112-0-patch (should be 970112... :-)
Sat Jan 9 20:52:00 PST 1998 Ian Main <imain@gimp.org>
* gtk/gtkfilesel.c: Changed a few tests in the path correcting
function. Hopefully this helps the filesel stability.
......
This diff is collapsed.
......@@ -54,8 +54,8 @@ struct _GtkToolbar
GtkTooltips *tooltips;
gint child_maxw;
gint child_maxh;
gint button_maxw;
gint button_maxh;
};
struct _GtkToolbarClass
......@@ -73,19 +73,19 @@ guint gtk_toolbar_get_type (void);
GtkWidget *gtk_toolbar_new (GtkOrientation orientation,
GtkToolbarStyle style);
void gtk_toolbar_append_item (GtkToolbar *toolbar,
GtkWidget *gtk_toolbar_append_item (GtkToolbar *toolbar,
const char *text,
const char *tooltip_text,
GtkPixmap *icon,
GtkSignalFunc callback,
gpointer user_data);
void gtk_toolbar_prepend_item (GtkToolbar *toolbar,
GtkWidget *gtk_toolbar_prepend_item (GtkToolbar *toolbar,
const char *text,
const char *tooltip_text,
GtkPixmap *icon,
GtkSignalFunc callback,
gpointer user_data);
void gtk_toolbar_insert_item (GtkToolbar *toolbar,
GtkWidget *gtk_toolbar_insert_item (GtkToolbar *toolbar,
const char *text,
const char *tooltip_text,
GtkPixmap *icon,
......@@ -96,6 +96,16 @@ 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_append_widget (GtkToolbar *toolbar,
const char *tooltip_text,
GtkWidget *widget);
void gtk_toolbar_prepend_widget (GtkToolbar *toolbar,
const char *tooltip_text,
GtkWidget *widget);
void gtk_toolbar_insert_widget (GtkToolbar *toolbar,
const char *tooltip_text,
GtkWidget *widget,
gint position);
void gtk_toolbar_set_orientation (GtkToolbar *toolbar,
GtkOrientation orientation);
......
......@@ -632,12 +632,13 @@ create_toolbar (void)
{
static GtkWidget *window = NULL;
GtkWidget *toolbar;
GtkWidget *entry;
if (!window)
{
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Toolbar test");
gtk_window_set_policy (GTK_WINDOW (window), TRUE, TRUE, TRUE);
gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, TRUE);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (destroy_window),
......@@ -682,6 +683,12 @@ create_toolbar (void)
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
entry = gtk_entry_new ();
gtk_widget_show(entry);
gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar), NULL, entry);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
"Small", "Use small spaces",
GTK_PIXMAP (new_pixmap ("test.xpm", window->window,
......
......@@ -632,12 +632,13 @@ create_toolbar (void)
{
static GtkWidget *window = NULL;
GtkWidget *toolbar;
GtkWidget *entry;
if (!window)
{
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Toolbar test");
gtk_window_set_policy (GTK_WINDOW (window), TRUE, TRUE, TRUE);
gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, TRUE);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (destroy_window),
......@@ -682,6 +683,12 @@ create_toolbar (void)
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
entry = gtk_entry_new ();
gtk_widget_show(entry);
gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar), NULL, entry);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
"Small", "Use small spaces",
GTK_PIXMAP (new_pixmap ("test.xpm", window->window,
......
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