From 79741ccd3f90c4c8aab672b508606d63c3899584 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 7 Jan 2010 14:44:46 -0500 Subject: BugĀ 606250 - Remove usage of deprecated GTK+ symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several GtkWidget macros were recently deprecated. --- addressbook/gui/widgets/e-minicard.c | 2 +- calendar/gui/e-calendar-view.c | 2 +- calendar/gui/e-timezone-entry.c | 2 +- calendar/gui/ea-day-view-cell.c | 2 +- calendar/gui/ea-week-view-cell.c | 2 +- calendar/gui/gnome-cal.c | 6 +++--- calendar/gui/weekday-picker.c | 2 +- configure.ac | 2 +- filter/e-filter-rule.c | 2 +- mail/e-mail-label-manager.c | 2 +- mail/em-account-editor.c | 2 +- mail/em-filter-rule.c | 2 +- mail/em-folder-selection-button.c | 2 +- mail/em-folder-tree.c | 2 +- mail/em-format-html-display.c | 2 +- mail/em-vfolder-rule.c | 2 +- modules/calendar/e-cal-attachment-handler.c | 4 ++-- modules/mail/e-mail-attachment-handler.c | 4 ++-- modules/mail/em-account-prefs.c | 8 ++++---- plugins/groupwise-features/install-shared.c | 2 +- plugins/groupwise-features/send-options.c | 4 ++-- widgets/misc/e-attachment-handler-image.c | 2 +- widgets/misc/e-attachment-handler-sendto.c | 2 +- widgets/misc/e-attachment-view.c | 20 ++++++++++---------- widgets/misc/e-calendar.c | 2 +- widgets/misc/e-canvas.c | 2 +- widgets/misc/e-charset-combo-box.c | 2 +- widgets/misc/e-signature-manager.c | 4 ++-- widgets/misc/e-web-view.c | 6 +++--- widgets/misc/ea-calendar-cell.c | 2 +- widgets/table/e-table-header-item.c | 2 +- widgets/table/gal-a11y-e-cell-registry.c | 2 +- widgets/table/gal-a11y-e-cell.c | 2 +- widgets/text/e-text.c | 4 ++-- 34 files changed, 55 insertions(+), 55 deletions(-) diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 1f6bc14117..a3d7e3aad4 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -600,7 +600,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) e_minicard->button_x = -1; e_minicard->button_y = -1; - if (GTK_WIDGET_HAS_GRAB (GNOME_CANVAS_ITEM (e_minicard)->canvas)) { + if (gtk_widget_has_grab (GTK_WIDGET (GNOME_CANVAS_ITEM (e_minicard)->canvas))) { gtk_grab_remove (GTK_WIDGET (GNOME_CANVAS_ITEM (e_minicard)->canvas)); gnome_canvas_item_ungrab (GNOME_CANVAS_ITEM (e_minicard), event->button.time); } diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index b699c84bc4..2bfa0918c3 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -1260,7 +1260,7 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view, g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view)); parent = gtk_widget_get_toplevel (GTK_WIDGET (cal_view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; priv = cal_view->priv; diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c index 53a8a4498b..a01c060491 100644 --- a/calendar/gui/e-timezone-entry.c +++ b/calendar/gui/e-timezone-entry.c @@ -219,7 +219,7 @@ timezone_entry_mnemonic_activate (GtkWidget *widget, priv = E_TIMEZONE_ENTRY_GET_PRIVATE (widget); - if (GTK_WIDGET_CAN_FOCUS (widget)) { + if (gtk_widget_get_can_focus (widget)) { if (priv->button != NULL) gtk_widget_grab_focus (priv->button); } diff --git a/calendar/gui/ea-day-view-cell.c b/calendar/gui/ea-day-view-cell.c index 0b0b7a75c5..6760b7cc42 100644 --- a/calendar/gui/ea-day-view-cell.c +++ b/calendar/gui/ea-day-view-cell.c @@ -389,7 +389,7 @@ component_interface_grab_focus (AtkComponent *comp) gtk_widget_queue_draw (day_view->main_canvas); toplevel = gtk_widget_get_toplevel (GTK_WIDGET (day_view)); - if (GTK_WIDGET_TOPLEVEL (toplevel)) + if (gtk_widget_is_toplevel (toplevel)) gtk_window_present (GTK_WINDOW (toplevel)); return TRUE; diff --git a/calendar/gui/ea-week-view-cell.c b/calendar/gui/ea-week-view-cell.c index e4b28e3d59..ea4c103ac4 100644 --- a/calendar/gui/ea-week-view-cell.c +++ b/calendar/gui/ea-week-view-cell.c @@ -470,7 +470,7 @@ component_interface_grab_focus (AtkComponent *comp) gtk_widget_queue_draw (week_view->main_canvas); toplevel = gtk_widget_get_toplevel (GTK_WIDGET (week_view)); - if (GTK_WIDGET_TOPLEVEL (toplevel)) + if (gtk_widget_is_toplevel (toplevel)) gtk_window_present (GTK_WINDOW (toplevel)); return TRUE; diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index f4f15d2482..abd6a36532 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1873,7 +1873,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal) priv = gcal->priv; parent = gtk_widget_get_toplevel (GTK_WIDGET (gcal)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; source = e_cal_get_source (ecal); state = e_cal_get_load_state (ecal); @@ -2056,7 +2056,7 @@ backend_error_cb (ECal *client, const gchar *message, gpointer data) gcal = GNOME_CALENDAR (data); parent = gtk_widget_get_toplevel (GTK_WIDGET (gcal)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; uristr = get_uri_without_password (e_cal_get_uri (client)); id = g_strdup ("calendar:error-on-loading-the-calendar"); @@ -2091,7 +2091,7 @@ backend_died_cb (ECal *ecal, gpointer data) priv = gcal->priv; parent = gtk_widget_get_toplevel (GTK_WIDGET (gcal)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; /* FIXME What about default sources? */ diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c index 6e9f4bb34f..75223ad7d8 100644 --- a/calendar/gui/weekday-picker.c +++ b/calendar/gui/weekday-picker.c @@ -315,7 +315,7 @@ weekday_picker_focus (GtkWidget *widget, wp = WEEKDAY_PICKER (widget); priv = wp->priv; - if (!GTK_WIDGET_CAN_FOCUS (widget)) + if (!gtk_widget_get_can_focus (widget)) return FALSE; if (GTK_WIDGET_HAS_FOCUS (widget)) { diff --git a/configure.ac b/configure.ac index d060f37a99..57f87f1297 100644 --- a/configure.ac +++ b/configure.ac @@ -36,7 +36,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) dnl Required Packages m4_define([glib_minimum_version], [2.22.0]) -m4_define([gtk_minimum_version], [2.16.0]) +m4_define([gtk_minimum_version], [2.18.0]) m4_define([eds_minimum_version], [evo_version]) m4_define([gnome_icon_theme_minimum_version], [2.19.91]) m4_define([gnome_desktop_minimum_version], [2.26.0]) diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c index 6bd509504f..f660d722f8 100644 --- a/filter/e-filter-rule.c +++ b/filter/e-filter-rule.c @@ -223,7 +223,7 @@ do_grab_focus_cb (GtkWidget *widget, if (*done) return; - if (widget && GTK_WIDGET_CAN_FOCUS (widget)) { + if (widget && gtk_widget_get_can_focus (widget)) { *done = TRUE; gtk_widget_grab_focus (widget); } diff --git a/mail/e-mail-label-manager.c b/mail/e-mail-label-manager.c index 212a0507ad..c5448ea0a8 100644 --- a/mail/e-mail-label-manager.c +++ b/mail/e-mail-label-manager.c @@ -159,7 +159,7 @@ mail_label_manager_add_label (EMailLabelManager *manager) const gchar *label_name; parent = gtk_widget_get_toplevel (GTK_WIDGET (manager)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; dialog = e_mail_label_dialog_new (parent); gtk_window_set_title (GTK_WINDOW (dialog), _("Add Label")); diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index e3e9613e2e..7951240de0 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -827,7 +827,7 @@ emae_signature_new (GtkWidget *widget, EMAccountEditor *emae) shell_settings = e_shell_get_shell_settings (shell); parent = gtk_widget_get_toplevel (widget); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; html_mode = e_shell_settings_get_boolean ( shell_settings, "composer-format-html"); diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c index 09c0ee15b1..41a6ba6640 100644 --- a/mail/em-filter-rule.c +++ b/mail/em-filter-rule.c @@ -465,7 +465,7 @@ do_grab_focus_cb (GtkWidget *widget, gpointer data) if (*done) return; - if (widget && GTK_WIDGET_CAN_FOCUS (widget)) { + if (widget && gtk_widget_get_can_focus (widget)) { *done = TRUE; gtk_widget_grab_focus (widget); } diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c index 48737a122a..d90f9ce2ce 100644 --- a/mail/em-folder-selection-button.c +++ b/mail/em-folder-selection-button.c @@ -213,7 +213,7 @@ folder_selection_button_clicked (GtkButton *button) priv = EM_FOLDER_SELECTION_BUTTON_GET_PRIVATE (button); parent = gtk_widget_get_toplevel (GTK_WIDGET (button)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; emft = (EMFolderTree *) em_folder_tree_new (); emu_restore_folder_tree_state (emft); diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 0709f28fed..7720ec9e1f 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -568,7 +568,7 @@ folder_tree_cell_edited_cb (EMFolderTree *folder_tree, camel_exception_init (&ex); parent = gtk_widget_get_toplevel (GTK_WIDGET (folder_tree)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; tree_view = GTK_TREE_VIEW (folder_tree); model = gtk_tree_view_get_model (tree_view); diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index ccbf531e52..fd0fe783fd 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -834,7 +834,7 @@ efhd_attachment_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje e_attachment_set_can_show (attachment, info->handle != NULL); parent = gtk_widget_get_toplevel (GTK_WIDGET (efh->html)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; view = em_format_html_display_get_attachment_view (efhd); gtk_widget_show (GTK_WIDGET (view)); diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c index 4932470609..6d7d978c06 100644 --- a/mail/em-vfolder-rule.c +++ b/mail/em-vfolder-rule.c @@ -511,7 +511,7 @@ source_add(GtkWidget *widget, struct _source_data *data) gpointer parent; parent = gtk_widget_get_toplevel (widget); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; emft =(EMFolderTree *) em_folder_tree_new (); emu_restore_folder_tree_state (emft); diff --git a/modules/calendar/e-cal-attachment-handler.c b/modules/calendar/e-cal-attachment-handler.c index dd95cc5d08..6453f14be2 100644 --- a/modules/calendar/e-cal-attachment-handler.c +++ b/modules/calendar/e-cal-attachment-handler.c @@ -329,7 +329,7 @@ attachment_handler_import_to_calendar (GtkAction *action, view = e_attachment_handler_get_view (handler); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; selected = e_attachment_view_get_selected_attachments (view); g_return_if_fail (g_list_length (selected) == 1); @@ -356,7 +356,7 @@ attachment_handler_import_to_tasks (GtkAction *action, view = e_attachment_handler_get_view (handler); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; selected = e_attachment_view_get_selected_attachments (view); g_return_if_fail (g_list_length (selected) == 1); diff --git a/modules/mail/e-mail-attachment-handler.c b/modules/mail/e-mail-attachment-handler.c index e00ba9df64..166522a827 100644 --- a/modules/mail/e-mail-attachment-handler.c +++ b/modules/mail/e-mail-attachment-handler.c @@ -195,7 +195,7 @@ mail_attachment_handler_message_rfc822 (EAttachmentView *view, store = e_attachment_view_get_store (view); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; attachment = e_attachment_new_for_message (message); e_attachment_store_add_attachment (store, attachment); @@ -248,7 +248,7 @@ mail_attachment_handler_x_uid_list (EAttachmentView *view, store = e_attachment_view_get_store (view); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; uids = g_ptr_array_new (); diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c index eaacec6c33..7a9973437e 100644 --- a/modules/mail/em-account-prefs.c +++ b/modules/mail/em-account-prefs.c @@ -80,7 +80,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view) return; parent = gtk_widget_get_toplevel (GTK_WIDGET (tree_view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; response = e_alert_run_dialog_for_args ( parent, "mail:ask-delete-proxy-accounts", NULL); @@ -110,7 +110,7 @@ account_prefs_add_account (EAccountManager *manager) } parent = gtk_widget_get_toplevel (GTK_WIDGET (manager)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; /** @HookPoint-EMConfig: New Mail Account Assistant * @Id: org.gnome.evolution.mail.config.accountAssistant @@ -153,7 +153,7 @@ account_prefs_edit_account (EAccountManager *manager) g_return_if_fail (account != NULL); parent = gtk_widget_get_toplevel (GTK_WIDGET (manager)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; /** @HookPoint-EMConfig: Mail Account Editor * @Id: org.gnome.evolution.mail.config.accountEditor @@ -196,7 +196,7 @@ account_prefs_delete_account (EAccountManager *manager) return; parent = gtk_widget_get_toplevel (GTK_WIDGET (manager)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; has_proxies = e_account_list_account_has_proxies (account_list, account); diff --git a/plugins/groupwise-features/install-shared.c b/plugins/groupwise-features/install-shared.c index d1edff3e02..b570d6486d 100644 --- a/plugins/groupwise-features/install-shared.c +++ b/plugins/groupwise-features/install-shared.c @@ -167,7 +167,7 @@ apply_clicked (GtkAssistant *assistant, CamelMimeMessage *msg) gpointer parent; parent = gtk_widget_get_toplevel (GTK_WIDGET (assistant)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; accept_data = g_new0(struct AcceptData, 1); folder_tree = (EMFolderTree *) em_folder_tree_new (); diff --git a/plugins/groupwise-features/send-options.c b/plugins/groupwise-features/send-options.c index f819501eb2..6e75f9153e 100644 --- a/plugins/groupwise-features/send-options.c +++ b/plugins/groupwise-features/send-options.c @@ -218,8 +218,8 @@ org_gnome_send_options (EPlugin *epl, EConfigHookItemFactoryData *data) G_CALLBACK (e_sendoptions_clicked_cb), account); parent = gtk_widget_get_toplevel (GTK_WIDGET (data->parent)); - if (!GTK_WIDGET_TOPLEVEL (parent)) - parent = NULL; + if (!gtk_widget_is_toplevel (parent)) + parent = NULL; gtk_widget_set_size_request (button, 10, -1); gtk_box_pack_start (GTK_BOX (vbox), frame, 0, 0, 0); diff --git a/widgets/misc/e-attachment-handler-image.c b/widgets/misc/e-attachment-handler-image.c index a91b433c6e..277a51be7f 100644 --- a/widgets/misc/e-attachment-handler-image.c +++ b/widgets/misc/e-attachment-handler-image.c @@ -86,7 +86,7 @@ action_image_set_as_background_saved_cb (EAttachment *attachment, error: parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; dialog = gtk_message_dialog_new_with_markup ( parent, GTK_DIALOG_DESTROY_WITH_PARENT, diff --git a/widgets/misc/e-attachment-handler-sendto.c b/widgets/misc/e-attachment-handler-sendto.c index 7cf651d98f..dda351bc8d 100644 --- a/widgets/misc/e-attachment-handler-sendto.c +++ b/widgets/misc/e-attachment-handler-sendto.c @@ -78,7 +78,7 @@ sendto_save_finished_cb (EAttachment *attachment, error: parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; dialog = gtk_message_dialog_new_with_markup ( parent, GTK_DIALOG_DESTROY_WITH_PARENT, diff --git a/widgets/misc/e-attachment-view.c b/widgets/misc/e-attachment-view.c index 715018c2fb..7529e669fb 100644 --- a/widgets/misc/e-attachment-view.c +++ b/widgets/misc/e-attachment-view.c @@ -75,7 +75,7 @@ action_add_cb (GtkAction *action, gpointer parent; parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; store = e_attachment_view_get_store (view); e_attachment_store_run_load_dialog (store, parent); @@ -150,7 +150,7 @@ action_properties_cb (GtkAction *action, attachment = selected->data; parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; dialog = e_attachment_dialog_new (parent, attachment); gtk_dialog_run (GTK_DIALOG (dialog)); @@ -174,7 +174,7 @@ action_recent_cb (GtkAction *action, store = e_attachment_view_get_store (view); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; uri = gtk_recent_chooser_get_current_uri (chooser); attachment = e_attachment_new_for_uri (uri); @@ -204,7 +204,7 @@ action_save_all_cb (GtkAction *action, store = e_attachment_view_get_store (view); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; /* XXX We lose the previous selection. */ e_attachment_view_select_all (view); @@ -244,7 +244,7 @@ action_save_as_cb (GtkAction *action, store = e_attachment_view_get_store (view); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; selected = e_attachment_view_get_selected_attachments (view); @@ -398,7 +398,7 @@ attachment_view_netscape_url (EAttachmentView *view, store = e_attachment_view_get_store (view); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; attachment = e_attachment_new_for_uri (strv[0]); e_attachment_store_add_attachment (store, attachment); @@ -453,7 +453,7 @@ attachment_view_text_calendar (EAttachmentView *view, store = e_attachment_view_get_store (view); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; attachment = e_attachment_new (); e_attachment_set_mime_part (attachment, mime_part); @@ -509,7 +509,7 @@ attachment_view_text_x_vcard (EAttachmentView *view, store = e_attachment_view_get_store (view); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; attachment = e_attachment_new (); e_attachment_set_mime_part (attachment, mime_part); @@ -548,7 +548,7 @@ attachment_view_uris (EAttachmentView *view, store = e_attachment_view_get_store (view); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; for (ii = 0; uris[ii] != NULL; ii++) { EAttachment *attachment; @@ -1012,7 +1012,7 @@ e_attachment_view_open_path (EAttachmentView *view, gtk_tree_model_get (model, &iter, column_id, &attachment, -1); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; e_attachment_open_async ( attachment, app_info, (GAsyncReadyCallback) diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c index 920e83d3a3..44e4568656 100644 --- a/widgets/misc/e-calendar.c +++ b/widgets/misc/e-calendar.c @@ -578,7 +578,7 @@ e_calendar_focus (GtkWidget *widget, GtkDirectionType direction) cal = E_CALENDAR (widget); canvas = GNOME_CANVAS (widget); - if (!GTK_WIDGET_CAN_FOCUS (widget)) + if (!gtk_widget_get_can_focus (widget)) return FALSE; children[0] = GNOME_CANVAS_ITEM (cal->calitem); diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index aeb26344ab..5f719fed80 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -561,7 +561,7 @@ e_canvas_item_grab_focus (GnomeCanvasItem *item, gboolean widget_too) g_return_if_fail (item != NULL); g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - g_return_if_fail (GTK_WIDGET_CAN_FOCUS (GTK_WIDGET (item->canvas))); + g_return_if_fail (gtk_widget_get_can_focus (GTK_WIDGET (item->canvas))); focused_item = item->canvas->focused_item; diff --git a/widgets/misc/e-charset-combo-box.c b/widgets/misc/e-charset-combo-box.c index 9c992ce1f7..142c8a98a3 100644 --- a/widgets/misc/e-charset-combo-box.c +++ b/widgets/misc/e-charset-combo-box.c @@ -84,7 +84,7 @@ charset_combo_box_run_dialog (ECharsetComboBox *combo_box) * finally resolved. */ parent = gtk_widget_get_toplevel (GTK_WIDGET (combo_box)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; object = G_OBJECT (combo_box->priv->other_action); charset = g_object_get_data (object, "charset"); diff --git a/widgets/misc/e-signature-manager.c b/widgets/misc/e-signature-manager.c index dff74a0b23..d30d20368a 100644 --- a/widgets/misc/e-signature-manager.c +++ b/widgets/misc/e-signature-manager.c @@ -100,7 +100,7 @@ signature_manager_run_script_dialog (ESignatureManager *manager, gchar *path; parent = gtk_widget_get_toplevel (GTK_WIDGET (manager)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; dialog = e_signature_script_dialog_new (parent); gtk_window_set_title (GTK_WINDOW (dialog), title); @@ -317,7 +317,7 @@ signature_manager_editor_created (ESignatureManager *manager, position = GTK_WIN_POS_CENTER_ON_PARENT; parent = gtk_widget_get_toplevel (GTK_WIDGET (manager)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; gtk_window_set_transient_for (GTK_WINDOW (editor), parent); gtk_window_set_position (GTK_WINDOW (editor), position); diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c index a873731014..0a0e3143ef 100644 --- a/widgets/misc/e-web-view.c +++ b/widgets/misc/e-web-view.c @@ -255,7 +255,7 @@ action_http_open_cb (GtkAction *action, gpointer parent; parent = gtk_widget_get_toplevel (GTK_WIDGET (web_view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; uri = e_web_view_get_selected_uri (web_view); g_return_if_fail (uri != NULL); @@ -311,7 +311,7 @@ action_send_message_cb (GtkAction *action, gpointer parent; parent = gtk_widget_get_toplevel (GTK_WIDGET (web_view)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; uri = e_web_view_get_selected_uri (web_view); g_return_if_fail (uri != NULL); @@ -684,7 +684,7 @@ web_view_link_clicked (GtkHTML *html, gpointer parent; parent = gtk_widget_get_toplevel (GTK_WIDGET (html)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + parent = gtk_widget_is_toplevel (parent) ? parent : NULL; e_show_uri (parent, uri); } diff --git a/widgets/misc/ea-calendar-cell.c b/widgets/misc/ea-calendar-cell.c index 05d0dcce6b..8728f49a46 100644 --- a/widgets/misc/ea-calendar-cell.c +++ b/widgets/misc/ea-calendar-cell.c @@ -378,7 +378,7 @@ component_interface_grab_focus (AtkComponent *component) gtk_widget_grab_focus (GTK_WIDGET (GNOME_CANVAS_ITEM (calitem)->canvas)); toplevel = gtk_widget_get_toplevel (GTK_WIDGET (GNOME_CANVAS_ITEM (calitem)->canvas)); - if (toplevel && GTK_WIDGET_TOPLEVEL (toplevel)) + if (toplevel && gtk_widget_is_toplevel (toplevel)) gtk_window_present (GTK_WINDOW (toplevel)); return TRUE; diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index ed468b3c58..067ce72c4b 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -1761,7 +1761,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e) ethi->maybe_drag = TRUE; is_pointer_on_division (ethi, x, &start, &col); ethi->selected_col = col; - if (GTK_WIDGET_CAN_FOCUS (GTK_WIDGET (item->canvas))) + if (gtk_widget_get_can_focus (GTK_WIDGET (item->canvas))) e_canvas_item_grab_focus (item, TRUE); } else if (e->button.button == 3) { ethi_header_context_menu (ethi, &e->button); diff --git a/widgets/table/gal-a11y-e-cell-registry.c b/widgets/table/gal-a11y-e-cell-registry.c index 5c741e1955..14ee7e7b2a 100644 --- a/widgets/table/gal-a11y-e-cell-registry.c +++ b/widgets/table/gal-a11y-e-cell-registry.c @@ -122,7 +122,7 @@ gal_a11y_e_cell_registry_get_object (GalA11yECellRegistry *registry, registry = default_registry; } - type = GTK_OBJECT_TYPE (cell_view->ecell); + type = G_OBJECT_TYPE (cell_view->ecell); while (func == NULL && type != 0) { func = g_hash_table_lookup (registry->priv->table, GINT_TO_POINTER (type)); type = g_type_parent (type); diff --git a/widgets/table/gal-a11y-e-cell.c b/widgets/table/gal-a11y-e-cell.c index 65f08f22d3..e9e5eb0455 100644 --- a/widgets/table/gal-a11y-e-cell.c +++ b/widgets/table/gal-a11y-e-cell.c @@ -212,7 +212,7 @@ gal_a11y_e_cell_grab_focus (AtkComponent *component) GTK_WIDGET (GNOME_CANVAS_ITEM (a11y->item)->canvas)); toplevel = gtk_widget_get_toplevel ( GTK_WIDGET (GNOME_CANVAS_ITEM (a11y->item)->canvas)); - if (toplevel && GTK_WIDGET_TOPLEVEL (toplevel)) + if (toplevel && gtk_widget_is_toplevel (toplevel)) gtk_window_present (GTK_WINDOW (toplevel)); return TRUE; diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index b9c5e0cbe3..fc73af5cae 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -1463,7 +1463,7 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable, thiswidth = widget->allocation.width - GTK_CONTAINER (widget)->border_width * 2; thisheight = widget->allocation.height - GTK_CONTAINER (widget)->border_width * 2; - if (GTK_WIDGET_HAS_DEFAULT (widget) && + if (gtk_widget_has_default (widget) && GTK_BUTTON (widget)->relief == GTK_RELIEF_NORMAL) { gtk_paint_box (widget->style, drawable, @@ -1472,7 +1472,7 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable, thisx + xoff, thisy + yoff, thiswidth, thisheight); } - if (GTK_WIDGET_CAN_DEFAULT (widget)) { + if (gtk_widget_get_can_default (widget)) { thisx += widget->style->xthickness; thisy += widget->style->ythickness; thiswidth -= 2 * thisx + default_spacing; -- cgit