diff options
author | JP Rosevear <jpr@ximian.com> | 2002-11-08 06:47:47 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-11-08 06:47:47 +0800 |
commit | 222645151f9ba0c906ce50af6e969d79a480f66a (patch) | |
tree | 3a256bf8980abeb7ca15c96c5df2f6656e393661 | |
parent | 21528af72621f17f26b18e53eb6d22f605b9941f (diff) | |
download | gsoc2013-evolution-222645151f9ba0c906ce50af6e969d79a480f66a.tar gsoc2013-evolution-222645151f9ba0c906ce50af6e969d79a480f66a.tar.gz gsoc2013-evolution-222645151f9ba0c906ce50af6e969d79a480f66a.tar.bz2 gsoc2013-evolution-222645151f9ba0c906ce50af6e969d79a480f66a.tar.lz gsoc2013-evolution-222645151f9ba0c906ce50af6e969d79a480f66a.tar.xz gsoc2013-evolution-222645151f9ba0c906ce50af6e969d79a480f66a.tar.zst gsoc2013-evolution-222645151f9ba0c906ce50af6e969d79a480f66a.zip |
Initial port of gui/ subdir to GNOME 2
2002-11-07 JP Rosevear <jpr@ximian.com>
* Initial port of gui/ subdir to GNOME 2
svn path=/trunk/; revision=18648
57 files changed, 398 insertions, 446 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 8c17eb7da8..6f50ac82c8 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,7 @@ +2002-11-07 JP Rosevear <jpr@ximian.com> + + * Initial port of gui/ subdir to GNOME 2 + 2002-11-07 Rodrigo Moya <rodrigo@ximian.com> * importers/icalendar-importer.c: removed non-existant headers. diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c index 2483b2b126..f0e473ec1d 100644 --- a/calendar/gui/cal-search-bar.c +++ b/calendar/gui/cal-search-bar.c @@ -29,7 +29,6 @@ #include <gtk/gtkmenuitem.h> #include <gtk/gtkoptionmenu.h> #include <gtk/gtksignal.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <gal/widgets/e-unicode.h> #include "cal-search-bar.h" @@ -132,7 +131,7 @@ cal_search_bar_class_init (CalSearchBarClass *class) cal_search_bar_signals[SEXP_CHANGED] = gtk_signal_new ("sexp_changed", GTK_RUN_FIRST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (CalSearchBarClass, sexp_changed), gtk_marshal_NONE__STRING, GTK_TYPE_NONE, 1, @@ -141,14 +140,12 @@ cal_search_bar_class_init (CalSearchBarClass *class) cal_search_bar_signals[CATEGORY_CHANGED] = gtk_signal_new ("category_changed", GTK_RUN_FIRST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (CalSearchBarClass, category_changed), gtk_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); - gtk_object_class_add_signals (object_class, cal_search_bar_signals, LAST_SIGNAL); - class->sexp_changed = NULL; class->category_changed = NULL; diff --git a/calendar/gui/cal-search-bar.h b/calendar/gui/cal-search-bar.h index 5cfb29fa76..a8910ba7b4 100644 --- a/calendar/gui/cal-search-bar.h +++ b/calendar/gui/cal-search-bar.h @@ -21,11 +21,10 @@ #ifndef CAL_SEARCH_BAR_H #define CAL_SEARCH_BAR_H -#include <libgnome/gnome-defs.h> #include "widgets/misc/e-search-bar.h" #include "widgets/misc/e-filter-bar.h" -BEGIN_GNOME_DECLS +G_BEGIN_DECLS @@ -66,6 +65,6 @@ const char *cal_search_bar_get_category (CalSearchBar *cal_search); -END_GNOME_DECLS +G_END_DECLS #endif diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index d288b8e77c..0f24a6bf98 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -37,11 +37,10 @@ #include <gtk/gtkmain.h> #include <gtk/gtksignal.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-util.h> #include <libgnomeui/gnome-dialog-util.h> #include <libgnomeui/gnome-messagebox.h> -#include <libgnomeui/gnome-stock.h> +#include <libgnomeui/gnome-stock-icons.h> #include <libgnome/gnome-util.h> #include <libgnome/gnome-i18n.h> #include <bonobo/bonobo-ui-util.h> @@ -332,7 +331,7 @@ get_shell_view_interface (BonoboControl *control) GNOME_Evolution_ShellView shell_view; CORBA_Environment ev; - control_frame = bonobo_control_get_control_frame (control); + control_frame = bonobo_control_get_control_frame (control, NULL); g_assert (control_frame != CORBA_OBJECT_NIL); @@ -710,8 +709,8 @@ calendar_control_activate (BonoboControl *control, uic = bonobo_control_get_ui_component (control); g_assert (uic != NULL); - remote_uih = bonobo_control_get_remote_ui_container (control); - bonobo_ui_component_set_container (uic, remote_uih); + remote_uih = bonobo_control_get_remote_ui_container (control, NULL); + bonobo_ui_component_set_container (uic, remote_uih, NULL); bonobo_object_release_unref (remote_uih, NULL); gnome_calendar_set_ui_component (gcal, uic); @@ -722,7 +721,8 @@ calendar_control_activate (BonoboControl *control, bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR, "evolution-calendar.xml", - "evolution-calendar"); + "evolution-calendar", + NULL); e_pixmaps_update (uic, pixmaps); @@ -779,7 +779,7 @@ calendar_control_deactivate (BonoboControl *control, GnomeCalendar *gcal) gtk_signal_disconnect_by_data (GTK_OBJECT (gcal), control); bonobo_ui_component_rm (uic, "/", NULL); - bonobo_ui_component_unset_container (uic); + bonobo_ui_component_unset_container (uic, NULL); } /* Removes a calendar from our list of all calendars when it is destroyed. */ diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index aa33766260..71656bab2f 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -24,6 +24,7 @@ #include <config.h> #include <errno.h> +#include <libgnome/gnome-util.h> #include <libgnomevfs/gnome-vfs-types.h> #include <libgnomevfs/gnome-vfs-uri.h> #include <libgnomevfs/gnome-vfs-ops.h> @@ -188,7 +189,7 @@ stop_alarms (GnomeVFSURI *uri) /* Activate the alarm notification service */ CORBA_exception_init (&ev); - an = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev); + an = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev); if (BONOBO_EX (&ev)) { g_message ("stop_alarms(): Could not activate the alarm notification service"); @@ -593,8 +594,8 @@ create_component (const char *uri, GNOME_Evolution_Calendar_CompEditorFactory_Co /* Get the factory */ CORBA_exception_init (&ev); - factory = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory", - 0, NULL, &ev); + factory = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory", + 0, NULL, &ev); if (BONOBO_EX (&ev)) { g_message ("create_component(): Could not activate the component editor factory"); @@ -699,7 +700,7 @@ add_creatable_item (EvolutionShellComponent *shell_component, icon = NULL; } else { icon_path = g_concat_dir_and_file (EVOLUTION_ICONSDIR, icon_name); - icon = gdk_pixbuf_new_from_file (icon_path); + icon = gdk_pixbuf_new_from_file (icon_path, NULL); } evolution_shell_component_add_user_creatable_item (shell_component, @@ -777,12 +778,12 @@ void component_factory_init (void) { BonoboObject *object; - int result; + Bonobo_RegistrationResult result; object = create_object (); - result = oaf_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (object)); + result = bonobo_activation_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (object)); - if (result == OAF_REG_ERROR) + if (result != Bonobo_ACTIVATION_REG_SUCCESS) g_error ("Cannot initialize Evolution's calendar component."); } diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 1d52799787..7f92c8f3ca 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -29,7 +29,7 @@ #include <config.h> #include <time.h> -#include <libgnome/gnome-defs.h> +#include <gtk/gtksignal.h> #include <libgnome/gnome-config.h> #include <libgnomeui/gnome-dialog.h> #include <widgets/e-timezone-dialog/e-timezone-dialog.h> diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index 83448d01f8..dd7be86eea 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -29,7 +29,7 @@ #include <ctype.h> #include <libgnomeui/gnome-messagebox.h> -#include <libgnomeui/gnome-stock.h> +#include <libgnomeui/gnome-stock-icons.h> #include <libgnome/gnome-i18n.h> #include <gal/widgets/e-unicode.h> #include <e-util/e-time-utils.h> @@ -2113,7 +2113,7 @@ calendar_model_set_status_message (CalendarModel *model, const char *message) char *client_id = g_strdup_printf ("%p", model); if (progress_icon[0] == NULL) - progress_icon[0] = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_TASKS_PROGRESS_IMAGE); + progress_icon[0] = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_TASKS_PROGRESS_IMAGE, NULL); priv->activity = evolution_activity_client_new ( global_shell_client, client_id, progress_icon, message, TRUE, &display); diff --git a/calendar/gui/calendar-view-factory.c b/calendar/gui/calendar-view-factory.c index 0c3f0562f9..e0e223d8df 100644 --- a/calendar/gui/calendar-view-factory.c +++ b/calendar/gui/calendar-view-factory.c @@ -23,7 +23,6 @@ #endif #include <glib.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include "calendar-view-factory.h" #include "calendar-view.h" diff --git a/calendar/gui/calendar-view-factory.h b/calendar/gui/calendar-view-factory.h index 6b3409afeb..6d1de25590 100644 --- a/calendar/gui/calendar-view-factory.h +++ b/calendar/gui/calendar-view-factory.h @@ -21,11 +21,10 @@ #ifndef CALENDAR_VIEW_FACTORY_H #define CALENDAR_VIEW_FACTORY_H -#include <libgnome/gnome-defs.h> #include <gal/menus/gal-view-factory.h> #include "gnome-cal.h" -BEGIN_GNOME_DECLS +G_BEGIN_DECLS @@ -60,6 +59,6 @@ CalendarViewFactory *calendar_view_factory_new (GnomeCalendarViewType view_type) -END_GNOME_DECLS +G_END_DECLS #endif diff --git a/calendar/gui/calendar-view.h b/calendar/gui/calendar-view.h index 515038d874..8b85966a90 100644 --- a/calendar/gui/calendar-view.h +++ b/calendar/gui/calendar-view.h @@ -21,11 +21,10 @@ #ifndef CALENDAR_VIEW_H #define CALENDAR_VIEW_H -#include <libgnome/gnome-defs.h> #include <gal/menus/gal-view.h> #include "gnome-cal.h" -BEGIN_GNOME_DECLS +G_BEGIN_DECLS @@ -62,6 +61,6 @@ GnomeCalendarViewType calendar_view_get_view_type (CalendarView *cal_view); -END_GNOME_DECLS +G_END_DECLS #endif diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c index aa33766260..71656bab2f 100644 --- a/calendar/gui/component-factory.c +++ b/calendar/gui/component-factory.c @@ -24,6 +24,7 @@ #include <config.h> #include <errno.h> +#include <libgnome/gnome-util.h> #include <libgnomevfs/gnome-vfs-types.h> #include <libgnomevfs/gnome-vfs-uri.h> #include <libgnomevfs/gnome-vfs-ops.h> @@ -188,7 +189,7 @@ stop_alarms (GnomeVFSURI *uri) /* Activate the alarm notification service */ CORBA_exception_init (&ev); - an = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev); + an = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev); if (BONOBO_EX (&ev)) { g_message ("stop_alarms(): Could not activate the alarm notification service"); @@ -593,8 +594,8 @@ create_component (const char *uri, GNOME_Evolution_Calendar_CompEditorFactory_Co /* Get the factory */ CORBA_exception_init (&ev); - factory = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory", - 0, NULL, &ev); + factory = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory", + 0, NULL, &ev); if (BONOBO_EX (&ev)) { g_message ("create_component(): Could not activate the component editor factory"); @@ -699,7 +700,7 @@ add_creatable_item (EvolutionShellComponent *shell_component, icon = NULL; } else { icon_path = g_concat_dir_and_file (EVOLUTION_ICONSDIR, icon_name); - icon = gdk_pixbuf_new_from_file (icon_path); + icon = gdk_pixbuf_new_from_file (icon_path, NULL); } evolution_shell_component_add_user_creatable_item (shell_component, @@ -777,12 +778,12 @@ void component_factory_init (void) { BonoboObject *object; - int result; + Bonobo_RegistrationResult result; object = create_object (); - result = oaf_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (object)); + result = bonobo_activation_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (object)); - if (result == OAF_REG_ERROR) + if (result != Bonobo_ACTIVATION_REG_SUCCESS) g_error ("Cannot initialize Evolution's calendar component."); } diff --git a/calendar/gui/control-factory.c b/calendar/gui/control-factory.c index a17790f197..3e723a5bb3 100644 --- a/calendar/gui/control-factory.c +++ b/calendar/gui/control-factory.c @@ -22,15 +22,15 @@ */ #include <config.h> +#include <gtk/gtksignal.h> #include <glade/glade.h> #include <bonobo/bonobo-control.h> #include <bonobo/bonobo-generic-factory.h> #include <bonobo/bonobo-persist-file.h> #include <bonobo/bonobo-context.h> +#include <bonobo/bonobo-property-bag.h> #include <glade/glade.h> -#include <liboaf/liboaf.h> - #include <cal-util/timeutil.h> #include <gui/gnome-cal.h> #include <gui/calendar-commands.h> @@ -174,22 +174,26 @@ calendar_properties_init (GnomeCalendar *gcal, BonoboControl *control) _("The type of view to show"), 0); - bonobo_control_set_properties (control, pbag); + bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (pbag)), NULL); bonobo_object_unref (BONOBO_OBJECT (pbag)); } /* Callback factory function for calendar controls */ static BonoboObject * -control_factory_fn (BonoboGenericFactory *Factory, void *data) +control_factory_fn (BonoboGenericFactory *Factory, const char *id, void *data) { BonoboControl *control; - control = control_factory_new_control (); - - if (control) - return BONOBO_OBJECT (control); - else + if (strcmp (id, CONTROL_FACTORY_ID) == 0) { + control = control_factory_new_control (); + if (control) + return BONOBO_OBJECT (control); + else + return NULL; + } else { + g_warning ("Unknown ID in calendar control factory -- %s", id); return NULL; + } } diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index bac958f259..03065452c7 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -37,7 +37,9 @@ #include "../calendar-commands.h" #include "../e-tasks.h" +#include <gtk/gtksignal.h> #include <gtk/gtkoptionmenu.h> +#include <gtk/gtktogglebutton.h> #include <libgnomeui/gnome-color-picker.h> #include <glade/glade.h> #include <gal/util/e-util.h> diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c index c60c416087..8d56097bff 100644 --- a/calendar/gui/dialogs/comp-editor-util.c +++ b/calendar/gui/dialogs/comp-editor-util.c @@ -26,6 +26,7 @@ #include <string.h> #include <ical.h> #include <glib.h> +#include <gtk/gtklabel.h> #include <libgnome/gnome-i18n.h> #include <bonobo-activation/bonobo-activation.h> #include <bonobo/bonobo-control.h> diff --git a/calendar/gui/dialogs/event-editor.h b/calendar/gui/dialogs/event-editor.h index 1b6f72829a..7bb335de96 100644 --- a/calendar/gui/dialogs/event-editor.h +++ b/calendar/gui/dialogs/event-editor.h @@ -24,7 +24,6 @@ #ifndef __EVENT_EDITOR_H__ #define __EVENT_EDITOR_H__ -#include <libgnome/gnome-defs.h> #include <gtk/gtkobject.h> #include "comp-editor.h" diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 89fb0b2a89..9ca2d03b2c 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -26,8 +26,8 @@ #endif #include <gtk/gtksignal.h> +#include <gtk/gtktext.h> #include <gtk/gtktogglebutton.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <glade/glade.h> #include <gal/widgets/e-unicode.h> @@ -1294,7 +1294,9 @@ init_widgets (EventPage *epage) GTK_SIGNAL_FUNC (summary_changed_cb), epage); /* Description - turn on word wrap. */ +#if 0 gtk_text_set_word_wrap (GTK_TEXT (priv->description), TRUE); +#endif /* Start and end times */ gtk_signal_connect (GTK_OBJECT (priv->start_time), "changed", @@ -1396,7 +1398,7 @@ event_page_construct (EventPage *epage) priv = epage->priv; priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/event-page.glade", - NULL); + NULL, NULL); if (!priv->xml) { g_message ("event_page_construct(): " "Could not load the Glade XML file!"); diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c index 44ff76eb08..ec5823f0e5 100644 --- a/calendar/gui/dialogs/meeting-page.c +++ b/calendar/gui/dialogs/meeting-page.c @@ -31,10 +31,9 @@ #include <gtk/gtktogglebutton.h> #include <gtk/gtkvbox.h> #include <gtk/gtkwindow.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <glade/glade.h> -#include <libgnomeui/gnome-stock.h> +#include <libgnomeui/gnome-stock-icons.h> #include <gal/e-table/e-cell-combo.h> #include <gal/e-table/e-cell-text.h> #include <gal/e-table/e-table-simple.h> @@ -691,8 +690,10 @@ right_click_cb (ETable *etable, gint row, gint col, GdkEvent *event, gpointer da priv->row = e_meeting_model_etable_view_to_model_row (etable, priv->model, view_row); /* FIXME: if you enable Delegate, then change index to '1' */ +#if 0 context_menu[0].pixmap_widget = gnome_stock_new_with_icon (GNOME_STOCK_MENU_TRASH); - +#endif + menu = e_popup_menu_create (context_menu, enable_mask, hide_mask, data); e_auto_kill_popup_menu_on_hide (menu); @@ -745,7 +746,7 @@ meeting_page_construct (MeetingPage *mpage, EMeetingModel *emm, priv = mpage->priv; priv->xml = glade_xml_new (EVOLUTION_GLADEDIR - "/meeting-page.glade", NULL); + "/meeting-page.glade", NULL, NULL); if (!priv->xml) { g_message ("meeting_page_construct(): " "Could not load the Glade XML file!"); diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index 3fb07a0559..5c5c2fb072 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -25,10 +25,11 @@ #include <config.h> #endif +#include <gtk/gtkmenuitem.h> #include <gtk/gtkoptionmenu.h> +#include <gtk/gtktogglebutton.h> #include <gtk/gtksignal.h> #include <gtk/gtkspinbutton.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <glade/glade.h> #include <gal/widgets/e-unicode.h> @@ -1033,7 +1034,7 @@ month_num_submenu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data) int month_index; item = gtk_menu_get_active (GTK_MENU (menu_shell)); - item = gtk_menu_get_active (GTK_MENU (GTK_MENU_ITEM (item)->submenu)); + item = gtk_menu_get_active (GTK_MENU (gtk_menu_item_get_submenu (GTK_MENU_ITEM (item)))); month_index = GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (item))); gtk_object_set_user_data (GTK_OBJECT (data), GINT_TO_POINTER (month_index)); @@ -2427,7 +2428,7 @@ recurrence_page_construct (RecurrencePage *rpage) priv = rpage->priv; priv->xml = glade_xml_new (EVOLUTION_GLADEDIR - "/recurrence-page.glade", NULL); + "/recurrence-page.glade", NULL, NULL); if (!priv->xml) { g_message ("recurrence_page_construct(): " "Could not load the Glade XML file!"); diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c index 67a43a7320..29701f92d7 100644 --- a/calendar/gui/dialogs/save-comp.c +++ b/calendar/gui/dialogs/save-comp.c @@ -24,10 +24,9 @@ #endif #include <glib.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnomeui/gnome-messagebox.h> -#include <libgnomeui/gnome-stock.h> +#include <libgnomeui/gnome-stock-icons.h> #include <gal/widgets/e-unicode.h> #include "save-comp.h" diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c index 6ae7924355..a6d1911018 100644 --- a/calendar/gui/dialogs/schedule-page.c +++ b/calendar/gui/dialogs/schedule-page.c @@ -30,9 +30,7 @@ #include <gtk/gtktogglebutton.h> #include <gtk/gtkvbox.h> #include <gtk/gtkwindow.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-stock.h> #include <libgnomeui/gnome-dialog-util.h> #include <glade/glade.h> #include <gal/e-table/e-cell-combo.h> @@ -427,7 +425,7 @@ schedule_page_construct (SchedulePage *spage, EMeetingModel *emm) priv = spage->priv; priv->xml = glade_xml_new (EVOLUTION_GLADEDIR - "/schedule-page.glade", NULL); + "/schedule-page.glade", NULL, NULL); if (!priv->xml) { g_message ("schedule_page_construct(): " "Could not load the Glade XML file!"); diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c index 2afd92320e..01aeef99fd 100644 --- a/calendar/gui/dialogs/send-comp.c +++ b/calendar/gui/dialogs/send-comp.c @@ -23,7 +23,6 @@ #endif #include <glib.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-dialog-util.h> diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index c138ddeda6..3a8149afde 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -27,7 +27,6 @@ #include <gtk/gtksignal.h> #include <gtk/gtktogglebutton.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <glade/glade.h> #include <gal/widgets/e-unicode.h> @@ -730,7 +729,7 @@ task_details_page_construct (TaskDetailsPage *tdpage) priv = tdpage->priv; priv->xml = glade_xml_new (EVOLUTION_GLADEDIR - "/task-details-page.glade", NULL); + "/task-details-page.glade", NULL, NULL); if (!priv->xml) { g_message ("task_details_page_construct(): " "Could not load the Glade XML file!"); diff --git a/calendar/gui/dialogs/task-editor.h b/calendar/gui/dialogs/task-editor.h index 070546bee0..f1af1f237a 100644 --- a/calendar/gui/dialogs/task-editor.h +++ b/calendar/gui/dialogs/task-editor.h @@ -24,7 +24,6 @@ #ifndef __TASK_EDITOR_H__ #define __TASK_EDITOR_H__ -#include <libgnome/gnome-defs.h> #include <gtk/gtkobject.h> #include "comp-editor.h" diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 62732c9eb0..a30a5064c2 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -31,7 +31,6 @@ #include <gtk/gtktogglebutton.h> #include <gtk/gtkspinbutton.h> #include <gtk/gtkoptionmenu.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <glade/glade.h> #include <gal/widgets/e-unicode.h> @@ -868,7 +867,9 @@ init_widgets (TaskPage *tpage) GTK_SIGNAL_FUNC (summary_changed_cb), tpage); /* Description - turn on word wrap. */ +#if 0 gtk_text_set_word_wrap (GTK_TEXT (priv->description), TRUE); +#endif /* Dates */ gtk_signal_connect (GTK_OBJECT (priv->start_date), "changed", @@ -948,7 +949,7 @@ task_page_construct (TaskPage *tpage) priv = tpage->priv; priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/task-page.glade", - NULL); + NULL, NULL); if (!priv->xml) { g_message ("task_page_construct(): " "Could not load the Glade XML file!"); diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index f4ccea596c..5456c50978 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -37,7 +37,6 @@ #include <gal/e-table/e-cell-toggle.h> #include <gal/e-table/e-cell-text.h> #include <gal/e-table/e-cell-combo.h> -#include <gal/util/e-unicode-i18n.h> #include <gal/widgets/e-popup-menu.h> #include <e-util/e-dialog-utils.h> #include <widgets/misc/e-cell-date-edit.h> @@ -393,9 +392,9 @@ e_calendar_table_init (ECalendarTable *cal_table) gtk_object_unref (GTK_OBJECT (cell)); strings = NULL; - strings = g_list_append (strings, (char*) U_("Public")); - strings = g_list_append (strings, (char*) U_("Private")); - strings = g_list_append (strings, (char*) U_("Confidential")); + strings = g_list_append (strings, (char*) _("Public")); + strings = g_list_append (strings, (char*) _("Private")); + strings = g_list_append (strings, (char*) _("Confidential")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); @@ -415,10 +414,10 @@ e_calendar_table_init (ECalendarTable *cal_table) gtk_object_unref (GTK_OBJECT (cell)); strings = NULL; - strings = g_list_append (strings, (char*) U_("High")); - strings = g_list_append (strings, (char*) U_("Normal")); - strings = g_list_append (strings, (char*) U_("Low")); - strings = g_list_append (strings, (char*) U_("Undefined")); + strings = g_list_append (strings, (char*) _("High")); + strings = g_list_append (strings, (char*) _("Normal")); + strings = g_list_append (strings, (char*) _("Low")); + strings = g_list_append (strings, (char*) _("Undefined")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); @@ -437,17 +436,17 @@ e_calendar_table_init (ECalendarTable *cal_table) gtk_object_unref (GTK_OBJECT (cell)); strings = NULL; - strings = g_list_append (strings, (char*) U_("0%")); - strings = g_list_append (strings, (char*) U_("10%")); - strings = g_list_append (strings, (char*) U_("20%")); - strings = g_list_append (strings, (char*) U_("30%")); - strings = g_list_append (strings, (char*) U_("40%")); - strings = g_list_append (strings, (char*) U_("50%")); - strings = g_list_append (strings, (char*) U_("60%")); - strings = g_list_append (strings, (char*) U_("70%")); - strings = g_list_append (strings, (char*) U_("80%")); - strings = g_list_append (strings, (char*) U_("90%")); - strings = g_list_append (strings, (char*) U_("100%")); + strings = g_list_append (strings, (char*) _("0%")); + strings = g_list_append (strings, (char*) _("10%")); + strings = g_list_append (strings, (char*) _("20%")); + strings = g_list_append (strings, (char*) _("30%")); + strings = g_list_append (strings, (char*) _("40%")); + strings = g_list_append (strings, (char*) _("50%")); + strings = g_list_append (strings, (char*) _("60%")); + strings = g_list_append (strings, (char*) _("70%")); + strings = g_list_append (strings, (char*) _("80%")); + strings = g_list_append (strings, (char*) _("90%")); + strings = g_list_append (strings, (char*) _("100%")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); @@ -467,8 +466,8 @@ e_calendar_table_init (ECalendarTable *cal_table) gtk_object_unref (GTK_OBJECT (cell)); strings = NULL; - strings = g_list_append (strings, (char*) U_("Free")); - strings = g_list_append (strings, (char*) U_("Busy")); + strings = g_list_append (strings, (char*) _("Free")); + strings = g_list_append (strings, (char*) _("Busy")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); @@ -488,10 +487,10 @@ e_calendar_table_init (ECalendarTable *cal_table) gtk_object_unref (GTK_OBJECT (cell)); strings = NULL; - strings = g_list_append (strings, (char*) U_("Not Started")); - strings = g_list_append (strings, (char*) U_("In Progress")); - strings = g_list_append (strings, (char*) U_("Completed")); - strings = g_list_append (strings, (char*) U_("Cancelled")); + strings = g_list_append (strings, (char*) _("Not Started")); + strings = g_list_append (strings, (char*) _("In Progress")); + strings = g_list_append (strings, (char*) _("Completed")); + strings = g_list_append (strings, (char*) _("Cancelled")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c index 96cf911a1a..e63db929ac 100644 --- a/calendar/gui/e-cell-date-edit-text.c +++ b/calendar/gui/e-cell-date-edit-text.c @@ -33,7 +33,7 @@ #include <unistd.h> #include <string.h> #include <libgnomeui/gnome-messagebox.h> -#include <libgnomeui/gnome-stock.h> +#include <libgnomeui/gnome-stock-icons.h> #include <libgnome/gnome-i18n.h> #include <gal/util/e-util.h> #include <gal/widgets/e-unicode.h> diff --git a/calendar/gui/e-cell-date-edit-text.h b/calendar/gui/e-cell-date-edit-text.h index bb00590622..2e4a768586 100644 --- a/calendar/gui/e-cell-date-edit-text.h +++ b/calendar/gui/e-cell-date-edit-text.h @@ -32,7 +32,7 @@ #include <ical.h> #include <gal/e-table/e-cell-text.h> -BEGIN_GNOME_DECLS +G_BEGIN_DECLS #define E_CELL_DATE_EDIT_TEXT_TYPE (e_cell_date_edit_text_get_type ()) #define E_CELL_DATE_EDIT_TEXT(o) (GTK_CHECK_CAST ((o), E_CELL_DATE_EDIT_TEXT_TYPE, ECellDateEditText)) @@ -69,6 +69,6 @@ void e_cell_date_edit_text_set_timezone (ECellDateEditText *ecd, icaltimezone *zone); void e_cell_date_edit_text_set_use_24_hour_format (ECellDateEditText *ecd, gboolean use_24_hour); -END_GNOME_DECLS +G_END_DECLS #endif /* _E_CELL_DATE_EDIT_TEXT_H_ */ diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c index ebdac5c2de..2966b440e2 100644 --- a/calendar/gui/e-day-view-main-item.c +++ b/calendar/gui/e-day-view-main-item.c @@ -201,8 +201,8 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable, day_view = dvmitem->day_view; g_return_if_fail (day_view != NULL); - style = GTK_WIDGET (day_view)->style; - font = style->font; + style = gtk_widget_get_style (GTK_WIDGET (day_view)); + font = gtk_style_get_font (style); /* Paint the background colors. */ gc = day_view->main_gc; diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c index 94af4ee00c..5fbe36a834 100644 --- a/calendar/gui/e-day-view-time-item.c +++ b/calendar/gui/e-day-view-time-item.c @@ -29,7 +29,9 @@ #include <config.h> #include <glib.h> -#include <libgnome/gnome-defs.h> +#include <gtk/gtksignal.h> +#include <gtk/gtkradiomenuitem.h> +#include <gtk/gtkcheckmenuitem.h> #include <libgnome/gnome-i18n.h> #include <gal/widgets/e-gui-utils.h> #include "e-day-view-time-item.h" @@ -208,9 +210,9 @@ e_day_view_time_item_get_column_width (EDayViewTimeItem *dvtmitem) day_view = dvtmitem->day_view; g_return_val_if_fail (day_view != NULL, 0); - style = GTK_WIDGET (day_view)->style; + style = gtk_widget_get_style (GTK_WIDGET (day_view)); g_return_val_if_fail (style != NULL, 0); - small_font = style->font; + small_font = gtk_style_get_font (style); g_return_val_if_fail (small_font != NULL, 0); large_font = day_view->large_font; g_return_val_if_fail (large_font != NULL, 0); @@ -279,8 +281,8 @@ e_day_view_time_item_draw (GnomeCanvasItem *canvas_item, day_view = dvtmitem->day_view; g_return_if_fail (day_view != NULL); - style = GTK_WIDGET (day_view)->style; - small_font = style->font; + style = gtk_widget_get_style (GTK_WIDGET (day_view)); + small_font = gtk_style_get_font (style); large_font = day_view->large_font; fg_gc = style->fg_gc[GTK_STATE_NORMAL]; dark_gc = style->dark_gc[GTK_STATE_NORMAL]; @@ -547,7 +549,7 @@ e_day_view_time_item_on_set_divisions (GtkWidget *item, day_view = dvtmitem->day_view; g_return_if_fail (day_view != NULL); - if (!GTK_CHECK_MENU_ITEM (item)->active) + if (!gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (item))) return; divisions = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (item), diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index c2fd76f86a..09ba416e86 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -27,7 +27,6 @@ #include <config.h> #include <glib.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include "e-util/e-categories-config.h" #include "cal-util/timeutil.h" @@ -203,8 +202,8 @@ e_day_view_top_item_draw (GnomeCanvasItem *canvas_item, day_view = dvtitem->day_view; g_return_if_fail (day_view != NULL); - style = GTK_WIDGET (day_view)->style; - font = style->font; + style = gtk_widget_get_style (GTK_WIDGET (day_view)); + font = gtk_style_get_font (style); gc = day_view->main_gc; fg_gc = style->fg_gc[GTK_STATE_NORMAL]; bg_gc = style->bg_gc[GTK_STATE_NORMAL]; @@ -388,8 +387,8 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, event = &g_array_index (day_view->long_events, EDayViewEvent, event_num); - style = GTK_WIDGET (day_view)->style; - font = style->font; + style = gtk_widget_get_style (GTK_WIDGET (day_view)); + font = gtk_style_get_font (style); gc = day_view->main_gc; fg_gc = style->fg_gc[GTK_STATE_NORMAL]; bg_gc = style->bg_gc[GTK_STATE_NORMAL]; diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 892cc2f4a4..3bbd1590c3 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -42,9 +42,10 @@ #include <gtk/gtkwindow.h> #include <gal/e-text/e-text.h> #include <gal/widgets/e-canvas-utils.h> +#include <gal/widgets/e-popup-menu.h> #include <gal/widgets/e-gui-utils.h> #include <gal/widgets/e-unicode.h> -#include <libgnomeui/gnome-canvas-rect-ellipse.h> +#include <libgnomecanvas/gnome-canvas-rect-ellipse.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-exec.h> #include <libgnome/gnome-util.h> @@ -514,12 +515,11 @@ e_day_view_class_init (EDayViewClass *class) e_day_view_signals[SELECTION_CHANGED] = gtk_signal_new ("selection_changed", GTK_RUN_LAST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (EDayViewClass, selection_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, e_day_view_signals, LAST_SIGNAL); /* Method override */ object_class->destroy = e_day_view_destroy; @@ -1137,8 +1137,7 @@ e_day_view_unrealize (GtkWidget *widget) day_view->main_gc = NULL; colormap = gtk_widget_get_colormap (widget); - for (i = 0; i < E_DAY_VIEW_COLOR_LAST; i++) - gdk_colors_free (colormap, &day_view->colors[i].pixel, 1, 0); + gdk_colormap_free_colors (colormap, day_view->colors, E_DAY_VIEW_COLOR_LAST); gdk_pixmap_unref (day_view->reminder_icon); day_view->reminder_icon = NULL; @@ -1170,7 +1169,7 @@ e_day_view_style_set (GtkWidget *widget, (*GTK_WIDGET_CLASS (parent_class)->style_set)(widget, previous_style); day_view = E_DAY_VIEW (widget); - font = widget->style->font; + font = gtk_style_get_font (gtk_widget_get_style (widget)); /* Create the large font. */ if (day_view->large_font != NULL) @@ -1286,12 +1285,10 @@ e_day_view_style_set (GtkWidget *widget, /* Set the fonts for the text items used when dragging. */ gnome_canvas_item_set (day_view->drag_long_event_item, - "font_gdk", GTK_WIDGET (day_view)->style->font, - NULL); + "font_gdk", font, NULL); gnome_canvas_item_set (day_view->drag_item, - "font_gdk", GTK_WIDGET (day_view)->style->font, - NULL); + "font_gdk", font, NULL); } @@ -1384,7 +1381,7 @@ e_day_view_recalc_cell_sizes (EDayView *day_view) char buffer[128]; g_return_if_fail (((GtkWidget*)day_view)->style != NULL); - font = GTK_WIDGET (day_view)->style->font; + font = gtk_style_get_font (gtk_widget_get_style (GTK_WIDGET (day_view))); /* Calculate the column sizes, using floating point so that pixels get divided evenly. Note that we use one more element than the @@ -1471,9 +1468,12 @@ e_day_view_focus_in (GtkWidget *widget, GdkEventFocus *event) gtk_widget_queue_draw (day_view->main_canvas); g_assert (GTK_WIDGET_REALIZED (day_view->main_canvas)); +#if 0 + /* FIXME when gal is fixed */ if (E_CANVAS (day_view->main_canvas)->ic) gdk_im_begin (E_CANVAS (day_view->main_canvas)->ic, GTK_LAYOUT (day_view->main_canvas)->bin_window); +#endif return FALSE; } @@ -1496,8 +1496,12 @@ e_day_view_focus_out (GtkWidget *widget, GdkEventFocus *event) gtk_widget_queue_draw (day_view->main_canvas); g_assert (GTK_WIDGET_REALIZED (day_view->main_canvas)); + +#if 0 + /* FIXME when gal is fixed */ if (E_CANVAS (day_view->main_canvas)->ic) gdk_im_end (); +#endif return FALSE; } @@ -5228,7 +5232,7 @@ e_day_view_reshape_long_event (EDayView *day_view, draw them on top of the resize rect. Nor when editing. */ num_icons = 0; comp = event->comp; - font = GTK_WIDGET (day_view)->style->font; + font = gtk_style_get_font (gtk_widget_get_style (GTK_WIDGET (day_view))); if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE && day_view->resize_event_day == E_DAY_VIEW_LONG_EVENT @@ -5270,7 +5274,7 @@ e_day_view_reshape_long_event (EDayView *day_view, event->canvas_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->top_canvas)->root), e_text_get_type (), - "font_gdk", GTK_WIDGET (day_view)->style->font, + "font_gdk", font, "anchor", GTK_ANCHOR_NW, "clip", TRUE, "max_lines", 1, @@ -5425,10 +5429,13 @@ e_day_view_reshape_day_event (EDayView *day_view, } if (!event->canvas_item) { + GdkFont *font; + + font = gtk_style_get_font (gtk_widget_get_style (GTK_WIDGET (day_view))); event->canvas_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->main_canvas)->root), e_text_get_type (), - "font_gdk", GTK_WIDGET (day_view)->style->font, + "font_gdk", font, "anchor", GTK_ANCHOR_NW, "line_wrap", TRUE, "editable", TRUE, @@ -6860,7 +6867,7 @@ e_day_view_update_top_canvas_drag (EDayView *day_view, "y2", item_y + item_h - 1, NULL); - font = GTK_WIDGET (day_view)->style->font; + font = gtk_style_get_font (gtk_widget_get_style (GTK_WIDGET (day_view))); gnome_canvas_item_set (day_view->drag_long_event_item, "font_gdk", font, "clip_width", item_w - (E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH + E_DAY_VIEW_LONG_EVENT_X_PAD) * 2, @@ -7020,7 +7027,7 @@ e_day_view_update_main_canvas_drag (EDayView *day_view, "y2", item_y + item_h - 1, NULL); - font = GTK_WIDGET (day_view)->style->font; + font = gtk_style_get_font (gtk_widget_get_style (GTK_WIDGET (day_view))); gnome_canvas_item_set (day_view->drag_item, "font_gdk", font, "clip_width", item_w - E_DAY_VIEW_BAR_WIDTH - E_DAY_VIEW_EVENT_X_PAD * 2, @@ -7730,7 +7737,7 @@ e_day_view_set_status_message (EDayView *day_view, const char *message) char *client_id = g_strdup_printf ("%p", day_view); if (progress_icon[0] == NULL) - progress_icon[0] = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CALENDAR_PROGRESS_IMAGE); + progress_icon[0] = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CALENDAR_PROGRESS_IMAGE, NULL); day_view->activity = evolution_activity_client_new ( global_shell_client, client_id, progress_icon, message, TRUE, &display); diff --git a/calendar/gui/e-day-view.h b/calendar/gui/e-day-view.h index bb66f8b9fe..0505e68d53 100644 --- a/calendar/gui/e-day-view.h +++ b/calendar/gui/e-day-view.h @@ -26,7 +26,7 @@ #include <time.h> #include <gtk/gtktable.h> -#include <libgnomeui/gnome-canvas.h> +#include <libgnomecanvas/gnome-canvas.h> #include <gal/widgets/e-popup-menu.h> #include "gnome-cal.h" diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 6710d6801a..43a3b01e4f 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -30,15 +30,14 @@ #include <fcntl.h> #include <glib.h> #include <gtk/gtkmisc.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> -#include <libgnomeui/gnome-stock.h> +#include <libgnomeui/gnome-stock-icons.h> #include <libgnomeui/gnome-uidefs.h> #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-dialog-util.h> +#include <bonobo/bonobo-object.h> #include <bonobo/bonobo-exception.h> -#include <gal/util/e-unicode-i18n.h> #include <gal/widgets/e-unicode.h> #include <gtkhtml/gtkhtml.h> #include <gtkhtml/gtkhtml-stream.h> @@ -583,7 +582,7 @@ write_label_piece (EItipControl *itip, CalComponentDateTime *dt, timezone name, we use it as-is, as it is already UTF-8. */ if (icaltimezone_get_builtin_timezone (display_name)) { - strcat (buffer, U_(display_name)); + strcat (buffer, _(display_name)); } else { strcat (buffer, display_name); } @@ -612,7 +611,7 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream, cal_component_get_dtstart (comp, &datetime); if (datetime.value) { write_label_piece (itip, &datetime, buffer, 1024, - U_("<b>Starts:</b> "), + _("<b>Starts:</b> "), "<br>"); gtk_html_write (html, html_stream, buffer, strlen(buffer)); wrote = TRUE; @@ -622,7 +621,7 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream, buffer[0] = '\0'; cal_component_get_dtend (comp, &datetime); if (datetime.value){ - write_label_piece (itip, &datetime, buffer, 1024, U_("<b>Ends:</b> "), "<br>"); + write_label_piece (itip, &datetime, buffer, 1024, _("<b>Ends:</b> "), "<br>"); gtk_html_write (html, html_stream, buffer, strlen (buffer)); wrote = TRUE; } @@ -635,7 +634,7 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream, /* Pass TRUE as is_utc, so it gets converted to the current timezone. */ datetime.value->is_utc = TRUE; - write_label_piece (itip, &datetime, buffer, 1024, U_("<b>Completed:</b> "), "<br>"); + write_label_piece (itip, &datetime, buffer, 1024, _("<b>Completed:</b> "), "<br>"); gtk_html_write (html, html_stream, buffer, strlen (buffer)); wrote = TRUE; task_completed = TRUE; @@ -645,7 +644,7 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream, buffer[0] = '\0'; cal_component_get_due (comp, &datetime); if (type == CAL_COMPONENT_TODO && !task_completed && datetime.value) { - write_label_piece (itip, &datetime, buffer, 1024, U_("<b>Due:</b> "), "<br>"); + write_label_piece (itip, &datetime, buffer, 1024, _("<b>Due:</b> "), "<br>"); gtk_html_write (html, html_stream, buffer, strlen (buffer)); wrote = TRUE; } @@ -682,7 +681,7 @@ write_error_html (EItipControl *itip, const gchar *itip_err) html_stream = gtk_html_begin (GTK_HTML (priv->html)); gtk_html_stream_printf (html_stream, "<html><head><title>%s</title></head>", - U_("iCalendar Information")); + _("iCalendar Information")); gtk_html_write (GTK_HTML (priv->html), html_stream, HTML_BODY_START, strlen(HTML_BODY_START)); @@ -697,7 +696,7 @@ write_error_html (EItipControl *itip, const gchar *itip_err) gtk_html_stream_printf (html_stream, "<td align=\"left\" valign=\"top\">"); /* Title */ - set_message (GTK_HTML (priv->html), html_stream, U_("iCalendar Error"), TRUE); + set_message (GTK_HTML (priv->html), html_stream, _("iCalendar Error"), TRUE); /* Error */ gtk_html_write (GTK_HTML (priv->html), html_stream, itip_err, strlen(itip_err)); @@ -732,7 +731,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title, html_stream = gtk_html_begin (GTK_HTML (priv->html)); gtk_html_stream_printf (html_stream, "<html><head><title>%s</title></head>", - U_("iCalendar Information")); + _("iCalendar Information")); gtk_html_write (GTK_HTML (priv->html), html_stream, HTML_BODY_START, strlen(HTML_BODY_START)); @@ -763,7 +762,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title, attendee->cn : itip_strip_mailto (attendee->value)); } else { - html = g_strdup_printf (itip_desc, U_("An unknown person")); + html = g_strdup_printf (itip_desc, _("An unknown person")); } break; case ICAL_METHOD_REQUEST: @@ -779,7 +778,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title, priv->delegator_name : priv->delegator_address); else - html = g_strdup_printf (itip_desc, U_("An unknown person"), + html = g_strdup_printf (itip_desc, _("An unknown person"), priv->delegator_name ? priv->delegator_name : priv->delegator_address); @@ -790,7 +789,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title, organizer.cn : itip_strip_mailto (organizer.value)); else - html = g_strdup_printf (itip_desc, U_("An unknown person")); + html = g_strdup_printf (itip_desc, _("An unknown person")); } break; @@ -807,14 +806,14 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title, organizer.cn : itip_strip_mailto (organizer.value)); else - html = g_strdup_printf (itip_desc, U_("An unknown person")); + html = g_strdup_printf (itip_desc, _("An unknown person")); break; } gtk_html_write (GTK_HTML (priv->html), html_stream, html, strlen(html)); g_free (html); /* Describe what the user can do */ - const_html = U_("<br> Please review the following information, " + const_html = _("<br> Please review the following information, " "and then select an action from the menu below."); gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html)); @@ -829,9 +828,9 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title, /* Summary */ cal_component_get_summary (priv->comp, &text); - html = e_text_to_html (text.value ? text.value : U_("<i>None</i>"), E_TEXT_TO_HTML_CONVERT_NL); + html = e_text_to_html (text.value ? text.value : _("<i>None</i>"), E_TEXT_TO_HTML_CONVERT_NL); gtk_html_stream_printf (html_stream, "<b>%s</b><br>%s<br><br>", - U_("Summary:"), html); + _("Summary:"), html); g_free (html); /* Location */ @@ -839,7 +838,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title, if (string != NULL) { html = e_text_to_html (string, E_TEXT_TO_HTML_CONVERT_NL); gtk_html_stream_printf (html_stream, "<b>%s</b><br>%s<br><br>", - U_("Location:"), html); + _("Location:"), html); g_free (html); } @@ -853,24 +852,24 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title, CalComponentAttendee *a = alist->data; gtk_html_stream_printf (html_stream, "<b>%s</b><br>", - U_("Status:")); + _("Status:")); switch (a->status) { case ICAL_PARTSTAT_ACCEPTED: gtk_html_stream_printf (html_stream, "%s<br><br>", - U_("Accepted")); + _("Accepted")); break; case ICAL_PARTSTAT_TENTATIVE: gtk_html_stream_printf (html_stream, "%s<br><br>", - U_("Tentatively Accepted")); + _("Tentatively Accepted")); break; case ICAL_PARTSTAT_DECLINED: gtk_html_stream_printf (html_stream, "%s<br><br>", - U_("Declined")); + _("Declined")); break; default: gtk_html_stream_printf (html_stream, "%s<br><br>", - U_("Unknown")); + _("Unknown")); } } @@ -885,7 +884,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title, if (l && text.value) { html = e_text_to_html (text.value, E_TEXT_TO_HTML_CONVERT_NL); gtk_html_stream_printf (html_stream, "<b>%s</b><br>%s", - U_("Description:"), html); + _("Description:"), html); g_free (html); } cal_component_free_text_list (l); @@ -923,9 +922,9 @@ get_publish_options (gboolean selector) "</select>    " "<input TYPE=Submit name=\"ok\" value=\"%s\">" "</form>", - U_("Choose an action:"), - U_("Update"), - U_("OK")); + _("Choose an action:"), + _("Update"), + _("OK")); if (selector) { char *sel; @@ -951,12 +950,12 @@ get_request_options (gboolean selector) "<input TYPE=\"checkbox\" name=\"rsvp\" value=\"1\" checked>%s  " "<input TYPE=\"submit\" name=\"ok\" value=\"%s\"><br> " "</form>", - U_("Choose an action:"), - U_("Accept"), - U_("Tentatively accept"), - U_("Decline"), - U_("RSVP"), - U_("OK")); + _("Choose an action:"), + _("Accept"), + _("Tentatively accept"), + _("Decline"), + _("RSVP"), + _("OK")); if (selector) { char *sel; @@ -977,9 +976,9 @@ get_request_fb_options () "<option VALUE=\"F\">%s</option></select>    " "<input TYPE=Submit name=\"ok\" value=\"%s\">" "</form>", - U_("Choose an action:"), - U_("Send Free/Busy Information"), - U_("OK")); + _("Choose an action:"), + _("Send Free/Busy Information"), + _("OK")); } static char* @@ -990,9 +989,9 @@ get_reply_options () "<option VALUE=\"R\">%s</option></select>    " "<input TYPE=Submit name=\"ok\" value=\"%s\">" "</form>", - U_("Choose an action:"), - U_("Update respondent status"), - U_("OK")); + _("Choose an action:"), + _("Update respondent status"), + _("OK")); } static char* @@ -1003,9 +1002,9 @@ get_refresh_options () "<option VALUE=\"S\">%s</option></select>    " "<input TYPE=Submit name=\"ok\" value=\"%s\">" "</form>", - U_("Choose an action:"), - U_("Send Latest Information"), - U_("OK")); + _("Choose an action:"), + _("Send Latest Information"), + _("OK")); } static char* @@ -1016,9 +1015,9 @@ get_cancel_options () "<option VALUE=\"C\">%s</option></select>    " "<input TYPE=Submit name=\"ok\" value=\"%s\">" "</form>", - U_("Choose an action:"), - U_("Cancel"), - U_("OK")); + _("Choose an action:"), + _("Cancel"), + _("OK")); } @@ -1098,50 +1097,50 @@ show_current_event (EItipControl *itip) switch (priv->method) { case ICAL_METHOD_PUBLISH: - itip_desc = U_("<b>%s</b> has published meeting information."); - itip_title = U_("Meeting Information"); + itip_desc = _("<b>%s</b> has published meeting information."); + itip_title = _("Meeting Information"); options = get_publish_options (priv->event_client ? FALSE : TRUE); break; case ICAL_METHOD_REQUEST: if (priv->delegator_address != NULL) - itip_desc = U_("<b>%s</b> requests the presence of %s at a meeting."); + itip_desc = _("<b>%s</b> requests the presence of %s at a meeting."); else - itip_desc = U_("<b>%s</b> requests your presence at a meeting."); - itip_title = U_("Meeting Proposal"); + itip_desc = _("<b>%s</b> requests your presence at a meeting."); + itip_title = _("Meeting Proposal"); options = get_request_options (priv->event_client ? FALSE : TRUE); break; case ICAL_METHOD_ADD: - itip_desc = U_("<b>%s</b> wishes to add to an existing meeting."); - itip_title = U_("Meeting Update"); + itip_desc = _("<b>%s</b> wishes to add to an existing meeting."); + itip_title = _("Meeting Update"); options = get_publish_options (priv->event_client ? FALSE : TRUE); break; case ICAL_METHOD_REFRESH: - itip_desc = U_("<b>%s</b> wishes to receive the latest meeting information."); - itip_title = U_("Meeting Update Request"); + itip_desc = _("<b>%s</b> wishes to receive the latest meeting information."); + itip_title = _("Meeting Update Request"); options = get_refresh_options (); /* Provide extra info, since its not in the component */ adjust_item (itip, priv->comp); break; case ICAL_METHOD_REPLY: - itip_desc = U_("<b>%s</b> has replied to a meeting request."); - itip_title = U_("Meeting Reply"); + itip_desc = _("<b>%s</b> has replied to a meeting request."); + itip_title = _("Meeting Reply"); options = get_reply_options (); /* Provide extra info, since might not be in the component */ adjust_item (itip, priv->comp); break; case ICAL_METHOD_CANCEL: - itip_desc = U_("<b>%s</b> has cancelled a meeting."); - itip_title = U_("Meeting Cancellation"); + itip_desc = _("<b>%s</b> has cancelled a meeting."); + itip_title = _("Meeting Cancellation"); options = get_cancel_options (); /* Provide extra info, since might not be in the component */ adjust_item (itip, priv->comp); break; default: - itip_desc = U_("<b>%s</b> has sent an unintelligible message."); - itip_title = U_("Bad Meeting Message"); + itip_desc = _("<b>%s</b> has sent an unintelligible message."); + itip_title = _("Bad Meeting Message"); options = NULL; } @@ -1165,50 +1164,50 @@ show_current_todo (EItipControl *itip) switch (priv->method) { case ICAL_METHOD_PUBLISH: - itip_desc = U_("<b>%s</b> has published task information."); - itip_title = U_("Task Information"); + itip_desc = _("<b>%s</b> has published task information."); + itip_title = _("Task Information"); options = get_publish_options (priv->task_client ? FALSE : TRUE); break; case ICAL_METHOD_REQUEST: if (priv->delegator_address != NULL) - itip_desc = U_("<b>%s</b> requests %s to perform a task."); + itip_desc = _("<b>%s</b> requests %s to perform a task."); else - itip_desc = U_("<b>%s</b> requests you perform a task."); - itip_title = U_("Task Proposal"); + itip_desc = _("<b>%s</b> requests you perform a task."); + itip_title = _("Task Proposal"); options = get_request_options (priv->task_client ? FALSE : TRUE); break; case ICAL_METHOD_ADD: - itip_desc = U_("<b>%s</b> wishes to add to an existing task."); - itip_title = U_("Task Update"); + itip_desc = _("<b>%s</b> wishes to add to an existing task."); + itip_title = _("Task Update"); options = get_publish_options (priv->task_client ? FALSE : TRUE); break; case ICAL_METHOD_REFRESH: - itip_desc = U_("<b>%s</b> wishes to receive the latest task information."); - itip_title = U_("Task Update Request"); + itip_desc = _("<b>%s</b> wishes to receive the latest task information."); + itip_title = _("Task Update Request"); options = get_refresh_options (); /* Provide extra info, since its not in the component */ adjust_item (itip, priv->comp); break; case ICAL_METHOD_REPLY: - itip_desc = U_("<b>%s</b> has replied to a task assignment."); - itip_title = U_("Task Reply"); + itip_desc = _("<b>%s</b> has replied to a task assignment."); + itip_title = _("Task Reply"); options = get_reply_options (); /* Provide extra info, since might not be in the component */ adjust_item (itip, priv->comp); break; case ICAL_METHOD_CANCEL: - itip_desc = U_("<b>%s</b> has cancelled a task."); - itip_title = U_("Task Cancellation"); + itip_desc = _("<b>%s</b> has cancelled a task."); + itip_title = _("Task Cancellation"); options = get_cancel_options (); /* Provide extra info, since might not be in the component */ adjust_item (itip, priv->comp); break; default: - itip_desc = U_("<b>%s</b> has sent an unintelligible message."); - itip_title = U_("Bad Task Message"); + itip_desc = _("<b>%s</b> has sent an unintelligible message."); + itip_title = _("Bad Task Message"); options = NULL; } @@ -1227,23 +1226,23 @@ show_current_freebusy (EItipControl *itip) switch (priv->method) { case ICAL_METHOD_PUBLISH: - itip_desc = U_("<b>%s</b> has published free/busy information."); - itip_title = U_("Free/Busy Information"); + itip_desc = _("<b>%s</b> has published free/busy information."); + itip_title = _("Free/Busy Information"); options = NULL; break; case ICAL_METHOD_REQUEST: - itip_desc = U_("<b>%s</b> requests your free/busy information."); - itip_title = U_("Free/Busy Request"); + itip_desc = _("<b>%s</b> requests your free/busy information."); + itip_title = _("Free/Busy Request"); options = get_request_fb_options (); break; case ICAL_METHOD_REPLY: - itip_desc = U_("<b>%s</b> has replied to a free/busy request."); - itip_title = U_("Free/Busy Reply"); + itip_desc = _("<b>%s</b> has replied to a free/busy request."); + itip_title = _("Free/Busy Reply"); options = NULL; break; default: - itip_desc = U_("<b>%s</b> has sent an unintelligible message."); - itip_title = U_("Bad Free/Busy Message"); + itip_desc = _("<b>%s</b> has sent an unintelligible message."); + itip_title = _("Bad Free/Busy Message"); options = NULL; } @@ -1317,7 +1316,7 @@ show_current (EItipControl *itip) priv->comp = cal_component_new (); if (!cal_component_set_icalcomponent (priv->comp, priv->ical_comp)) { - write_error_html (itip, U_("The message does not appear to be properly formed")); + write_error_html (itip, _("The message does not appear to be properly formed")); gtk_object_unref (GTK_OBJECT (priv->comp)); priv->comp = NULL; return; @@ -1379,7 +1378,7 @@ show_current (EItipControl *itip) show_current_freebusy (itip); break; default: - write_error_html (itip, U_("The message contains only unsupported requests.")); + write_error_html (itip, _("The message contains only unsupported requests.")); } find_my_address (itip, priv->ical_comp); @@ -1407,13 +1406,13 @@ e_itip_control_set_data (EItipControl *itip, const gchar *text) priv->main_comp = icalparser_parse_string (priv->vcalendar); if (priv->main_comp == NULL) { - write_error_html (itip, U_("The attachment does not contain a valid calendar message")); + write_error_html (itip, _("The attachment does not contain a valid calendar message")); return; } prop = icalcomponent_get_first_property (priv->main_comp, ICAL_METHOD_PROPERTY); if (prop == NULL) { - write_error_html (itip, U_("The attachment does not contain a valid calendar message")); + write_error_html (itip, _("The attachment does not contain a valid calendar message")); return; } @@ -1438,7 +1437,7 @@ e_itip_control_set_data (EItipControl *itip, const gchar *text) priv->ical_comp = get_next (&priv->iter); if (priv->ical_comp == NULL) { - write_error_html (itip, U_("The attachment has no viewable calendar items")); + write_error_html (itip, _("The attachment has no viewable calendar items")); return; } diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c index 3d4a8a4f48..0f469f7f23 100644 --- a/calendar/gui/e-meeting-attendee.c +++ b/calendar/gui/e-meeting-attendee.c @@ -110,14 +110,12 @@ class_init (EMeetingAttendeeClass *klass) signals[CHANGED] = gtk_signal_new ("changed", GTK_RUN_FIRST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (EMeetingAttendeeClass, changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - - object_class->destroy = destroy; + object_class->destroy = destroy; } static gchar * diff --git a/calendar/gui/e-meeting-model.c b/calendar/gui/e-meeting-model.c index d0e08b781a..53b0926427 100644 --- a/calendar/gui/e-meeting-model.c +++ b/calendar/gui/e-meeting-model.c @@ -25,11 +25,9 @@ #endif #include <glib.h> -#include <liboaf/liboaf.h> #include <bonobo/bonobo-control.h> #include <bonobo/bonobo-widget.h> #include <bonobo/bonobo-exception.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> #include <libgnomevfs/gnome-vfs.h> @@ -37,7 +35,6 @@ #include <gal/e-table/e-cell-text.h> #include <gal/e-table/e-cell-popup.h> #include <gal/e-table/e-cell-combo.h> -#include <gal/util/e-unicode-i18n.h> #include <ebook/e-book.h> #include <ebook/e-card-types.h> #include <ebook/e-card-cursor.h> @@ -827,11 +824,11 @@ build_etable (ETableModel *model, const gchar *spec_file, const gchar *state_fil gtk_object_unref (GTK_OBJECT (cell)); strings = NULL; - strings = g_list_append (strings, (char*) U_("Individual")); - strings = g_list_append (strings, (char*) U_("Group")); - strings = g_list_append (strings, (char*) U_("Resource")); - strings = g_list_append (strings, (char*) U_("Room")); - strings = g_list_append (strings, (char*) U_("Unknown")); + strings = g_list_append (strings, (char*) _("Individual")); + strings = g_list_append (strings, (char*) _("Group")); + strings = g_list_append (strings, (char*) _("Resource")); + strings = g_list_append (strings, (char*) _("Room")); + strings = g_list_append (strings, (char*) _("Unknown")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); e_table_extras_add_cell (extras, "typeedit", popup_cell); @@ -843,11 +840,11 @@ build_etable (ETableModel *model, const gchar *spec_file, const gchar *state_fil gtk_object_unref (GTK_OBJECT (cell)); strings = NULL; - strings = g_list_append (strings, (char*) U_("Chair")); - strings = g_list_append (strings, (char*) U_("Required Participant")); - strings = g_list_append (strings, (char*) U_("Optional Participant")); - strings = g_list_append (strings, (char*) U_("Non-Participant")); - strings = g_list_append (strings, (char*) U_("Unknown")); + strings = g_list_append (strings, (char*) _("Chair")); + strings = g_list_append (strings, (char*) _("Required Participant")); + strings = g_list_append (strings, (char*) _("Optional Participant")); + strings = g_list_append (strings, (char*) _("Non-Participant")); + strings = g_list_append (strings, (char*) _("Unknown")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); e_table_extras_add_cell (extras, "roleedit", popup_cell); @@ -859,8 +856,8 @@ build_etable (ETableModel *model, const gchar *spec_file, const gchar *state_fil gtk_object_unref (GTK_OBJECT (cell)); strings = NULL; - strings = g_list_append (strings, (char*) U_("Yes")); - strings = g_list_append (strings, (char*) U_("No")); + strings = g_list_append (strings, (char*) _("Yes")); + strings = g_list_append (strings, (char*) _("No")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); e_table_extras_add_cell (extras, "rsvpedit", popup_cell); @@ -872,11 +869,11 @@ build_etable (ETableModel *model, const gchar *spec_file, const gchar *state_fil gtk_object_unref (GTK_OBJECT (cell)); strings = NULL; - strings = g_list_append (strings, (char*) U_("Needs Action")); - strings = g_list_append (strings, (char*) U_("Accepted")); - strings = g_list_append (strings, (char*) U_("Declined")); - strings = g_list_append (strings, (char*) U_("Tentative")); - strings = g_list_append (strings, (char*) U_("Delegated")); + strings = g_list_append (strings, (char*) _("Needs Action")); + strings = g_list_append (strings, (char*) _("Accepted")); + strings = g_list_append (strings, (char*) _("Declined")); + strings = g_list_append (strings, (char*) _("Tentative")); + strings = g_list_append (strings, (char*) _("Delegated")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); e_table_extras_add_cell (extras, "statusedit", popup_cell); @@ -1460,7 +1457,8 @@ cursor_cb (EBook *book, EBookStatus status, ECardCursor *cursor, gpointer data) continue; /* Read in free/busy data from the url */ - gnome_vfs_async_open (&handle, card->fburl, GNOME_VFS_OPEN_READ, async_open, qdata); + gnome_vfs_async_open (&handle, card->fburl, GNOME_VFS_OPEN_READ, + GNOME_VFS_PRIORITY_DEFAULT, async_open, qdata); return; } @@ -1726,7 +1724,7 @@ get_select_name_dialog (EMeetingModel *im) CORBA_exception_init (&ev); - priv->corba_select_names = oaf_activate_from_id (SELECT_NAMES_OAFID, 0, NULL, &ev); + priv->corba_select_names = bonobo_activation_activate_from_id (SELECT_NAMES_OAFID, 0, NULL, &ev); for (i = 0; sections[i] != NULL; i++) add_section (priv->corba_select_names, sections[i]); diff --git a/calendar/gui/e-meeting-time-sel-item.c b/calendar/gui/e-meeting-time-sel-item.c index d44a1f436d..64d5594271 100644 --- a/calendar/gui/e-meeting-time-sel-item.c +++ b/calendar/gui/e-meeting-time-sel-item.c @@ -34,7 +34,6 @@ #include <time.h> #include <glib.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include "calendar-config.h" #include "e-meeting-time-sel-item.h" @@ -468,7 +467,7 @@ e_meeting_time_selector_item_paint_day_top (EMeetingTimeSelectorItem *mts_item, /* Draw the date. Set a clipping rectangle so we don't draw over the next day. */ - font = GTK_WIDGET (mts)->style->font; + font = gtk_style_get_font (gtk_widget_get_style (GTK_WIDGET (mts))); if (mts->date_format == E_MEETING_TIME_SELECTOR_DATE_FULL) /* This is a strftime() format string %A = full weekday name, %B = full month name, %d = month day, %Y = full year. */ diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index 7df2996013..a420b5a08e 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -50,7 +50,7 @@ #include <gtk/gtkvscrollbar.h> #include <libgnomeui/gnome-dateedit.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-canvas-widget.h> +#include <libgnomecanvas/gnome-canvas-widget.h> #include <gal/widgets/e-canvas.h> #include <gal/widgets/e-canvas-utils.h> @@ -127,8 +127,6 @@ static void e_meeting_time_selector_style_set (GtkWidget *widget, GtkStyle *previous_style); static gint e_meeting_time_selector_expose_event (GtkWidget *widget, GdkEventExpose *event); -static void e_meeting_time_selector_draw (GtkWidget *widget, - GdkRectangle *area); static void e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts); static void e_meeting_time_selector_hadjustment_changed (GtkAdjustment *adjustment, EMeetingTimeSelector *mts); @@ -258,22 +256,18 @@ e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * klass) mts_signals [CHANGED] = gtk_signal_new ("changed", GTK_RUN_FIRST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (EMeetingTimeSelectorClass, changed), gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, mts_signals, - LAST_SIGNAL); - object_class->destroy = e_meeting_time_selector_destroy; widget_class->realize = e_meeting_time_selector_realize; widget_class->unrealize = e_meeting_time_selector_unrealize; widget_class->style_set = e_meeting_time_selector_style_set; widget_class->expose_event = e_meeting_time_selector_expose_event; - widget_class->draw = e_meeting_time_selector_draw; } @@ -489,7 +483,9 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingModel *em mts->options_menu = gtk_menu_new (); gtk_menu_attach_to_widget (GTK_MENU (mts->options_menu), mts->options_button, e_meeting_time_selector_options_menu_detacher); +#if 0 menu_accel_group = gtk_menu_ensure_uline_accel_group (GTK_MENU (mts->options_menu)); +#endif menuitem = gtk_check_menu_item_new_with_label (""); accel_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menuitem)->child), _("Show _Only Working Hours")); @@ -584,7 +580,9 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingModel *em mts->autopick_menu = gtk_menu_new (); gtk_menu_attach_to_widget (GTK_MENU (mts->autopick_menu), mts->autopick_button, e_meeting_time_selector_autopick_menu_detacher); +#if 0 menu_accel_group = gtk_menu_ensure_uline_accel_group (GTK_MENU (mts->autopick_menu)); +#endif menuitem = gtk_radio_menu_item_new_with_label (NULL, ""); mts->autopick_all_item = menuitem; @@ -693,7 +691,6 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingModel *em /* Allocate the colors. */ visual = gtk_widget_get_visual (GTK_WIDGET (mts)); colormap = gtk_widget_get_colormap (GTK_WIDGET (mts)); - mts->color_context = gdk_color_context_new (visual, colormap); e_meeting_time_selector_alloc_named_color (mts, "gray75", &mts->bg_color); e_meeting_time_selector_alloc_named_color (mts, "gray50", &mts->all_attendees_bg_color); gdk_color_black (colormap, &mts->grid_color); @@ -797,17 +794,14 @@ static void e_meeting_time_selector_alloc_named_color (EMeetingTimeSelector * mts, const char *name, GdkColor *c) { - int failed; + GdkColormap *colormap; g_return_if_fail (name != NULL); g_return_if_fail (c != NULL); gdk_color_parse (name, c); - c->pixel = 0; - c->pixel = gdk_color_context_get_pixel (mts->color_context, - c->red, c->green, c->blue, - &failed); - if (failed) + colormap = gtk_widget_get_colormap (GTK_WIDGET (mts)); + if (!gdk_colormap_alloc_color (colormap, c, TRUE, TRUE)) g_warning ("Failed to allocate color: %s\n", name); } @@ -866,7 +860,6 @@ e_meeting_time_selector_destroy (GtkObject *object) e_meeting_time_selector_remove_timeout (mts); - gdk_color_context_free (mts->color_context); gdk_bitmap_unref (mts->stipple); if (mts->model) @@ -923,7 +916,7 @@ e_meeting_time_selector_style_set (GtkWidget *widget, (*GTK_WIDGET_CLASS (parent_class)->style_set)(widget, previous_style); mts = E_MEETING_TIME_SELECTOR (widget); - font = widget->style->font; + font = gtk_style_get_font (gtk_widget_get_style (widget)); efont = e_font_from_gdk_font (font); /* Calculate the widths of the hour strings in the style's font. */ @@ -986,22 +979,6 @@ e_meeting_time_selector_expose_event (GtkWidget *widget, return FALSE; } - -static void -e_meeting_time_selector_draw (GtkWidget *widget, - GdkRectangle *area) -{ - EMeetingTimeSelector *mts; - - mts = E_MEETING_TIME_SELECTOR (widget); - - e_meeting_time_selector_draw_shadow (mts); - - if (GTK_WIDGET_CLASS (parent_class)->draw) - (*GTK_WIDGET_CLASS (parent_class)->draw)(widget, area); -} - - static void e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts) { @@ -2069,7 +2046,7 @@ e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mts) gchar buffer[128]; GdkFont *font; - font = GTK_WIDGET (mts)->style->font; + font = gtk_style_get_font (gtk_widget_get_style (GTK_WIDGET (mts))); /* Calculate the maximum date width we can fit into the display. */ max_date_width = mts->day_width - 2; diff --git a/calendar/gui/e-meeting-time-sel.h b/calendar/gui/e-meeting-time-sel.h index 30c1abefa7..cbfffb6a25 100644 --- a/calendar/gui/e-meeting-time-sel.h +++ b/calendar/gui/e-meeting-time-sel.h @@ -27,7 +27,7 @@ #include <gtk/gtkaccelgroup.h> #include <gtk/gtktable.h> #include <gtk/gtkwidget.h> -#include <libgnomeui/gnome-canvas.h> +#include <libgnomecanvas/gnome-canvas.h> #include <gal/e-text/e-text.h> #include <gal/e-table/e-table-model.h> #include <gal/e-table/e-table.h> @@ -156,7 +156,6 @@ struct _EMeetingTimeSelector GtkWidget *end_date_edit; /* Colors. */ - GdkColorContext *color_context; GdkColor bg_color; GdkColor all_attendees_bg_color; GdkColor meeting_time_bg_color; diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 17cce37bd2..5ebcd3d580 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -97,14 +97,12 @@ e_tasks_class_init (ETasksClass *class) e_tasks_signals[SELECTION_CHANGED] = gtk_signal_new ("selection_changed", GTK_RUN_LAST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (ETasksClass, selection_changed), gtk_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); - gtk_object_class_add_signals (object_class, e_tasks_signals, LAST_SIGNAL); - object_class->destroy = e_tasks_destroy; class->selection_changed = NULL; diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c index 84c512b574..957ba587dd 100644 --- a/calendar/gui/e-timezone-entry.c +++ b/calendar/gui/e-timezone-entry.c @@ -128,14 +128,12 @@ e_timezone_entry_class_init (ETimezoneEntryClass *class) timezone_entry_signals[CHANGED] = gtk_signal_new ("changed", GTK_RUN_LAST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (ETimezoneEntryClass, changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, timezone_entry_signals, - LAST_SIGNAL); object_class->destroy = e_timezone_entry_destroy; diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index 4006afb3f7..529e0541b8 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -488,8 +488,8 @@ e_week_view_draw_time (EWeekView *week_view, gint time_y_normal_font, time_y_small_font; gchar buffer[128], *suffix; - style = GTK_WIDGET (week_view)->style; - font = style->font; + style = gtk_widget_get_style (GTK_WIDGET (week_view)); + font = gtk_style_get_font (style); small_font = week_view->small_font; gc = week_view->main_gc; diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c index 60d71f0631..594f227bab 100644 --- a/calendar/gui/e-week-view-main-item.c +++ b/calendar/gui/e-week-view-main-item.c @@ -29,7 +29,6 @@ #include <config.h> #include <glib.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include "e-week-view-main-item.h" @@ -238,8 +237,8 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem, g_print ("Drawing Day:%i at %i,%i\n", day, x, y); #endif week_view = wvmitem->week_view; - style = GTK_WIDGET (week_view)->style; - font = style->font; + style = gtk_widget_get_style (GTK_WIDGET (week_view)); + font = gtk_style_get_font (style); gc = week_view->main_gc; g_return_if_fail (gc != NULL); diff --git a/calendar/gui/e-week-view-titles-item.c b/calendar/gui/e-week-view-titles-item.c index d201a50e35..0be7228cf9 100644 --- a/calendar/gui/e-week-view-titles-item.c +++ b/calendar/gui/e-week-view-titles-item.c @@ -184,8 +184,8 @@ e_week_view_titles_item_draw (GnomeCanvasItem *canvas_item, week_view = wvtitem->week_view; g_return_if_fail (week_view != NULL); - style = GTK_WIDGET (week_view)->style; - font = style->font; + style = gtk_widget_get_style (GTK_WIDGET (week_view)); + font = gtk_style_get_font (style); fg_gc = style->fg_gc[GTK_STATE_NORMAL]; bg_gc = style->bg_gc[GTK_STATE_NORMAL]; light_gc = style->light_gc[GTK_STATE_NORMAL]; diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 66ddc9a32e..1010144b7f 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -39,13 +39,11 @@ #include <gtk/gtkvscrollbar.h> #include <gtk/gtkwindow.h> #include <gtk/gtkmain.h> -#include <libgnome/gnome-defs.h> -#include <libgnome/gnome-i18n.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-exec.h> #include <libgnome/gnome-util.h> #include <gdk-pixbuf/gdk-pixbuf.h> -#include <gdk-pixbuf/gnome-canvas-pixbuf.h> +#include <libgnomecanvas/gnome-canvas-pixbuf.h> #include <gal/e-text/e-text.h> #include <gal/widgets/e-canvas-utils.h> #include <gal/widgets/e-gui-utils.h> @@ -284,13 +282,11 @@ e_week_view_class_init (EWeekViewClass *class) e_week_view_signals[SELECTION_CHANGED] = gtk_signal_new ("selection_changed", GTK_RUN_LAST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (EWeekViewClass, selection_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, e_week_view_signals, LAST_SIGNAL); - /* Method override */ object_class->destroy = e_week_view_destroy; @@ -302,7 +298,6 @@ e_week_view_class_init (EWeekViewClass *class) widget_class->focus_out_event = e_week_view_focus_out; widget_class->key_press_event = e_week_view_key_press; widget_class->expose_event = e_week_view_expose_event; - widget_class->draw = e_week_view_draw; class->selection_changed = NULL; @@ -649,8 +644,7 @@ e_week_view_unrealize (GtkWidget *widget) week_view->main_gc = NULL; colormap = gtk_widget_get_colormap (widget); - for (i = 0; i < E_WEEK_VIEW_COLOR_LAST; i++) - gdk_colors_free (colormap, &week_view->colors[i].pixel, 1, 0); + gdk_colormap_free_colors (colormap, week_view->colors, E_WEEK_VIEW_COLOR_LAST); gdk_pixmap_unref (week_view->reminder_icon); week_view->reminder_icon = NULL; @@ -679,7 +673,7 @@ e_week_view_style_set (GtkWidget *widget, (*GTK_WIDGET_CLASS (parent_class)->style_set)(widget, previous_style); week_view = E_WEEK_VIEW (widget); - font = widget->style->font; + font = gtk_style_get_font (gtk_widget_get_style (widget)); /* Recalculate the height of each row based on the font size. */ week_view->row_height = font->ascent + font->descent + E_WEEK_VIEW_EVENT_BORDER_HEIGHT * 2 + E_WEEK_VIEW_EVENT_TEXT_Y_PAD * 2; @@ -811,6 +805,7 @@ e_week_view_recalc_cell_sizes (EWeekView *week_view) gfloat canvas_width, canvas_height, offset; gint row, col; GtkWidget *widget; + GtkStyle *style; GdkFont *font; gint width, height, time_width; @@ -859,10 +854,12 @@ e_week_view_recalc_cell_sizes (EWeekView *week_view) /* If the font hasn't been set yet just return. */ widget = GTK_WIDGET (week_view); - if (!widget->style || ! widget->style->font) + style = gtk_widget_get_style (widget); + if (!style) + return; + font = gtk_style_get_font (style); + if (!font) return; - - font = widget->style->font; /* Calculate the number of rows of events in each cell, for the large cells and the compressed weekend cells. */ @@ -967,22 +964,6 @@ e_week_view_expose_event (GtkWidget *widget, return FALSE; } - -static void -e_week_view_draw (GtkWidget *widget, - GdkRectangle *area) -{ - EWeekView *week_view; - - week_view = E_WEEK_VIEW (widget); - - e_week_view_draw_shadow (week_view); - - if (GTK_WIDGET_CLASS (parent_class)->draw) - (*GTK_WIDGET_CLASS (parent_class)->draw)(widget, area); -} - - static void e_week_view_draw_shadow (EWeekView *week_view) { @@ -2666,7 +2647,7 @@ e_week_view_reshape_event_span (EWeekView *week_view, span = &g_array_index (week_view->spans, EWeekViewEventSpan, event->spans_index + span_num); comp = event->comp; - font = GTK_WIDGET (week_view)->style->font; + font = gtk_style_get_font (gtk_widget_get_style (GTK_WIDGET (week_view))); one_day_event = e_week_view_is_one_day_event (week_view, event_num); @@ -2738,7 +2719,7 @@ e_week_view_reshape_event_span (EWeekView *week_view, span->text_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (week_view->main_canvas)->root), e_text_get_type (), - "font_gdk", GTK_WIDGET (week_view)->style->font, + "font_gdk", font, "anchor", GTK_ANCHOR_NW, "clip", TRUE, #if 0 @@ -4416,7 +4397,7 @@ e_week_view_set_status_message (EWeekView *week_view, const char *message) char *client_id = g_strdup_printf ("%p", week_view); if (progress_icon[0] == NULL) - progress_icon[0] = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CALENDAR_PROGRESS_IMAGE); + progress_icon[0] = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CALENDAR_PROGRESS_IMAGE, NULL); week_view->activity = evolution_activity_client_new ( global_shell_client, client_id, progress_icon, message, TRUE, &display); diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h index 696c8e6ac2..abc0419815 100644 --- a/calendar/gui/e-week-view.h +++ b/calendar/gui/e-week-view.h @@ -25,7 +25,7 @@ #define _E_WEEK_VIEW_H_ #include <gtk/gtktable.h> -#include <libgnomeui/gnome-canvas.h> +#include <libgnomecanvas/gnome-canvas.h> #include <gal/widgets/e-popup-menu.h> #include "gnome-cal.h" diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index e54f3c74e6..80f1b7cf4e 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -29,12 +29,10 @@ #include <sys/wait.h> #include <fcntl.h> #include <glib.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-dialog-util.h> -#include <liboaf/liboaf.h> #include <bonobo/bonobo-exception.h> #include <gal/e-paned/e-hpaned.h> #include <gal/e-paned/e-vpaned.h> @@ -233,7 +231,7 @@ gnome_calendar_class_init (GnomeCalendarClass *class) gnome_calendar_signals[DATES_SHOWN_CHANGED] = gtk_signal_new ("dates_shown_changed", GTK_RUN_LAST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (GnomeCalendarClass, dates_shown_changed), gtk_marshal_NONE__NONE, @@ -242,7 +240,7 @@ gnome_calendar_class_init (GnomeCalendarClass *class) gnome_calendar_signals[CALENDAR_SELECTION_CHANGED] = gtk_signal_new ("calendar_selection_changed", GTK_RUN_LAST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (GnomeCalendarClass, calendar_selection_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -250,7 +248,7 @@ gnome_calendar_class_init (GnomeCalendarClass *class) gnome_calendar_signals[TASKPAD_SELECTION_CHANGED] = gtk_signal_new ("taskpad_selection_changed", GTK_RUN_LAST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (GnomeCalendarClass, taskpad_selection_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -258,7 +256,7 @@ gnome_calendar_class_init (GnomeCalendarClass *class) gnome_calendar_signals[CALENDAR_FOCUS_CHANGE] = gtk_signal_new ("calendar_focus_change", GTK_RUN_FIRST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (GnomeCalendarClass, calendar_focus_change), gtk_marshal_NONE__BOOL, GTK_TYPE_NONE, 1, @@ -267,16 +265,12 @@ gnome_calendar_class_init (GnomeCalendarClass *class) gnome_calendar_signals[TASKPAD_FOCUS_CHANGE] = gtk_signal_new ("taskpad_focus_change", GTK_RUN_FIRST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (GnomeCalendarClass, taskpad_focus_change), gtk_marshal_NONE__BOOL, GTK_TYPE_NONE, 1, GTK_TYPE_BOOL); - gtk_object_class_add_signals (object_class, - gnome_calendar_signals, - LAST_SIGNAL); - object_class->destroy = gnome_calendar_destroy; class->dates_shown_changed = NULL; @@ -1933,7 +1927,7 @@ add_alarms (const char *uri) /* Activate the alarm notification service */ CORBA_exception_init (&ev); - an = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev); + an = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev); if (BONOBO_EX (&ev)) { g_warning ("add_alarms(): Could not activate the alarm notification service: %s", diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c index 06250a1a70..c51061703f 100644 --- a/calendar/gui/goto.c +++ b/calendar/gui/goto.c @@ -216,7 +216,7 @@ goto_dialog (GnomeCalendar *gcal) dlg = g_new0 (GoToDialog, 1); /* Load the content widgets */ - dlg->xml = glade_xml_new (EVOLUTION_GLADEDIR "/goto-dialog.glade", NULL); + dlg->xml = glade_xml_new (EVOLUTION_GLADEDIR "/goto-dialog.glade", NULL, NULL); if (!dlg->xml) { g_message ("goto_dialog(): Could not load the Glade XML file!"); g_free (dlg); diff --git a/calendar/gui/itip-bonobo-control.c b/calendar/gui/itip-bonobo-control.c index d05cee6d9a..56f362d6e3 100644 --- a/calendar/gui/itip-bonobo-control.c +++ b/calendar/gui/itip-bonobo-control.c @@ -212,14 +212,14 @@ itip_control_factory (BonoboGenericFactory *Factory, void *closure) bonobo_property_bag_add (prop_bag, "from_address", FROM_ADDRESS_ARG_ID, BONOBO_ARG_STRING, NULL, "from_address", 0 ); - bonobo_control_set_properties (control, prop_bag); + bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (prop_bag)), NULL); bonobo_object_unref (BONOBO_OBJECT (prop_bag)); bonobo_control_set_automerge (control, TRUE); stream = bonobo_persist_stream_new (pstream_load, pstream_save, - pstream_get_max_size, pstream_get_content_types, + "OAFIID:GNOME_Evolution_Calendar_iTip_Control", itip); if (stream == NULL) { diff --git a/calendar/gui/itip-control-factory.c b/calendar/gui/itip-control-factory.c index d05cee6d9a..56f362d6e3 100644 --- a/calendar/gui/itip-control-factory.c +++ b/calendar/gui/itip-control-factory.c @@ -212,14 +212,14 @@ itip_control_factory (BonoboGenericFactory *Factory, void *closure) bonobo_property_bag_add (prop_bag, "from_address", FROM_ADDRESS_ARG_ID, BONOBO_ARG_STRING, NULL, "from_address", 0 ); - bonobo_control_set_properties (control, prop_bag); + bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (prop_bag)), NULL); bonobo_object_unref (BONOBO_OBJECT (prop_bag)); bonobo_control_set_automerge (control, TRUE); stream = bonobo_persist_stream_new (pstream_load, pstream_save, - pstream_get_max_size, pstream_get_content_types, + "OAFIID:GNOME_Evolution_Calendar_iTip_Control", itip); if (stream == NULL) { diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index f5c70086c0..8a1816d499 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -26,15 +26,11 @@ #include <bonobo/bonobo-exception.h> #include <bonobo/bonobo-object.h> -#include <bonobo/bonobo-object-client.h> #include <bonobo/bonobo-moniker-util.h> -#include <bonobo-conf/bonobo-config-database.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <gtk/gtkwidget.h> #include <gal/widgets/e-gui-utils.h> #include <gal/widgets/e-unicode.h> -#include <gal/util/e-unicode-i18n.h> #include <gal/util/e-util.h> #include <ical.h> #include <Evolution-Composer.h> @@ -459,15 +455,15 @@ comp_subject (CalComponentItipMethod method, CalComponent *comp) else { switch (cal_component_get_vtype (comp)) { case CAL_COMPONENT_EVENT: - description = U_("Event information"); + description = _("Event information"); case CAL_COMPONENT_TODO: - description = U_("Task information"); + description = _("Task information"); case CAL_COMPONENT_JOURNAL: - description = U_("Journal information"); + description = _("Journal information"); case CAL_COMPONENT_FREEBUSY: - description = U_("Free/Busy information"); + description = _("Free/Busy information"); default: - description = U_("Calendar information"); + description = _("Calendar information"); } } @@ -487,13 +483,13 @@ comp_subject (CalComponentItipMethod method, CalComponent *comp) switch (a->status) { case ICAL_PARTSTAT_ACCEPTED: - prefix = U_("Accepted"); + prefix = _("Accepted"); break; case ICAL_PARTSTAT_TENTATIVE: - prefix = U_("Tentatively Accepted"); + prefix = _("Tentatively Accepted"); break; case ICAL_PARTSTAT_DECLINED: - prefix = U_("Declined"); + prefix = _("Declined"); break; default: break; @@ -503,23 +499,23 @@ comp_subject (CalComponentItipMethod method, CalComponent *comp) break; case CAL_COMPONENT_METHOD_ADD: - prefix = U_("Updated"); + prefix = _("Updated"); break; case CAL_COMPONENT_METHOD_CANCEL: - prefix = U_("Cancel"); + prefix = _("Cancel"); break; case CAL_COMPONENT_METHOD_REFRESH: - prefix = U_("Refresh"); + prefix = _("Refresh"); break; case CAL_COMPONENT_METHOD_COUNTER: - prefix = U_("Counter-proposal"); + prefix = _("Counter-proposal"); break; case CAL_COMPONENT_METHOD_DECLINECOUNTER: - prefix = U_("Declined"); + prefix = _("Declined"); break; default: @@ -568,11 +564,11 @@ comp_description (CalComponent *comp) switch (cal_component_get_vtype (comp)) { case CAL_COMPONENT_EVENT: - return CORBA_string_dup (U_("Event information")); + return CORBA_string_dup (_("Event information")); case CAL_COMPONENT_TODO: - return CORBA_string_dup (U_("Task information")); + return CORBA_string_dup (_("Task information")); case CAL_COMPONENT_JOURNAL: - return CORBA_string_dup (U_("Journal information")); + return CORBA_string_dup (_("Journal information")); case CAL_COMPONENT_FREEBUSY: cal_component_get_dtstart (comp, &dt); if (dt.value) { @@ -589,13 +585,13 @@ comp_description (CalComponent *comp) g_free (tmp_utf); g_free (tmp); } else { - description = CORBA_string_dup (U_("Free/Busy information")); + description = CORBA_string_dup (_("Free/Busy information")); } g_free (start); g_free (end); return description; default: - return CORBA_string_dup (U_("iCalendar information")); + return CORBA_string_dup (_("iCalendar information")); } } @@ -910,7 +906,7 @@ gboolean itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp, CalClient *client, icalcomponent *zones) { - BonoboObjectClient *bonobo_server; + BonoboObject *bonobo_server; GNOME_Evolution_Composer composer_server; CalComponent *comp = NULL; icalcomponent *top_level = NULL; @@ -928,7 +924,7 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp, CORBA_exception_init (&ev); /* Obtain an object reference for the Composer. */ - bonobo_server = bonobo_object_activate (GNOME_EVOLUTION_COMPOSER_OAFIID, 0); + bonobo_server = bonobo_activation_activate_from_id (GNOME_EVOLUTION_COMPOSER_OAFIID, 0, NULL, &ev); g_return_val_if_fail (bonobo_server != NULL, FALSE); composer_server = BONOBO_OBJREF (bonobo_server); diff --git a/calendar/gui/main.c b/calendar/gui/main.c index 5d9bdf30c5..2b21346300 100644 --- a/calendar/gui/main.c +++ b/calendar/gui/main.c @@ -25,13 +25,11 @@ #endif #include <glib.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-init.h> +#include <libgnome/gnome-init.h> #include <libgnomevfs/gnome-vfs-init.h> #include <glade/glade.h> -#include <liboaf/liboaf.h> #include <bonobo/bonobo-main.h> #include <bonobo/bonobo-generic-factory.h> #include <bonobo/bonobo-exception.h> @@ -58,12 +56,12 @@ static void init_bonobo (int argc, char **argv) { if (gnome_init_with_popt_table ("evolution-calendar", VERSION, argc, argv, - oaf_popt_options, 0, NULL) != 0) + bonobo_activation_popt_options, 0, NULL) != 0) g_error (_("Could not initialize GNOME")); - oaf_init (argc, argv); + bonobo_activation_init (argc, argv); - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) + if (bonobo_init (&argc, argv) == FALSE) g_error (_("Could not initialize Bonobo")); if (!bonobo_activate ()) @@ -74,7 +72,7 @@ init_bonobo (int argc, char **argv) * references a singleton service object. */ static BonoboObject * -comp_editor_factory_fn (BonoboGenericFactory *factory, void *data) +comp_editor_factory_fn (BonoboGenericFactory *factory, const char *id, void *data) { if (!comp_editor_factory) { comp_editor_factory = comp_editor_factory_new (); @@ -115,7 +113,7 @@ launch_alarm_daemon_cb (gpointer data) /* activate the alarm daemon */ CORBA_exception_init (&ev); - an = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev); + an = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev); if (BONOBO_EX (&ev)) { g_message ("launch_alarm_daemon_cb(): Could not activate the alarm notification service"); diff --git a/calendar/gui/print.c b/calendar/gui/print.c index b353fc24fb..599458d082 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -28,22 +28,21 @@ #include <math.h> #include <time.h> #include <glib.h> -#include <libgnome/gnome-defs.h> +#include <gtk/gtkradiobutton.h> #include <libgnome/gnome-i18n.h> -#include <libgnome/gnome-paper.h> #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-uidefs.h> -#include <libgnomeui/gnome-paper-selector.h> -#include <libgnomeui/gnome-stock.h> +#include <libgnomeui/gnome-stock-icons.h> #include <libgnomeprint/gnome-print.h> -#include <libgnomeprint/gnome-print-copies.h> +#include <libgnomeprint/gnome-print-paper.h> #include <libgnomeprint/gnome-print-master.h> -#include <libgnomeprint/gnome-print-master-preview.h> -#include <libgnomeprint/gnome-print-preview.h> -#include <libgnomeprint/gnome-printer-dialog.h> +#include <libgnomeprintui/gnome-print-master-preview.h> +#include <libgnomeprintui/gnome-print-paper-selector.h> +#include <libgnomeprintui/gnome-print-copies.h> +#include <libgnomeprintui/gnome-print-preview.h> +#include <libgnomeprintui/gnome-printer-dialog.h> #include <e-util/e-dialog-widgets.h> #include <e-util/e-time-utils.h> -#include <gal/util/e-unicode-i18n.h> #include <gal/widgets/e-unicode.h> #include <cal-util/timeutil.h> #include "calendar-commands.h" @@ -165,7 +164,7 @@ struct einfo int count; }; -static const GnomePaper *paper_info = NULL; +static const GnomePrintPaper *paper_info = NULL; /* Convenience function to help the transition to timezone functions. @@ -259,13 +258,13 @@ get_font_for_size (double h, GnomeFontWeight weight, gboolean italic) GnomeFont *font; double asc, desc, size; - face = gnome_font_unsized_closest (DEFAULT_FONT, weight, italic); + face = gnome_font_face_find_closest_from_weight_slant (DEFAULT_FONT, weight, italic); asc = gnome_font_face_get_ascender (face); desc = gnome_font_face_get_descender (face); size = h * 1000 / (asc + desc); g_print ("Print Info: %f, %f, %f\n", asc, desc, size); - font = gnome_font_new_closest (DEFAULT_FONT, weight, italic, size); + font = gnome_font_find_closest_from_weight_slant (DEFAULT_FONT, weight, italic, size); gtk_object_unref (GTK_OBJECT (face)); @@ -581,7 +580,7 @@ print_month_small (GnomePrintContext *pc, GnomeCalendar *gcal, time_t month, week_start_day = calendar_config_get_week_start_day (); weekday = week_start_day; for (x = 0; x < 7; x++) { - print_text (pc, font_bold, U_(daynames[weekday]), ALIGN_CENTER, + print_text (pc, font_bold, _(daynames[weekday]), ALIGN_CENTER, left + x * col_width, left + (x + 1) * col_width, top, top - row_height * 1.4); weekday = (weekday + 1) % 7; @@ -788,9 +787,9 @@ print_day_background (GnomePrintContext *pc, GnomeCalendar *gcal, minute = "00"; } else { if (i < 12) - minute = U_("am"); + minute = _("am"); else - minute = U_("pm"); + minute = _("pm"); hour = i % 12; if (hour == 0) @@ -1774,7 +1773,7 @@ print_todo_details (GnomePrintContext *pc, GnomeCalendar *gcal, gnome_print_setrgbcolor (pc, 0, 0, 0); gnome_print_setlinewidth (pc, 0.0); - titled_box (pc, U_("Tasks"), font_summary, ALIGN_CENTER | ALIGN_BORDER, + titled_box (pc, _("Tasks"), font_summary, ALIGN_CENTER | ALIGN_BORDER, &left, &right, &top, &bottom, 1.0); y = top - 3; @@ -2244,9 +2243,9 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client, /* We should only be asked to print VEVENTs or VTODOs. */ if (vtype == CAL_COMPONENT_EVENT) - title = U_("Appointment"); + title = _("Appointment"); else if (vtype == CAL_COMPONENT_TODO) - title = U_("Task"); + title = _("Task"); else return; @@ -2287,23 +2286,23 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client, if (status != ICAL_STATUS_NONE) { switch (status) { case ICAL_STATUS_NEEDSACTION: - status_string = U_("Not Started"); + status_string = _("Not Started"); break; case ICAL_STATUS_INPROCESS: - status_string = U_("In Progress"); + status_string = _("In Progress"); break; case ICAL_STATUS_COMPLETED: - status_string = U_("Completed"); + status_string = _("Completed"); break; case ICAL_STATUS_CANCELLED: - status_string = U_("Cancelled"); + status_string = _("Cancelled"); break; default: break; } if (status_string) { - char *text = g_strdup_printf (U_("Status: %s"), + char *text = g_strdup_printf (_("Status: %s"), status_string); top = bound_text (pc, font, text, left, right, top, bottom, 0); @@ -2321,7 +2320,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client, cal_component_free_priority (priority); priority_utf8 = e_utf8_from_locale_string (priority_string); - text = g_strdup_printf (U_("Priority: %s"), + text = g_strdup_printf (_("Priority: %s"), priority_utf8); top = bound_text (pc, font, text, left, right, top, bottom, 0); @@ -2335,7 +2334,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client, if (percent) { char *percent_string; - percent_string = g_strdup_printf (U_("Percent Complete: %i"), *percent); + percent_string = g_strdup_printf (_("Percent Complete: %i"), *percent); cal_component_free_percent (percent); top = bound_text (pc, font, percent_string, @@ -2347,7 +2346,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client, /* URL */ cal_component_get_url (comp, &url); if (url && url[0]) { - char *url_string = g_strdup_printf (U_("URL: %s"), + char *url_string = g_strdup_printf (_("URL: %s"), url); top = bound_text (pc, font, url_string, @@ -2361,7 +2360,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client, /* Categories */ cal_component_get_categories (comp, &categories); if (categories && categories[0]) { - categories_string = g_strdup_printf (U_("Categories: %s"), + categories_string = g_strdup_printf (_("Categories: %s"), categories); top = bound_text (pc, font, categories_string, left, right, top, bottom, 0); @@ -2372,7 +2371,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client, /* Contacts */ cal_component_get_contact_list (comp, &contact_list); if (contact_list) { - GString *contacts = g_string_new (U_("Contacts: ")); + GString *contacts = g_string_new (_("Contacts: ")); for (elem = contact_list; elem; elem = elem->next) { CalComponentText *t = elem->data; /* Put a comma between contacts. */ @@ -2409,7 +2408,8 @@ void print_calendar (GnomeCalendar *gcal, gboolean preview, time_t date, PrintView default_view) { - GnomePrinter *printer; +#if 0 + GnomePrintConfig *config; GnomePrintMaster *gpm; GnomePrintContext *pc; int copies, collate; @@ -2418,7 +2418,7 @@ print_calendar (GnomeCalendar *gcal, gboolean preview, time_t date, g_return_if_fail (gcal != NULL); g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - printer = NULL; + config = NULL; copies = 1; collate = FALSE; @@ -2427,9 +2427,7 @@ print_calendar (GnomeCalendar *gcal, gboolean preview, time_t date, GtkWidget *range; int view; - gpd = gnome_print_dialog_new (_("Print Calendar"), - GNOME_PRINT_DIALOG_RANGE - | GNOME_PRINT_DIALOG_COPIES); + gpd = gnome_printer_dialog_new_default (); view = (int) default_view; range = range_selector_new (gpd, date, &view); @@ -2525,12 +2523,14 @@ print_calendar (GnomeCalendar *gcal, gboolean preview, time_t date, } gtk_object_unref (GTK_OBJECT (gpm)); +#endif } void print_comp (CalComponent *comp, CalClient *client, gboolean preview) { +#if 0 GnomePrinter *printer; GnomePrintMaster *gpm; GnomePrintContext *pc; @@ -2617,11 +2617,13 @@ print_comp (CalComponent *comp, CalClient *client, gboolean preview) } gtk_object_unref (GTK_OBJECT (gpm)); +#endif } void print_setup (void) { +#if 0 GtkWidget *dlg, *ps; gint btn; @@ -2643,4 +2645,5 @@ print_setup (void) } gnome_dialog_close (GNOME_DIALOG (dlg)); +#endif } diff --git a/calendar/gui/tasks-control-factory.c b/calendar/gui/tasks-control-factory.c index 5fd8d61346..59bf57439e 100644 --- a/calendar/gui/tasks-control-factory.c +++ b/calendar/gui/tasks-control-factory.c @@ -24,7 +24,6 @@ #include <config.h> #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-dialog-util.h> -#include <liboaf/liboaf.h> #include <bonobo/bonobo-control.h> #include <bonobo/bonobo-generic-factory.h> #include <bonobo/bonobo-context.h> diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c index 0f0166833c..66b4dbc4a2 100644 --- a/calendar/gui/tasks-control.c +++ b/calendar/gui/tasks-control.c @@ -23,20 +23,23 @@ #include <config.h> #include <gtk/gtksignal.h> -#include <libgnome/gnome-defs.h> +#include <gtk/gtklabel.h> +#include <gtk/gtkcheckbutton.h> #include <libgnome/gnome-i18n.h> -#include <libgnome/gnome-paper.h> #include <libgnome/gnome-util.h> #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-dialog-util.h> -#include <libgnomeui/gnome-stock.h> +#include <libgnomeui/gnome-stock-icons.h> #include <libgnomeprint/gnome-print.h> -#include <libgnomeprint/gnome-print-copies.h> +#include <libgnomeprint/gnome-print-paper.h> #include <libgnomeprint/gnome-print-master.h> -#include <libgnomeprint/gnome-print-master-preview.h> -#include <libgnomeprint/gnome-print-preview.h> -#include <libgnomeprint/gnome-printer-dialog.h> +#include <libgnomeprintui/gnome-print-master-preview.h> +#include <libgnomeprintui/gnome-print-paper-selector.h> +#include <libgnomeprintui/gnome-print-copies.h> +#include <libgnomeprintui/gnome-print-preview.h> +#include <libgnomeprintui/gnome-printer-dialog.h> #include <bonobo/bonobo-control.h> +#include <bonobo/bonobo-property-bag.h> #include <bonobo/bonobo-ui-util.h> #include <gal/widgets/e-gui-utils.h> #include <e-util/e-dialog-utils.h> @@ -147,7 +150,7 @@ tasks_control_properties_init (BonoboControl *control, _("The URI of the tasks folder to display"), 0); - bonobo_control_set_properties (control, pbag); + bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (pbag)), NULL); bonobo_object_unref (BONOBO_OBJECT (pbag)); } @@ -161,7 +164,7 @@ tasks_control_get_property (BonoboPropertyBag *bag, gpointer user_data) { ETasks *tasks = user_data; - char *uri; + const char *uri; switch (arg_id) { @@ -309,8 +312,8 @@ tasks_control_activate (BonoboControl *control, ETasks *tasks) uic = bonobo_control_get_ui_component (control); g_assert (uic != NULL); - remote_uih = bonobo_control_get_remote_ui_container (control); - bonobo_ui_component_set_container (uic, remote_uih); + remote_uih = bonobo_control_get_remote_ui_container (control, NULL); + bonobo_ui_component_set_container (uic, remote_uih, NULL); bonobo_object_release_unref (remote_uih, NULL); e_tasks_set_ui_component (tasks, uic); @@ -321,7 +324,8 @@ tasks_control_activate (BonoboControl *control, ETasks *tasks) bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR, "evolution-tasks.xml", - "evolution-tasks"); + "evolution-tasks", + NULL); e_pixmaps_update (uic, pixmaps); @@ -366,7 +370,7 @@ tasks_control_deactivate (BonoboControl *control, ETasks *tasks) gtk_signal_disconnect_by_data (GTK_OBJECT (tasks), control); bonobo_ui_component_rm (uic, "/", NULL); - bonobo_ui_component_unset_container (uic); + bonobo_ui_component_unset_container (uic, NULL); } @@ -503,7 +507,7 @@ print_title (GnomePrintContext *pc, char *text; double w, x, y; - font = gnome_font_new_closest ("Times", GNOME_FONT_BOLD, 0, 18); + font = gnome_font_find_closest_from_weight_slant ("Times", GNOME_FONT_BOLD, 0, 18); text = _("Tasks"); w = gnome_font_get_width_utf8 (font, text); @@ -524,12 +528,13 @@ static void print_tasks (ETasks *tasks, gboolean preview, gboolean landscape, int copies, gboolean collate) { +#if 0 ECalendarTable *cal_table; EPrintable *printable; ETable *etable; GnomePrintMaster *master; GnomePrintContext *pc; - const GnomePaper *paper_info; + const GnomePrintPaper *paper_info; double l, r, t, b, page_width, page_height, left_margin, bottom_margin; cal_table = e_tasks_get_calendar_table (tasks); @@ -538,7 +543,7 @@ print_tasks (ETasks *tasks, gboolean preview, gboolean landscape, master = gnome_print_master_new (); - paper_info = gnome_paper_with_name (gnome_paper_name_default ()); + paper_info = gnome_print_paper_with_name (gnome_paper_name_default ()); gnome_print_master_set_paper (master, paper_info); gnome_print_master_set_copies (master, copies, collate); @@ -594,6 +599,7 @@ print_tasks (ETasks *tasks, gboolean preview, gboolean landscape, gtk_object_unref (GTK_OBJECT (master)); gtk_object_unref (GTK_OBJECT (printable)); +#endif } @@ -603,6 +609,7 @@ tasks_control_print_cmd (BonoboUIComponent *uic, gpointer data, const char *path) { +#if 0 ETasks *tasks; GtkWidget *gpd, *mode_box, *portrait_radio, *landscape_radio; GtkWidget *dialog_vbox, *dialog_hbox, *mode_frame; @@ -674,6 +681,7 @@ tasks_control_print_cmd (BonoboUIComponent *uic, gnome_dialog_close (GNOME_DIALOG (gpd)); print_tasks (tasks, preview, landscape, copies, collate); +#endif } static void diff --git a/calendar/gui/tasks-migrate.c b/calendar/gui/tasks-migrate.c index c6c6309528..37ddcd7958 100644 --- a/calendar/gui/tasks-migrate.c +++ b/calendar/gui/tasks-migrate.c @@ -24,7 +24,6 @@ #include <gtk/gtkwindow.h> #include <gtk/gtksignal.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnomeui/gnome-dialog-util.h> #include <cal-client/cal-client.h> diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c index 890d46f92e..04201e6b41 100644 --- a/calendar/gui/weekday-picker.c +++ b/calendar/gui/weekday-picker.c @@ -24,10 +24,9 @@ #include <string.h> #include <gtk/gtksignal.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-canvas-rect-ellipse.h> -#include <libgnomeui/gnome-canvas-text.h> +#include <libgnomecanvas/gnome-canvas-rect-ellipse.h> +#include <libgnomecanvas/gnome-canvas-text.h> #include "weekday-picker.h" @@ -64,7 +63,7 @@ enum { static void weekday_picker_class_init (WeekdayPickerClass *class); static void weekday_picker_init (WeekdayPicker *wp); -static void weekday_picker_finalize (GtkObject *object); +static void weekday_picker_destroy (GtkObject *object); static void weekday_picker_realize (GtkWidget *widget); static void weekday_picker_size_request (GtkWidget *widget, GtkRequisition *requisition); @@ -123,14 +122,12 @@ weekday_picker_class_init (WeekdayPickerClass *class) wp_signals[CHANGED] = gtk_signal_new ("changed", GTK_RUN_FIRST, - object_class->type, + G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (WeekdayPickerClass, changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, wp_signals, LAST_SIGNAL); - - object_class->finalize = weekday_picker_finalize; + object_class->destroy = weekday_picker_destroy; widget_class->realize = weekday_picker_realize; widget_class->size_request = weekday_picker_size_request; @@ -231,7 +228,7 @@ weekday_picker_init (WeekdayPicker *wp) /* Finalize handler for the weekday picker */ static void -weekday_picker_finalize (GtkObject *object) +weekday_picker_destroy (GtkObject *object) { WeekdayPicker *wp; WeekdayPickerPrivate *priv; @@ -245,8 +242,8 @@ weekday_picker_finalize (GtkObject *object) g_free (priv); wp->priv = NULL; - if (GTK_OBJECT_CLASS (parent_class)->finalize) - (* GTK_OBJECT_CLASS (parent_class)->finalize) (object); + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void @@ -332,7 +329,7 @@ configure_items (WeekdayPicker *wp) c = g_strndup (str + day, 1); gnome_canvas_item_set (priv->labels[i], "text", c, - "font_gdk", GTK_WIDGET (wp)->style->font, + "font_gdk", gtk_style_get_font (gtk_widget_get_style (GTK_WIDGET (wp))), "x", (double) (i * box_width) + box_width / 2.0, "y", (double) (1 + PADDING), "anchor", GTK_ANCHOR_N, @@ -394,6 +391,7 @@ weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style) { WeekdayPicker *wp; WeekdayPickerPrivate *priv; + GdkFont *font; int max_width; const char *str; int i, len; @@ -401,8 +399,9 @@ weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style) wp = WEEKDAY_PICKER (widget); priv = wp->priv; - priv->font_ascent = widget->style->font->ascent; - priv->font_descent = widget->style->font->descent; + font = gtk_style_get_font (gtk_widget_get_style (widget)); + priv->font_ascent = font->ascent; + priv->font_descent = font->descent; max_width = 0; @@ -412,7 +411,7 @@ weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style) for (i = 0; i < len; i++) { int w; - w = gdk_char_measure (widget->style->font, str[i]); + w = gdk_char_measure (font, str[i]); if (w > max_width) max_width = w; } diff --git a/calendar/gui/weekday-picker.h b/calendar/gui/weekday-picker.h index 928dcac353..67a72f9ebd 100644 --- a/calendar/gui/weekday-picker.h +++ b/calendar/gui/weekday-picker.h @@ -21,10 +21,9 @@ #ifndef WEEKDAY_PICKER_H #define WEEKDAY_PICKER_H -#include <libgnome/gnome-defs.h> -#include <libgnomeui/gnome-canvas.h> +#include <libgnomecanvas/gnome-canvas.h> -BEGIN_GNOME_DECLS +G_BEGIN_DECLS @@ -67,6 +66,6 @@ int weekday_picker_get_week_start_day (WeekdayPicker *wp); -END_GNOME_DECLS +G_END_DECLS #endif |