diff options
author | Not Zed <NotZed@Ximian.com> | 2002-12-02 11:28:22 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-12-02 11:28:22 +0800 |
commit | 4354c0ac032ef2837a80f801d1d1cad9036f2b37 (patch) | |
tree | 0d54c308c8ec1fe3ba4dd3bf32a5565df85d36b0 /widgets/misc | |
parent | 9d77b85ae36094fd1a0b07be4ebb69e047c9cec1 (diff) | |
download | gsoc2013-evolution-4354c0ac032ef2837a80f801d1d1cad9036f2b37.tar gsoc2013-evolution-4354c0ac032ef2837a80f801d1d1cad9036f2b37.tar.gz gsoc2013-evolution-4354c0ac032ef2837a80f801d1d1cad9036f2b37.tar.bz2 gsoc2013-evolution-4354c0ac032ef2837a80f801d1d1cad9036f2b37.tar.lz gsoc2013-evolution-4354c0ac032ef2837a80f801d1d1cad9036f2b37.tar.xz gsoc2013-evolution-4354c0ac032ef2837a80f801d1d1cad9036f2b37.tar.zst gsoc2013-evolution-4354c0ac032ef2837a80f801d1d1cad9036f2b37.zip |
Add include of gnome-dialog.h
2002-11-27 Not Zed <NotZed@Ximian.com>
* e-charset-picker.c: Add include of gnome-dialog.h
* *.[ch]: ran fix.sh script over everything.
svn path=/trunk/; revision=18978
Diffstat (limited to 'widgets/misc')
39 files changed, 226 insertions, 217 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 9283f709a9..4f454bac70 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,9 @@ +2002-11-27 Not Zed <NotZed@Ximian.com> + + * e-charset-picker.c: Add include of gnome-dialog.h + + * *.[ch]: ran fix.sh script over everything. + 2002-11-26 Not Zed <NotZed@Ximian.com> * e-combo-button.c (impl_button_press_event): Dont grab_add diff --git a/widgets/misc/e-bonobo-widget.c b/widgets/misc/e-bonobo-widget.c index 7302356860..3ace72a4af 100644 --- a/widgets/misc/e-bonobo-widget.c +++ b/widgets/misc/e-bonobo-widget.c @@ -42,7 +42,7 @@ static BonoboWidgetClass *parent_class = NULL; static void class_init (GtkObjectClass *object_class) { - parent_class = gtk_type_class (PARENT_TYPE); + parent_class = g_type_class_ref(PARENT_TYPE); /* No method to override. */ } diff --git a/widgets/misc/e-bonobo-widget.h b/widgets/misc/e-bonobo-widget.h index 2ccf54c8ec..f5ac818c6f 100644 --- a/widgets/misc/e-bonobo-widget.h +++ b/widgets/misc/e-bonobo-widget.h @@ -31,10 +31,10 @@ extern "C" { #endif /* __cplusplus */ #define E_TYPE_BONOBO_WIDGET (e_bonobo_widget_get_type ()) -#define E_BONOBO_WIDGET(obj) (GTK_CHECK_CAST ((obj), E_TYPE_BONOBO_WIDGET, EBonoboWidget)) -#define E_BONOBO_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_BONOBO_WIDGET, EBonoboWidgetClass)) -#define E_IS_BONOBO_WIDGET(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_BONOBO_WIDGET)) -#define E_IS_BONOBO_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_BONOBO_WIDGET)) +#define E_BONOBO_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_BONOBO_WIDGET, EBonoboWidget)) +#define E_BONOBO_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_BONOBO_WIDGET, EBonoboWidgetClass)) +#define E_IS_BONOBO_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_BONOBO_WIDGET)) +#define E_IS_BONOBO_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_BONOBO_WIDGET)) typedef struct _EBonoboWidget EBonoboWidget; diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index 6a7e4494d2..5431c5c24c 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -267,7 +267,7 @@ e_calendar_item_class_init (ECalendarItemClass *class) GtkObjectClass *object_class; GnomeCanvasItemClass *item_class; - parent_class = gtk_type_class (gnome_canvas_item_get_type()); + parent_class = g_type_class_ref(gnome_canvas_item_get_type()); object_class = (GtkObjectClass *) class; item_class = (GnomeCanvasItemClass *) class; @@ -340,14 +340,14 @@ e_calendar_item_class_init (ECalendarItemClass *class) gtk_signal_new ("date_range_changed", GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (ECalendarItemClass, date_range_changed), + G_STRUCT_OFFSET (ECalendarItemClass, date_range_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); e_calendar_item_signals[SELECTION_CHANGED] = gtk_signal_new ("selection_changed", GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (ECalendarItemClass, selection_changed), + G_STRUCT_OFFSET (ECalendarItemClass, selection_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -2783,9 +2783,9 @@ e_calendar_item_show_popup_menu (ECalendarItem *calitem, submenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu); - gtk_object_set_data (GTK_OBJECT (submenu), "year", + g_object_set_data(G_OBJECT(submenu), "year", GINT_TO_POINTER (year)); - gtk_object_set_data (GTK_OBJECT (submenu), "month_offset", + g_object_set_data(G_OBJECT(submenu), "month_offset", GINT_TO_POINTER (month_offset)); for (month = 0; month < 12; month++) { @@ -2806,17 +2806,17 @@ e_calendar_item_show_popup_menu (ECalendarItem *calitem, gtk_widget_show (label); gtk_container_add (GTK_CONTAINER (menuitem), label); - gtk_object_set_data (GTK_OBJECT (menuitem), "month", + g_object_set_data(G_OBJECT(menuitem), "month", GINT_TO_POINTER (month)); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (e_calendar_item_on_menu_item_activate), calitem); + g_signal_connect((menuitem), "activate", + G_CALLBACK (e_calendar_item_on_menu_item_activate), calitem); } } /* Run the menu modal so we can destroy it after. */ - gtk_signal_connect (GTK_OBJECT (menu), "deactivate", - GTK_SIGNAL_FUNC (gtk_main_quit), NULL); + g_signal_connect((menu), "deactivate", + G_CALLBACK (gtk_main_quit), NULL); gtk_menu_popup (GTK_MENU (menu), NULL, NULL, e_calendar_item_position_menu, calitem, event->button, event->time); @@ -2833,9 +2833,9 @@ e_calendar_item_on_menu_item_activate (GtkWidget *menuitem, { gint year, month_offset, month; - year = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (menuitem->parent), "year")); - month_offset = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (menuitem->parent), "month_offset")); - month = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (menuitem), "month")); + year = GPOINTER_TO_INT (g_object_get_data(G_OBJECT(menuitem->parent), "year")); + month_offset = GPOINTER_TO_INT (g_object_get_data(G_OBJECT(menuitem->parent), "month_offset")); + month = GPOINTER_TO_INT (g_object_get_data(G_OBJECT(menuitem), "month")); month -= month_offset; e_calendar_item_normalize_date (calitem, &year, &month); @@ -2918,7 +2918,7 @@ e_calendar_item_signal_emission_idle_cb (gpointer data) /* We ref the calitem & check in case it gets destroyed, since we were getting a free memory write here. */ - gtk_object_ref (GTK_OBJECT (calitem)); + g_object_ref((calitem)); if (calitem->date_range_changed) { calitem->date_range_changed = FALSE; @@ -2932,7 +2932,7 @@ e_calendar_item_signal_emission_idle_cb (gpointer data) e_calendar_item_signals[SELECTION_CHANGED]); } - gtk_object_unref (GTK_OBJECT (calitem)); + g_object_unref((calitem)); GDK_THREADS_LEAVE (); return FALSE; diff --git a/widgets/misc/e-calendar-item.h b/widgets/misc/e-calendar-item.h index e153d7a052..f63282b080 100644 --- a/widgets/misc/e-calendar-item.h +++ b/widgets/misc/e-calendar-item.h @@ -78,11 +78,11 @@ typedef struct tm (*ECalendarItemGetTimeCallback) (ECalendarItem *calitem, gpointer data); -#define E_CALENDAR_ITEM(obj) (GTK_CHECK_CAST((obj), \ +#define E_CALENDAR_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ e_calendar_item_get_type (), ECalendarItem)) -#define E_CALENDAR_ITEM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k),\ +#define E_CALENDAR_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k),\ e_calendar_item_get_type ())) -#define E_IS_CALENDAR_ITEM(o) (GTK_CHECK_TYPE((o), \ +#define E_IS_CALENDAR_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \ e_calendar_item_get_type ())) struct _ECalendarItem diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c index 49dc391686..105afc555a 100644 --- a/widgets/misc/e-calendar.c +++ b/widgets/misc/e-calendar.c @@ -139,8 +139,8 @@ e_calendar_class_init (ECalendarClass *class) object_class = (GtkObjectClass *) class; widget_class = (GtkWidgetClass *) class; - parent_class = gtk_type_class (E_CANVAS_TYPE); - grandparent_class = gtk_type_class (GTK_TYPE_LAYOUT); + parent_class = g_type_class_ref(E_CANVAS_TYPE); + grandparent_class = g_type_class_ref(GTK_TYPE_LAYOUT); object_class->destroy = e_calendar_destroy; @@ -189,10 +189,10 @@ e_calendar_init (ECalendar *cal) gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_widget_show (button); gtk_signal_connect_object (GTK_OBJECT (button), "pressed", - GTK_SIGNAL_FUNC (e_calendar_on_prev_pressed), + G_CALLBACK (e_calendar_on_prev_pressed), GTK_OBJECT (cal)); gtk_signal_connect_object (GTK_OBJECT (button), "released", - GTK_SIGNAL_FUNC (e_calendar_on_prev_released), + G_CALLBACK (e_calendar_on_prev_released), GTK_OBJECT (cal)); colormap = gtk_widget_get_colormap (GTK_WIDGET (cal)); @@ -202,7 +202,7 @@ e_calendar_init (ECalendar *cal) pixmap = gtk_pixmap_new (gdk_pixmap, gdk_mask); gtk_widget_show (pixmap); gdk_pixmap_unref (gdk_pixmap); - gdk_bitmap_unref (gdk_mask); + g_object_unref (gdk_mask); gtk_container_add (GTK_CONTAINER (button), pixmap); cal->prev_item = gnome_canvas_item_new (canvas_group, @@ -215,10 +215,10 @@ e_calendar_init (ECalendar *cal) gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_widget_show (button); gtk_signal_connect_object (GTK_OBJECT (button), "pressed", - GTK_SIGNAL_FUNC (e_calendar_on_next_pressed), + G_CALLBACK (e_calendar_on_next_pressed), GTK_OBJECT (cal)); gtk_signal_connect_object (GTK_OBJECT (button), "released", - GTK_SIGNAL_FUNC (e_calendar_on_next_released), + G_CALLBACK (e_calendar_on_next_released), GTK_OBJECT (cal)); gdk_pixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, @@ -227,7 +227,7 @@ e_calendar_init (ECalendar *cal) pixmap = gtk_pixmap_new (gdk_pixmap, gdk_mask); gtk_widget_show (pixmap); gdk_pixmap_unref (gdk_pixmap); - gdk_bitmap_unref (gdk_mask); + g_object_unref (gdk_mask); gtk_container_add (GTK_CONTAINER (button), pixmap); cal->next_item = gnome_canvas_item_new (canvas_group, @@ -320,7 +320,7 @@ e_calendar_size_request (GtkWidget *widget, cal = E_CALENDAR (widget); style = GTK_WIDGET (cal)->style; - gtk_object_get (GTK_OBJECT (cal->calitem), + g_object_get((cal->calitem), "row_height", &row_height, "column_width", &col_width, NULL); diff --git a/widgets/misc/e-calendar.h b/widgets/misc/e-calendar.h index 87ed8b2f3d..aadde962f4 100644 --- a/widgets/misc/e-calendar.h +++ b/widgets/misc/e-calendar.h @@ -39,9 +39,9 @@ extern "C" { * to got to the current day. */ -#define E_CALENDAR(obj) GTK_CHECK_CAST (obj, e_calendar_get_type (), ECalendar) -#define E_CALENDAR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_calendar_get_type (), ECalendarClass) -#define E_IS_CALENDAR(obj) GTK_CHECK_TYPE (obj, e_calendar_get_type ()) +#define E_CALENDAR(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, e_calendar_get_type (), ECalendar) +#define E_CALENDAR_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, e_calendar_get_type (), ECalendarClass) +#define E_IS_CALENDAR(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, e_calendar_get_type ()) typedef struct _ECalendar ECalendar; diff --git a/widgets/misc/e-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c index b2a022a351..4e2dfe8831 100644 --- a/widgets/misc/e-cell-date-edit.c +++ b/widgets/misc/e-cell-date-edit.c @@ -153,7 +153,7 @@ e_cell_date_edit_class_init (GtkObjectClass *object_class) ecpc->popup = e_cell_date_edit_do_popup; - parent_class = gtk_type_class (e_cell_popup_get_type ()); + parent_class = g_type_class_ref(e_cell_popup_get_type ()); } @@ -205,7 +205,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde) gtk_widget_show (vbox2); ecde->time_entry = gtk_entry_new (); - gtk_widget_set_usize (ecde->time_entry, 50, -1); + gtk_widget_set_size_request (ecde->time_entry, 50, -1); gtk_box_pack_start (GTK_BOX (vbox2), ecde->time_entry, FALSE, FALSE, 0); gtk_widget_show (ecde->time_entry); @@ -223,8 +223,8 @@ e_cell_date_edit_init (ECellDateEdit *ecde) gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_window))); gtk_widget_show (list); ecde->time_list = list; - gtk_signal_connect (GTK_OBJECT (list), "selection-changed", - GTK_SIGNAL_FUNC (e_cell_date_edit_on_time_selected), + g_signal_connect((list), "selection-changed", + G_CALLBACK (e_cell_date_edit_on_time_selected), ecde); bbox = gtk_hbutton_box_new (); @@ -238,42 +238,42 @@ e_cell_date_edit_init (ECellDateEdit *ecde) now_button = gtk_button_new_with_label (_("Now")); gtk_container_add (GTK_CONTAINER (bbox), now_button); gtk_widget_show (now_button); - gtk_signal_connect (GTK_OBJECT (now_button), "clicked", - GTK_SIGNAL_FUNC (e_cell_date_edit_on_now_clicked), + g_signal_connect((now_button), "clicked", + G_CALLBACK (e_cell_date_edit_on_now_clicked), ecde); ecde->now_button = now_button; today_button = gtk_button_new_with_label (_("Today")); gtk_container_add (GTK_CONTAINER (bbox), today_button); gtk_widget_show (today_button); - gtk_signal_connect (GTK_OBJECT (today_button), "clicked", - GTK_SIGNAL_FUNC (e_cell_date_edit_on_today_clicked), + g_signal_connect((today_button), "clicked", + G_CALLBACK (e_cell_date_edit_on_today_clicked), ecde); ecde->today_button = today_button; none_button = gtk_button_new_with_label (_("None")); gtk_container_add (GTK_CONTAINER (bbox), none_button); gtk_widget_show (none_button); - gtk_signal_connect (GTK_OBJECT (none_button), "clicked", - GTK_SIGNAL_FUNC (e_cell_date_edit_on_none_clicked), + g_signal_connect((none_button), "clicked", + G_CALLBACK (e_cell_date_edit_on_none_clicked), ecde); ecde->none_button = none_button; ok_button = gtk_button_new_with_label (_("OK")); gtk_container_add (GTK_CONTAINER (bbox), ok_button); gtk_widget_show (ok_button); - gtk_signal_connect (GTK_OBJECT (ok_button), "clicked", - GTK_SIGNAL_FUNC (e_cell_date_edit_on_ok_clicked), + g_signal_connect((ok_button), "clicked", + G_CALLBACK (e_cell_date_edit_on_ok_clicked), ecde); - gtk_signal_connect (GTK_OBJECT (ecde->popup_window), + g_signal_connect((ecde->popup_window), "key_press_event", - GTK_SIGNAL_FUNC (e_cell_date_edit_key_press), + G_CALLBACK (e_cell_date_edit_key_press), ecde); - gtk_signal_connect (GTK_OBJECT (ecde->popup_window), + g_signal_connect((ecde->popup_window), "button_press_event", - GTK_SIGNAL_FUNC (e_cell_date_edit_button_press), + G_CALLBACK (e_cell_date_edit_button_press), ecde); } @@ -565,7 +565,7 @@ e_cell_date_edit_show_popup (ECellDateEdit *ecde, e_cell_date_edit_get_popup_pos (ecde, row, view_col, &x, &y, &height, &width); gtk_widget_set_uposition (ecde->popup_window, x, y); - gtk_widget_set_usize (ecde->popup_window, width, height); + gtk_widget_set_size_request (ecde->popup_window, width, height); gtk_widget_realize (ecde->popup_window); gdk_window_resize (ecde->popup_window->window, width, height); gtk_widget_show (ecde->popup_window); diff --git a/widgets/misc/e-cell-date-edit.h b/widgets/misc/e-cell-date-edit.h index da7a19ef8a..6f1dacbb58 100644 --- a/widgets/misc/e-cell-date-edit.h +++ b/widgets/misc/e-cell-date-edit.h @@ -33,10 +33,10 @@ #include <gal/e-table/e-cell-popup.h> #define E_CELL_DATE_EDIT_TYPE (e_cell_date_edit_get_type ()) -#define E_CELL_DATE_EDIT(o) (GTK_CHECK_CAST ((o), E_CELL_DATE_EDIT_TYPE, ECellDateEdit)) -#define E_CELL_DATE_EDIT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CELL_DATE_EDIT_TYPE, ECellDateEditClass)) -#define E_IS_CELL_DATE_EDIT(o) (GTK_CHECK_TYPE ((o), E_CELL_DATE_EDIT_TYPE)) -#define E_IS_CELL_DATE_EDIT_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CELL_DATE_EDIT_TYPE)) +#define E_CELL_DATE_EDIT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_CELL_DATE_EDIT_TYPE, ECellDateEdit)) +#define E_CELL_DATE_EDIT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), E_CELL_DATE_EDIT_TYPE, ECellDateEditClass)) +#define E_IS_CELL_DATE_EDIT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_CELL_DATE_EDIT_TYPE)) +#define E_IS_CELL_DATE_EDIT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_CELL_DATE_EDIT_TYPE)) typedef struct _ECellDateEdit ECellDateEdit; diff --git a/widgets/misc/e-cell-percent.c b/widgets/misc/e-cell-percent.c index c267f7b223..e2e6ae6b6b 100644 --- a/widgets/misc/e-cell-percent.c +++ b/widgets/misc/e-cell-percent.c @@ -119,7 +119,7 @@ e_cell_percent_class_init (GtkObjectClass *object_class) { ECellTextClass *ectc = (ECellTextClass *) object_class; - parent_class = gtk_type_class (PARENT_TYPE); + parent_class = g_type_class_ref(PARENT_TYPE); ectc->get_text = ecp_get_text; ectc->free_text = ecp_free_text; diff --git a/widgets/misc/e-cell-percent.h b/widgets/misc/e-cell-percent.h index 3fdfb994df..74f56ae225 100644 --- a/widgets/misc/e-cell-percent.h +++ b/widgets/misc/e-cell-percent.h @@ -32,10 +32,10 @@ #include <gal/e-table/e-cell-text.h> #define E_CELL_PERCENT_TYPE (e_cell_percent_get_type ()) -#define E_CELL_PERCENT(o) (GTK_CHECK_CAST ((o), E_CELL_PERCENT_TYPE, ECellPercent)) -#define E_CELL_PERCENT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CELL_PERCENT_TYPE, ECellPercentClass)) -#define E_IS_CELL_NUMBER(o) (GTK_CHECK_TYPE ((o), E_CELL_PERCENT_TYPE)) -#define E_IS_CELL_NUMBER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CELL_PERCENT_TYPE)) +#define E_CELL_PERCENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_CELL_PERCENT_TYPE, ECellPercent)) +#define E_CELL_PERCENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), E_CELL_PERCENT_TYPE, ECellPercentClass)) +#define E_IS_CELL_NUMBER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_CELL_PERCENT_TYPE)) +#define E_IS_CELL_NUMBER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_CELL_PERCENT_TYPE)) typedef struct { ECellText base; diff --git a/widgets/misc/e-charset-picker.c b/widgets/misc/e-charset-picker.c index f2ffb3a5ef..0199da5bfc 100644 --- a/widgets/misc/e-charset-picker.c +++ b/widgets/misc/e-charset-picker.c @@ -33,6 +33,7 @@ #include <gtk/gtkoptionmenu.h> #include <gtk/gtksignal.h> +#include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-dialog-util.h> #include <libgnome/gnome-i18n.h> @@ -115,7 +116,7 @@ select_item (GtkMenuShell *menu_shell, GtkWidget *item) static void activate (GtkWidget *item, gpointer menu) { - gtk_object_set_data (GTK_OBJECT (menu), "activated_item", item); + g_object_set_data(G_OBJECT(menu), "activated_item", item); } static GtkWidget * @@ -138,14 +139,14 @@ add_charset (GtkWidget *menu, ECharset *charset, gboolean free_name) } item = gtk_menu_item_new_with_label (label); - gtk_object_set_data_full (GTK_OBJECT (item), "charset", + g_object_set_data_full(G_OBJECT(item), "charset", charset->name, free_name ? g_free : NULL); g_free (label); gtk_widget_show (item); - gtk_menu_append (GTK_MENU (menu), item); - gtk_signal_connect (GTK_OBJECT (item), "activate", - GTK_SIGNAL_FUNC (activate), menu); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); + g_signal_connect((item), "activate", + G_CALLBACK (activate), menu); return item; } @@ -160,14 +161,14 @@ add_other_charset (GtkWidget *menu, GtkWidget *other, char *new_charset) ic = iconv_open ("UTF-8", new_charset); if (ic == (iconv_t)-1) { GtkWidget *window = gtk_widget_get_ancestor (other, GTK_TYPE_WINDOW); - e_notice (GTK_WINDOW (window), GNOME_MESSAGE_BOX_ERROR, + e_notice (GTK_WINDOW (window), GTK_MESSAGE_ERROR, _("Unknown character set: %s"), new_charset); return FALSE; } iconv_close (ic); /* Temporarily remove the "Other..." item */ - gtk_object_ref (GTK_OBJECT (other)); + g_object_ref((other)); gtk_container_remove (GTK_CONTAINER (menu), other); /* Create new menu item */ @@ -175,13 +176,13 @@ add_other_charset (GtkWidget *menu, GtkWidget *other, char *new_charset) item = add_charset (menu, &charset, TRUE); /* And re-add "Other..." */ - gtk_menu_append (GTK_MENU (menu), other); - gtk_object_unref (GTK_OBJECT (other)); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), other); + g_object_unref((other)); - gtk_object_set_data_full (GTK_OBJECT (menu), "other_charset", + g_object_set_data_full(G_OBJECT(menu), "other_charset", g_strdup (new_charset), g_free); - gtk_object_set_data (GTK_OBJECT (menu), "activated_item", item); + g_object_set_data(G_OBJECT(menu), "activated_item", item); select_item (GTK_MENU_SHELL (menu), item); return TRUE; } @@ -201,7 +202,7 @@ activate_other (GtkWidget *item, gpointer menu) char *old_charset, *new_charset; window = gtk_widget_get_ancestor (item, GTK_TYPE_WINDOW); - old_charset = gtk_object_get_data (GTK_OBJECT (menu), "other_charset"); + old_charset = g_object_get_data(G_OBJECT(menu), "other_charset"); dialog = gnome_request_dialog (FALSE, _("Enter the character set to use"), old_charset, 0, other_charset_callback, @@ -215,7 +216,7 @@ activate_other (GtkWidget *item, gpointer menu) } /* Revert to previous selection */ - select_item (GTK_MENU_SHELL (menu), gtk_object_get_data (GTK_OBJECT (menu), "activated_item")); + select_item (GTK_MENU_SHELL (menu), g_object_get_data(G_OBJECT(menu), "activated_item")); } /** @@ -263,7 +264,7 @@ e_charset_picker_new (const char *default_charset) } /* do the Unknown/Other section */ - gtk_menu_append (GTK_MENU (menu), gtk_menu_item_new ()); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_menu_item_new ()); if (def == num_charsets) { ECharset other = { NULL, E_CHARSET_UNKNOWN, NULL }; @@ -273,15 +274,15 @@ e_charset_picker_new (const char *default_charset) item = add_charset (menu, &other, TRUE); activate (item, menu); select_item (GTK_MENU_SHELL (menu), item); - gtk_object_set_data_full (GTK_OBJECT (menu), "other_charset", + g_object_set_data_full(G_OBJECT(menu), "other_charset", g_strdup (default_charset), g_free); def++; } item = gtk_menu_item_new_with_label (_("Other...")); - gtk_signal_connect (GTK_OBJECT (item), "activate", - GTK_SIGNAL_FUNC (activate_other), menu); - gtk_menu_append (GTK_MENU (menu), item); + g_signal_connect((item), "activate", + G_CALLBACK (activate_other), menu); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show_all (menu); return menu; @@ -303,7 +304,7 @@ e_charset_picker_get_charset (GtkWidget *menu) g_return_val_if_fail (GTK_IS_MENU (menu), NULL); item = gtk_menu_get_active (GTK_MENU (menu)); - charset = gtk_object_get_data (GTK_OBJECT (item), "charset"); + charset = g_object_get_data(G_OBJECT(item), "charset"); return g_strdup (charset); } diff --git a/widgets/misc/e-clipped-label.c b/widgets/misc/e-clipped-label.c index f74a720aea..cb0c5ba478 100644 --- a/widgets/misc/e-clipped-label.c +++ b/widgets/misc/e-clipped-label.c @@ -82,7 +82,7 @@ e_clipped_label_get_type (void) (GtkClassInitFunc) NULL }; - parent_class = gtk_type_class (GTK_TYPE_MISC); + parent_class = g_type_class_ref(GTK_TYPE_MISC); e_clipped_label_type = gtk_type_unique (GTK_TYPE_MISC, &e_clipped_label_info); } diff --git a/widgets/misc/e-clipped-label.h b/widgets/misc/e-clipped-label.h index 002cb0de0a..6649fee366 100644 --- a/widgets/misc/e-clipped-label.h +++ b/widgets/misc/e-clipped-label.h @@ -37,9 +37,9 @@ extern "C" { #endif /* __cplusplus */ -#define E_CLIPPED_LABEL(obj) GTK_CHECK_CAST (obj, e_clipped_label_get_type (), EClippedLabel) -#define E_CLIPPED_LABEL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_clipped_label_get_type (), EClippedLabelClass) -#define E_IS_CLIPPED_LABEL(obj) GTK_CHECK_TYPE (obj, e_clipped_label_get_type ()) +#define E_CLIPPED_LABEL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, e_clipped_label_get_type (), EClippedLabel) +#define E_CLIPPED_LABEL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, e_clipped_label_get_type (), EClippedLabelClass) +#define E_IS_CLIPPED_LABEL(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, e_clipped_label_get_type ()) typedef struct _EClippedLabel EClippedLabel; diff --git a/widgets/misc/e-combo-button.c b/widgets/misc/e-combo-button.c index f0f3b64c6b..0929d0bbd5 100644 --- a/widgets/misc/e-combo-button.c +++ b/widgets/misc/e-combo-button.c @@ -88,7 +88,7 @@ create_pixmap_widget_from_pixbuf (GdkPixbuf *pixbuf) pixmap_widget = gtk_pixmap_new (pixmap, mask); gdk_pixmap_unref (pixmap); - gdk_bitmap_unref (mask); + g_object_unref (mask); return pixmap_widget; } @@ -103,7 +103,7 @@ create_empty_pixmap_widget (void) pixmap_widget = create_pixmap_widget_from_pixbuf (pixbuf); - gdk_pixbuf_unref (pixbuf); + g_object_unref (pixbuf); return pixmap_widget; } @@ -118,7 +118,7 @@ create_arrow_pixmap_widget (void) pixmap_widget = create_pixmap_widget_from_pixbuf (pixbuf); - gdk_pixbuf_unref (pixbuf); + g_object_unref (pixbuf); return pixmap_widget; } @@ -134,7 +134,7 @@ set_icon (EComboButton *combo_button, priv = combo_button->priv; if (priv->icon != NULL) - gdk_pixbuf_unref (priv->icon); + g_object_unref (priv->icon); if (pixbuf == NULL) { priv->icon = NULL; @@ -142,7 +142,7 @@ set_icon (EComboButton *combo_button, return; } - priv->icon = gdk_pixbuf_ref (pixbuf); + priv->icon = g_object_ref (pixbuf); gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, 128); gtk_pixmap_set (GTK_PIXMAP (priv->icon_pixmap), pixmap, mask); @@ -278,7 +278,7 @@ impl_destroy (GtkObject *object) } if (priv->icon != NULL) { - gdk_pixbuf_unref (priv->icon); + g_object_unref (priv->icon); priv->icon = NULL; } @@ -412,7 +412,7 @@ class_init (GtkObjectClass *object_class) GtkWidgetClass *widget_class; GtkButtonClass *button_class; - parent_class = gtk_type_class (PARENT_TYPE); + parent_class = g_type_class_ref(PARENT_TYPE); object_class->destroy = impl_destroy; @@ -427,7 +427,7 @@ class_init (GtkObjectClass *object_class) signals[ACTIVATE_DEFAULT] = gtk_signal_new ("activate_default", GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (EComboButtonClass, activate_default), + G_STRUCT_OFFSET (EComboButtonClass, activate_default), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); } @@ -542,8 +542,8 @@ e_combo_button_set_menu (EComboButton *combo_button, gtk_menu_attach_to_widget (menu, GTK_WIDGET (combo_button), menu_detacher); - gtk_signal_connect (GTK_OBJECT (menu), "deactivate", - GTK_SIGNAL_FUNC (menu_deactivate_callback), + g_signal_connect((menu), "deactivate", + G_CALLBACK (menu_deactivate_callback), combo_button); } diff --git a/widgets/misc/e-combo-button.h b/widgets/misc/e-combo-button.h index a0ad8af8f6..fa4dcc65a2 100644 --- a/widgets/misc/e-combo-button.h +++ b/widgets/misc/e-combo-button.h @@ -38,10 +38,10 @@ extern "C" { #endif /* __cplusplus */ #define E_TYPE_COMBO_BUTTON (e_combo_button_get_type ()) -#define E_COMBO_BUTTON(obj) (GTK_CHECK_CAST ((obj), E_TYPE_COMBO_BUTTON, EComboButton)) -#define E_COMBO_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_COMBO_BUTTON, EComboButtonClass)) -#define E_IS_COMBO_BUTTON(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_COMBO_BUTTON)) -#define E_IS_COMBO_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_COMBO_BUTTON)) +#define E_COMBO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_COMBO_BUTTON, EComboButton)) +#define E_COMBO_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_COMBO_BUTTON, EComboButtonClass)) +#define E_IS_COMBO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_COMBO_BUTTON)) +#define E_IS_COMBO_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_COMBO_BUTTON)) typedef struct _EComboButton EComboButton; diff --git a/widgets/misc/e-config-page.c b/widgets/misc/e-config-page.c index 3bd2f8257b..ad440ca938 100644 --- a/widgets/misc/e-config-page.c +++ b/widgets/misc/e-config-page.c @@ -70,19 +70,19 @@ class_init (EConfigPageClass *class) object_class = G_OBJECT_CLASS (class); object_class->finalize = impl_finalize; - parent_class = gtk_type_class (PARENT_TYPE); + parent_class = g_type_class_ref(PARENT_TYPE); signals[APPLY] = gtk_signal_new ("apply", GTK_RUN_LAST, GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (EConfigPageClass, apply), + G_STRUCT_OFFSET (EConfigPageClass, apply), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); signals[CHANGED] = gtk_signal_new ("changed", GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (EConfigPageClass, changed), + G_STRUCT_OFFSET (EConfigPageClass, changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); } diff --git a/widgets/misc/e-config-page.h b/widgets/misc/e-config-page.h index 3cbbc482cc..4862f8b1b5 100644 --- a/widgets/misc/e-config-page.h +++ b/widgets/misc/e-config-page.h @@ -35,10 +35,10 @@ extern "C" { #endif /* __cplusplus */ #define E_TYPE_CONFIG_PAGE (e_config_page_get_type ()) -#define E_CONFIG_PAGE(obj) (GTK_CHECK_CAST ((obj), E_TYPE_CONFIG_PAGE, EConfigPage)) -#define E_CONFIG_PAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_CONFIG_PAGE, EConfigPageClass)) -#define E_IS_CONFIG_PAGE(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_CONFIG_PAGE)) -#define E_IS_CONFIG_PAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_CONFIG_PAGE)) +#define E_CONFIG_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CONFIG_PAGE, EConfigPage)) +#define E_CONFIG_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CONFIG_PAGE, EConfigPageClass)) +#define E_IS_CONFIG_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CONFIG_PAGE)) +#define E_IS_CONFIG_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_CONFIG_PAGE)) typedef struct _EConfigPage EConfigPage; diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index c88f6fc803..72dcb15772 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -324,7 +324,7 @@ create_children (EDateEdit *dedit) priv = dedit->priv; priv->date_entry = gtk_entry_new (); - gtk_widget_set_usize (priv->date_entry, 90, 0); + gtk_widget_set_size_request (priv->date_entry, 90, 0); gtk_box_pack_start (GTK_BOX (dedit), priv->date_entry, FALSE, TRUE, 0); g_signal_connect (priv->date_entry, "key_press_event", @@ -356,7 +356,7 @@ create_children (EDateEdit *dedit) priv->time_combo = gtk_combo_new (); - gtk_widget_set_usize (GTK_COMBO (priv->time_combo)->entry, 90, 0); + gtk_widget_set_size_request (GTK_COMBO (priv->time_combo)->entry, 90, 0); gtk_box_pack_start (GTK_BOX (dedit), priv->time_combo, FALSE, TRUE, 0); rebuild_time_popup (dedit); diff --git a/widgets/misc/e-dateedit.h b/widgets/misc/e-dateedit.h index 2e6337c4c4..1fa14b95c8 100644 --- a/widgets/misc/e-dateedit.h +++ b/widgets/misc/e-dateedit.h @@ -46,10 +46,10 @@ #include <gtk/gtkwidget.h> #define E_TYPE_DATE_EDIT (e_date_edit_get_type ()) -#define E_DATE_EDIT(obj) (GTK_CHECK_CAST ((obj), E_TYPE_DATE_EDIT, EDateEdit)) -#define E_DATE_EDIT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_DATE_EDIT, EDateEditClass)) -#define E_IS_DATE_EDIT(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_DATE_EDIT)) -#define E_IS_DATE_EDIT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_DATE_EDIT)) +#define E_DATE_EDIT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_DATE_EDIT, EDateEdit)) +#define E_DATE_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_DATE_EDIT, EDateEditClass)) +#define E_IS_DATE_EDIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_DATE_EDIT)) +#define E_IS_DATE_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_DATE_EDIT)) typedef struct _EDateEdit EDateEdit; typedef struct _EDateEditPrivate EDateEditPrivate; diff --git a/widgets/misc/e-dropdown-button.c b/widgets/misc/e-dropdown-button.c index 7a25b80859..6ccbda5783 100644 --- a/widgets/misc/e-dropdown-button.c +++ b/widgets/misc/e-dropdown-button.c @@ -154,7 +154,7 @@ class_init (EDropdownButtonClass *klass) object_class->destroy = impl_destroy; toggle_class->toggled = impl_toggled; - parent_class = gtk_type_class (PARENT_TYPE); + parent_class = g_type_class_ref(PARENT_TYPE); } @@ -217,7 +217,7 @@ e_dropdown_button_construct (EDropdownButton *dropdown_button, priv->menu = GTK_WIDGET (menu); gtk_signal_connect_while_alive (GTK_OBJECT (priv->menu), "deactivate", - GTK_SIGNAL_FUNC (menu_deactivate_cb), + G_CALLBACK (menu_deactivate_cb), dropdown_button, GTK_OBJECT (dropdown_button)); } diff --git a/widgets/misc/e-dropdown-button.h b/widgets/misc/e-dropdown-button.h index 72c34f729f..f0e6257b0f 100644 --- a/widgets/misc/e-dropdown-button.h +++ b/widgets/misc/e-dropdown-button.h @@ -36,10 +36,10 @@ extern "C" { #endif /* __cplusplus */ #define E_TYPE_DROPDOWN_BUTTON (e_dropdown_button_get_type ()) -#define E_DROPDOWN_BUTTON(obj) (GTK_CHECK_CAST ((obj), E_TYPE_DROPDOWN_BUTTON, EDropdownButton)) -#define E_DROPDOWN_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_DROPDOWN_BUTTON, EDropdownButtonClass)) -#define E_IS_DROPDOWN_BUTTON(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_DROPDOWN_BUTTON)) -#define E_IS_DROPDOWN_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_DROPDOWN_BUTTON)) +#define E_DROPDOWN_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_DROPDOWN_BUTTON, EDropdownButton)) +#define E_DROPDOWN_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_DROPDOWN_BUTTON, EDropdownButtonClass)) +#define E_IS_DROPDOWN_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_DROPDOWN_BUTTON)) +#define E_IS_DROPDOWN_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_DROPDOWN_BUTTON)) typedef struct _EDropdownButton EDropdownButton; diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c index 14a3c8065f..28ac335273 100644 --- a/widgets/misc/e-filter-bar.c +++ b/widgets/misc/e-filter-bar.c @@ -251,7 +251,7 @@ menubar_activated (ESearchBar *esb, int id, void *data) } } - gtk_signal_emit_stop_by_name (GTK_OBJECT (esb), "menu_activated"); + g_signal_stop_emission_by_name((esb), "menu_activated"); } static void @@ -618,7 +618,7 @@ class_init (EFilterBarClass *klass) object_class = G_OBJECT_CLASS (klass); gtk_object_class = GTK_OBJECT_CLASS (klass); - parent_class = gtk_type_class (e_search_bar_get_type ()); + parent_class = g_type_class_ref(e_search_bar_get_type ()); object_class->dispose = dispose; @@ -634,7 +634,7 @@ class_init (EFilterBarClass *klass) gtk_signal_new ("query_changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (EFilterBarClass, query_changed), + G_STRUCT_OFFSET (EFilterBarClass, query_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -642,7 +642,7 @@ class_init (EFilterBarClass *klass) gtk_signal_new ("menu_activated", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (EFilterBarClass, menu_activated), + G_STRUCT_OFFSET (EFilterBarClass, menu_activated), gtk_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); diff --git a/widgets/misc/e-filter-bar.h b/widgets/misc/e-filter-bar.h index c824b5fced..e53cf87099 100644 --- a/widgets/misc/e-filter-bar.h +++ b/widgets/misc/e-filter-bar.h @@ -42,10 +42,10 @@ extern "C" { */ #define E_FILTER_BAR_TYPE (e_filter_bar_get_type ()) -#define E_FILTER_BAR(obj) (GTK_CHECK_CAST ((obj), E_FILTER_BAR_TYPE, EFilterBar)) -#define E_FILTER_BAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_FILTER_BAR_TYPE, EFilterBarClass)) -#define E_IS_FILTER_BAR(obj) (GTK_CHECK_TYPE ((obj), E_FILTER_BAR_TYPE)) -#define E_IS_FILTER_BAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_FILTER_BAR_TYPE)) +#define E_FILTER_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_FILTER_BAR_TYPE, EFilterBar)) +#define E_FILTER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_FILTER_BAR_TYPE, EFilterBarClass)) +#define E_IS_FILTER_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_FILTER_BAR_TYPE)) +#define E_IS_FILTER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_FILTER_BAR_TYPE)) typedef struct _EFilterBar EFilterBar; typedef struct _EFilterBarClass EFilterBarClass; diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c index 8114bead81..3cd13cd656 100644 --- a/widgets/misc/e-map.c +++ b/widgets/misc/e-map.c @@ -167,7 +167,7 @@ e_map_class_init (EMapClass *class) object_class = (GtkObjectClass *) class; widget_class = (GtkWidgetClass *) class; - parent_class = gtk_type_class (GTK_TYPE_WIDGET); + parent_class = g_type_class_ref(GTK_TYPE_WIDGET); gobject_class->finalize = e_map_finalize; @@ -177,7 +177,7 @@ e_map_class_init (EMapClass *class) widget_class->set_scroll_adjustments_signal = gtk_signal_new ("set_scroll_adjustments", GTK_RUN_LAST, GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (EMapClass, set_scroll_adjustments), + G_STRUCT_OFFSET (EMapClass, set_scroll_adjustments), gtk_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, @@ -253,21 +253,21 @@ e_map_finalize (GObject *object) view = E_MAP (object); priv = view->priv; - gtk_object_unref (GTK_OBJECT (priv->hadj)); + g_object_unref((priv->hadj)); priv->hadj = NULL; - gtk_object_unref (GTK_OBJECT (priv->vadj)); + g_object_unref((priv->vadj)); priv->vadj = NULL; if (priv->map_pixbuf) { - gdk_pixbuf_unref (priv->map_pixbuf); + g_object_unref (priv->map_pixbuf); priv->map_pixbuf = NULL; } if (priv->map_render_pixbuf) { - gdk_pixbuf_unref (priv->map_render_pixbuf); + g_object_unref (priv->map_render_pixbuf); priv->map_render_pixbuf = NULL; } @@ -506,13 +506,13 @@ e_map_set_scroll_adjustments (GtkWidget *widget, GtkAdjustment *hadj, GtkAdjustm if (priv->hadj && priv->hadj != hadj) { gtk_signal_disconnect_by_data (GTK_OBJECT (priv->hadj), view); - gtk_object_unref (GTK_OBJECT (priv->hadj)); + g_object_unref((priv->hadj)); } if (priv->vadj && priv->vadj != vadj) { gtk_signal_disconnect_by_data (GTK_OBJECT (priv->vadj), view); - gtk_object_unref (GTK_OBJECT (priv->vadj)); + g_object_unref((priv->vadj)); } need_adjust = FALSE; @@ -520,10 +520,10 @@ e_map_set_scroll_adjustments (GtkWidget *widget, GtkAdjustment *hadj, GtkAdjustm if (priv->hadj != hadj) { priv->hadj = hadj; - gtk_object_ref (GTK_OBJECT (priv->hadj)); + g_object_ref((priv->hadj)); gtk_object_sink (GTK_OBJECT (priv->hadj)); - gtk_signal_connect (GTK_OBJECT (priv->hadj), "value_changed", GTK_SIGNAL_FUNC (adjustment_changed_cb), view); + g_signal_connect((priv->hadj), "value_changed", G_CALLBACK (adjustment_changed_cb), view); need_adjust = TRUE; } @@ -531,10 +531,10 @@ e_map_set_scroll_adjustments (GtkWidget *widget, GtkAdjustment *hadj, GtkAdjustm if (priv->vadj != vadj) { priv->vadj = vadj; - gtk_object_ref (GTK_OBJECT (priv->vadj)); + g_object_ref((priv->vadj)); gtk_object_sink (GTK_OBJECT (priv->vadj)); - gtk_signal_connect (GTK_OBJECT (priv->vadj), "value_changed", GTK_SIGNAL_FUNC (adjustment_changed_cb), view); + g_signal_connect((priv->vadj), "value_changed", G_CALLBACK (adjustment_changed_cb), view); need_adjust = TRUE; } @@ -974,7 +974,7 @@ load_map_background (EMap *view, gchar *name) if (!pb0) return FALSE; - if (priv->map_pixbuf) gdk_pixbuf_unref (priv->map_pixbuf); + if (priv->map_pixbuf) g_object_unref (priv->map_pixbuf); priv->map_pixbuf = pb0; update_render_pixbuf (view, GDK_INTERP_BILINEAR, TRUE); @@ -1018,7 +1018,7 @@ update_render_pixbuf (EMap *map, ArtFilterLevel interp, gboolean render_overlays /* Reallocate the pixbuf */ - if (priv->map_render_pixbuf) gdk_pixbuf_unref (priv->map_render_pixbuf); + if (priv->map_render_pixbuf) g_object_unref (priv->map_render_pixbuf); priv->map_render_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, /* No alpha */ 8, width, height); diff --git a/widgets/misc/e-map.h b/widgets/misc/e-map.h index bf4deb2ca1..9e0098a5a2 100644 --- a/widgets/misc/e-map.h +++ b/widgets/misc/e-map.h @@ -26,10 +26,10 @@ #include <gtk/gtkwidget.h> #define TYPE_E_MAP (e_map_get_type ()) -#define E_MAP(obj) (GTK_CHECK_CAST ((obj), TYPE_E_MAP, EMap)) -#define E_MAP_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_E_MAP, EMapClass)) -#define IS_E_MAP(obj) (GTK_CHECK_TYPE ((obj), TYPE_E_MAP)) -#define IS_E_MAP_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_E_MAP)) +#define E_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_E_MAP, EMap)) +#define E_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_E_MAP, EMapClass)) +#define IS_E_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_E_MAP)) +#define IS_E_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_E_MAP)) typedef struct _EMap EMap; typedef struct _EMapClass EMapClass; diff --git a/widgets/misc/e-messagebox.c b/widgets/misc/e-messagebox.c index 9607e2fa92..4a6da0e3cf 100644 --- a/widgets/misc/e-messagebox.c +++ b/widgets/misc/e-messagebox.c @@ -81,7 +81,7 @@ e_message_box_class_init (EMessageBoxClass *klass) gobject_class = (GObjectClass *) klass; object_class = (GtkObjectClass *) klass; - parent_class = gtk_type_class (gnome_dialog_get_type ()); + parent_class = g_type_class_ref(gnome_dialog_get_type ()); gobject_class->finalize = e_message_box_finalize; @@ -216,7 +216,7 @@ e_message_box_construct (EMessageBox *messagebox, /* Add some extra space on the right to balance the pixmap */ if (pixmap) { alignment = gtk_alignment_new (0., 0., 0., 0.); - gtk_widget_set_usize (alignment, GNOME_PAD, -1); + gtk_widget_set_size_request (alignment, GNOME_PAD, -1); gtk_widget_show (alignment); gtk_box_pack_start (GTK_BOX (hbox), alignment, FALSE, FALSE, 0); diff --git a/widgets/misc/e-messagebox.h b/widgets/misc/e-messagebox.h index c7f280bbf2..a659262767 100644 --- a/widgets/misc/e-messagebox.h +++ b/widgets/misc/e-messagebox.h @@ -23,15 +23,17 @@ #ifndef __E_MESSAGE_BOX_H__ #define __E_MESSAGE_BOX_H__ +#warning "e_messagebox is deprecated, use gtk_message_box instead" + #include <glib.h> #include <gtk/gtkwidget.h> #include <libgnomeui/gnome-dialog.h> #define E_TYPE_MESSAGE_BOX (e_message_box_get_type ()) -#define E_MESSAGE_BOX(obj) (GTK_CHECK_CAST ((obj), E_TYPE_MESSAGE_BOX, EMessageBox)) -#define E_MESSAGE_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MESSAGE_BOX, EMessageBoxClass)) -#define E_IS_MESSAGE_BOX(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_MESSAGE_BOX)) -#define E_IS_MESSAGE_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_MESSAGE_BOX)) +#define E_MESSAGE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MESSAGE_BOX, EMessageBox)) +#define E_MESSAGE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MESSAGE_BOX, EMessageBoxClass)) +#define E_IS_MESSAGE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MESSAGE_BOX)) +#define E_IS_MESSAGE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_MESSAGE_BOX)) #define E_MESSAGE_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), E_TYPE_MESSAGE_BOX, EMessageBoxClass)) diff --git a/widgets/misc/e-multi-config-dialog.c b/widgets/misc/e-multi-config-dialog.c index b1e3834074..c0f6e3066f 100644 --- a/widgets/misc/e-multi-config-dialog.c +++ b/widgets/misc/e-multi-config-dialog.c @@ -295,7 +295,7 @@ class_init (EMultiConfigDialogClass *class) dialog_class = GTK_DIALOG_CLASS (class); dialog_class->response = impl_response; - parent_class = gtk_type_class (PARENT_TYPE); + parent_class = g_type_class_ref(PARENT_TYPE); } #define RGB_COLOR(color) (((color).red & 0xff00) << 8 | \ @@ -328,7 +328,7 @@ fill_in_pixbufs (EMultiConfigDialog *dialog, int row) 1, colors[i], colors[i]); e_table_model_set_value_at (dialog->priv->list_e_table_model, i + 2, row, pixbuf); - gdk_pixbuf_unref(pixbuf); + g_object_unref(pixbuf); } } diff --git a/widgets/misc/e-multi-config-dialog.h b/widgets/misc/e-multi-config-dialog.h index e812149385..0a4c32d7a4 100644 --- a/widgets/misc/e-multi-config-dialog.h +++ b/widgets/misc/e-multi-config-dialog.h @@ -38,10 +38,10 @@ extern "C" { #endif /* __cplusplus */ #define E_TYPE_MULTI_CONFIG_DIALOG (e_multi_config_dialog_get_type ()) -#define E_MULTI_CONFIG_DIALOG(obj) (GTK_CHECK_CAST ((obj), E_TYPE_MULTI_CONFIG_DIALOG, EMultiConfigDialog)) -#define E_MULTI_CONFIG_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MULTI_CONFIG_DIALOG, EMultiConfigDialogClass)) -#define E_IS_MULTI_CONFIG_DIALOG(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_MULTI_CONFIG_DIALOG)) -#define E_IS_MULTI_CONFIG_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_MULTI_CONFIG_DIALOG)) +#define E_MULTI_CONFIG_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MULTI_CONFIG_DIALOG, EMultiConfigDialog)) +#define E_MULTI_CONFIG_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MULTI_CONFIG_DIALOG, EMultiConfigDialogClass)) +#define E_IS_MULTI_CONFIG_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MULTI_CONFIG_DIALOG)) +#define E_IS_MULTI_CONFIG_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MULTI_CONFIG_DIALOG)) typedef struct _EMultiConfigDialog EMultiConfigDialog; diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index afbfd72eb2..dd2fada5ec 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -310,7 +310,7 @@ activate_by_subitems (ESearchBar *esb, gint item_id, ESearchBarSubitem *subitems if (esb->entry == NULL) { esb->entry = gtk_entry_new(); - gtk_widget_set_usize (esb->entry, 4, -1); + gtk_widget_set_size_request (esb->entry, 4, -1); g_object_ref (esb->entry); g_signal_connect (esb->entry, "changed", G_CALLBACK (entry_changed_cb), esb); @@ -395,7 +395,7 @@ activate_by_subitems (ESearchBar *esb, gint item_id, ESearchBarSubitem *subitems esb); gtk_widget_show (menu_item); - gtk_menu_append (GTK_MENU (menu), menu_item); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item); } gtk_option_menu_remove_menu (GTK_OPTION_MENU (esb->suboption)); @@ -636,7 +636,7 @@ set_option (ESearchBar *esb, ESearchBarItem *items) gtk_widget_set_sensitive (item, FALSE); } - gtk_menu_append (GTK_MENU (menu), item); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_object_set_data (G_OBJECT (item), "EsbChoiceId", GINT_TO_POINTER(items[i].id)); diff --git a/widgets/misc/e-title-bar.c b/widgets/misc/e-title-bar.c index ffe249628b..f5ce0f97c4 100644 --- a/widgets/misc/e-title-bar.c +++ b/widgets/misc/e-title-bar.c @@ -200,9 +200,9 @@ button_realize_cb (GtkWidget *widget, gtk_container_add (GTK_CONTAINER (priv->button), hbox); gdk_pixmap_unref (close_pixmap); - gdk_bitmap_unref (close_mask); + g_object_unref (close_mask); gdk_pixmap_unref (pin_pixmap); - gdk_bitmap_unref (pin_mask); + g_object_unref (pin_mask); show_and_hide_pixmaps_according_to_mode (title_bar); } @@ -256,13 +256,13 @@ class_init (ETitleBarClass *klass) object_class = G_OBJECT_CLASS (klass); object_class->finalize = impl_finalize; - parent_class = gtk_type_class (gtk_frame_get_type ()); + parent_class = g_type_class_ref(gtk_frame_get_type ()); signals[LABEL_BUTTON_PRESS_EVENT] = gtk_signal_new ("label_button_press_event", GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (ETitleBarClass, label_button_press_event), + G_STRUCT_OFFSET (ETitleBarClass, label_button_press_event), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); @@ -271,7 +271,7 @@ class_init (ETitleBarClass *klass) gtk_signal_new ("button_clicked", GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (ETitleBarClass, button_clicked), + G_STRUCT_OFFSET (ETitleBarClass, button_clicked), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); } @@ -323,12 +323,12 @@ e_title_bar_construct (ETitleBar *title_bar, gtk_container_add (GTK_CONTAINER (title_bar), hbox); - gtk_signal_connect (GTK_OBJECT (priv->button), "realize", - GTK_SIGNAL_FUNC (button_realize_cb), title_bar); - gtk_signal_connect (GTK_OBJECT (priv->button), "clicked", - GTK_SIGNAL_FUNC (button_clicked_cb), title_bar); - gtk_signal_connect (GTK_OBJECT (priv->label), "button_press_event", - GTK_SIGNAL_FUNC (label_button_press_event_cb), title_bar); + g_signal_connect((priv->button), "realize", + G_CALLBACK (button_realize_cb), title_bar); + g_signal_connect((priv->button), "clicked", + G_CALLBACK (button_clicked_cb), title_bar); + g_signal_connect((priv->label), "button_press_event", + G_CALLBACK (label_button_press_event_cb), title_bar); } GtkWidget * diff --git a/widgets/misc/e-title-bar.h b/widgets/misc/e-title-bar.h index 388a0e6585..32c4f2b262 100644 --- a/widgets/misc/e-title-bar.h +++ b/widgets/misc/e-title-bar.h @@ -35,10 +35,10 @@ extern "C" { #endif /* __cplusplus */ #define E_TYPE_TITLE_BAR (e_title_bar_get_type ()) -#define E_TITLE_BAR(obj) (GTK_CHECK_CAST ((obj), E_TYPE_TITLE_BAR, ETitleBar)) -#define E_TITLE_BAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_TITLE_BAR, ETitleBarClass)) -#define E_IS_TITLE_BAR(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_TITLE_BAR)) -#define E_IS_TITLE_BAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_TITLE_BAR)) +#define E_TITLE_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_TITLE_BAR, ETitleBar)) +#define E_TITLE_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_TITLE_BAR, ETitleBarClass)) +#define E_IS_TITLE_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_TITLE_BAR)) +#define E_IS_TITLE_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_TITLE_BAR)) enum _ETitleBarButtonMode { diff --git a/widgets/misc/e-url-entry.c b/widgets/misc/e-url-entry.c index 4c0c477ebf..25b58d2e1d 100644 --- a/widgets/misc/e-url-entry.c +++ b/widgets/misc/e-url-entry.c @@ -76,7 +76,7 @@ class_init (EUrlEntryClass *klass) object_class = GTK_OBJECT_CLASS (klass); - parent_class = gtk_type_class (gtk_hbox_get_type ()); + parent_class = g_type_class_ref(gtk_hbox_get_type ()); object_class->destroy = destroy; } @@ -111,8 +111,8 @@ init (EUrlEntry *url_entry) gtk_widget_show (priv->button); gtk_widget_show (priv->entry); - gtk_signal_connect (GTK_OBJECT (priv->button), "clicked", - GTK_SIGNAL_FUNC (button_clicked_cb), url_entry); + g_signal_connect((priv->button), "clicked", + G_CALLBACK (button_clicked_cb), url_entry); } static void diff --git a/widgets/misc/e-url-entry.h b/widgets/misc/e-url-entry.h index 036313f9ee..3cf98d7b8c 100644 --- a/widgets/misc/e-url-entry.h +++ b/widgets/misc/e-url-entry.h @@ -36,10 +36,10 @@ extern "C" { #endif /* __cplusplus */ #define E_TYPE_URL_ENTRY (e_url_entry_get_type ()) -#define E_URL_ENTRY(obj) (GTK_CHECK_CAST ((obj), E_TYPE_URL_ENTRY, EUrlEntry)) -#define E_URL_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_URL_ENTRY, EUrlEntryClass)) -#define E_IS_URL_ENTRY(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_URL_ENTRY)) -#define E_IS_URL_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_URL_ENTRY)) +#define E_URL_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_URL_ENTRY, EUrlEntry)) +#define E_URL_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_URL_ENTRY, EUrlEntryClass)) +#define E_IS_URL_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_URL_ENTRY)) +#define E_IS_URL_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_URL_ENTRY)) typedef struct _EUrlEntry EUrlEntry; diff --git a/widgets/misc/test-calendar.c b/widgets/misc/test-calendar.c index 8e0e9fe93b..f6e4efe3ab 100644 --- a/widgets/misc/test-calendar.c +++ b/widgets/misc/test-calendar.c @@ -89,8 +89,8 @@ main (int argc, char **argv) gtk_window_set_policy (GTK_WINDOW (app), FALSE, TRUE, FALSE); gtk_container_set_border_width (GTK_CONTAINER (app), 8); - gtk_signal_connect (GTK_OBJECT (app), "delete_event", - GTK_SIGNAL_FUNC (delete_event_cb), NULL); + g_signal_connect((app), "delete_event", + G_CALLBACK (delete_event_cb), NULL); cal = e_calendar_new (); e_calendar_set_minimum_size (E_CALENDAR (cal), 1, 1); @@ -99,10 +99,10 @@ main (int argc, char **argv) e_calendar_item_set_style_callback (calitem, get_day_style, NULL, NULL); - gtk_signal_connect (GTK_OBJECT (calitem), "date_range_changed", - GTK_SIGNAL_FUNC (on_date_range_changed), NULL); - gtk_signal_connect (GTK_OBJECT (calitem), "selection_changed", - GTK_SIGNAL_FUNC (on_selection_changed), NULL); + g_signal_connect((calitem), "date_range_changed", + G_CALLBACK (on_date_range_changed), NULL); + g_signal_connect((calitem), "selection_changed", + G_CALLBACK (on_selection_changed), NULL); gtk_drag_dest_set (cal, diff --git a/widgets/misc/test-dateedit.c b/widgets/misc/test-dateedit.c index 79038bc79c..c96e881369 100644 --- a/widgets/misc/test-dateedit.c +++ b/widgets/misc/test-dateedit.c @@ -70,8 +70,8 @@ main (int argc, char **argv) gtk_window_set_policy (GTK_WINDOW (app), FALSE, TRUE, TRUE); gtk_container_set_border_width (GTK_CONTAINER (app), 8); - gtk_signal_connect (GTK_OBJECT (app), "delete_event", - GTK_SIGNAL_FUNC (delete_event_cb), app); + g_signal_connect((app), "delete_event", + G_CALLBACK (delete_event_cb), app); table = gtk_table_new (3, 3, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 4); @@ -86,21 +86,21 @@ main (int argc, char **argv) gtk_widget_show ((GtkWidget*) (dedit)); #if 0 - gtk_signal_connect (GTK_OBJECT (dedit), "date_changed", - GTK_SIGNAL_FUNC (on_date_changed), "1"); - gtk_signal_connect (GTK_OBJECT (dedit), "time_changed", - GTK_SIGNAL_FUNC (on_time_changed), "1"); + g_signal_connect((dedit), "date_changed", + G_CALLBACK (on_date_changed), "1"); + g_signal_connect((dedit), "time_changed", + G_CALLBACK (on_time_changed), "1"); #else - gtk_signal_connect (GTK_OBJECT (dedit), "changed", - GTK_SIGNAL_FUNC (on_changed), "1"); + g_signal_connect((dedit), "changed", + G_CALLBACK (on_changed), "1"); #endif button = gtk_button_new_with_label ("Print Date"); gtk_table_attach (GTK_TABLE (table), button, 1, 2, 0, 1, 0, 0, 0, 0); gtk_widget_show (button); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - GTK_SIGNAL_FUNC (on_get_date_clicked), dedit); + g_signal_connect((button), "clicked", + G_CALLBACK (on_get_date_clicked), dedit); /* EDateEdit 2. */ dedit = E_DATE_EDIT (e_date_edit_new ()); @@ -114,21 +114,21 @@ main (int argc, char **argv) e_date_edit_set_show_time (dedit, FALSE); #if 0 - gtk_signal_connect (GTK_OBJECT (dedit), "date_changed", - GTK_SIGNAL_FUNC (on_date_changed), "2"); - gtk_signal_connect (GTK_OBJECT (dedit), "time_changed", - GTK_SIGNAL_FUNC (on_time_changed), "2"); + g_signal_connect((dedit), "date_changed", + G_CALLBACK (on_date_changed), "2"); + g_signal_connect((dedit), "time_changed", + G_CALLBACK (on_time_changed), "2"); #else - gtk_signal_connect (GTK_OBJECT (dedit), "changed", - GTK_SIGNAL_FUNC (on_changed), "2"); + g_signal_connect((dedit), "changed", + G_CALLBACK (on_changed), "2"); #endif button = gtk_button_new_with_label ("Print Date"); gtk_table_attach (GTK_TABLE (table), button, 1, 2, 1, 2, 0, 0, 0, 0); gtk_widget_show (button); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - GTK_SIGNAL_FUNC (on_get_date_clicked), dedit); + g_signal_connect((button), "clicked", + G_CALLBACK (on_get_date_clicked), dedit); /* EDateEdit 3. */ dedit = E_DATE_EDIT (e_date_edit_new ()); @@ -142,28 +142,28 @@ main (int argc, char **argv) e_date_edit_set_allow_no_date_set (dedit, TRUE); #if 0 - gtk_signal_connect (GTK_OBJECT (dedit), "date_changed", - GTK_SIGNAL_FUNC (on_date_changed), "3"); - gtk_signal_connect (GTK_OBJECT (dedit), "time_changed", - GTK_SIGNAL_FUNC (on_time_changed), "3"); + g_signal_connect((dedit), "date_changed", + G_CALLBACK (on_date_changed), "3"); + g_signal_connect((dedit), "time_changed", + G_CALLBACK (on_time_changed), "3"); #else - gtk_signal_connect (GTK_OBJECT (dedit), "changed", - GTK_SIGNAL_FUNC (on_changed), "3"); + g_signal_connect((dedit), "changed", + G_CALLBACK (on_changed), "3"); #endif button = gtk_button_new_with_label ("Print Date"); gtk_table_attach (GTK_TABLE (table), button, 1, 2, 2, 3, 0, 0, 0, 0); gtk_widget_show (button); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - GTK_SIGNAL_FUNC (on_get_date_clicked), dedit); + g_signal_connect((button), "clicked", + G_CALLBACK (on_get_date_clicked), dedit); button = gtk_button_new_with_label ("Toggle 24-hour"); gtk_table_attach (GTK_TABLE (table), button, 2, 3, 2, 3, 0, 0, 0, 0); gtk_widget_show (button); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - GTK_SIGNAL_FUNC (on_toggle_24_hour_clicked), + g_signal_connect((button), "clicked", + G_CALLBACK (on_toggle_24_hour_clicked), dedit); gtk_widget_show (app); diff --git a/widgets/misc/test-multi-config-dialog.c b/widgets/misc/test-multi-config-dialog.c index 94f830fdb4..1a56af9a30 100644 --- a/widgets/misc/test-multi-config-dialog.c +++ b/widgets/misc/test-multi-config-dialog.c @@ -81,8 +81,8 @@ main (int argc, char **argv) dialog = e_multi_config_dialog_new (); gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 300); - gtk_signal_connect (GTK_OBJECT (dialog), "delete_event", - GTK_SIGNAL_FUNC (delete_event_callback), NULL); + g_signal_connect((dialog), "delete_event", + G_CALLBACK (delete_event_callback), NULL); add_pages (E_MULTI_CONFIG_DIALOG (dialog)); diff --git a/widgets/misc/test-title-bar.c b/widgets/misc/test-title-bar.c index d8bf6a08f2..80944f5b01 100644 --- a/widgets/misc/test-title-bar.c +++ b/widgets/misc/test-title-bar.c @@ -55,7 +55,7 @@ main (int argc, char **argv) gtk_window_set_default_size (GTK_WINDOW (app), 400, 400); gtk_window_set_policy (GTK_WINDOW (app), FALSE, TRUE, FALSE); - gtk_signal_connect (GTK_OBJECT (app), "delete_event", GTK_SIGNAL_FUNC (delete_event_cb), NULL); + g_signal_connect((app), "delete_event", G_CALLBACK (delete_event_cb), NULL); title_bar = e_title_bar_new ("This is a very annoyingly long title bar"); gtk_widget_show (title_bar); |