From d2c859ad387d1220524145bc72f5ae0c911c9f40 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Sat, 27 Jan 2001 10:28:58 +0000 Subject: Fix the API to EDropdownButton by removing args that don't make much sense. svn path=/trunk/; revision=7854 --- widgets/misc/ChangeLog | 7 +++++++ widgets/misc/e-dropdown-button.c | 17 +++-------------- widgets/misc/e-dropdown-button.h | 8 ++------ widgets/misc/test-dropdown-button.c | 2 +- 4 files changed, 13 insertions(+), 21 deletions(-) (limited to 'widgets/misc') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 83f684f751..2c39f11046 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,10 @@ +2001-01-27 Ettore Perazzoli + + * e-dropdown-button.c (e_dropdown_button_construct): Removed + @ui_info and @data args. Obviously I am not very smart at this + time of the night. + (e_dropdown_button_new): Likewise. + 2001-01-27 Ettore Perazzoli * e-dropdown-button.c, e-dropdown-button.h: New. diff --git a/widgets/misc/e-dropdown-button.c b/widgets/misc/e-dropdown-button.c index b40d31733a..c9aba7048e 100644 --- a/widgets/misc/e-dropdown-button.c +++ b/widgets/misc/e-dropdown-button.c @@ -144,9 +144,7 @@ init (EDropdownButton *dropdown_button) void e_dropdown_button_construct (EDropdownButton *dropdown_button, const char *label_text, - GtkMenu *menu, - GnomeUIInfo *ui_info, - void *data) + GtkMenu *menu) { EDropdownButtonPrivate *priv; GtkWidget *hbox; @@ -159,7 +157,6 @@ e_dropdown_button_construct (EDropdownButton *dropdown_button, g_return_if_fail (label_text != NULL); g_return_if_fail (menu != NULL); g_return_if_fail (GTK_IS_MENU (menu)); - g_return_if_fail (ui_info != NULL); priv = dropdown_button->priv; @@ -179,16 +176,12 @@ e_dropdown_button_construct (EDropdownButton *dropdown_button, gtk_widget_show (arrow); priv->menu = GTK_WIDGET (menu); - gnome_app_fill_menu_with_data (GTK_MENU_SHELL (priv->menu), ui_info, - priv->accel_group, TRUE, 0, data); } /** * e_dropdown_button_new: * @label_text: * @menu: - * @ui_info: - * @data: * * Create a new dropdown button. * @@ -196,21 +189,17 @@ e_dropdown_button_construct (EDropdownButton *dropdown_button, **/ GtkWidget * e_dropdown_button_new (const char *label_text, - GtkMenu *menu, - GnomeUIInfo *ui_info, - void *data) + GtkMenu *menu) { GtkWidget *widget; g_return_val_if_fail (label_text != NULL, NULL); g_return_val_if_fail (menu != NULL, NULL); g_return_val_if_fail (GTK_IS_MENU (menu), NULL); - g_return_val_if_fail (ui_info != NULL, NULL); widget = gtk_type_new (e_dropdown_button_get_type ()); - e_dropdown_button_construct (E_DROPDOWN_BUTTON (widget), label_text, menu, ui_info, data); - + e_dropdown_button_construct (E_DROPDOWN_BUTTON (widget), label_text, menu); return widget; } diff --git a/widgets/misc/e-dropdown-button.h b/widgets/misc/e-dropdown-button.h index 4abf36b766..584cb0365b 100644 --- a/widgets/misc/e-dropdown-button.h +++ b/widgets/misc/e-dropdown-button.h @@ -63,13 +63,9 @@ struct _EDropdownButtonClass { GtkType e_dropdown_button_get_type (void); void e_dropdown_button_construct (EDropdownButton *dropdown_button, const char *label_text, - GtkMenu *menu, - GnomeUIInfo *ui_info, - void *data); + GtkMenu *menu); GtkWidget *e_dropdown_button_new (const char *label_text, - GtkMenu *menu, - GnomeUIInfo *ui_info, - void *data); + GtkMenu *menu); #ifdef __cplusplus } diff --git a/widgets/misc/test-dropdown-button.c b/widgets/misc/test-dropdown-button.c index e5052d52a5..3acfea3a1c 100644 --- a/widgets/misc/test-dropdown-button.c +++ b/widgets/misc/test-dropdown-button.c @@ -82,7 +82,7 @@ main (int argc, char **argv) gnome_app_fill_menu (GTK_MENU_SHELL (menu), ui_info, NULL, TRUE, 0); - dropdown_button = e_dropdown_button_new ("Me_nu", GTK_MENU (menu), ui_info, NULL); + dropdown_button = e_dropdown_button_new ("Me_nu", GTK_MENU (menu)); gtk_container_add (GTK_CONTAINER (window), dropdown_button); gtk_widget_show (window); -- cgit v1.2.3