From dfca5a2aacceff5436c7c3bdeb6708a258571fcd Mon Sep 17 00:00:00 2001 From: Soeren Sandmann Date: Wed, 30 Jul 2003 18:35:08 +0000 Subject: swap icon_widget and label arguments to match BonoboUIToolbarButton. Wed Jul 30 17:03:58 2003 Soeren Sandmann * gtk/gtktoolbutton.[ch]: (gtk_tool_button_new): swap icon_widget and label arguments to match BonoboUIToolbarButton. * gtk/gtktoolbar.h: un-deprecate gtk_toolbar_{set|unset}_style(). --- ChangeLog | 8 ++ ChangeLog.pre-2-10 | 8 ++ ChangeLog.pre-2-4 | 8 ++ ChangeLog.pre-2-6 | 8 ++ ChangeLog.pre-2-8 | 8 ++ docs/reference/gtk/tmpl/gtk-unused.sgml | 6 ++ docs/reference/gtk/tmpl/gtktoolbar.sgml | 120 +++++++++++++++-------------- docs/reference/gtk/tmpl/gtktoolbutton.sgml | 2 +- gtk/gtktoolbar.h | 15 ++-- gtk/gtktoolbutton.c | 9 ++- gtk/gtktoolbutton.h | 26 +++---- tests/testtoolbar.c | 4 +- 12 files changed, 138 insertions(+), 84 deletions(-) diff --git a/ChangeLog b/ChangeLog index aea227c68f..212d338fc9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Jul 30 17:03:58 2003 Soeren Sandmann + + * gtk/gtktoolbutton.[ch]: + (gtk_tool_button_new): swap icon_widget and label arguments to + match BonoboUIToolbarButton. + + * gtk/gtktoolbar.h: un-deprecate gtk_toolbar_{set|unset}_style(). + 2003-07-30 Matthias Clasen * gtk/gtkwidget.c (gtk_widget_class_init): Some updates to the DND signal docs. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index aea227c68f..212d338fc9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Wed Jul 30 17:03:58 2003 Soeren Sandmann + + * gtk/gtktoolbutton.[ch]: + (gtk_tool_button_new): swap icon_widget and label arguments to + match BonoboUIToolbarButton. + + * gtk/gtktoolbar.h: un-deprecate gtk_toolbar_{set|unset}_style(). + 2003-07-30 Matthias Clasen * gtk/gtkwidget.c (gtk_widget_class_init): Some updates to the DND signal docs. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index aea227c68f..212d338fc9 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Wed Jul 30 17:03:58 2003 Soeren Sandmann + + * gtk/gtktoolbutton.[ch]: + (gtk_tool_button_new): swap icon_widget and label arguments to + match BonoboUIToolbarButton. + + * gtk/gtktoolbar.h: un-deprecate gtk_toolbar_{set|unset}_style(). + 2003-07-30 Matthias Clasen * gtk/gtkwidget.c (gtk_widget_class_init): Some updates to the DND signal docs. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index aea227c68f..212d338fc9 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Wed Jul 30 17:03:58 2003 Soeren Sandmann + + * gtk/gtktoolbutton.[ch]: + (gtk_tool_button_new): swap icon_widget and label arguments to + match BonoboUIToolbarButton. + + * gtk/gtktoolbar.h: un-deprecate gtk_toolbar_{set|unset}_style(). + 2003-07-30 Matthias Clasen * gtk/gtkwidget.c (gtk_widget_class_init): Some updates to the DND signal docs. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index aea227c68f..212d338fc9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Wed Jul 30 17:03:58 2003 Soeren Sandmann + + * gtk/gtktoolbutton.[ch]: + (gtk_tool_button_new): swap icon_widget and label arguments to + match BonoboUIToolbarButton. + + * gtk/gtktoolbar.h: un-deprecate gtk_toolbar_{set|unset}_style(). + 2003-07-30 Matthias Clasen * gtk/gtkwidget.c (gtk_widget_class_init): Some updates to the DND signal docs. diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml index df6231ff3c..17237fd2ac 100644 --- a/docs/reference/gtk/tmpl/gtk-unused.sgml +++ b/docs/reference/gtk/tmpl/gtk-unused.sgml @@ -1361,6 +1361,12 @@ produce superscript and subscript. + + + + + + diff --git a/docs/reference/gtk/tmpl/gtktoolbar.sgml b/docs/reference/gtk/tmpl/gtktoolbar.sgml index 5d5c681bb4..f2b732af91 100644 --- a/docs/reference/gtk/tmpl/gtktoolbar.sgml +++ b/docs/reference/gtk/tmpl/gtktoolbar.sgml @@ -143,8 +143,8 @@ to a #GtkToolbar. -@toolbar: -@orientation: +@toolbar: +@orientation: @@ -152,8 +152,8 @@ to a #GtkToolbar. -@toolbar: -@enable: +@toolbar: +@enable: @@ -223,14 +223,14 @@ to a #GtkToolbar. -@toolbar: -@text: -@tooltip_text: -@tooltip_private_text: -@icon: -@callback: -@user_data: -@Returns: +@toolbar: +@text: +@tooltip_text: +@tooltip_private_text: +@icon: +@callback: +@user_data: +@Returns: @@ -238,14 +238,14 @@ to a #GtkToolbar. -@toolbar: -@text: -@tooltip_text: -@tooltip_private_text: -@icon: -@callback: -@user_data: -@Returns: +@toolbar: +@text: +@tooltip_text: +@tooltip_private_text: +@icon: +@callback: +@user_data: +@Returns: @@ -253,15 +253,15 @@ to a #GtkToolbar. -@toolbar: -@text: -@tooltip_text: -@tooltip_private_text: -@icon: -@callback: -@user_data: -@position: -@Returns: +@toolbar: +@text: +@tooltip_text: +@tooltip_private_text: +@icon: +@callback: +@user_data: +@position: +@Returns: @@ -269,7 +269,7 @@ to a #GtkToolbar. -@toolbar: +@toolbar: @@ -277,7 +277,7 @@ to a #GtkToolbar. -@toolbar: +@toolbar: @@ -285,8 +285,8 @@ to a #GtkToolbar. -@toolbar: -@position: +@toolbar: +@position: @@ -297,16 +297,16 @@ to a #GtkToolbar. -@toolbar: -@type: -@widget: -@text: -@tooltip_text: -@tooltip_private_text: -@icon: -@callback: -@user_data: -@Returns: +@toolbar: +@type: +@widget: +@text: +@tooltip_text: +@tooltip_private_text: +@icon: +@callback: +@user_data: +@Returns: @@ -317,16 +317,16 @@ to a #GtkToolbar. I -@toolbar: -@type: -@widget: -@text: -@tooltip_text: -@tooltip_private_text: -@icon: -@callback: -@user_data: -@Returns: +@toolbar: +@type: +@widget: +@text: +@tooltip_text: +@tooltip_private_text: +@icon: +@callback: +@user_data: +@Returns: @@ -386,8 +386,8 @@ I -@toolbar: -@style: +@toolbar: +@style: @@ -464,14 +464,20 @@ I @toolbar: the object which received the signal. @Returns: +@: +@: +@Returns: +@: +@Returns: +@Returns: -@toolbar: -@style: +@toolbar: +@style: diff --git a/docs/reference/gtk/tmpl/gtktoolbutton.sgml b/docs/reference/gtk/tmpl/gtktoolbutton.sgml index 19b5ae2a3f..6fa2e61e28 100644 --- a/docs/reference/gtk/tmpl/gtktoolbutton.sgml +++ b/docs/reference/gtk/tmpl/gtktoolbutton.sgml @@ -25,8 +25,8 @@ GtkToolButton -@label: @icon_widget: +@label: @Returns: diff --git a/gtk/gtktoolbar.h b/gtk/gtktoolbar.h index 5b569547a7..fce9b7b2a0 100644 --- a/gtk/gtktoolbar.h +++ b/gtk/gtktoolbar.h @@ -131,15 +131,14 @@ struct _GtkToolbarClass void (*_gtk_reserved3) (void); }; -GType gtk_toolbar_get_type (void) G_GNUC_CONST; -GtkWidget* gtk_toolbar_new (void); - +GType gtk_toolbar_get_type (void) G_GNUC_CONST; +GtkWidget* gtk_toolbar_new (void); void gtk_toolbar_insert (GtkToolbar *toolbar, GtkToolItem *item, gint pos); gint gtk_toolbar_get_item_index (GtkToolbar *toolbar, GtkToolItem *item); -gint gtk_toolbar_get_n_items (GtkToolbar *toolbar); +gint gtk_toolbar_get_n_items (GtkToolbar *toolbar); GtkToolItem * gtk_toolbar_get_nth_item (GtkToolbar *toolbar, gint n); gint gtk_toolbar_get_drop_index (GtkToolbar *toolbar, @@ -157,16 +156,18 @@ GtkToolbarStyle gtk_toolbar_get_style (GtkToolbar *toolbar); GtkIconSize gtk_toolbar_get_icon_size (GtkToolbar *toolbar); gboolean gtk_toolbar_get_tooltips (GtkToolbar *toolbar); GtkReliefStyle gtk_toolbar_get_relief_style (GtkToolbar *toolbar); +void gtk_toolbar_set_style (GtkToolbar *toolbar, + GtkToolbarStyle style); +void gtk_toolbar_unset_style (GtkToolbar *toolbar); + + /* internal function */ gchar * _gtk_toolbar_elide_underscores (const gchar *original); #ifndef GTK_DISABLE_DEPRECATED -void gtk_toolbar_set_style (GtkToolbar *toolbar, - GtkToolbarStyle style); void gtk_toolbar_set_icon_size (GtkToolbar *toolbar, GtkIconSize icon_size); -void gtk_toolbar_unset_style (GtkToolbar *toolbar); void gtk_toolbar_unset_icon_size (GtkToolbar *toolbar); /* Simple button items */ diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c index 75b4cb4883..93c241ce5f 100644 --- a/gtk/gtktoolbutton.c +++ b/gtk/gtktoolbutton.c @@ -278,10 +278,10 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item) if (style != GTK_TOOLBAR_TEXT) need_icon = TRUE; - + if (style != GTK_TOOLBAR_ICONS) need_label = TRUE; - + if (need_label) { if (button->priv->label_widget) @@ -586,8 +586,8 @@ gtk_tool_button_new_from_stock (const gchar *stock_id) } GtkToolItem * -gtk_tool_button_new (const gchar *label, - GtkWidget *icon_widget) +gtk_tool_button_new (GtkWidget *icon_widget, + const gchar *label) { GtkToolButton *button; @@ -757,3 +757,4 @@ _gtk_tool_button_get_button (GtkToolButton *button) return button->priv->button; } + diff --git a/gtk/gtktoolbutton.h b/gtk/gtktoolbutton.h index 88e2ec5ef0..3633d12d47 100644 --- a/gtk/gtktoolbutton.h +++ b/gtk/gtktoolbutton.h @@ -58,27 +58,27 @@ struct _GtkToolButtonClass }; GType gtk_tool_button_get_type (void); -GtkToolItem *gtk_tool_button_new (const gchar *label, - GtkWidget *icon_widget); +GtkToolItem *gtk_tool_button_new (GtkWidget *icon_widget, + const gchar *label); GtkToolItem *gtk_tool_button_new_from_stock (const gchar *stock_id); -void gtk_tool_button_set_label (GtkToolButton *button, - const gchar *label); -G_CONST_RETURN gchar *gtk_tool_button_get_label (GtkToolButton *button); +void gtk_tool_button_set_label (GtkToolButton *button, + const gchar *label); +G_CONST_RETURN gchar *gtk_tool_button_get_label (GtkToolButton *button); void gtk_tool_button_set_use_underline (GtkToolButton *button, gboolean use_underline); gboolean gtk_tool_button_get_use_underline (GtkToolButton *button); -void gtk_tool_button_set_stock_id (GtkToolButton *button, +void gtk_tool_button_set_stock_id (GtkToolButton *button, const gchar *stock_id); G_CONST_RETURN gchar *gtk_tool_button_get_stock_id (GtkToolButton *button); -void gtk_tool_button_set_icon_widget (GtkToolButton *button, - GtkWidget *icon); -GtkWidget * gtk_tool_button_get_icon_widget (GtkToolButton *button); - -void gtk_tool_button_set_label_widget (GtkToolButton *button, - GtkWidget *label_widget); -GtkWidget * gtk_tool_button_get_label_widget (GtkToolButton *button); +void gtk_tool_button_set_icon_widget (GtkToolButton *button, + GtkWidget *icon); +GtkWidget * gtk_tool_button_get_icon_widget (GtkToolButton *button); +void gtk_tool_button_set_label_widget (GtkToolButton *button, + GtkWidget *label_widget); +GtkWidget * gtk_tool_button_get_label_widget (GtkToolButton *button); + /* internal function */ GtkWidget *_gtk_tool_button_get_button (GtkToolButton *button); diff --git a/tests/testtoolbar.c b/tests/testtoolbar.c index 803d8ef730..8d5fb7aa52 100644 --- a/tests/testtoolbar.c +++ b/tests/testtoolbar.c @@ -547,7 +547,7 @@ main (gint argc, gchar **argv) gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); item = gtk_tool_button_new_from_stock (GTK_STOCK_REFRESH); - add_item_to_list (store, item, "Refresh"); + add_item_to_list (store, item, "Refresh"); g_signal_connect (item, "clicked", G_CALLBACK (reload_clicked), NULL); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); @@ -594,7 +594,7 @@ main (gint argc, gchar **argv) add_item_to_list (store, item, "Right"); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); - item = gtk_tool_button_new ("_Apple", gtk_image_new_from_file ("apple-red.png")); + item = gtk_tool_button_new (gtk_image_new_from_file ("apple-red.png"), "_Apple"); add_item_to_list (store, item, "Apple"); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (item), TRUE); -- cgit v1.2.1