diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2007-04-20 02:53:33 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-04-20 02:53:33 +0800 |
commit | 64977cb1bcc55bf4c7c0fc38cd3d047b1e6a25c6 (patch) | |
tree | 4ebe95239bef43cb97c0e46aa8194d44e6c88be6 /calendar | |
parent | bb05f6e6d0541bf29c8dde4e264cc7c23ba52fbb (diff) | |
download | gsoc2013-evolution-64977cb1bcc55bf4c7c0fc38cd3d047b1e6a25c6.tar.gz gsoc2013-evolution-64977cb1bcc55bf4c7c0fc38cd3d047b1e6a25c6.tar.zst gsoc2013-evolution-64977cb1bcc55bf4c7c0fc38cd3d047b1e6a25c6.zip |
Massive code cleanup (bug #429422)
svn path=/trunk/; revision=33432
Diffstat (limited to 'calendar')
38 files changed, 484 insertions, 221 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 4336ce37ce..d33eddc09c 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,129 @@ +2007-04-19 Matthew Barnes <mbarnes@redhat.com> + + ** Fixes part of bug #429422 + + * gui/e-select-names-renderer.c + (e_select_names_renderer_editing_done): + Use gtk_cell_renderer_stop_editing() instead of + gtk_cell_renderer_editing_canceled(). + + * gui/dialogs/task-details-page.c (get_widgets): + * gui/dialogs/schedule-page.c (get_widgets): + * gui/dialogs/task-page.c (get_widgets): + * gui/dialogs/recurrence-page.c (get_widgets): + * gui/dialogs/event-page.c (get_widgets): + * gui/dialogs/memo-page.c (get_widgets): + Use g_object_ref() instead of gtk_widget_ref(). + + * gui/dialogs/task-details-page.c (task_details_page_finalize): + * gui/dialogs/schedule-page.c (schedule_page_finalize): + * gui/dialogs/task-page.c (task_page_finalize): + * gui/dialogs/recurrence-page.c (recurrence_page_finalize): + * gui/dialogs/event-page.c (event_page_finalize): + * gui/dialogs/memo-page.c (memo_page_finalize): + Use g_object_unref() instead of gtk_widget_unref(). + + * gui/dialogs/event-editor.c (create_schedule_page): + * gui/dialogs/memo-editor.c (memo_editor_construct): + * gui/dialogs/task-editor.c (task_editor_construct): + * gui/print.c (print_table): + * conduits/todo/todo-conduit.c (todoconduit_load_configuration): + * conduits/calendar/calendar-conduit.c + (calconduit_load_configuration): + * conduits/memo/memo-conduit.c (memoconduit_load_configuration): + Use g_object_ref_sink() instead of gtk_object_sink(). + + * gui/dialogs/task-details-page.c (sensitize_widgets): + * gui/dialogs/task-page.c (sensitize_widgets): + * gui/dialogs/event-page.c (sensitize_widgets), + (event_page_fill_widgets): + * gui/dialogs/memo-page.c (sensitize_widgets), + (memo_page_fill_widgets): + * gui/e-timezone-entry.c (e_timezone_entry_init): + Use gtk_editable_set_editable() instead of gtk_entry_set_editable(). + + * gui/dialogs/task-details-page.c (get_widgets): + * gui/dialogs/schedule-page.c (get_widgets): + * gui/dialogs/task-page.c (get_widgets): + * gui/dialogs/recurrence-page.c (get_widgets): + * gui/dialogs/event-page.c (get_widgets): + * gui/dialogs/memo-page.c (get_widgets): + Use g_object_ref() instead of gtk_accel_group_ref(). + + * gui/dialogs/comp-editor-page.c (comp_editor_page_destroy): + Use g_object_unref() instead of gtk_accel_group_unref(). + + * gui/dialogs/task-page.c (task_page_new): + * gui/dialogs/memo-page.c (memo_page_new): + Use g_object_new() instead of gtk_type_new(). + + * gui/dialogs/comp-editor.c (save_comp), (obj_modified_cb): + * gui/dialogs/comp-editor-page.c + (comp_editor_page_display_validation_error): + * gui/e-memos.c (backend_error_cb): + * gui/e-itip-control.c (update_item), (update_attendee_status), + (send_item), (send_freebusy): + * gui/gnome-cal.c (backend_error_cb): + * gui/e-tasks.c (backend_error_cb): + * gui/e-cell-date-edit-text.c (show_date_warning): + Use gtk_message_dialog_new() instead of gnome_error_dialog(), + gnome_warning_dialog(), gnome_question_dialog(), or gnome_ok_dialog(). + + * gui/dialogs/comp-editor.c (comp_editor_show_page): + * gui/dialogs/alarm-dialog.c (action_selection_done_cb): + * gui/gnome-cal.c (display_view): + * importers/icalendar-importer.c (button_toggled_cb): + Use gtk_notebook_set_current_page() instead of + gtk_notebook_set_page(). + + * gui/dialogs/alarm-dialog.glade: + * gui/dialogs/alarm-dialog.c: + Use GtkFileChooserButton instead of GnomeFileEntry. + + * gui/e-memos.c (e_memos_class_init): + * gui/e-tasks.c (e_tasks_class_init): + Use g_cclosure_marshal_VOID__INT instead of gtk_marshal_NONE__INT. + + * gui/e-day-view.c (e_day_view_style_set), (e_day_view_check_layout): + * gui/e-itip-control.c (e_itip_control_init): + * gui/gnome-cal.c (gnome_calendar_hpane_resized): + * gui/e-week-view.c (e_week_view_style_set): + * gui/e-meeting-time-sel (e_meeting_time_selector_construct), + (e_meeting_time_selector_style_set): + Use gtk_widget_set_size_request() instead of gtk_widget_set_usize(). + + * gui/e-day-view.c (e_day_view_stop_auto_scroll), + (e_day_view_cancel_layout): + * gui/e-week-view.c (e_week_view_cancel_layout): + Use g_source_remove() instead of gtk_timeout_remove(). + + * gui/tasks-component.c (task_component_peek): + * gui/calendar-component.c (calendar_component_peek): + * gui/memos-component.c (memos_component_peek): + Use g_mkdir_with_parents() instead of e_util_mkdir_hier(). + + * gui/print.c (range_selector_new): + * gui/e-day-view-time-item.c (e_day_view_time_item_show_popup_menu): + Use gtk_radio_button_get_group() instead of gtk_radio_button_group(). + + * gui/e-day-view-time-item.c (e_day_view_time_item_show_popup_menu): + * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct): + Use gtk_menu_shell_append() instead of gtk_menu_append(). + + * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct): + e_button_new_with_stock_icon() is dead; just do it manually. + + * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct): + Use gtk_radio_menu_item_get_group() instead of + gtk_radio_menu_item_group(). + + * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct), + (e_meeting_time_selector_draw_shadow): + Use gtk_paint_shadow() instead of gtk_draw_shadow(). + + * gui/e-meeting-time-sel.c (e_meeting_time_selector_timeout_handler): + Remove gtk_layout_freeze() and gtk_layout_thaw(). + 2007-04-10 Andre Klapper <a9016009@gmx.de> * gui/dialogs/cal-prefs-dialog.glade: add missing mnemonic widgets. diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index 56dacdab9d..6763757f94 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -120,11 +120,9 @@ calconduit_load_configuration (guint32 pilot_id) /* Sync Type */ management = gnome_pilot_conduit_management_new ("e_calendar_conduit", GNOME_PILOT_CONDUIT_MGMT_ID); - gtk_object_ref (GTK_OBJECT (management)); - gtk_object_sink (GTK_OBJECT (management)); + g_object_ref_sink (management); config = gnome_pilot_conduit_config_new (management, pilot_id); - gtk_object_ref (GTK_OBJECT (config)); - gtk_object_sink (GTK_OBJECT (config)); + g_object_ref_sink (config); if (!gnome_pilot_conduit_config_is_enabled (config, &c->sync_type)) c->sync_type = GnomePilotConduitSyncTypeNotSet; gtk_object_unref (GTK_OBJECT (config)); diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index 7bd2e104c3..49f5170f7f 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -125,11 +125,9 @@ memoconduit_load_configuration (guint32 pilot_id) c->pilot_id = pilot_id; management = gnome_pilot_conduit_management_new ("e_memo_conduit", GNOME_PILOT_CONDUIT_MGMT_ID); - gtk_object_ref (GTK_OBJECT (management)); - gtk_object_sink (GTK_OBJECT (management)); + g_object_ref_sink (management); config = gnome_pilot_conduit_config_new (management, pilot_id); - gtk_object_ref (GTK_OBJECT (config)); - gtk_object_sink (GTK_OBJECT (config)); + g_object_ref_sink (config); if (!gnome_pilot_conduit_config_is_enabled (config, &c->sync_type)) c->sync_type = GnomePilotConduitSyncTypeNotSet; gtk_object_unref (GTK_OBJECT (config)); diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 31d84c173b..e63871a02d 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -127,11 +127,9 @@ todoconduit_load_configuration (guint32 pilot_id) c->pilot_id = pilot_id; management = gnome_pilot_conduit_management_new ("e_todo_conduit", GNOME_PILOT_CONDUIT_MGMT_ID); - gtk_object_ref (GTK_OBJECT (management)); - gtk_object_sink (GTK_OBJECT (management)); + g_object_ref_sink (management); config = gnome_pilot_conduit_config_new (management, pilot_id); - gtk_object_ref (GTK_OBJECT (config)); - gtk_object_sink (GTK_OBJECT (config)); + g_object_ref_sink (config); if (!gnome_pilot_conduit_config_is_enabled (config, &c->sync_type)) c->sync_type = GnomePilotConduitSyncTypeNotSet; gtk_object_unref (GTK_OBJECT (config)); diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index d528202a50..08ecfb09f3 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -1718,7 +1718,7 @@ calendar_component_peek (void) if (component == NULL) { component = g_object_new (calendar_component_get_type (), NULL); - if (e_util_mkdir_hier (calendar_component_peek_config_directory (component), 0777) != 0) { + if (g_mkdir_with_parents (calendar_component_peek_config_directory (component), 0777) != 0) { g_warning (G_STRLOC ": Cannot create directory %s: %s", calendar_component_peek_config_directory (component), g_strerror (errno)); diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index d6e03cc036..36ee0add7a 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -33,6 +33,7 @@ #include <gtk/gtklabel.h> #include <gtk/gtkcellrenderertext.h> #include <gtk/gtkdialog.h> +#include <gtk/gtkfilechooserbutton.h> #include <gtk/gtknotebook.h> #include <gtk/gtksignal.h> #include <gtk/gtktreeview.h> @@ -41,7 +42,6 @@ #include <gtk/gtktextbuffer.h> #include <gtk/gtktextview.h> #include <gtk/gtktogglebutton.h> -#include <libgnomeui/gnome-file-entry.h> #include <bonobo/bonobo-control.h> #include <bonobo/bonobo-exception.h> #include <bonobo/bonobo-widget.h> @@ -99,7 +99,7 @@ typedef struct { GtkWidget *aalarm_group; GtkWidget *aalarm_sound; GtkWidget *aalarm_attach; - GtkWidget *aalarm_file_entry; + GtkWidget *aalarm_file_chooser; /* Mail alarm widgets */ const char *email; @@ -779,7 +779,7 @@ get_widgets (Dialog *dialog) dialog->aalarm_group = GW ("aalarm-group"); dialog->aalarm_sound = GW ("aalarm-sound"); dialog->aalarm_attach = GW ("aalarm-attach"); - dialog->aalarm_file_entry = GW ("aalarm-file-entry"); + dialog->aalarm_file_chooser = GW ("aalarm-file-chooser"); dialog->malarm_group = GW ("malarm-group"); dialog->malarm_address_group = GW ("malarm-address-group"); @@ -810,7 +810,7 @@ get_widgets (Dialog *dialog) && dialog->aalarm_group && dialog->aalarm_sound && dialog->aalarm_attach - && dialog->aalarm_file_entry + && dialog->aalarm_file_chooser && dialog->malarm_group && dialog->malarm_address_group && dialog->malarm_addressbook @@ -1073,13 +1073,16 @@ action_selection_done_cb (GtkMenuShell *menu_shell, gpointer data) } } - gtk_notebook_set_page (GTK_NOTEBOOK (dialog->option_notebook), page); + gtk_notebook_set_current_page ( + GTK_NOTEBOOK (dialog->option_notebook), page); switch (action) { case E_CAL_COMPONENT_ALARM_AUDIO: dir = calendar_config_get_dir_path (); if ( dir && *dir ) - gnome_file_entry_set_default_path (GNOME_FILE_ENTRY (dialog->aalarm_file_entry), dir); + gtk_file_chooser_set_current_folder ( + GTK_FILE_CHOOSER (dialog->aalarm_file_chooser), + dir); g_free (dir); check_custom_sound (dialog); break; diff --git a/calendar/gui/dialogs/alarm-dialog.glade b/calendar/gui/dialogs/alarm-dialog.glade index fb44f24b25..4e32374928 100644 --- a/calendar/gui/dialogs/alarm-dialog.glade +++ b/calendar/gui/dialogs/alarm-dialog.glade @@ -18,6 +18,8 @@ <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -85,6 +87,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> @@ -112,6 +118,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> @@ -336,6 +346,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> @@ -363,6 +377,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> @@ -435,6 +453,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> @@ -539,6 +561,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> @@ -566,6 +592,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> @@ -631,6 +661,10 @@ <property name="xpad">0</property> <property name="ypad">0</property> <property name="mnemonic_widget">option-notebook</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> @@ -704,6 +738,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="type">tab</property> @@ -754,7 +792,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">aalarm-attach</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> @@ -764,27 +805,14 @@ </child> <child> - <widget class="GnomeFileEntry" id="aalarm-file-entry"> + <widget class="GtkFileChooserButton" id="aalarm-file-chooser"> <property name="visible">True</property> - <property name="max_saved">10</property> - <property name="directory_entry">False</property> - <property name="modal">True</property> - <property name="use_filechooser">True</property> - <property name="filechooser_action">GTK_FILE_CHOOSER_ACTION_OPEN</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="aalarm-attach"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - </child> + <property name="title" translatable="yes">Select A File</property> + <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> + <property name="local_only">True</property> + <property name="show_hidden">False</property> + <property name="do_overwrite_confirmation">False</property> + <property name="width_chars">-1</property> </widget> <packing> <property name="padding">0</property> @@ -819,6 +847,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="type">tab</property> @@ -854,6 +886,10 @@ <property name="xpad">0</property> <property name="ypad">0</property> <property name="mnemonic_widget">palarm-program</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> @@ -879,6 +915,10 @@ <property name="xpad">0</property> <property name="ypad">0</property> <property name="mnemonic_widget">palarm-args</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> @@ -958,6 +998,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="type">tab</property> @@ -1094,6 +1138,10 @@ <property name="xpad">0</property> <property name="ypad">0</property> <property name="mnemonic_widget">option-notebook</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> @@ -1145,6 +1193,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="type">tab</property> diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index 543a3555c7..ab546ca2a4 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -23,6 +23,8 @@ #include <config.h> #endif +#include <string.h> + #include <gtk/gtkbox.h> #include <gtk/gtkdialog.h> #include <gtk/gtkstock.h> diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c index 8c9d488f4f..303d5bde84 100644 --- a/calendar/gui/dialogs/comp-editor-page.c +++ b/calendar/gui/dialogs/comp-editor-page.c @@ -22,8 +22,9 @@ #include <config.h> #endif -#include <gtk/gtksignal.h> #include <glib/gi18n.h> +#include <gtk/gtkmessagedialog.h> +#include <gtk/gtksignal.h> #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-dialog-util.h> #include "comp-editor-page.h" @@ -200,7 +201,7 @@ comp_editor_page_destroy (GtkObject *object) } if (page->accel_group) { - gtk_accel_group_unref (page->accel_group); + g_object_unref (page->accel_group); page->accel_group = NULL; } @@ -506,17 +507,18 @@ comp_editor_page_display_validation_error (CompEditorPage *page, GtkWidget *field) { GtkWidget *dialog; - char *real_msg; g_return_if_fail (IS_COMP_EDITOR_PAGE (page)); g_return_if_fail (msg != NULL); g_return_if_fail (GTK_IS_WIDGET (field)); - real_msg = g_strdup_printf (_("Validation error: %s"), msg); - dialog = gnome_error_dialog (real_msg); - gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + _("Validation error: %s"), msg); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); gtk_widget_grab_focus (field); - - g_free (real_msg); } diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index d74c23daef..0cd25deef7 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -814,15 +814,17 @@ save_comp (CompEditor *editor) } if (!result) { - GtkWidget *dlg; - char *msg; + GtkWidget *dialog; - msg = g_strdup (error ? error->message : _("Could not update object")); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + "%s", (error != NULL) ? error->message : + _("Could not update object")); + gtk_dialog_run (GTK_DIALOG(dialog)); + gtk_widget_destroy (dialog); - dlg = gnome_error_dialog (msg); - gnome_dialog_run_and_close (GNOME_DIALOG (dlg)); - - g_free (msg); if (error) g_error_free (error); @@ -2093,7 +2095,7 @@ comp_editor_show_page (CompEditor *editor, CompEditorPage *page) page_widget = comp_editor_page_get_widget (page); page_num = gtk_notebook_page_num (priv->notebook, page_widget); - gtk_notebook_set_page (priv->notebook, page_num); + gtk_notebook_set_current_page (priv->notebook, page_num); } /** @@ -2964,10 +2966,17 @@ obj_modified_cb (ECal *client, GList *objects, gpointer data) if (e_cal_component_set_icalcomponent (comp, icalcomp)) { comp_editor_edit_comp (editor, comp); } else { - GtkWidget *dlg; + GtkWidget *dialog; + + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + "%s", + _("Unable to use current version!")); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); - dlg = gnome_error_dialog (_("Unable to use current version!")); - gnome_dialog_run_and_close (GNOME_DIALOG (dlg)); icalcomponent_free (icalcomp); } diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index a8a1c365a2..3274dc0f37 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -372,8 +372,7 @@ create_schedule_page (EventEditor *ee) "gtk-close", GTK_RESPONSE_CLOSE, NULL); priv->sched_page = schedule_page_new (priv->model); - g_object_ref (priv->sched_page); - gtk_object_sink (GTK_OBJECT (priv->sched_page)); + g_object_ref_sink (priv->sched_page); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(priv->sched_window)->vbox), comp_editor_page_get_widget (COMP_EDITOR_PAGE (priv->sched_page))); g_signal_connect (priv->sched_window, "response", G_CALLBACK(gtk_widget_hide), NULL); @@ -597,8 +596,7 @@ event_editor_construct (EventEditor *ee, ECal *client) priv = ee->priv; priv->event_page = event_page_new (priv->model, client, COMP_EDITOR(ee)->uic); - g_object_ref (priv->event_page); - gtk_object_sink (GTK_OBJECT (priv->event_page)); + g_object_ref_sink (priv->event_page); comp_editor_append_page (COMP_EDITOR (ee), COMP_EDITOR_PAGE (priv->event_page), _("Appoint_ment"), TRUE); @@ -612,8 +610,7 @@ event_editor_construct (EventEditor *ee, ECal *client) g_signal_connect (priv->recur_window, "response", G_CALLBACK (gtk_widget_hide), NULL); g_signal_connect ((GtkWidget *) priv->recur_window, "delete-event", G_CALLBACK(window_delete_event), NULL); priv->recur_page = recurrence_page_new (); - g_object_ref (priv->recur_page); - gtk_object_sink (GTK_OBJECT (priv->recur_page)); + g_object_ref_sink (priv->recur_page); gtk_container_add ((GtkContainer *) (GTK_DIALOG (priv->recur_window)->vbox), comp_editor_page_get_widget (COMP_EDITOR_PAGE (priv->recur_page))); gtk_widget_show_all (priv->recur_window); diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 74cd4d2144..efb3c95b24 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -286,7 +286,7 @@ event_page_finalize (GObject *object) g_ptr_array_free (priv->deleted_attendees, TRUE); if (priv->main) - gtk_widget_unref (priv->main); + g_object_unref (priv->main); if (priv->xml) { g_object_unref (priv->xml); @@ -811,8 +811,8 @@ sensitize_widgets (EventPage *epage) gtk_box_pack_start ((GtkBox *)priv->status_icons, priv->alarm_icon, FALSE, FALSE, 6); } - gtk_entry_set_editable (GTK_ENTRY (priv->summary), !read_only); - gtk_entry_set_editable (GTK_ENTRY (priv->location), sensitize); + gtk_editable_set_editable (GTK_EDITABLE (priv->summary), !read_only); + gtk_editable_set_editable (GTK_EDITABLE (priv->location), sensitize); gtk_widget_set_sensitive (priv->alarm_box, custom); gtk_widget_set_sensitive (priv->start_time, sensitize); gtk_widget_set_sensitive (priv->start_timezone, sensitize); @@ -833,7 +833,7 @@ sensitize_widgets (EventPage *epage) gtk_widget_set_sensitive (priv->hour_selector, sensitize); gtk_widget_set_sensitive (priv->minute_selector, sensitize); - gtk_entry_set_editable (GTK_ENTRY (priv->categories), !read_only); + gtk_editable_set_editable (GTK_EDITABLE (priv->categories), !read_only); if (delegate) { gtk_widget_set_sensitive (priv->source_selector, FALSE); @@ -1052,7 +1052,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) if (!priv->user_org) { list = g_list_append (list, string); gtk_combo_set_popdown_strings (GTK_COMBO (priv->organizer), list); - gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry), FALSE); + gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->organizer)->entry), FALSE); } g_free (string); @@ -2176,10 +2176,8 @@ get_widgets (EventPage *epage) it when the notebook page is mapped. */ toplevel = gtk_widget_get_toplevel (priv->main); accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel)); - if (accel_groups) { - page->accel_group = accel_groups->data; - gtk_accel_group_ref (page->accel_group); - } + if (accel_groups) + page->accel_group = g_object_ref (accel_groups->data); priv->alarm_dialog = GW ("alarm-dialog"); priv->alarm_box = GW ("custom_box"); priv->alarm_time = GW ("alarm-time"); @@ -2200,7 +2198,7 @@ get_widgets (EventPage *epage) } priv->attendees_label = GW ("attendees-label"); - gtk_widget_ref (priv->main); + g_object_ref (priv->main); gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main); priv->categories = GW ("categories"); diff --git a/calendar/gui/dialogs/memo-editor.c b/calendar/gui/dialogs/memo-editor.c index fb977c3a97..aaa1b864b6 100644 --- a/calendar/gui/dialogs/memo-editor.c +++ b/calendar/gui/dialogs/memo-editor.c @@ -213,8 +213,7 @@ memo_editor_construct (MemoEditor *me, ECal *client) priv = me->priv; priv->memo_page = memo_page_new (editor->uic, flags); - g_object_ref (priv->memo_page); - gtk_object_sink (GTK_OBJECT (priv->memo_page)); + g_object_ref_sink (priv->memo_page); comp_editor_append_page (COMP_EDITOR (me), COMP_EDITOR_PAGE (priv->memo_page), _("Memo"), TRUE); diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index c0cade5155..b307da3ed8 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -180,7 +180,7 @@ memo_page_finalize (GObject *object) priv = mpage->priv; if (priv->main) - gtk_widget_unref (priv->main); + g_object_unref (priv->main); if (priv->xml) { g_object_unref (priv->xml); @@ -306,14 +306,14 @@ sensitize_widgets (MemoPage *mpage) gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->memo_content), sensitize); gtk_widget_set_sensitive (priv->start_date, sensitize); gtk_widget_set_sensitive (priv->categories_btn, !read_only); - gtk_entry_set_editable (GTK_ENTRY (priv->categories), !read_only); - gtk_entry_set_editable (GTK_ENTRY (priv->summary_entry), sensitize); + gtk_editable_set_editable (GTK_EDITABLE (priv->categories), !read_only); + gtk_editable_set_editable (GTK_EDITABLE (priv->summary_entry), sensitize); if (COMP_EDITOR_PAGE (mpage)->flags & COMP_EDITOR_IS_SHARED) { - gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (priv->org_combo)->entry), sensitize); + gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->org_combo)->entry), sensitize); if (priv->to_entry) { - gtk_entry_set_editable (GTK_ENTRY (priv->to_entry), !read_only); + gtk_editable_set_editable (GTK_EDITABLE (priv->to_entry), !read_only); gtk_widget_grab_focus (priv->to_entry); } } @@ -424,7 +424,7 @@ memo_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) } else { list = g_list_append (list, string); gtk_combo_set_popdown_strings (GTK_COMBO (priv->org_combo), list); - gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (priv->org_combo)->entry), FALSE); + gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->org_combo)->entry), FALSE); } g_free (string); g_list_free (list); @@ -777,12 +777,10 @@ get_widgets (MemoPage *mpage) it when the notebook page is mapped. */ toplevel = gtk_widget_get_toplevel (priv->main); accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel)); - if (accel_groups) { - page->accel_group = accel_groups->data; - gtk_accel_group_ref (page->accel_group); - } + if (accel_groups) + page->accel_group = g_object_ref (accel_groups->data); - gtk_widget_ref (priv->main); + g_object_ref (priv->main); gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main); priv->org_label = GW ("org-label"); @@ -1141,7 +1139,7 @@ memo_page_new (BonoboUIComponent *uic, CompEditorPageFlags flags) { MemoPage *mpage; - mpage = gtk_type_new (TYPE_MEMO_PAGE); + mpage = g_object_new (TYPE_MEMO_PAGE, NULL); mpage->priv->uic = uic; COMP_EDITOR_PAGE (mpage)->flags = flags; diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index 2ee4f1a410..581a2559db 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -286,7 +286,7 @@ recurrence_page_finalize (GObject *object) 0, 0, NULL, preview_date_range_changed_cb, NULL); if (priv->main) - gtk_widget_unref (priv->main); + g_object_unref (priv->main); if (priv->xml) { g_object_unref (priv->xml); @@ -2000,12 +2000,10 @@ get_widgets (RecurrencePage *rpage) it when the notebook page is mapped. */ toplevel = gtk_widget_get_toplevel (priv->main); accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel)); - if (accel_groups) { - page->accel_group = accel_groups->data; - gtk_accel_group_ref (page->accel_group); - } + if (accel_groups) + page->accel_group = g_object_ref (accel_groups->data); - gtk_widget_ref (priv->main); + g_object_ref (priv->main); gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main); priv->recurs = GW ("recurs"); diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c index 3aeb03b328..dd467b42f9 100644 --- a/calendar/gui/dialogs/schedule-page.c +++ b/calendar/gui/dialogs/schedule-page.c @@ -133,7 +133,7 @@ schedule_page_finalize (GObject *object) priv = spage->priv; if (priv->main) - gtk_widget_unref (priv->main); + g_object_unref (priv->main); if (priv->xml) { g_object_unref (priv->xml); @@ -358,12 +358,10 @@ get_widgets (SchedulePage *spage) it when the notebook page is mapped. */ toplevel = gtk_widget_get_toplevel (priv->main); accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel)); - if (accel_groups) { - page->accel_group = accel_groups->data; - gtk_accel_group_ref (page->accel_group); - } + if (accel_groups) + page->accel_group = g_object_ref (accel_groups->data); - gtk_widget_ref (priv->main); + g_object_ref (priv->main); gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main); #undef GW diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index 9484add139..a5164534d6 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -158,7 +158,7 @@ task_details_page_finalize (GObject *object) priv = tdpage->priv; if (priv->main) - gtk_widget_unref (priv->main); + g_object_unref (priv->main); if (priv->xml) { g_object_unref (priv->xml); @@ -275,7 +275,7 @@ sensitize_widgets (TaskDetailsPage *tdpage) gtk_widget_set_sensitive (priv->percent_complete, !read_only); gtk_widget_set_sensitive (priv->completed_date, !read_only); gtk_widget_set_sensitive (priv->url_label, !read_only); - gtk_entry_set_editable (GTK_ENTRY (e_url_entry_get_entry (E_URL_ENTRY (priv->url_entry))), !read_only); + gtk_editable_set_editable (GTK_EDITABLE (e_url_entry_get_entry (E_URL_ENTRY (priv->url_entry))), !read_only); } /* fill_widgets handler for the task page */ @@ -492,12 +492,10 @@ get_widgets (TaskDetailsPage *tdpage) it when the notebook page is mapped. */ toplevel = gtk_widget_get_toplevel (priv->main); accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel)); - if (accel_groups) { - page->accel_group = accel_groups->data; - gtk_accel_group_ref (page->accel_group); - } + if (accel_groups) + page->accel_group = g_object_ref (accel_groups->data); - gtk_widget_ref (priv->main); + g_object_ref (priv->main); gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main); priv->status = GW ("status"); diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 35b92bc63b..ef614ef1c0 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -418,8 +418,7 @@ task_editor_construct (TaskEditor *te, ECal *client) priv = te->priv; priv->task_page = task_page_new (priv->model, client, editor->uic); - g_object_ref (priv->task_page); - gtk_object_sink (GTK_OBJECT (priv->task_page)); + g_object_ref_sink (priv->task_page); comp_editor_append_page (COMP_EDITOR (te), COMP_EDITOR_PAGE (priv->task_page), _("_Task"), TRUE); @@ -434,8 +433,7 @@ task_editor_construct (TaskEditor *te, ECal *client) g_signal_connect (priv->task_details_window, "delete-event", G_CALLBACK(gtk_widget_hide), NULL); priv->task_details_page = task_details_page_new (); - g_object_ref (priv->task_details_page); - gtk_object_sink (GTK_OBJECT (priv->task_details_page)); + g_object_ref_sink (priv->task_details_page); gtk_container_add ((GtkContainer *) GTK_DIALOG(priv->task_details_window)->vbox, comp_editor_page_get_widget ((CompEditorPage *)priv->task_details_page)); gtk_widget_show_all (priv->task_details_window); diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 79b07d012b..1a7352aab5 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -233,7 +233,7 @@ task_page_finalize (GObject *object) priv = tpage->priv; if (priv->main) - gtk_widget_unref (priv->main); + g_object_unref (priv->main); if (priv->xml) { g_object_unref (priv->xml); @@ -391,13 +391,13 @@ sensitize_widgets (TaskPage *tpage) sensitize = (!read_only && sens); - gtk_entry_set_editable (GTK_ENTRY (priv->summary), !read_only); + gtk_editable_set_editable (GTK_EDITABLE (priv->summary), !read_only); gtk_widget_set_sensitive (priv->due_date, !read_only); gtk_widget_set_sensitive (priv->start_date, !read_only); gtk_widget_set_sensitive (priv->timezone, !read_only); gtk_widget_set_sensitive (priv->description, !read_only); gtk_widget_set_sensitive (priv->categories_btn, !read_only); - gtk_entry_set_editable (GTK_ENTRY (priv->categories), !read_only); + gtk_editable_set_editable (GTK_EDITABLE (priv->categories), !read_only); gtk_widget_set_sensitive (priv->organizer, !read_only); gtk_widget_set_sensitive (priv->add, (!read_only && sens)); @@ -1398,12 +1398,10 @@ get_widgets (TaskPage *tpage) it when the notebook page is mapped. */ toplevel = gtk_widget_get_toplevel (priv->main); accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel)); - if (accel_groups) { - page->accel_group = accel_groups->data; - gtk_accel_group_ref (page->accel_group); - } + if (accel_groups) + page->accel_group = g_object_ref (accel_groups->data); - gtk_widget_ref (priv->main); + g_object_ref (priv->main); gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main); priv->summary = GW ("summary"); @@ -1913,7 +1911,7 @@ task_page_new (EMeetingStore *model, ECal *client, BonoboUIComponent *uic) { TaskPage *tpage; - tpage = gtk_type_new (TYPE_TASK_PAGE); + tpage = g_object_new (TYPE_TASK_PAGE, NULL); if (!task_page_construct (tpage, model, client)) { g_object_unref (tpage); return NULL; diff --git a/calendar/gui/e-cal-component-memo-preview.c b/calendar/gui/e-cal-component-memo-preview.c index 07b2f79964..4608967cfd 100644 --- a/calendar/gui/e-cal-component-memo-preview.c +++ b/calendar/gui/e-cal-component-memo-preview.c @@ -27,8 +27,10 @@ #include <config.h> #endif +#include <string.h> #include <gnome.h> #include <gtk/gtk.h> +#include <glib/gi18n.h> #include <libgnomevfs/gnome-vfs-ops.h> #include <libecal/e-cal-time-util.h> #include <libedataserver/e-categories.h> diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c index d38ec5f195..3a8e9c7bee 100644 --- a/calendar/gui/e-cal-component-preview.c +++ b/calendar/gui/e-cal-component-preview.c @@ -26,8 +26,10 @@ #include <config.h> #endif +#include <string.h> #include <gnome.h> #include <gtk/gtk.h> +#include <glib/gi18n.h> #include <libgnomevfs/gnome-vfs-ops.h> #include <libedataserver/e-categories.h> #include <libecal/e-cal-time-util.h> diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index ef3badd22b..fd9d014827 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -34,6 +34,7 @@ #include <sys/stat.h> #include <unistd.h> #include <glib.h> +#include <glib/gi18n.h> #include <glib/gstdio.h> #include <gnome.h> #include <misc/e-gui-utils.h> diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c index a93c5e3ab3..4123e7357e 100644 --- a/calendar/gui/e-cell-date-edit-text.c +++ b/calendar/gui/e-cell-date-edit-text.c @@ -102,7 +102,7 @@ static void show_date_warning (ECellDateEditText *ecd) { GtkWidget *dialog; - char buffer[64], message[256], *format; + char buffer[64], *format; time_t t; struct tm *tmp_tm; @@ -120,14 +120,14 @@ show_date_warning (ECellDateEditText *ecd) e_utf8_strftime (buffer, sizeof (buffer), format, tmp_tm); - g_snprintf (message, 256, - _("The date must be entered in the format: \n\n%s"), - buffer); - - dialog = gnome_message_box_new (message, - GNOME_MESSAGE_BOX_ERROR, - GNOME_STOCK_BUTTON_OK, NULL); - gtk_widget_show (dialog); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("The date must be entered in the format: \n%s"), + buffer); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); } diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c index b15f243e2c..d372e3e2f6 100644 --- a/calendar/gui/e-day-view-time-item.c +++ b/calendar/gui/e-day-view-time-item.c @@ -806,9 +806,9 @@ e_day_view_time_item_show_popup_menu (EDayViewTimeItem *dvtmitem, */ _("%02i minute divisions"), divisions[i]); item = gtk_radio_menu_item_new_with_label (group, buffer); - group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (item)); + group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item)); gtk_widget_show (item); - gtk_menu_append (GTK_MENU (menu), item); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); if (current_divisions == divisions[i]) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE); diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 07f11c40b2..c61ae63bca 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -1680,7 +1680,7 @@ e_day_view_style_set (GtkWidget *widget, number of rows needed (min 1 + 1 for the dates + 1 space for DnD).*/ top_rows = MAX (1, day_view->rows_in_top_display); top_canvas_height = (top_rows + 2) * day_view->top_row_height; - gtk_widget_set_usize (day_view->top_canvas, -1, top_canvas_height); + gtk_widget_set_size_request (day_view->top_canvas, -1, top_canvas_height); /* Find the longest full & abbreviated month names. */ memset (&date_tm, 0, sizeof (date_tm)); @@ -1778,7 +1778,7 @@ e_day_view_style_set (GtkWidget *widget, /* Calculate the width of the time column. */ times_width = e_day_view_time_item_get_column_width (E_DAY_VIEW_TIME_ITEM (day_view->time_canvas_item)); - gtk_widget_set_usize (day_view->time_canvas, times_width, -1); + gtk_widget_set_size_request (day_view->time_canvas, times_width, -1); g_object_unref (layout); pango_font_metrics_unref (font_metrics); @@ -1877,7 +1877,7 @@ e_day_view_style_set (GtkWidget *widget, number of rows needed (min 1 + 1 for the dates + 1 space for DnD).*/ top_rows = MAX (1, day_view->rows_in_top_display); top_canvas_height = (top_rows + 2) * day_view->top_row_height; - gtk_widget_set_usize (day_view->top_canvas, -1, top_canvas_height); + gtk_widget_set_size_request (day_view->top_canvas, -1, top_canvas_height); /* Find the longest full & abbreviated month names. */ memset (&date_tm, 0, sizeof (date_tm)); @@ -1975,7 +1975,7 @@ e_day_view_style_set (GtkWidget *widget, /* Calculate the width of the time column. */ times_width = e_day_view_time_item_get_column_width (E_DAY_VIEW_TIME_ITEM (day_view->time_canvas_item)); - gtk_widget_set_usize (day_view->time_canvas, times_width, -1); + gtk_widget_set_size_request (day_view->time_canvas, times_width, -1); g_object_unref (layout); pango_font_metrics_unref (font_metrics); @@ -5499,8 +5499,8 @@ e_day_view_check_layout (EDayView *day_view) top_rows = MAX (1, rows_in_top_display); top_canvas_height = (top_rows + 2) * day_view->top_row_height; - gtk_widget_set_usize (day_view->top_canvas, -1, - top_canvas_height); + gtk_widget_set_size_request ( + day_view->top_canvas, -1, top_canvas_height); } } @@ -7962,7 +7962,7 @@ void e_day_view_stop_auto_scroll (EDayView *day_view) { if (day_view->auto_scroll_timeout_id != 0) { - gtk_timeout_remove (day_view->auto_scroll_timeout_id); + g_source_remove (day_view->auto_scroll_timeout_id); day_view->auto_scroll_timeout_id = 0; } } @@ -9307,7 +9307,7 @@ static void e_day_view_cancel_layout (EDayView *day_view) { if (day_view->layout_timeout_id != 0) { - gtk_timeout_remove (day_view->layout_timeout_id); + g_source_remove (day_view->layout_timeout_id); day_view->layout_timeout_id = 0; } } diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 24624aa0a0..66d2a445f1 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -427,7 +427,7 @@ e_itip_control_init (EItipControl *itip) gtk_container_add (GTK_CONTAINER (scrolled_window), priv->html); g_object_weak_ref (G_OBJECT (priv->html), (GWeakNotify)html_destroyed, itip); - gtk_widget_set_usize (scrolled_window, 600, 400); + gtk_widget_set_size_request (scrolled_window, 600, 400); gtk_box_pack_start (GTK_BOX (itip), scrolled_window, FALSE, FALSE, 6); g_signal_connect (priv->html, "url_requested", G_CALLBACK (url_requested_cb), itip); @@ -1930,12 +1930,21 @@ update_item (EItipControl *itip) icalcomponent_set_method (priv->top_level, priv->method); if (!e_cal_receive_objects (priv->current_ecal, priv->top_level, &error)) { - dialog = gnome_warning_dialog (error->message); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + "%s", error->message); g_error_free (error); } else { - dialog = gnome_ok_dialog (_("Update complete\n")); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_INFO, + GTK_BUTTONS_OK, + _("Update complete\n")); } - gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); icalcomponent_remove_component (priv->top_level, clone); } @@ -1961,7 +1970,12 @@ update_attendee_status (EItipControl *itip) if (!e_cal_component_set_icalcomponent (comp, icalcomp)) { icalcomponent_free (icalcomp); - dialog = gnome_warning_dialog (_("Object is invalid and cannot be updated\n")); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_OK, + "%s", _("Object is invalid and " + "cannot be updated\n")); } else { e_cal_component_get_attendee_list (priv->comp, &attendees); if (attendees != NULL) { @@ -1971,10 +1985,18 @@ update_attendee_status (EItipControl *itip) prop = find_attendee (icalcomp, itip_strip_mailto (a->value)); if (prop == NULL) { - dialog = gnome_question_dialog_modal (_("This response is not from a current " - "attendee. Add as an attendee?"), - NULL, NULL); - if (gnome_dialog_run_and_close (GNOME_DIALOG (dialog)) == GNOME_YES) { + gint response; + + dialog = gtk_message_dialog_new ( + NULL, GTK_DIALOG_MODAL, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + "%s", _("This response is not from a " + "current attendee. Add as an attendee?")); + response = gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + + if (response == GTK_RESPONSE_YES) { change_status (icalcomp, itip_strip_mailto (a->value), a->status); @@ -1983,10 +2005,13 @@ update_attendee_status (EItipControl *itip) goto cleanup; } } else if (a->status == ICAL_PARTSTAT_NONE || a->status == ICAL_PARTSTAT_X) { - dialog = gnome_warning_dialog (_("Attendee status could " - "not be updated because " - "of an invalid status!\n")); - goto cleanup; + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_OK, + "%s", _("Attendee status could not be " + "updated because of an invalid status!\n")); + goto run; } else { change_status (icalcomp, itip_strip_mailto (a->value), @@ -1997,20 +2022,35 @@ update_attendee_status (EItipControl *itip) } if (!e_cal_modify_object (priv->current_ecal, icalcomp, CALOBJ_MOD_ALL, &error)) { - dialog = gnome_warning_dialog (error->message); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_OK, + "%s", error->message); g_error_free (error); } else { - dialog = gnome_ok_dialog (_("Attendee status updated\n")); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_INFO, + GTK_BUTTONS_OK, + "%s", _("Attendee status updated\n")); } } else { - dialog = gnome_warning_dialog (_("Attendee status can not be updated " - "because the item no longer exists")); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_OK, + "%s", _("Attendee status can not be updated " + "because the item no longer exists")); } + run: + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + cleanup: if (comp != NULL) g_object_unref (comp); - gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); } static void @@ -2027,11 +2067,20 @@ send_item (EItipControl *itip) if (comp != NULL) { itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, priv->current_ecal, NULL, NULL, NULL); g_object_unref (comp); - dialog = gnome_ok_dialog (_("Item sent!\n")); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_INFO, + GTK_BUTTONS_OK, + "%s", _("Item sent!\n")); } else { - dialog = gnome_warning_dialog (_("The item could not be sent!\n")); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_OK, + "%s", _("The item could not be sent!\n")); } - gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); } static void @@ -2075,13 +2124,22 @@ send_freebusy (EItipControl *itip) g_object_unref (comp); } - dialog = gnome_ok_dialog (_("Item sent!\n")); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_INFO, + GTK_BUTTONS_OK, + "%s", _("Item sent!\n")); g_list_free (comp_list); } else { - dialog = gnome_warning_dialog (_("The item could not be sent!\n")); + dialog = gtk_message_dialog_new ( + NULL, 0, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_OK, + "%s", _("The item could not be sent!\n")); } - gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); } static void diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index dde51f0ccc..4a8406b562 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -351,7 +351,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em /* The free/busy information */ mts->display_top = gnome_canvas_new (); - gtk_widget_set_usize (mts->display_top, -1, mts->row_height * 3); + gtk_widget_set_size_request (mts->display_top, -1, mts->row_height * 3); gnome_canvas_set_scroll_region (GNOME_CANVAS (mts->display_top), 0, 0, mts->day_width * E_MEETING_TIME_SELECTOR_DAYS_SHOWN, @@ -424,7 +424,12 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em 0, 1, 3, 4, GTK_FILL, 0, 0, 0); gtk_widget_show (hbox); - mts->add_attendees_button = e_button_new_with_stock_icon (_("A_ttendees..."), "gtk-jump-to"); + mts->add_attendees_button = + gtk_button_new_with_mnemonic (_("A_ttendees...")); + gtk_button_set_image ( + mts->add_attendees_button, + gtk_image_new_from_stock ( + GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_BUTTON)); gtk_box_pack_start (GTK_BOX (hbox), mts->add_attendees_button, TRUE, TRUE, 6); gtk_widget_show (mts->add_attendees_button); g_signal_connect (mts->add_attendees_button, "clicked", @@ -459,7 +464,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em menuitem = gtk_check_menu_item_new_with_label (""); gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("Show _only working hours")); - gtk_menu_append (GTK_MENU (mts->options_menu), menuitem); + gtk_menu_shell_append (GTK_MENU_SHELL (mts->options_menu), menuitem); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem), mts->working_hours_only); @@ -469,7 +474,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em menuitem = gtk_check_menu_item_new_with_label (""); gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("Show _zoomed out")); - gtk_menu_append (GTK_MENU (mts->options_menu), menuitem); + gtk_menu_shell_append (GTK_MENU_SHELL (mts->options_menu), menuitem); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem), mts->zoomed_out); @@ -478,13 +483,13 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em gtk_widget_show (menuitem); menuitem = gtk_menu_item_new (); - gtk_menu_append (GTK_MENU (mts->options_menu), menuitem); + gtk_menu_shell_append (GTK_MENU_SHELL (mts->options_menu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); gtk_widget_show (menuitem); menuitem = gtk_menu_item_new_with_label (""); gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("_Update free/busy")); - gtk_menu_append (GTK_MENU (mts->options_menu), menuitem); + gtk_menu_shell_append (GTK_MENU_SHELL (mts->options_menu), menuitem); g_signal_connect (menuitem, "activate", G_CALLBACK (e_meeting_time_selector_on_update_free_busy), mts); @@ -547,36 +552,36 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em menuitem = gtk_radio_menu_item_new_with_label (NULL, ""); mts->autopick_all_item = menuitem; - group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem)); + group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem)); gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("_All people and resources")); - gtk_menu_append (GTK_MENU (mts->autopick_menu), menuitem); + gtk_menu_shell_append (GTK_MENU_SHELL (mts->autopick_menu), menuitem); g_signal_connect (menuitem, "toggled", G_CALLBACK (e_meeting_time_selector_on_autopick_option_toggled), mts); gtk_widget_show (menuitem); menuitem = gtk_radio_menu_item_new_with_label (group, ""); mts->autopick_all_people_one_resource_item = menuitem; - group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem)); + group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem)); gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("All _people and one resource")); - gtk_menu_append (GTK_MENU (mts->autopick_menu), menuitem); + gtk_menu_shell_append (GTK_MENU_SHELL (mts->autopick_menu), menuitem); g_signal_connect (menuitem, "toggled", G_CALLBACK (e_meeting_time_selector_on_autopick_option_toggled), mts); gtk_widget_show (menuitem); menuitem = gtk_radio_menu_item_new_with_label (group, ""); mts->autopick_required_people_item = menuitem; - group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem)); + group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem)); gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("_Required people")); - gtk_menu_append (GTK_MENU (mts->autopick_menu), menuitem); + gtk_menu_shell_append (GTK_MENU_SHELL (mts->autopick_menu), menuitem); g_signal_connect (menuitem, "activate", G_CALLBACK (e_meeting_time_selector_on_autopick_option_toggled), mts); gtk_widget_show (menuitem); menuitem = gtk_radio_menu_item_new_with_label (group, ""); mts->autopick_required_people_one_resource_item = menuitem; - group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem)); + group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem)); gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("Required people and _one resource")); - gtk_menu_append (GTK_MENU (mts->autopick_menu), menuitem); + gtk_menu_shell_append (GTK_MENU_SHELL (mts->autopick_menu), menuitem); g_signal_connect (menuitem, "activate", G_CALLBACK (e_meeting_time_selector_on_autopick_option_toggled), mts); gtk_widget_show (menuitem); @@ -701,7 +706,7 @@ e_meeting_time_selector_add_key_color (EMeetingTimeSelector * mts, darea = gtk_drawing_area_new (); gtk_box_pack_start (GTK_BOX (child_hbox), darea, FALSE, FALSE, 0); gtk_object_set_user_data (GTK_OBJECT (darea), mts); - gtk_widget_set_usize (darea, 14, 14); + gtk_widget_set_size_request (darea, 14, 14); gtk_widget_show (darea); label = gtk_label_new (label_text); @@ -728,8 +733,8 @@ e_meeting_time_selector_expose_key_color (GtkWidget *darea, width = darea->allocation.width; height = darea->allocation.height; - gtk_draw_shadow (darea->style, darea->window, GTK_STATE_NORMAL, - GTK_SHADOW_IN, 0, 0, width, height); + gtk_paint_shadow (darea->style, darea->window, GTK_STATE_NORMAL, + GTK_SHADOW_IN, NULL, NULL, NULL, 0, 0, width, height); if (color) { gdk_gc_set_foreground (gc, color); @@ -929,7 +934,7 @@ e_meeting_time_selector_style_set (GtkWidget *widget, e_meeting_time_selector_recalc_grid (mts); e_meeting_time_selector_restore_position (mts, &saved_time); - gtk_widget_set_usize (mts->display_top, -1, mts->row_height * 3 + 4); + gtk_widget_set_size_request (mts->display_top, -1, mts->row_height * 3 + 4); /* * FIXME: I can't find a way to get the treeview header heights @@ -939,11 +944,11 @@ e_meeting_time_selector_style_set (GtkWidget *widget, gtk_widget_realize (mts->list_view); gdk_window_get_position (gtk_tree_view_get_bin_window (GTK_TREE_VIEW (mts->list_view)), NULL, &maxheight); - gtk_widget_set_usize (mts->attendees_vbox_spacer, 1, mts->row_height * 3 - maxheight); + gtk_widget_set_size_request (mts->attendees_vbox_spacer, 1, mts->row_height * 3 - maxheight); */ - gtk_widget_set_usize (mts->attendees_vbox_spacer, 1, mts->row_height * 2 - 6); + gtk_widget_set_size_request (mts->attendees_vbox_spacer, 1, mts->row_height * 2 - 6); GTK_LAYOUT (mts->display_main)->hadjustment->step_increment = mts->day_width; GTK_LAYOUT (mts->display_main)->vadjustment->step_increment = mts->row_height; @@ -983,8 +988,8 @@ e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts) w = mts->display_top->allocation.width + 4; h = mts->display_top->allocation.height + mts->display_main->allocation.height + 4; - gtk_draw_shadow (widget->style, widget->window, GTK_STATE_NORMAL, - GTK_SHADOW_IN, x, y, w, h); + gtk_paint_shadow (widget->style, widget->window, GTK_STATE_NORMAL, + GTK_SHADOW_IN, NULL, NULL, NULL, x, y, w, h); } @@ -2617,14 +2622,10 @@ e_meeting_time_selector_timeout_handler (gpointer data) get redrawn completely. Otherwise the pixels get scrolled left or right which is not good for us (since our vertical bars have been moved) and causes flicker. */ - gtk_layout_freeze (GTK_LAYOUT (mts->display_main)); - gtk_layout_freeze (GTK_LAYOUT (mts->display_top)); gnome_canvas_scroll_to (GNOME_CANVAS (mts->display_main), scroll_x, scroll_y); gnome_canvas_scroll_to (GNOME_CANVAS (mts->display_top), scroll_x, scroll_y); - gtk_layout_thaw (GTK_LAYOUT (mts->display_main)); - gtk_layout_thaw (GTK_LAYOUT (mts->display_top)); GDK_THREADS_LEAVE (); return TRUE; diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c index 49594300dd..18353f5563 100644 --- a/calendar/gui/e-memo-table.c +++ b/calendar/gui/e-memo-table.c @@ -35,6 +35,7 @@ #include <sys/stat.h> #include <unistd.h> #include <glib.h> +#include <glib/gi18n.h> #include <glib/gstdio.h> #include <gnome.h> #include <widgets/misc/e-gui-utils.h> diff --git a/calendar/gui/e-memos.c b/calendar/gui/e-memos.c index 89c0f147a4..e87761974d 100644 --- a/calendar/gui/e-memos.c +++ b/calendar/gui/e-memos.c @@ -27,7 +27,9 @@ #include <config.h> #endif +#include <string.h> #include <gnome.h> +#include <glib/gi18n.h> #include <libgnomevfs/gnome-vfs-ops.h> #include <libedataserver/e-time-utils.h> #include <table/e-table-scrolled.h> @@ -501,7 +503,7 @@ e_memos_class_init (EMemosClass *klass) GTK_RUN_LAST, G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (EMemosClass, selection_changed), - gtk_marshal_NONE__INT, + g_cclosure_marshal_VOID__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); @@ -715,15 +717,23 @@ static void backend_error_cb (ECal *client, const char *message, gpointer data) { EMemos *memos; + GtkWidget *dialog; char *errmsg; char *urinopwd; memos = E_MEMOS (data); urinopwd = get_uri_without_password (e_cal_get_uri (client)); - errmsg = g_strdup_printf (_("Error on %s:\n %s"), urinopwd, message); - gnome_error_dialog_parented (errmsg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (memos)))); - g_free (errmsg); + + dialog = gtk_message_dialog_new ( + GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (memos))), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Error on %s:\n %s"), urinopwd, message); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + g_free (urinopwd); } diff --git a/calendar/gui/e-select-names-renderer.c b/calendar/gui/e-select-names-renderer.c index 2f119e2e6c..e7af491077 100644 --- a/calendar/gui/e-select-names-renderer.c +++ b/calendar/gui/e-select-names-renderer.c @@ -61,7 +61,7 @@ e_select_names_renderer_editing_done (GtkCellEditable *editable, ESelectNamesRen g_signal_handlers_disconnect_matched (editable, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, cell); if (GTK_ENTRY (editable)->editing_canceled) { - gtk_cell_renderer_editing_canceled (GTK_CELL_RENDERER (cell)); + gtk_cell_renderer_stop_editing (GTK_CELL_RENDERER (cell), TRUE); goto cleanup; } diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index fec3839ddc..1c77ae09fa 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -27,6 +27,7 @@ #endif #include <gnome.h> +#include <glib/gi18n.h> #include <libgnomevfs/gnome-vfs-ops.h> #include <libedataserver/e-time-utils.h> #include <table/e-table-scrolled.h> @@ -630,7 +631,7 @@ e_tasks_class_init (ETasksClass *class) GTK_RUN_LAST, G_TYPE_FROM_CLASS (object_class), GTK_SIGNAL_OFFSET (ETasksClass, selection_changed), - gtk_marshal_NONE__INT, + g_cclosure_marshal_VOID__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); @@ -828,15 +829,23 @@ static void backend_error_cb (ECal *client, const char *message, gpointer data) { ETasks *tasks; - char *errmsg; + GtkWidget *dialog; char *urinopwd; tasks = E_TASKS (data); urinopwd = get_uri_without_password (e_cal_get_uri (client)); - errmsg = g_strdup_printf (_("Error on %s:\n %s"), urinopwd, message); - gnome_error_dialog_parented (errmsg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks)))); - g_free (errmsg); + + dialog = gtk_message_dialog_new ( + GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Error on %s:\n %s"), + urinopwd, message); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + g_free (urinopwd); } diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c index 0699826999..b79ec9e171 100644 --- a/calendar/gui/e-timezone-entry.c +++ b/calendar/gui/e-timezone-entry.c @@ -120,7 +120,7 @@ e_timezone_entry_init (ETimezoneEntry *tentry) priv->default_zone = NULL; priv->entry = gtk_entry_new (); - gtk_entry_set_editable (GTK_ENTRY (priv->entry), FALSE); + gtk_editable_set_editable (GTK_EDITABLE (priv->entry), FALSE); /*gtk_widget_set_usize (priv->date_entry, 90, 0);*/ gtk_box_pack_start (GTK_BOX (tentry), priv->entry, TRUE, TRUE, 0); gtk_widget_show (priv->entry); diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 02250ed228..4690ee2241 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -857,9 +857,10 @@ e_week_view_style_set (GtkWidget *widget, } /* Set the height of the top canvas. */ - gtk_widget_set_usize (week_view->titles_canvas, -1, - PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) + - PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) + 5); + gtk_widget_set_size_request ( + week_view->titles_canvas, -1, + PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) + + PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) + 5); /* Save the sizes of various strings in the font, so we can quickly decide which date formats to use. */ @@ -4214,7 +4215,7 @@ static void e_week_view_cancel_layout (EWeekView *week_view) { if (week_view->layout_timeout_id != 0) { - gtk_timeout_remove (week_view->layout_timeout_id); + g_source_remove (week_view->layout_timeout_id); week_view->layout_timeout_id = 0; } } diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index fb361ea7fa..ee049ebf6c 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -2211,7 +2211,8 @@ display_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type, gboolean gra priv->current_view_type = view_type; - gtk_notebook_set_page (GTK_NOTEBOOK (priv->notebook), (int) view_type); + gtk_notebook_set_current_page ( + GTK_NOTEBOOK (priv->notebook), (int) view_type); if (grab_focus) focus_current_view (gcal); @@ -2762,15 +2763,23 @@ static void backend_error_cb (ECal *client, const char *message, gpointer data) { GnomeCalendar *gcal; - char *errmsg; + GtkDialog *dialog; char *uristr; gcal = GNOME_CALENDAR (data); uristr = get_uri_without_password (e_cal_get_uri (client)); - errmsg = g_strdup_printf (_("Error on %s:\n %s"), uristr, message); - gnome_error_dialog_parented (errmsg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal)))); - g_free (errmsg); + + dialog = gtk_message_dialog_new ( + GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Error on %s:\n %s"), + uristr, message); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + g_free (uristr); } @@ -3413,9 +3422,9 @@ gnome_calendar_hpane_resized (GtkWidget *w, GdkEventButton *e, GnomeCalendar *gc times_width = e_day_view_time_item_get_column_width ( E_DAY_VIEW_TIME_ITEM (E_DAY_VIEW (priv->day_view)->time_canvas_item)); if (times_width < priv->hpane_pos - 20) - gtk_widget_set_usize (E_DAY_VIEW (priv->day_view)->time_canvas, times_width, -1); + gtk_widget_set_size_request (E_DAY_VIEW (priv->day_view)->time_canvas, times_width, -1); else - gtk_widget_set_usize (E_DAY_VIEW (priv->day_view)->time_canvas, priv->hpane_pos - 20, -1); + gtk_widget_set_size_request (E_DAY_VIEW (priv->day_view)->time_canvas, priv->hpane_pos - 20, -1); return FALSE; diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index ad811e0512..aef826507c 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -1314,7 +1314,7 @@ memos_component_peek (void) if (component == NULL) { component = g_object_new (memos_component_get_type (), NULL); - if (e_util_mkdir_hier (component->priv->config_directory, 0777) != 0) { + if (g_mkdir_with_parents (component->priv->config_directory, 0777) != 0) { g_warning (G_STRLOC ": Cannot create directory %s: %s", component->priv->config_directory, g_strerror (errno)); g_object_unref (component); diff --git a/calendar/gui/print.c b/calendar/gui/print.c index fafa4db632..5dbff11c0a 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -2046,7 +2046,7 @@ range_selector_new (GtkWidget *dialog, time_t at, int *view) e_utf8_strftime (text, sizeof (text), _("Selected day (%a %b %d %Y)"), &tm); radio = gtk_radio_button_new_with_label (NULL, text); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio)); + group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)); gtk_box_pack_start (GTK_BOX (box), radio, FALSE, FALSE, 0); /* Week */ @@ -2084,21 +2084,21 @@ range_selector_new (GtkWidget *dialog, time_t at, int *view) g_snprintf (text, sizeof (text), _("Selected week (%s - %s)"), str1, str2); radio = gtk_radio_button_new_with_label (group, text); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio)); + group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)); gtk_box_pack_start (GTK_BOX (box), radio, FALSE, FALSE, 0); /* Month */ e_utf8_strftime (text, sizeof (text), _("Selected month (%b %Y)"), &tm); radio = gtk_radio_button_new_with_label (group, text); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio)); + group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)); gtk_box_pack_start (GTK_BOX (box), radio, FALSE, FALSE, 0); /* Year */ e_utf8_strftime (text, sizeof (text), _("Selected year (%Y)"), &tm); radio = gtk_radio_button_new_with_label (group, text); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio)); + group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)); gtk_box_pack_start (GTK_BOX (box), radio, FALSE, FALSE, 0); /* Select default */ @@ -2830,8 +2830,7 @@ print_table (ETable *etable, const char *dialog_title, const char *print_header, gpd = e_print_get_dialog_with_config (dialog_title, 0, settings); printable = e_table_get_printable (etable); - g_object_ref (printable); - gtk_object_sink (GTK_OBJECT (printable)); + g_object_ref_sink (printable); e_printable_reset (printable); pti->printable = printable; diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c index 2fc9bc8d62..0bae3c7c48 100644 --- a/calendar/gui/tasks-component.c +++ b/calendar/gui/tasks-component.c @@ -1391,7 +1391,7 @@ tasks_component_peek (void) if (component == NULL) { component = g_object_new (tasks_component_get_type (), NULL); - if (e_util_mkdir_hier (component->priv->config_directory, 0777) != 0) { + if (g_mkdir_with_parents (component->priv->config_directory, 0777) != 0) { g_warning (G_STRLOC ": Cannot create directory %s: %s", component->priv->config_directory, g_strerror (errno)); g_object_unref (component); diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c index 768075ba34..5b7470c003 100644 --- a/calendar/importers/icalendar-importer.c +++ b/calendar/importers/icalendar-importer.c @@ -198,7 +198,7 @@ button_toggled_cb (GtkWidget *widget, struct _selector_data *sd) g_object_ref(e_source_selector_peek_primary_selection((ESourceSelector *)sd->selector)), g_object_unref); g_datalist_set_data(&sd->target->data, "primary-type", GINT_TO_POINTER(import_type_map[sd->page])); - gtk_notebook_set_page((GtkNotebook *)sd->notebook, sd->page); + gtk_notebook_set_current_page((GtkNotebook *)sd->notebook, sd->page); } static void |