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... :-)
This commit is contained in:
committed by
Arturo Espinosa
parent
284882b8c7
commit
139026de73
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user