aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog67
-rw-r--r--mail/component-factory.c6
-rw-r--r--mail/folder-browser-factory.c2
-rw-r--r--mail/folder-browser-ui.c2
-rw-r--r--mail/folder-browser.c118
-rw-r--r--mail/folder-browser.h8
-rw-r--r--mail/folder-info.c2
-rw-r--r--mail/mail-account-editor.c5
-rw-r--r--mail/mail-account-editor.h8
-rw-r--r--mail/mail-account-gui.c12
-rw-r--r--mail/mail-accounts.c13
-rw-r--r--mail/mail-accounts.h8
-rw-r--r--mail/mail-callbacks.c390
-rw-r--r--mail/mail-composer-prefs.c3
-rw-r--r--mail/mail-composer-prefs.h8
-rw-r--r--mail/mail-config-druid.h8
-rw-r--r--mail/mail-display.c2
-rw-r--r--mail/mail-display.h8
-rw-r--r--mail/mail-font-prefs.h8
-rw-r--r--mail/mail-local.c4
-rw-r--r--mail/mail-offline-handler.h8
-rw-r--r--mail/mail-preferences.h8
-rw-r--r--mail/mail-search-dialogue.h6
-rw-r--r--mail/mail-search.h8
-rw-r--r--mail/mail-send-recv.c7
-rw-r--r--mail/mail-session.c81
-rw-r--r--mail/mail-signature-editor.c2
-rw-r--r--mail/mail-summary.c8
-rw-r--r--mail/mail-vfolder.c4
-rw-r--r--mail/message-browser.h8
-rw-r--r--mail/message-list.h8
-rw-r--r--mail/message-tag-editor.h6
-rw-r--r--mail/message-tag-followup.c40
-rw-r--r--mail/message-tag-followup.h8
-rw-r--r--mail/subscribe-dialog.c2
-rw-r--r--mail/subscribe-dialog.h8
36 files changed, 374 insertions, 520 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index b61d234309..1f1722224a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,70 @@
+2002-11-27 Not Zed <NotZed@Ximian.com>
+
+ * message-tag-followup.c (construct): gnome_pixmap -> gtkimage.
+ (construct): gtk_clist -> gtk_tree_view, setup columns. They dont
+ size well :-/
+ (message_tag_followup_append_message): Append using model, remove
+ clist stuff.
+ (construct): Show date edit (glade bugs?)
+
+ * folder-browser.c (folder_browser_class_init): gtk_marshal -> g_cclosure_marshal
+ (setup_popup_icons): gnome_pixmap -> gtk_image.
+ (on_right_click): gtk_pixmap -> gtk_image.
+
+ * mail-accounts.c (account_delete_clicked): removed #if 0'd out code.
+
+ * mail-send-recv.c (receive_done): remove FIXME and extra unref.
+
+ * mail-session.c (request_password): Removed #if 0'd out stuff.
+
+ * mail-vfolder.c (new_rule_clicked): proper cast for g_object_get_data.
+
+ * mail-local.c (reconfigure_response): cast for g_object_get_data.
+
+ * mail-account-editor.c (construct): GNOME_DIALOG -> GTK_DIALOG.
+
+ * *.[ch]: re-ran fix.sh for e_notice change
+
+ * mail-callbacks.c (save_msg_ok): g_object_get_data +
+ gtk_object_remove_no_notify -> g_object_steal_data.
+ (find_socket): gtk_container_children ->
+ gtk_container_get_children
+ (edit_msg): gnome_*_dialog -> gtk_message_dialog.
+ (resent_msg): "
+ (search_msg): "
+ (confirm_goto_next_folder): gtkmessagedialogised (even if not
+ used).
+ (confirm_expunge): gtkmessagedialogised
+ (filter_edit): "
+ (do_mail_print): e_notice -> gtk_message_dialog.
+ (are_you_sure): removed e_gnome_ok_cancel_dialog crap, replaced
+ with a gtk dialog.
+ (are_you_sure): gtkmessagedialogised.
+ (edit_msg_internal): Dont free uids array, are_you_sure() free's
+ it.
+ (resend_msg): Same.
+ (check_send_configuration): Use e_notice for stuff. Sigh, here we
+ go again ...!
+ (e_question): A utility function to ask a question, potentially
+ with 'dont ask again' as well.
+ (configure_mail): use e_question to save code. Here we go again,
+ again ...
+ (ask_confirm_for_unwanted_html_mail): "
+ (ask_confirm_for_only_bcc): "
+ (ask_confirm_for_only_bcc): "
+ (composer_get_message): Use e_notice.
+ (composer_save_draft_cb): Use e_question
+ (edit_msg): use e_notice, & change to an ERROR.
+ (resend_msg): same.
+ (save_msg_ok): Properly initialise ret to OK, and use e_question,
+ and use access() to determine existance/write access rather than
+ stat, display an error if we can't write to a file that exists,
+ and print the filename in all dialogues.
+ (confirm_goto_next_folder): Use e_question.
+ (confirm_expunge): use e_question.
+ (filter_edit): Use e_notice.
+ (do_mail_print): use e_notice.
+
2002-11-26 Not Zed <NotZed@Ximian.com>
* mail-vfolder.c (vfolder_gui_add_rule): clicked->response signal
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 78cb922c6e..4a522d1daa 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -1073,7 +1073,7 @@ component_factory_init (void)
shell_component = create_component ();
result = bonobo_activation_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (shell_component));
if (result == Bonobo_ACTIVATION_REG_ERROR) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
+ e_notice (NULL, GTK_MESSAGE_ERROR,
_("Cannot initialize the Evolution mail component."));
exit (1);
} else if (result == Bonobo_ACTIVATION_REG_ALREADY_ACTIVE) {
@@ -1082,13 +1082,13 @@ component_factory_init (void)
}
if (evolution_mail_config_factory_init () == FALSE) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
+ e_notice (NULL, GTK_MESSAGE_ERROR,
_("Cannot initialize Evolution's mail config component."));
exit (1);
}
if (evolution_folder_info_factory_init () == FALSE) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
+ e_notice (NULL, GTK_MESSAGE_ERROR,
_("Cannot initialize Evolution's folder info component."));
exit (1);
}
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index 6f7fe4d809..21f398b6ec 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -202,7 +202,7 @@ folder_browser_factory_new_control (const char *uri,
return NULL;
}
- g_signal_connect (control, "activate", GTK_SIGNAL_FUNC (control_activate_cb), fb);
+ g_signal_connect (control, "activate", G_CALLBACK (control_activate_cb), fb);
g_object_weak_ref (G_OBJECT(control), (GWeakNotify) control_destroy_cb, fb);
g_object_weak_ref (G_OBJECT(fb), (GWeakNotify) browser_destroy_cb, control);
diff --git a/mail/folder-browser-ui.c b/mail/folder-browser-ui.c
index f053acf6a8..b3ac053794 100644
--- a/mail/folder-browser-ui.c
+++ b/mail/folder-browser-ui.c
@@ -413,7 +413,7 @@ folder_browser_ui_setup_view_menus (FolderBrowser *fb)
if (fb->view_instance == NULL)
return;
- g_signal_connect (fb->view_instance, "display_view", GTK_SIGNAL_FUNC (display_view), fb);
+ g_signal_connect (fb->view_instance, "display_view", G_CALLBACK (display_view), fb);
display_view (fb->view_instance, gal_view_instance_get_current_view (fb->view_instance), fb);
}
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index b81fd3bac7..093ede8288 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -243,7 +243,7 @@ folder_browser_class_init (FolderBrowserClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_ref(PARENT_TYPE);
object_class->destroy = folder_browser_destroy;
gobject_class->finalize = folder_browser_finalise;
@@ -255,7 +255,7 @@ folder_browser_class_init (FolderBrowserClass *klass)
G_STRUCT_OFFSET (FolderBrowserClass, folder_loaded),
NULL,
NULL,
- gtk_marshal_NONE__STRING,
+ g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
folder_browser_signals[MESSAGE_LOADED] =
@@ -265,7 +265,7 @@ folder_browser_class_init (FolderBrowserClass *klass)
G_STRUCT_OFFSET (FolderBrowserClass, message_loaded),
NULL,
NULL,
- gtk_marshal_NONE__STRING,
+ g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
/* clipboard atom */
@@ -1705,67 +1705,67 @@ enum {
#define MLIST_FILTER (8)
static EPopupMenu filter_menu[] = {
- E_POPUP_ITEM_CC (N_("VFolder on _Subject"), GTK_SIGNAL_FUNC (vfolder_subject_uid), NULL, SELECTION_SET),
- E_POPUP_ITEM_CC (N_("VFolder on Se_nder"), GTK_SIGNAL_FUNC (vfolder_sender_uid), NULL, SELECTION_SET),
- E_POPUP_ITEM_CC (N_("VFolder on _Recipients"), GTK_SIGNAL_FUNC (vfolder_recipient_uid), NULL, SELECTION_SET),
- E_POPUP_ITEM_CC (N_("VFolder on Mailing _List"), GTK_SIGNAL_FUNC (vfolder_mlist_uid), NULL, SELECTION_SET | IS_MAILING_LIST),
+ E_POPUP_ITEM_CC (N_("VFolder on _Subject"), G_CALLBACK (vfolder_subject_uid), NULL, SELECTION_SET),
+ E_POPUP_ITEM_CC (N_("VFolder on Se_nder"), G_CALLBACK (vfolder_sender_uid), NULL, SELECTION_SET),
+ E_POPUP_ITEM_CC (N_("VFolder on _Recipients"), G_CALLBACK (vfolder_recipient_uid), NULL, SELECTION_SET),
+ E_POPUP_ITEM_CC (N_("VFolder on Mailing _List"), G_CALLBACK (vfolder_mlist_uid), NULL, SELECTION_SET | IS_MAILING_LIST),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM_CC (N_("Filter on Sub_ject"), GTK_SIGNAL_FUNC (filter_subject_uid), NULL, SELECTION_SET),
- E_POPUP_ITEM_CC (N_("Filter on Sen_der"), GTK_SIGNAL_FUNC (filter_sender_uid), NULL, SELECTION_SET),
- E_POPUP_ITEM_CC (N_("Filter on Re_cipients"), GTK_SIGNAL_FUNC (filter_recipient_uid), NULL, SELECTION_SET),
- E_POPUP_ITEM_CC (N_("Filter on _Mailing List"), GTK_SIGNAL_FUNC (filter_mlist_uid), NULL, SELECTION_SET | IS_MAILING_LIST),
+ E_POPUP_ITEM_CC (N_("Filter on Sub_ject"), G_CALLBACK (filter_subject_uid), NULL, SELECTION_SET),
+ E_POPUP_ITEM_CC (N_("Filter on Sen_der"), G_CALLBACK (filter_sender_uid), NULL, SELECTION_SET),
+ E_POPUP_ITEM_CC (N_("Filter on Re_cipients"), G_CALLBACK (filter_recipient_uid), NULL, SELECTION_SET),
+ E_POPUP_ITEM_CC (N_("Filter on _Mailing List"), G_CALLBACK (filter_mlist_uid), NULL, SELECTION_SET | IS_MAILING_LIST),
E_POPUP_TERMINATOR
};
static EPopupMenu label_menu[] = {
- E_POPUP_PIXMAP_WIDGET_ITEM_CC (N_("None"), NULL, GTK_SIGNAL_FUNC (set_msg_label), NULL, 0),
+ E_POPUP_PIXMAP_WIDGET_ITEM_CC (N_("None"), NULL, G_CALLBACK (set_msg_label), NULL, 0),
E_POPUP_SEPARATOR,
- E_POPUP_PIXMAP_WIDGET_ITEM_CC (NULL, NULL, GTK_SIGNAL_FUNC (set_msg_label), NULL, 0),
- E_POPUP_PIXMAP_WIDGET_ITEM_CC (NULL, NULL, GTK_SIGNAL_FUNC (set_msg_label), NULL, 0),
- E_POPUP_PIXMAP_WIDGET_ITEM_CC (NULL, NULL, GTK_SIGNAL_FUNC (set_msg_label), NULL, 0),
- E_POPUP_PIXMAP_WIDGET_ITEM_CC (NULL, NULL, GTK_SIGNAL_FUNC (set_msg_label), NULL, 0),
- E_POPUP_PIXMAP_WIDGET_ITEM_CC (NULL, NULL, GTK_SIGNAL_FUNC (set_msg_label), NULL, 0),
+ E_POPUP_PIXMAP_WIDGET_ITEM_CC (NULL, NULL, G_CALLBACK (set_msg_label), NULL, 0),
+ E_POPUP_PIXMAP_WIDGET_ITEM_CC (NULL, NULL, G_CALLBACK (set_msg_label), NULL, 0),
+ E_POPUP_PIXMAP_WIDGET_ITEM_CC (NULL, NULL, G_CALLBACK (set_msg_label), NULL, 0),
+ E_POPUP_PIXMAP_WIDGET_ITEM_CC (NULL, NULL, G_CALLBACK (set_msg_label), NULL, 0),
+ E_POPUP_PIXMAP_WIDGET_ITEM_CC (NULL, NULL, G_CALLBACK (set_msg_label), NULL, 0),
E_POPUP_TERMINATOR
};
static EPopupMenu context_menu[] = {
- E_POPUP_ITEM (N_("_Open"), GTK_SIGNAL_FUNC (open_msg), 0),
- E_POPUP_ITEM (N_("_Edit as New Message..."), GTK_SIGNAL_FUNC (resend_msg), CAN_RESEND),
- E_POPUP_ITEM (N_("_Save As..."), GTK_SIGNAL_FUNC (save_msg), 0),
- E_POPUP_ITEM (N_("_Print"), GTK_SIGNAL_FUNC (print_msg), 0),
+ E_POPUP_ITEM (N_("_Open"), G_CALLBACK (open_msg), 0),
+ E_POPUP_ITEM (N_("_Edit as New Message..."), G_CALLBACK (resend_msg), CAN_RESEND),
+ E_POPUP_ITEM (N_("_Save As..."), G_CALLBACK (save_msg), 0),
+ E_POPUP_ITEM (N_("_Print"), G_CALLBACK (print_msg), 0),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("_Reply to Sender"), GTK_SIGNAL_FUNC (reply_to_sender), 0),
- E_POPUP_ITEM (N_("Reply to _List"), GTK_SIGNAL_FUNC (reply_to_list), 0),
- E_POPUP_ITEM (N_("Reply to _All"), GTK_SIGNAL_FUNC (reply_to_all), 0),
- E_POPUP_ITEM (N_("_Forward"), GTK_SIGNAL_FUNC (forward), 0),
+ E_POPUP_ITEM (N_("_Reply to Sender"), G_CALLBACK (reply_to_sender), 0),
+ E_POPUP_ITEM (N_("Reply to _List"), G_CALLBACK (reply_to_list), 0),
+ E_POPUP_ITEM (N_("Reply to _All"), G_CALLBACK (reply_to_all), 0),
+ E_POPUP_ITEM (N_("_Forward"), G_CALLBACK (forward), 0),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Follo_w Up..."), GTK_SIGNAL_FUNC (flag_for_followup), CAN_FLAG_FOR_FOLLOWUP),
- E_POPUP_ITEM (N_("Fla_g Completed"), GTK_SIGNAL_FUNC (flag_followup_completed), CAN_FLAG_COMPLETED),
- E_POPUP_ITEM (N_("Cl_ear Flag"), GTK_SIGNAL_FUNC (flag_followup_clear), CAN_CLEAR_FLAG),
+ E_POPUP_ITEM (N_("Follo_w Up..."), G_CALLBACK (flag_for_followup), CAN_FLAG_FOR_FOLLOWUP),
+ E_POPUP_ITEM (N_("Fla_g Completed"), G_CALLBACK (flag_followup_completed), CAN_FLAG_COMPLETED),
+ E_POPUP_ITEM (N_("Cl_ear Flag"), G_CALLBACK (flag_followup_clear), CAN_CLEAR_FLAG),
/* separator here? */
- E_POPUP_ITEM (N_("Mar_k as Read"), GTK_SIGNAL_FUNC (mark_as_seen_cb), CAN_MARK_READ),
- E_POPUP_ITEM (N_("Mark as _Unread"), GTK_SIGNAL_FUNC (mark_as_unseen_cb), CAN_MARK_UNREAD),
- E_POPUP_ITEM (N_("Mark as _Important"), GTK_SIGNAL_FUNC (mark_as_important_cb), CAN_MARK_IMPORTANT),
- E_POPUP_ITEM (N_("_Mark as Unimportant"), GTK_SIGNAL_FUNC (mark_as_unimportant_cb), CAN_MARK_UNIMPORTANT),
+ E_POPUP_ITEM (N_("Mar_k as Read"), G_CALLBACK (mark_as_seen_cb), CAN_MARK_READ),
+ E_POPUP_ITEM (N_("Mark as _Unread"), G_CALLBACK (mark_as_unseen_cb), CAN_MARK_UNREAD),
+ E_POPUP_ITEM (N_("Mark as _Important"), G_CALLBACK (mark_as_important_cb), CAN_MARK_IMPORTANT),
+ E_POPUP_ITEM (N_("_Mark as Unimportant"), G_CALLBACK (mark_as_unimportant_cb), CAN_MARK_UNIMPORTANT),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("_Delete"), GTK_SIGNAL_FUNC (delete_msg), CAN_DELETE),
- E_POPUP_ITEM (N_("U_ndelete"), GTK_SIGNAL_FUNC (undelete_msg), CAN_UNDELETE),
+ E_POPUP_ITEM (N_("_Delete"), G_CALLBACK (delete_msg), CAN_DELETE),
+ E_POPUP_ITEM (N_("U_ndelete"), G_CALLBACK (undelete_msg), CAN_UNDELETE),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Mo_ve to Folder..."), GTK_SIGNAL_FUNC (move_msg_cb), 0),
- E_POPUP_ITEM (N_("_Copy to Folder..."), GTK_SIGNAL_FUNC (copy_msg_cb), 0),
+ E_POPUP_ITEM (N_("Mo_ve to Folder..."), G_CALLBACK (move_msg_cb), 0),
+ E_POPUP_ITEM (N_("_Copy to Folder..."), G_CALLBACK (copy_msg_cb), 0),
E_POPUP_SEPARATOR,
@@ -1773,11 +1773,11 @@ static EPopupMenu context_menu[] = {
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Add Sender to Address_book"), GTK_SIGNAL_FUNC (addrbook_sender), SELECTION_SET | CAN_ADD_SENDER),
+ E_POPUP_ITEM (N_("Add Sender to Address_book"), G_CALLBACK (addrbook_sender), SELECTION_SET | CAN_ADD_SENDER),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Appl_y Filters"), GTK_SIGNAL_FUNC (apply_filters), 0),
+ E_POPUP_ITEM (N_("Appl_y Filters"), G_CALLBACK (apply_filters), 0),
E_POPUP_SEPARATOR,
@@ -1850,7 +1850,7 @@ setup_popup_icons (void)
char *filename;
filename = g_strdup_printf ("%s/%s", EVOLUTION_IMAGES, context_pixmaps[i]);
- context_menu[i].pixmap_widget = gnome_pixmap_new_from_file (filename);
+ context_menu[i].pixmap_widget = gtk_image_new_from_file(filename);
g_free (filename);
}
}
@@ -2086,7 +2086,7 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
g_ptr_array_add (closures, closure);
label_menu[i + 2].name = (char *)mail_config_get_label_name (i);
- label_menu[i + 2].pixmap_widget = gtk_pixmap_new (pixmap, NULL);
+ label_menu[i + 2].pixmap_widget = gtk_image_new_from_pixmap(pixmap, NULL);
label_menu[i + 2].closure = closure;
}
@@ -2322,11 +2322,11 @@ folder_browser_gui_init (FolderBrowser *fb)
gtk_widget_show (GTK_WIDGET (fb->search));
g_signal_connect (fb->search, "menu_activated",
- GTK_SIGNAL_FUNC (folder_browser_search_menu_activated), fb);
+ G_CALLBACK (folder_browser_search_menu_activated), fb);
g_signal_connect (fb->search, "search_activated",
- GTK_SIGNAL_FUNC (folder_browser_search_do_search), fb);
+ G_CALLBACK (folder_browser_search_do_search), fb);
g_signal_connect (fb->search, "query_changed",
- GTK_SIGNAL_FUNC (folder_browser_query_changed), fb);
+ G_CALLBACK (folder_browser_query_changed), fb);
gtk_table_attach (GTK_TABLE (fb), GTK_WIDGET (fb->search),
0, 1, 0, 1,
@@ -2335,15 +2335,15 @@ folder_browser_gui_init (FolderBrowser *fb)
0, 0);
esm = e_tree_get_selection_model (E_TREE (fb->message_list->tree));
- g_signal_connect (esm, "selection_changed", GTK_SIGNAL_FUNC (on_selection_changed), fb);
- g_signal_connect (esm, "cursor_activated", GTK_SIGNAL_FUNC (on_cursor_activated), fb);
+ g_signal_connect (esm, "selection_changed", G_CALLBACK (on_selection_changed), fb);
+ g_signal_connect (esm, "cursor_activated", G_CALLBACK (on_cursor_activated), fb);
fb->selection_state = FB_SELSTATE_NONE; /* default to none */
e_paned_add1 (E_PANED (fb->vpaned), GTK_WIDGET (fb->message_list));
gtk_widget_show (GTK_WIDGET (fb->message_list));
g_signal_connect (fb->message_list, "size_allocate",
- GTK_SIGNAL_FUNC (fb_resize_cb), fb);
+ G_CALLBACK (fb_resize_cb), fb);
e_paned_add2 (E_PANED (fb->vpaned), GTK_WIDGET (fb->mail_display));
e_paned_set_position (E_PANED (fb->vpaned), mail_config_get_paned_size ());
@@ -2508,40 +2508,40 @@ my_folder_browser_init (FolderBrowser *fb)
fb->preview_shown = TRUE;
g_signal_connect (fb->mail_display->html, "key_press_event",
- GTK_SIGNAL_FUNC (on_key_press), fb);
+ G_CALLBACK (on_key_press), fb);
g_signal_connect (fb->mail_display->html, "button_press_event",
- GTK_SIGNAL_FUNC (html_button_press_event), fb);
+ G_CALLBACK (html_button_press_event), fb);
g_signal_connect (fb->message_list->tree, "key_press",
- GTK_SIGNAL_FUNC (etree_key), fb);
+ G_CALLBACK (etree_key), fb);
g_signal_connect (fb->message_list->tree, "right_click",
- GTK_SIGNAL_FUNC (on_right_click), fb);
+ G_CALLBACK (on_right_click), fb);
g_signal_connect (fb->message_list->tree, "double_click",
- GTK_SIGNAL_FUNC (on_double_click), fb);
+ G_CALLBACK (on_double_click), fb);
g_signal_connect (fb->message_list, "focus_in_event",
- GTK_SIGNAL_FUNC (on_message_list_focus_in), fb);
+ G_CALLBACK (on_message_list_focus_in), fb);
g_signal_connect (fb->message_list, "focus_out_event",
- GTK_SIGNAL_FUNC (on_message_list_focus_out), fb);
+ G_CALLBACK (on_message_list_focus_out), fb);
g_signal_connect (fb->message_list, "message_selected",
- GTK_SIGNAL_FUNC (on_message_selected), fb);
+ G_CALLBACK (on_message_selected), fb);
/* drag & drop */
e_tree_drag_source_set (fb->message_list->tree, GDK_BUTTON1_MASK,
drag_types, num_drag_types, GDK_ACTION_MOVE | GDK_ACTION_COPY);
g_signal_connect (fb->message_list->tree, "tree_drag_data_get",
- GTK_SIGNAL_FUNC (message_list_drag_data_get), fb);
+ G_CALLBACK (message_list_drag_data_get), fb);
e_tree_drag_dest_set (fb->message_list->tree, GTK_DEST_DEFAULT_ALL,
drag_types, num_drag_types, GDK_ACTION_MOVE | GDK_ACTION_COPY);
g_signal_connect (fb->message_list->tree, "tree_drag_data_received",
- GTK_SIGNAL_FUNC (message_list_drag_data_received), fb);
+ G_CALLBACK (message_list_drag_data_received), fb);
/* cut, copy & paste */
fb->invisible = gtk_invisible_new ();
@@ -2552,11 +2552,11 @@ my_folder_browser_init (FolderBrowser *fb)
paste_types[i].info);
g_signal_connect (fb->invisible, "selection_get",
- GTK_SIGNAL_FUNC (selection_get), fb);
+ G_CALLBACK (selection_get), fb);
g_signal_connect (fb->invisible, "selection_clear_event",
- GTK_SIGNAL_FUNC (selection_clear_event), fb);
+ G_CALLBACK (selection_clear_event), fb);
g_signal_connect (fb->invisible, "selection_received",
- GTK_SIGNAL_FUNC (selection_received), fb);
+ G_CALLBACK (selection_received), fb);
folder_browser_gui_init (fb);
}
diff --git a/mail/folder-browser.h b/mail/folder-browser.h
index dfd6ec89dd..dd8486bc1c 100644
--- a/mail/folder-browser.h
+++ b/mail/folder-browser.h
@@ -18,10 +18,10 @@
#include "shell/Evolution.h"
#define FOLDER_BROWSER_TYPE (folder_browser_get_type ())
-#define FOLDER_BROWSER(o) (GTK_CHECK_CAST ((o), FOLDER_BROWSER_TYPE, FolderBrowser))
-#define FOLDER_BROWSER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), FOLDER_BROWSER_TYPE, FolderBrowserClass))
-#define IS_FOLDER_BROWSER(o) (GTK_CHECK_TYPE ((o), FOLDER_BROWSER_TYPE))
-#define IS_FOLDER_BROWSER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), FOLDER_BROWSER_TYPE))
+#define FOLDER_BROWSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FOLDER_BROWSER_TYPE, FolderBrowser))
+#define FOLDER_BROWSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), FOLDER_BROWSER_TYPE, FolderBrowserClass))
+#define IS_FOLDER_BROWSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FOLDER_BROWSER_TYPE))
+#define IS_FOLDER_BROWSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), FOLDER_BROWSER_TYPE))
#define FB_DEFAULT_CHARSET _("Default")
diff --git a/mail/folder-info.c b/mail/folder-info.c
index e072af4b9a..5dda928863 100644
--- a/mail/folder-info.c
+++ b/mail/folder-info.c
@@ -173,7 +173,7 @@ evolution_folder_info_class_init (EvolutionFolderInfoClass *klass)
{
POA_GNOME_Evolution_FolderInfo__epv *epv = &klass->epv;
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_ref(PARENT_TYPE);
epv->getInfo = impl_GNOME_Evolution_FolderInfo_getInfo;
}
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
index feb7384bcb..057b9453b2 100644
--- a/mail/mail-account-editor.c
+++ b/mail/mail-account-editor.c
@@ -40,7 +40,6 @@ static void mail_account_editor_finalize (GObject *obj);
static GtkDialogClass *parent_class = NULL;
-
GType
mail_account_editor_get_type ()
{
@@ -100,7 +99,7 @@ apply_changes (MailAccountEditor *editor)
if (page != -1) {
gtk_notebook_set_page (editor->notebook, page);
gtk_widget_grab_focus (incomplete);
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("You have not filled in all of the required information."));
+ e_notice (NULL, GTK_MESSAGE_ERROR, _("You have not filled in all of the required information."));
return FALSE;
}
@@ -141,7 +140,7 @@ construct (MailAccountEditor *editor, MailConfigAccount *account, MailAccountsTa
/* get our toplevel widget and reparent it */
editor->notebook = GTK_NOTEBOOK (glade_xml_get_widget (editor->gui->xml, "account_editor_notebook"));
- gtk_widget_reparent (GTK_WIDGET (editor->notebook), GNOME_DIALOG (editor)->vbox);
+ gtk_widget_reparent (GTK_WIDGET (editor->notebook), GTK_DIALOG (editor)->vbox);
/* give our dialog an OK button and title */
gtk_window_set_title (GTK_WINDOW (editor), _("Evolution Account Editor"));
diff --git a/mail/mail-account-editor.h b/mail/mail-account-editor.h
index ce550f1fde..afb81513a9 100644
--- a/mail/mail-account-editor.h
+++ b/mail/mail-account-editor.h
@@ -35,10 +35,10 @@ extern "C" {
#include "mail-accounts.h"
#define MAIL_ACCOUNT_EDITOR_TYPE (mail_account_editor_get_type ())
-#define MAIL_ACCOUNT_EDITOR(o) (GTK_CHECK_CAST ((o), MAIL_ACCOUNT_EDITOR_TYPE, MailAccountEditor))
-#define MAIL_ACCOUNT_EDITOR_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_ACCOUNT_EDITOR_TYPE, MailAccountEditorClass))
-#define MAIL_IS_ACCOUNT_EDITOR(o) (GTK_CHECK_TYPE ((o), MAIL_ACCOUNT_EDITOR_TYPE))
-#define MAIL_IS_ACCOUNT_EDITOR_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_ACCOUNT_EDITOR_TYPE))
+#define MAIL_ACCOUNT_EDITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_ACCOUNT_EDITOR_TYPE, MailAccountEditor))
+#define MAIL_ACCOUNT_EDITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_ACCOUNT_EDITOR_TYPE, MailAccountEditorClass))
+#define MAIL_IS_ACCOUNT_EDITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_ACCOUNT_EDITOR_TYPE))
+#define MAIL_IS_ACCOUNT_EDITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_ACCOUNT_EDITOR_TYPE))
struct _MailAccountEditor {
GtkDialog parent_object;
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index a4300eab2e..7595067df5 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -752,11 +752,11 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string)
mailcheck_frame = glade_xml_get_widget (gui->xml, "extra_mailcheck_frame");
/* Remove any additional mailcheck items. */
- children = gtk_container_children (GTK_CONTAINER (mailcheck_frame));
+ children = gtk_container_get_children(GTK_CONTAINER (mailcheck_frame));
if (children) {
cur_vbox = children->data;
g_list_free (children);
- children = gtk_container_children (GTK_CONTAINER (cur_vbox));
+ children = gtk_container_get_children(GTK_CONTAINER (cur_vbox));
for (child = children; child; child = child->next) {
if (child != children) {
gtk_container_remove (GTK_CONTAINER (cur_vbox),
@@ -769,7 +769,7 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string)
/* Remove the contents of the extra_vbox except for the
* mailcheck_frame.
*/
- children = gtk_container_children (GTK_CONTAINER (main_vbox));
+ children = gtk_container_get_children(GTK_CONTAINER (main_vbox));
for (child = children; child; child = child->next) {
if (child != children) {
gtk_container_remove (GTK_CONTAINER (main_vbox),
@@ -1103,7 +1103,7 @@ setup_service (MailAccountGuiService *gsvc, MailConfigService *service)
else if (!*use_ssl) /* old config code just used an empty string as the value */
use_ssl = "always";
- children = gtk_container_children (GTK_CONTAINER (gtk_option_menu_get_menu (gsvc->use_ssl)));
+ children = gtk_container_get_children(GTK_CONTAINER (gtk_option_menu_get_menu (gsvc->use_ssl)));
for (item = children, i = 0; item; item = item->next, i++) {
if (!strcmp (use_ssl, ssl_options[i].value)) {
gtk_option_menu_set_history (gsvc->use_ssl, i);
@@ -1118,7 +1118,7 @@ setup_service (MailAccountGuiService *gsvc, MailConfigService *service)
CamelServiceAuthType *authtype;
int i;
- children = gtk_container_children (GTK_CONTAINER (gtk_option_menu_get_menu (gsvc->authtype)));
+ children = gtk_container_get_children(GTK_CONTAINER (gtk_option_menu_get_menu (gsvc->authtype)));
for (item = children, i = 0; item; item = item->next, i++) {
authtype = g_object_get_data ((GObject *) item->data, "authtype");
if (!authtype)
@@ -1830,7 +1830,7 @@ mail_account_gui_save (MailAccountGui *gui)
old_account = (MailConfigAccount *) mail_config_get_account_by_name (new_name);
if (old_account && old_account != account) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
+ e_notice (NULL, GTK_MESSAGE_ERROR,
_("You may not create two accounts with the same name."));
return FALSE;
}
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c
index 2e1609b717..43b957ff05 100644
--- a/mail/mail-accounts.c
+++ b/mail/mail-accounts.c
@@ -232,18 +232,7 @@ account_delete_clicked (GtkButton *button, gpointer user_data)
ans = gtk_dialog_run(confirm);
gtk_widget_destroy((GtkWidget *)confirm);
g_object_unref(confirm);
-#if 0
- confirm = GNOME_DIALOG (gnome_message_box_new (_("Are you sure you want to delete this account?"),
- GNOME_MESSAGE_BOX_QUESTION,
- NULL));
- gnome_dialog_append_button_with_pixmap (confirm, _("Delete"), GNOME_STOCK_BUTTON_YES);
- gnome_dialog_append_button_with_pixmap (confirm, _("Don't delete"), GNOME_STOCK_BUTTON_NO);
- gtk_window_set_policy (GTK_WINDOW (confirm), TRUE, TRUE, TRUE);
- gtk_window_set_modal (GTK_WINDOW (confirm), TRUE);
- gtk_window_set_title (GTK_WINDOW (confirm), _("Really delete account?"));
- gnome_dialog_set_parent (confirm, PREFS_WINDOW (prefs));
- ans = gnome_dialog_run_and_close (confirm);
-#endif
+
if (ans == GTK_RESPONSE_YES) {
int select, len;
diff --git a/mail/mail-accounts.h b/mail/mail-accounts.h
index 9e11acfdf9..b13efb47dc 100644
--- a/mail/mail-accounts.h
+++ b/mail/mail-accounts.h
@@ -42,10 +42,10 @@ extern "C" {
#define MAIL_ACCOUNTS_TAB_TYPE (mail_accounts_tab_get_type ())
-#define MAIL_ACCOUNTS_TAB(o) (GTK_CHECK_CAST ((o), MAIL_ACCOUNTS_TAB_TYPE, MailAccountsTab))
-#define MAIL_ACCOUNTS_TAB_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_ACCOUNTS_TAB_TYPE, MailAccountsTabClass))
-#define IS_MAIL_ACCOUNTS_TAB(o) (GTK_CHECK_TYPE ((o), MAIL_ACCOUNTS_TAB_TYPE))
-#define IS_MAIL_ACCOUNTS_TAB_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_ACCOUNTS_TAB_TYPE))
+#define MAIL_ACCOUNTS_TAB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_ACCOUNTS_TAB_TYPE, MailAccountsTab))
+#define MAIL_ACCOUNTS_TAB_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_ACCOUNTS_TAB_TYPE, MailAccountsTabClass))
+#define IS_MAIL_ACCOUNTS_TAB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_ACCOUNTS_TAB_TYPE))
+#define IS_MAIL_ACCOUNTS_TAB_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_ACCOUNTS_TAB_TYPE))
typedef struct _MailAccountsTab MailAccountsTab;
typedef struct _MailAccountsTabClass MailAccountsTabClass;
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 1058ec83e6..fb46cb05a5 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -75,6 +75,40 @@
#define FB_WINDOW(fb) GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (fb), GTK_TYPE_WINDOW))
+/* default is default gtk response
+ if again is != NULL, a checkbox "dont show this again" will appear, and the result stored in *again
+*/
+static gboolean
+e_question(GtkWindow *parent, int def, gboolean *again, const char *fmt, ...)
+{
+ GtkWidget *mbox, *check = NULL;
+ va_list ap;
+ int button;
+ char *str;
+
+ va_start(ap, fmt);
+ str = g_strdup_vprintf(fmt, ap);
+ va_end(ap);
+ mbox = gtk_message_dialog_new(parent, GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
+ "%s", str);
+ g_free(str);
+ gtk_dialog_set_default_response ((GtkDialog *)mbox, def);
+ if (again) {
+ check = gtk_check_button_new_with_label (_("Don't show this message again."));
+ gtk_box_pack_start((GtkBox *)((GtkDialog *)mbox)->vbox, check, TRUE, TRUE, 10);
+ gtk_widget_show(check);
+ }
+
+ button = gtk_dialog_run((GtkDialog *)mbox);
+ if (again)
+ *again = !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
+ gtk_widget_destroy(mbox);
+
+ return button == GTK_RESPONSE_YES;
+}
+
+
struct _composer_callback_data {
unsigned int ref_count;
@@ -148,32 +182,17 @@ static gboolean
configure_mail (FolderBrowser *fb)
{
MailConfigDruid *druid;
- GtkWidget *dialog;
- int resp;
- dialog = gtk_message_dialog_new (FB_WINDOW (fb), GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s",
- _("You have not configured the mail client.\n"
- "You need to do this before you can send,\n"
- "receive or compose mail.\n"
- "Would you like to configure it now?"));
-
- gtk_dialog_set_default_response ((GtkDialog *) dialog, GTK_RESPONSE_YES);
-
- resp = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy(dialog);
-
- switch (resp) {
- case GTK_RESPONSE_YES:
+ if (e_question(FB_WINDOW(fb), GTK_RESPONSE_YES, NULL,
+ _("You have not configured the mail client.\n"
+ "You need to do this before you can send,\n"
+ "receive or compose mail.\n"
+ "Would you like to configure it now?"))) {
druid = mail_config_druid_new (fb->shell);
g_object_weak_ref ((GObject *) druid, (GWeakNotify) druid_destroy_cb, NULL);
gtk_widget_show ((GtkWidget *)druid);
gtk_grab_add ((GtkWidget *)druid);
gtk_main ();
- break;
- case GTK_RESPONSE_NO:
- default:
- break;
}
return mail_config_is_configured ();
@@ -194,27 +213,16 @@ check_send_configuration (FolderBrowser *fb)
/* Check for an identity */
if (!account) {
- dialog = gtk_message_dialog_new (FB_WINDOW (fb), GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE,
- "%s", _("You need to configure an identity\n"
- "before you can compose mail."));
-
- g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
- gtk_widget_show (dialog);
-
+ e_notice(FB_WINDOW(fb), GTK_MESSAGE_WARNING,
+ _("You need to configure an identity\nbefore you can compose mail."));
return FALSE;
}
/* Check for a transport */
if (!account->transport || !account->transport->url) {
- dialog = gtk_message_dialog_new (FB_WINDOW (fb), GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE,
- "%s", _("You need to configure a mail transport\n"
- "before you can compose mail."));
-
- g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
- gtk_widget_show (dialog);
-
+ e_notice(FB_WINDOW(fb), GTK_MESSAGE_WARNING,
+ _("You need to configure a mail transport\n"
+ "before you can compose mail."));
return FALSE;
}
@@ -224,15 +232,12 @@ check_send_configuration (FolderBrowser *fb)
static gboolean
ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EDestination **recipients)
{
- gboolean show_again;
+ gboolean show_again, res;
GString *str;
- GtkWidget *mbox, *check;
- int i, button;
-
- if (!mail_config_get_confirm_unwanted_html ()) {
- g_message ("doesn't want to see confirm html messages!");
+ int i;
+
+ if (!mail_config_get_confirm_unwanted_html ())
return TRUE;
- }
/* FIXME: this wording sucks */
str = g_string_new (_("You are sending an HTML-formatted message. Please make sure that\n"
@@ -248,58 +253,34 @@ ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EDestination **recip
}
g_string_append (str, _("Send anyway?"));
+ res = e_question((GtkWindow *)composer, GTK_RESPONSE_YES, &show_again, "%s", str->str);
+ g_string_free(str, TRUE);
+ mail_config_set_confirm_unwanted_html (show_again);
- mbox = gtk_message_dialog_new((GtkWindow *)composer, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
- "%s", str->str);
- check = gtk_check_button_new_with_label (_("Don't show this message again."));
- gtk_box_pack_start((GtkBox *)((GtkDialog *)mbox)->vbox, check, TRUE, TRUE, 10);
- gtk_widget_show(check);
- button = gtk_dialog_run((GtkDialog *)mbox);
- show_again = !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
- gtk_widget_destroy(mbox);
-
- if (!show_again) {
- mail_config_set_confirm_unwanted_html (show_again);
- g_message ("don't show HTML warning again");
- }
-
- return (button == GTK_RESPONSE_YES);
+ return res;
}
static gboolean
ask_confirm_for_empty_subject (EMsgComposer *composer)
{
- gboolean show_again;
+ gboolean show_again, res;
GtkWidget *mbox, *check;
- int button;
if (!mail_config_get_prompt_empty_subject ())
return TRUE;
- mbox = gtk_message_dialog_new((GtkWindow *)composer, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
- _("This message has no subject.\nReally send?"));
- check = gtk_check_button_new_with_label (_("Don't show this message again."));
- gtk_box_pack_start((GtkBox *)((GtkDialog *)mbox)->vbox, check, TRUE, TRUE, 10);
- gtk_widget_show(check);
- button = gtk_dialog_run((GtkDialog *)mbox);
- show_again = !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
- gtk_widget_destroy(mbox);
-
+ res = e_question((GtkWindow *)composer, GTK_RESPONSE_YES, &show_again,
+ _("This message has no subject.\nReally send?"));
mail_config_set_prompt_empty_subject (show_again);
- return (button == GTK_RESPONSE_YES);
+ return res;
}
static gboolean
ask_confirm_for_only_bcc (EMsgComposer *composer, gboolean hidden_list_case)
{
- gboolean show_again;
- GtkWidget *mbox, *check;
- int button;
+ gboolean show_again, res;
const char *first_text;
- char *message_text;
if (!mail_config_get_prompt_only_bcc ())
return TRUE;
@@ -317,22 +298,15 @@ ask_confirm_for_only_bcc (EMsgComposer *composer, gboolean hidden_list_case)
} else {
first_text = _("This message contains only Bcc recipients.");
}
-
- mbox = gtk_message_dialog_new((GtkWindow *)composer, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
- "%s\n%s", first_text,
- _("It is possible that the mail server may reveal the recipients "
- "by adding an Apparently-To header.\nSend anyway?"));
- check = gtk_check_button_new_with_label (_("Don't show this message again."));
- gtk_box_pack_start((GtkBox *)((GtkDialog *)mbox)->vbox, check, TRUE, TRUE, 10);
- gtk_widget_show(check);
- button = gtk_dialog_run((GtkDialog *)mbox);
- show_again = !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
- gtk_widget_destroy(mbox);
+
+ res = e_question((GtkWindow *)composer, GTK_RESPONSE_YES, &show_again,
+ "%s\n%s", first_text,
+ _("It is possible that the mail server may reveal the recipients "
+ "by adding an Apparently-To header.\nSend anyway?"));
mail_config_set_prompt_only_bcc (show_again);
- return (button == GTK_RESPONSE_YES);
+ return res;
}
@@ -455,13 +429,8 @@ composer_get_message (EMsgComposer *composer, gboolean post, gboolean save_html_
/* I'm sensing a lack of love, er, I mean recipients. */
if (num == 0 && !post) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new ((GtkWindow *)composer, GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE, "%s",
- _("You must specify recipients in order to send this message."));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ e_notice((GtkWindow *)composer, GTK_MESSAGE_WARNING,
+ _("You must specify recipients in order to send this message."));
goto finished;
}
@@ -715,18 +684,10 @@ composer_save_draft_cb (EMsgComposer *composer, int quit, gpointer user_data)
mail_msg_wait (id);
if (!folder) {
- GtkWidget *dialog;
- int response;
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (composer), GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
- "%s", _("Unable to open the drafts folder for this account.\n"
- "Would you like to use the default drafts folder?"));
-
- response = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- if (response != GTK_RESPONSE_YES)
+ gboolean res;
+ if (!e_question((GtkWindow *)composer, GTK_RESPONSE_YES, NULL,
+ _("Unable to open the drafts folder for this account.\n"
+ "Would you like to use the default drafts folder?")))
return;
folder = drafts_folder;
@@ -1707,7 +1668,7 @@ find_socket (GtkContainer *container)
{
GList *children, *tmp;
- children = gtk_container_children (container);
+ children = gtk_container_get_children (container);
while (children) {
if (BONOBO_IS_SOCKET (children->data))
return children->data;
@@ -2264,17 +2225,20 @@ are_you_sure (const char *msg, GPtrArray *uids, FolderBrowser *fb)
GtkWidget *dialog;
char *buf;
int button, i;
-
- buf = g_strdup_printf (msg, uids->len);
- dialog = e_gnome_ok_cancel_dialog_parented (buf, NULL, NULL, FB_WINDOW (fb));
- button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- if (button != 0) {
+
+ dialog = gtk_message_dialog_new (FB_WINDOW (fb), GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL,
+ msg, uids->len);
+ button = gtk_dialog_run((GtkDialog *)dialog);
+ gtk_widget_destroy(dialog);
+
+ if (button != GTK_RESPONSE_OK) {
for (i = 0; i < uids->len; i++)
g_free (uids->pdata[i]);
g_ptr_array_free (uids, TRUE);
}
- return button == 0;
+ return button == GTK_RESPONSE_OK;
}
static void
@@ -2288,16 +2252,8 @@ edit_msg_internal (FolderBrowser *fb)
uids = g_ptr_array_new ();
message_list_foreach (fb->message_list, enumerate_msg, uids);
- if (uids->len > 10 && !are_you_sure (_("Are you sure you want to edit all %d messages?"), uids, fb)) {
- int i;
-
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
-
- g_ptr_array_free (uids, TRUE);
-
+ if (uids->len > 10 && !are_you_sure (_("Are you sure you want to edit all %d messages?"), uids, fb))
return;
- }
mail_get_messages (fb->folder, uids, do_edit_messages, fb);
}
@@ -2311,13 +2267,8 @@ edit_msg (GtkWidget *widget, gpointer user_data)
return;
if (!folder_browser_is_drafts (fb)) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog_parented (_("You may only edit messages saved\n"
- "in the Drafts folder."),
- FB_WINDOW (fb));
- gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
- gtk_widget_show (dialog);
+ e_notice(FB_WINDOW(fb), GTK_MESSAGE_ERROR,
+ _("You may only edit messages saved\nin the Drafts folder."));
return;
}
@@ -2351,12 +2302,9 @@ resend_msg (GtkWidget *widget, gpointer user_data)
if (!folder_browser_is_sent (fb)) {
GtkWidget *dialog;
-
- dialog = gnome_warning_dialog_parented (_("You may only resend messages\n"
- "in the Sent folder."),
- FB_WINDOW (fb));
- gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
- gtk_widget_show (dialog);
+
+ e_notice(FB_WINDOW(fb), GTK_MESSAGE_ERROR,
+ _("You may only resend messages\nin the Sent folder."));
return;
}
@@ -2366,16 +2314,8 @@ resend_msg (GtkWidget *widget, gpointer user_data)
uids = g_ptr_array_new ();
message_list_foreach (fb->message_list, enumerate_msg, uids);
- if (uids->len > 10 && !are_you_sure (_("Are you sure you want to resend all %d messages?"), uids, fb)) {
- int i;
-
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
-
- g_ptr_array_free (uids, TRUE);
-
+ if (uids->len > 10 && !are_you_sure (_("Are you sure you want to resend all %d messages?"), uids, fb))
return;
- }
mail_get_messages (fb->folder, uids, do_resend_messages, fb);
}
@@ -2392,8 +2332,10 @@ search_msg (GtkWidget *widget, gpointer user_data)
if (fb->mail_display->current_message == NULL) {
GtkWidget *dialog;
- dialog = gnome_warning_dialog_parented (_("No Message Selected"), FB_WINDOW (fb));
- gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
+ dialog = gtk_message_dialog_new(FB_WINDOW(fb), GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE,
+ _("No Message Selected"));
+ g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
gtk_widget_show (dialog);
return;
}
@@ -2419,8 +2361,8 @@ save_msg_ok (GtkWidget *widget, gpointer user_data)
CamelFolder *folder;
GPtrArray *uids;
const char *path;
- int fd, ret = 0;
struct stat st;
+ gboolean ret = TRUE;
path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (user_data));
if (path[0] == '\0')
@@ -2429,34 +2371,21 @@ save_msg_ok (GtkWidget *widget, gpointer user_data)
/* make sure we can actually save to it... */
if (stat (path, &st) != -1 && !S_ISREG (st.st_mode))
return;
-
- fd = open (path, O_RDONLY);
- if (fd != -1) {
- GtkWidget *dialog;
- GtkWidget *label;
-
- close (fd);
-
- dialog = gtk_dialog_new_with_buttons (_("Overwrite file?"), GTK_WINDOW (user_data),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_YES, GTK_RESPONSE_YES,
- GTK_STOCK_NO, GTK_RESPONSE_NO,
- NULL);
-
- label = gtk_label_new (_("A file by that name already exists.\nOverwrite it?"));
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, TRUE, TRUE, 4);
- gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE);
- gtk_widget_show (label);
-
- ret = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+
+ if (access(path, F_OK) == 0) {
+ if (access(path, W_OK) != 0) {
+ e_notice(GTK_WINDOW(user_data), GTK_MESSAGE_ERROR,
+ _("Cannot save to `%s'\n %s"), path, g_strerror(errno));
+ return;
+ }
+
+ ret = e_question(GTK_WINDOW(user_data), GTK_RESPONSE_NO, NULL,
+ _("`%s' already exists.\nOverwrite it?"), path);
}
if (ret == GTK_RESPONSE_OK) {
folder = g_object_get_data ((GObject *) user_data, "folder");
- uids = g_object_get_data ((GObject *) user_data, "uids");
- /* FIXME: what's this supposed to become? */
- gtk_object_remove_no_notify (GTK_OBJECT (user_data), "uids");
+ uids = g_object_steal_data (G_OBJECT (user_data), "uids");
mail_save_messages (folder, uids, path, NULL, NULL);
gtk_widget_destroy (GTK_WIDGET (user_data));
}
@@ -2557,46 +2486,20 @@ undelete_msg (GtkWidget *button, gpointer user_data)
static gboolean
confirm_goto_next_folder (FolderBrowser *fb)
{
- GtkWidget *dialog, *label, *checkbox;
- int button;
+ gboolean res, show_again;
if (!mail_config_get_confirm_goto_next_folder ())
return mail_config_get_goto_next_folder ();
-
- dialog = gnome_dialog_new (_("Go to next folder with unread messages?"),
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- NULL);
-
- e_gnome_dialog_set_parent (GNOME_DIALOG (dialog), FB_WINDOW (fb));
-
- label = gtk_label_new (_("There are no more new messages in this folder.\n"
- "Would you like to go to the next folder?"));
-
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
- gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, TRUE, TRUE, 4);
-
- checkbox = gtk_check_button_new_with_label (_("Do not ask me again."));
- g_object_ref((checkbox));
- gtk_widget_show (checkbox);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), checkbox, TRUE, TRUE, 4);
-
- button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)))
- mail_config_set_confirm_goto_next_folder (FALSE);
-
- g_object_unref((checkbox));
-
- if (button == 0) {
- mail_config_set_goto_next_folder (TRUE);
- return TRUE;
- } else {
- mail_config_set_goto_next_folder (FALSE);
- return FALSE;
- }
+
+ /*gtk_window_set_title((GtkWindow *)dialog, _("Go to next folder with unread messages?"));*/
+
+ res = e_question(FB_WINDOW(fb), GTK_RESPONSE_YES, &show_again,
+ _("There are no more new messages in this folder.\n"
+ "Would you like to go to the next folder?"));
+ mail_config_set_confirm_goto_next_folder(show_again);
+ mail_config_set_goto_next_folder (res);
+
+ return res;
}
static CamelFolderInfo *
@@ -2800,45 +2703,19 @@ expunged_folder (CamelFolder *f, void *data)
static gboolean
confirm_expunge (FolderBrowser *fb)
{
- GtkWidget *dialog, *label, *checkbox;
- int button;
-
+ gboolean res, show_again;
+
if (!mail_config_get_confirm_expunge ())
return TRUE;
-
- dialog = gnome_dialog_new (_("Warning"),
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- NULL);
-
- e_gnome_dialog_set_parent (GNOME_DIALOG (dialog), FB_WINDOW (fb));
-
- label = gtk_label_new (_("This operation will permanently erase all messages marked as deleted. If you continue, you will not be able to recover these messages.\n\nReally erase these messages?"));
-
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
- gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, TRUE, TRUE, 4);
-
- checkbox = gtk_check_button_new_with_label (_("Do not ask me again."));
- g_object_ref((checkbox));
- gtk_widget_show (checkbox);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), checkbox, TRUE, TRUE, 4);
-
- /* Set the 'No' button as the default */
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 1);
-
- button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- if (button == 0 && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)))
- mail_config_set_confirm_expunge (FALSE);
-
- g_object_unref((checkbox));
-
- if (button == 0)
- return TRUE;
- else
- return FALSE;
+
+ res = e_question(FB_WINDOW(fb), GTK_RESPONSE_NO, &show_again,
+ _("This operation will permanently erase all messages marked as\n"
+ "deleted. If you continue, you will not be able to recover these messages.\n"
+ "\nReally erase these messages?"));
+
+ mail_config_set_confirm_expunge(show_again);
+
+ return res;
}
void
@@ -2917,16 +2794,9 @@ filter_edit (BonoboUIComponent *uih, void *user_data, const char *path)
g_free (user);
if (((RuleContext *)fc)->error) {
- GtkWidget *dialog;
- char *err;
-
- err = g_strdup_printf (_("Error loading filter information:\n%s"),
- ((RuleContext *)fc)->error);
- dialog = gnome_warning_dialog_parented (err, FB_WINDOW (fb));
- g_free (err);
-
- gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
- gtk_widget_show (dialog);
+ e_notice(FB_WINDOW (fb), GTK_MESSAGE_ERROR,
+ _("Error loading filter information:\n%s"),
+ ((RuleContext *)fc)->error);
return;
}
@@ -3088,10 +2958,8 @@ do_mail_print (FolderBrowser *fb, gboolean preview)
} else {
int result = gnome_print_master_print (print_master);
- if (result == -1){
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Printing of message failed"));
- }
+ if (result == -1)
+ e_notice(FB_WINDOW(fb), GTK_MESSAGE_ERROR, _("Printing of message failed"));
}
/* FIXME: We are leaking the GtkHTML object */
diff --git a/mail/mail-composer-prefs.c b/mail/mail-composer-prefs.c
index 0d8c779750..647552af73 100644
--- a/mail/mail-composer-prefs.c
+++ b/mail/mail-composer-prefs.c
@@ -33,6 +33,7 @@
#include <bonobo/bonobo-generic-factory.h>
#include <gal/widgets/e-gui-utils.h>
+#include <gal/util/e-iconv.h>
#include "widgets/misc/e-charset-picker.h"
@@ -213,7 +214,7 @@ sig_edit (GtkWidget *widget, MailComposerPrefs *prefs)
if (sig->filename && *sig->filename)
mail_signature_editor (sig);
else
- e_notice (GTK_WINDOW (prefs), GNOME_MESSAGE_BOX_ERROR,
+ e_notice (GTK_WINDOW (prefs), GTK_MESSAGE_ERROR,
_("Please specify signature filename\nin Advanced section of signature settings."));
}
diff --git a/mail/mail-composer-prefs.h b/mail/mail-composer-prefs.h
index 8e0086942e..4cf0cf1b2e 100644
--- a/mail/mail-composer-prefs.h
+++ b/mail/mail-composer-prefs.h
@@ -48,10 +48,10 @@ extern "C" {
#include "Spell.h"
#define MAIL_COMPOSER_PREFS_TYPE (mail_composer_prefs_get_type ())
-#define MAIL_COMPOSER_PREFS(o) (GTK_CHECK_CAST ((o), MAIL_COMPOSER_PREFS_TYPE, MailComposerPrefs))
-#define MAIL_COMPOSER_PREFS_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_COMPOSER_PREFS_TYPE, MailComposerPrefsClass))
-#define IS_MAIL_COMPOSER_PREFS(o) (GTK_CHECK_TYPE ((o), MAIL_COMPOSER_PREFS_TYPE))
-#define IS_MAIL_COMPOSER_PREFS_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_COMPOSER_PREFS_TYPE))
+#define MAIL_COMPOSER_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_COMPOSER_PREFS_TYPE, MailComposerPrefs))
+#define MAIL_COMPOSER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_COMPOSER_PREFS_TYPE, MailComposerPrefsClass))
+#define IS_MAIL_COMPOSER_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_COMPOSER_PREFS_TYPE))
+#define IS_MAIL_COMPOSER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_COMPOSER_PREFS_TYPE))
typedef struct _MailComposerPrefs MailComposerPrefs;
typedef struct _MailComposerPrefsClass MailComposerPrefsClass;
diff --git a/mail/mail-config-druid.h b/mail/mail-config-druid.h
index ed9f8d2f76..d739898077 100644
--- a/mail/mail-config-druid.h
+++ b/mail/mail-config-druid.h
@@ -37,10 +37,10 @@ extern "C" {
#include "mail-account-gui.h"
#define MAIL_CONFIG_DRUID_TYPE (mail_config_druid_get_type ())
-#define MAIL_CONFIG_DRUID(o) (GTK_CHECK_CAST ((o), MAIL_CONFIG_DRUID_TYPE, MailConfigDruid))
-#define MAIL_CONFIG_DRUID_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_CONFIG_DRUID_TYPE, MailConfigDruidClass))
-#define MAIL_IS_CONFIG_DRUID(o) (GTK_CHECK_TYPE ((o), MAIL_CONFIG_DRUID_TYPE))
-#define MAIL_IS_CONFIG_DRUID_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_CONFIG_DRUID_TYPE))
+#define MAIL_CONFIG_DRUID(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_CONFIG_DRUID_TYPE, MailConfigDruid))
+#define MAIL_CONFIG_DRUID_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_CONFIG_DRUID_TYPE, MailConfigDruidClass))
+#define MAIL_IS_CONFIG_DRUID(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_CONFIG_DRUID_TYPE))
+#define MAIL_IS_CONFIG_DRUID_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_CONFIG_DRUID_TYPE))
typedef struct {
GtkWindow parent;
diff --git a/mail/mail-display.c b/mail/mail-display.c
index d5c7a6b0fd..88fb1dc6eb 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -358,7 +358,7 @@ launch_cb (GtkWidget *widget, gpointer user_data)
g_return_if_fail (handler != NULL && handler->applications != NULL);
/* Yum. Too bad EPopupMenu doesn't allow per-item closures. */
- children = gtk_container_children (GTK_CONTAINER (widget->parent));
+ children = gtk_container_get_children(GTK_CONTAINER (widget->parent));
g_return_if_fail (children != NULL && children->next != NULL && children->next->next != NULL);
for (c = children->next->next, apps = handler->applications; c && apps; c = c->next, apps = apps->next) {
diff --git a/mail/mail-display.h b/mail/mail-display.h
index c192d818c3..4bb9a3a017 100644
--- a/mail/mail-display.h
+++ b/mail/mail-display.h
@@ -18,10 +18,10 @@
#include "mail-config.h" /*display_style*/
#define MAIL_DISPLAY_TYPE (mail_display_get_type ())
-#define MAIL_DISPLAY(o) (GTK_CHECK_CAST ((o), MAIL_DISPLAY_TYPE, MailDisplay))
-#define MAIL_DISPLAY_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_DISPLAY_TYPE, MailDisplayClass))
-#define IS_MAIL_DISPLAY(o) (GTK_CHECK_TYPE ((o), MAIL_DISPLAY_TYPE))
-#define IS_MAIL_DISPLAY_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_DISPLAY_TYPE))
+#define MAIL_DISPLAY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_DISPLAY_TYPE, MailDisplay))
+#define MAIL_DISPLAY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_DISPLAY_TYPE, MailDisplayClass))
+#define IS_MAIL_DISPLAY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_DISPLAY_TYPE))
+#define IS_MAIL_DISPLAY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_DISPLAY_TYPE))
struct _MailDisplay {
GtkVBox parent;
diff --git a/mail/mail-font-prefs.h b/mail/mail-font-prefs.h
index 05ac80cc3d..14a1d20b40 100644
--- a/mail/mail-font-prefs.h
+++ b/mail/mail-font-prefs.h
@@ -34,10 +34,10 @@ extern "C" {
#include "evolution-config-control.h"
#define MAIL_FONT_PREFS_TYPE (mail_font_prefs_get_type())
-#define MAIL_FONT_PREFS(o) (GTK_CHECK_CAST ((o), MAIL_FONT_PREFS_TYPE, MailFontPrefs))
-#define MAIL_FONT_PREFS_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_FONT_PREFS_TYPE, MailFontPrefsClass))
-#define IS_MAIL_FONT_PREFS(o) (GTK_CHECK_TYPE ((o), MAIL_FONT_PREFS_TYPE))
-#define IS_MAIL_FONT_PREFS_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_FONT_PREFS_TYPE))
+#define MAIL_FONT_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_FONT_PREFS_TYPE, MailFontPrefs))
+#define MAIL_FONT_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_FONT_PREFS_TYPE, MailFontPrefsClass))
+#define IS_MAIL_FONT_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_FONT_PREFS_TYPE))
+#define IS_MAIL_FONT_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_FONT_PREFS_TYPE))
typedef struct _MailFontPrefs MailFontPrefs;
typedef struct _MailFontPrefsClass MailFontPrefsClass;
diff --git a/mail/mail-local.c b/mail/mail-local.c
index 3c73261a7c..c8d80c8a5e 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -1390,7 +1390,7 @@ reconfigure_response(GtkDialog *dialog, int button, struct _reconfigure_msg *m)
menu = gtk_option_menu_get_menu(m->optionlist);
item = gtk_menu_get_active(GTK_MENU(menu));
- m->newtype = g_strdup(g_object_get_data (item, "type"));
+ m->newtype = g_strdup(g_object_get_data ((GObject *)item, "type"));
m->index_body = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m->check_index_body));
gtk_widget_set_sensitive (m->frame, FALSE);
@@ -1509,7 +1509,7 @@ mail_local_reconfigure_folder(const char *uri, void (*done)(const char *uri, Cam
struct _reconfigure_msg *m;
if (strncmp(uri, "file:", 5) != 0) {
- e_notice (NULL, GNOME_MESSAGE_BOX_WARNING,
+ e_notice (NULL, GTK_MESSAGE_WARNING,
_("You cannot change the format of a non-local folder."));
if (done)
done(uri, NULL, done_data);
diff --git a/mail/mail-offline-handler.h b/mail/mail-offline-handler.h
index 4eba1f9fcb..375f374005 100644
--- a/mail/mail-offline-handler.h
+++ b/mail/mail-offline-handler.h
@@ -32,10 +32,10 @@ extern "C" {
#endif /* __cplusplus */
#define MAIL_TYPE_OFFLINE_HANDLER (mail_offline_handler_get_type ())
-#define MAIL_OFFLINE_HANDLER(obj) (GTK_CHECK_CAST ((obj), MAIL_TYPE_OFFLINE_HANDLER, MailOfflineHandler))
-#define MAIL_OFFLINE_HANDLER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), MAIL_TYPE_OFFLINE_HANDLER, MailOfflineHandlerClass))
-#define MAIL_IS_OFFLINE_HANDLER(obj) (GTK_CHECK_TYPE ((obj), MAIL_TYPE_OFFLINE_HANDLER))
-#define MAIL_IS_OFFLINE_HANDLER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), MAIL_TYPE_OFFLINE_HANDLER))
+#define MAIL_OFFLINE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAIL_TYPE_OFFLINE_HANDLER, MailOfflineHandler))
+#define MAIL_OFFLINE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MAIL_TYPE_OFFLINE_HANDLER, MailOfflineHandlerClass))
+#define MAIL_IS_OFFLINE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAIL_TYPE_OFFLINE_HANDLER))
+#define MAIL_IS_OFFLINE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), MAIL_TYPE_OFFLINE_HANDLER))
typedef struct _MailOfflineHandler MailOfflineHandler;
diff --git a/mail/mail-preferences.h b/mail/mail-preferences.h
index f34247b326..10cfc9fb67 100644
--- a/mail/mail-preferences.h
+++ b/mail/mail-preferences.h
@@ -43,10 +43,10 @@ extern "C" {
#include <shell/Evolution.h>
#define MAIL_PREFERENCES_TYPE (mail_preferences_get_type ())
-#define MAIL_PREFERENCES(o) (GTK_CHECK_CAST ((o), MAIL_PREFERENCES_TYPE, MailPreferences))
-#define MAIL_PREFERENCES_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_PREFERENCES_TYPE, MailPreferencesClass))
-#define IS_MAIL_PREFERENCES(o) (GTK_CHECK_TYPE ((o), MAIL_PREFERENCES_TYPE))
-#define IS_MAIL_PREFERENCES_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_PREFERENCES_TYPE))
+#define MAIL_PREFERENCES(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_PREFERENCES_TYPE, MailPreferences))
+#define MAIL_PREFERENCES_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_PREFERENCES_TYPE, MailPreferencesClass))
+#define IS_MAIL_PREFERENCES(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_PREFERENCES_TYPE))
+#define IS_MAIL_PREFERENCES_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_PREFERENCES_TYPE))
typedef struct _MailPreferences MailPreferences;
typedef struct _MailPreferencesClass MailPreferencesClass;
diff --git a/mail/mail-search-dialogue.h b/mail/mail-search-dialogue.h
index fc5ff3349e..32793c0fd5 100644
--- a/mail/mail-search-dialogue.h
+++ b/mail/mail-search-dialogue.h
@@ -27,9 +27,9 @@
#include "filter/rule-context.h"
#include "filter/filter-rule.h"
-#define MAIL_SEARCH_DIALOGUE(obj) GTK_CHECK_CAST (obj, mail_search_dialogue_get_type (), MailSearchDialogue)
-#define MAIL_SEARCH_DIALOGUE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, mail_search_dialogue_get_type (), MailSearchDialogueClass)
-#define IS_MAIL_SEARCH_DIALOGUE(obj) GTK_CHECK_TYPE (obj, mail_search_dialogue_get_type ())
+#define MAIL_SEARCH_DIALOGUE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mail_search_dialogue_get_type (), MailSearchDialogue)
+#define MAIL_SEARCH_DIALOGUE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mail_search_dialogue_get_type (), MailSearchDialogueClass)
+#define IS_MAIL_SEARCH_DIALOGUE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, mail_search_dialogue_get_type ())
typedef struct _MailSearchDialogue MailSearchDialogue;
typedef struct _MailSearchDialogueClass MailSearchDialogueClass;
diff --git a/mail/mail-search.h b/mail/mail-search.h
index 38e501cc50..590fabb1ba 100644
--- a/mail/mail-search.h
+++ b/mail/mail-search.h
@@ -36,10 +36,10 @@ extern "C" {
#include "mail-display.h"
#define MAIL_SEARCH_TYPE (mail_search_get_type ())
-#define MAIL_SEARCH(o) (GTK_CHECK_CAST ((o), MAIL_SEARCH_TYPE, MailSearch))
-#define MAIL_SEARCH_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), MAIL_SEARCH_TYPE, MailSearch))
-#define IS_MAIL_SEARCH(o) (GTK_CHECK_TYPE ((o), MAIL_SEARCH_TYPE))
-#define IS_MAIL_SEARCH_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_SEARCH_TYPE))
+#define MAIL_SEARCH(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_SEARCH_TYPE, MailSearch))
+#define MAIL_SEARCH_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_SEARCH_TYPE, MailSearch))
+#define IS_MAIL_SEARCH(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_SEARCH_TYPE))
+#define IS_MAIL_SEARCH_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_SEARCH_TYPE))
typedef struct _MailSearch MailSearch;
typedef struct _MailSearchClass MailSearchClass;
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 3d9e56f659..fc8b05a750 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -359,7 +359,7 @@ build_dialogue (GSList *sources, CamelFolder *outbox, const char *destination)
status_label = (GtkLabel *)gtk_label_new ((info->type == SEND_UPDATE) ? _("Updating...") :
_("Waiting..."));
- /* gtk_object_set (data->label, "bold", TRUE, NULL); */
+ /* g_object_set(data->label, "bold", TRUE, NULL); */
gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
gtk_misc_set_alignment (GTK_MISC (status_label), 0, .5);
@@ -558,11 +558,8 @@ receive_done (char *uri, void *data)
info->data->infos = g_list_remove(info->data->infos, info);
if (g_hash_table_size(info->data->active) == 0) {
- /* FIXME: check this is right ... was gnome_dialog_close() */
- if (info->data->gd) {
+ if (info->data->gd)
gtk_widget_destroy((GtkWidget *)info->data->gd);
- g_object_unref(info->data->gd);
- }
free_send_data();
}
diff --git a/mail/mail-session.c b/mail/mail-session.c
index c338ad3e63..8858af01f5 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -264,87 +264,6 @@ request_password(struct _pass_msg *m)
gtk_widget_show(m->check);
}
-#if 0
-
- /* FIXME: Remove this total snot */
-
- /* assume we can use any widget to translate string for display */
- check_label = gtk_label_new ("");
- title = e_utf8_to_gtk_string (GTK_WIDGET (check_label), m->prompt);
- password_dialogue = (GnomeDialog *)dialogue = gnome_request_dialog (m->secret, title, NULL, 0, pass_got, m, NULL);
- g_free(title);
- password_destroy_id = g_signal_connect (dialogue, "destroy", request_password_deleted, m);
-
- check = gtk_check_button_new ();
- gtk_misc_set_alignment (GTK_MISC (check_label), 0.0, 0.5);
- accel_key = gtk_label_parse_uline (GTK_LABEL (check_label),
- m->service_url ? _("_Remember this password") :
- _("_Remember this password for the remainder of this session"));
- gtk_widget_add_accelerator (check, "clicked",
- GNOME_DIALOG (password_dialogue)->accelerators,
- accel_key,
- GDK_MOD1_MASK, 0);
- gtk_container_add (GTK_CONTAINER (check), check_label);
-
- show = TRUE;
-
- if (m->service_url) {
- mca = mail_config_get_account_by_source_url(m->service_url);
- if (mca)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), mca->source->save_passwd);
- else {
- mca = mail_config_get_account_by_transport_url (m->service_url);
- if (mca)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), mca->transport->save_passwd);
- else {
- d(printf ("Cannot figure out which account owns URL \"%s\"\n", m->service_url));
- show = FALSE;
- }
- }
- }
-
- if (show)
- gtk_widget_show_all (check);
-
- /* do some dirty stuff to put the checkbutton after the entry */
- entry = NULL;
- children = gtk_container_children (GTK_CONTAINER (GNOME_DIALOG (dialogue)->vbox));
- for (iter = children; iter; iter = iter->next) {
- if (GTK_IS_ENTRY (iter->data)) {
- entry = GTK_WIDGET (iter->data);
- break;
- }
- }
- g_list_free (children);
-
- if (entry) {
- g_object_ref((entry));
- gtk_container_remove (GTK_CONTAINER (GNOME_DIALOG (dialogue)->vbox), entry);
- }
-
- gtk_box_pack_end (GTK_BOX (GNOME_DIALOG (dialogue)->vbox), check, TRUE, FALSE, 0);
-
- if (entry) {
- gtk_box_pack_end (GTK_BOX (GNOME_DIALOG (dialogue)->vbox), entry, TRUE, FALSE, 0);
- gtk_widget_grab_focus (entry);
- g_object_unref((entry));
- }
-
- m->check = check;
-
- if (mca) {
- char *name;
-
- name = e_utf8_to_gtk_string (GTK_WIDGET (dialogue), mca->name);
- title = g_strdup_printf (_("Enter Password for %s"), name);
- g_free (name);
- } else
- title = g_strdup (_("Enter Password"));
-
- gtk_window_set_title (GTK_WINDOW (dialogue), title);
- g_free (title);
-#endif
-
if (m->ismain)
gtk_dialog_run(password_dialogue);
else
diff --git a/mail/mail-signature-editor.c b/mail/mail-signature-editor.c
index 96921aa23d..cc53d9e5f3 100644
--- a/mail/mail-signature-editor.c
+++ b/mail/mail-signature-editor.c
@@ -77,7 +77,7 @@ menu_file_save_error (BonoboUIComponent *uic, CORBA_Environment *ev)
err = ev->_major != CORBA_NO_EXCEPTION ? bonobo_exception_get_text (ev) : g_strerror (errno);
- e_notice (GTK_WINDOW (uic), GNOME_MESSAGE_BOX_ERROR,
+ e_notice (GTK_WINDOW (uic), GTK_MESSAGE_ERROR,
_("Could not save signature file: %s"), err);
g_warning ("Exception while saving signature: %s", err);
diff --git a/mail/mail-summary.c b/mail/mail-summary.c
index 5e3aaa1161..2c42c01fb5 100644
--- a/mail/mail-summary.c
+++ b/mail/mail-summary.c
@@ -496,10 +496,10 @@ create_summary_view (ExecutiveSummaryComponentFactory *_factory,
#ifdef DETECT_NEW_VFOLDERS
summary->listener = evolution_storage_listener_new ();
- gtk_signal_connect (GTK_OBJECT (summary->listener), "new_folder",
- GTK_SIGNAL_FUNC (new_folder_cb), summary);
- gtk_signal_connect (GTK_OBJECT (summary->listener), "removed_folder",
- GTK_SIGNAL_FUNC (removed_folder_cb), summary);
+ g_signal_connect((summary->listener), "new_folder",
+ G_CALLBACK (new_folder_cb), summary);
+ g_signal_connect((summary->listener), "removed_folder",
+ G_CALLBACK (removed_folder_cb), summary);
corba_object = evolution_storage_listener_corba_objref (summary->listener);
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 1ee161580a..491fc172a2 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -864,7 +864,7 @@ vfolder_edit_rule(const char *uri)
g_signal_connect(gd, "response", G_CALLBACK(edit_rule_response), NULL);
gtk_widget_show((GtkWidget *)gd);
} else {
- e_notice (NULL, GNOME_MESSAGE_BOX_WARNING,
+ e_notice (NULL, GTK_MESSAGE_WARNING,
_("Trying to edit a vfolder '%s' which doesn't exist."), uri);
}
@@ -877,7 +877,7 @@ new_rule_clicked(GtkWidget *w, int button, void *data)
{
if (button == GTK_RESPONSE_OK) {
char *user;
- FilterRule *rule = gtk_object_get_data((GtkObject *)w, "rule");
+ FilterRule *rule = g_object_get_data((GObject *)w, "rule");
g_object_ref(rule);
rule_context_add_rule((RuleContext *)context, rule);
diff --git a/mail/message-browser.h b/mail/message-browser.h
index 15dd75c30e..ebd50c07bc 100644
--- a/mail/message-browser.h
+++ b/mail/message-browser.h
@@ -32,10 +32,10 @@
#include "mail-types.h"
#define MESSAGE_BROWSER_TYPE (message_browser_get_type ())
-#define MESSAGE_BROWSER(o) (GTK_CHECK_CAST ((o), MESSAGE_BROWSER_TYPE, MessageBrowser))
-#define MESSAGE_BROWSER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MESSAGE_BROWSER_TYPE, MessageBrowserClass))
-#define IS_MESSAGE_BROWSER(o) (GTK_CHECK_TYPE ((o), MESSAGE_BROWSER_TYPE))
-#define IS_MESSAGE_BROWSER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MESSAGE_BROWSER_TYPE))
+#define MESSAGE_BROWSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MESSAGE_BROWSER_TYPE, MessageBrowser))
+#define MESSAGE_BROWSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MESSAGE_BROWSER_TYPE, MessageBrowserClass))
+#define IS_MESSAGE_BROWSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MESSAGE_BROWSER_TYPE))
+#define IS_MESSAGE_BROWSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MESSAGE_BROWSER_TYPE))
struct _MessageBrowser {
BonoboWindow parent;
diff --git a/mail/message-list.h b/mail/message-list.h
index dd57d69d1d..de152cec2e 100644
--- a/mail/message-list.h
+++ b/mail/message-list.h
@@ -10,10 +10,10 @@
#include "mail-types.h"
#define MESSAGE_LIST_TYPE (message_list_get_type ())
-#define MESSAGE_LIST(o) (GTK_CHECK_CAST ((o), MESSAGE_LIST_TYPE, MessageList))
-#define MESSAGE_LIST_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MESSAGE_LIST_TYPE, MessageListClass))
-#define IS_MESSAGE_LIST(o) (GTK_CHECK_TYPE ((o), MESSAGE_LIST_TYPE))
-#define IS_MESSAGE_LIST_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MESSAGE_LIST_TYPE))
+#define MESSAGE_LIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MESSAGE_LIST_TYPE, MessageList))
+#define MESSAGE_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MESSAGE_LIST_TYPE, MessageListClass))
+#define IS_MESSAGE_LIST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MESSAGE_LIST_TYPE))
+#define IS_MESSAGE_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MESSAGE_LIST_TYPE))
enum {
COL_MESSAGE_STATUS,
diff --git a/mail/message-tag-editor.h b/mail/message-tag-editor.h
index 01d6b0c052..92c4364b0f 100644
--- a/mail/message-tag-editor.h
+++ b/mail/message-tag-editor.h
@@ -34,9 +34,9 @@ extern "C" {
#pragma }
#endif /* __cplusplus */
-#define MESSAGE_TAG_EDITOR(obj) GTK_CHECK_CAST (obj, message_tag_editor_get_type (), MessageTagEditor)
-#define MESSAGE_TAG_EDITOR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, message_tag_editor_get_type (), MessageTagEditorClass)
-#define IS_MESSAGE_TAG_EDITOR(obj) GTK_CHECK_TYPE (obj, message_tag_editor_get_type ())
+#define MESSAGE_TAG_EDITOR(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, message_tag_editor_get_type (), MessageTagEditor)
+#define MESSAGE_TAG_EDITOR_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, message_tag_editor_get_type (), MessageTagEditorClass)
+#define IS_MESSAGE_TAG_EDITOR(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, message_tag_editor_get_type ())
typedef struct _MessageTagEditor MessageTagEditor;
typedef struct _MessageTagEditorClass MessageTagEditorClass;
diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c
index 861742f16d..19b6ff78df 100644
--- a/mail/message-tag-followup.c
+++ b/mail/message-tag-followup.c
@@ -237,7 +237,9 @@ construct (MessageTagEditor *editor)
GList *strings;
GladeXML *gui;
int i;
-
+ GtkListStore *model;
+ GtkCellRenderer *text;
+
gtk_window_set_title (GTK_WINDOW (editor), _("Flag to Follow Up"));
gnome_window_icon_set_from_file (GTK_WINDOW (editor), EVOLUTION_IMAGES "/flag-for-followup-16.png");
@@ -249,10 +251,20 @@ construct (MessageTagEditor *editor)
gtk_widget_reparent (widget, GTK_DIALOG (editor)->vbox);
widget = glade_xml_get_widget (gui, "pixmap");
- gnome_pixmap_load_file (GNOME_PIXMAP (widget), EVOLUTION_GLADEDIR "/flag-for-followup-48.png");
-
- followup->message_list = GTK_CLIST (glade_xml_get_widget (gui, "message_list"));
-
+ gtk_image_set_from_file ((GtkImage *)widget, EVOLUTION_GLADEDIR "/flag-for-followup-48.png");
+
+ followup->message_list = GTK_TREE_VIEW (glade_xml_get_widget (gui, "message_list"));
+ model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
+ gtk_tree_view_set_model (followup->message_list, (GtkTreeModel *) model);
+ gtk_tree_view_insert_column_with_attributes(followup->message_list, -1, _("From"),
+ (text = gtk_cell_renderer_text_new()),
+ "text", 0,
+ NULL);
+ gtk_tree_view_insert_column_with_attributes(followup->message_list, -1, _("Subject"),
+ text,
+ "text", 1,
+ NULL);
+
followup->combo = GTK_COMBO (glade_xml_get_widget (gui, "combo"));
gtk_combo_set_case_sensitive (followup->combo, FALSE);
strings = NULL;
@@ -263,6 +275,8 @@ construct (MessageTagEditor *editor)
gtk_list_select_item (GTK_LIST (followup->combo->list), DEFAULT_FLAG);
followup->target_date = E_DATE_EDIT (glade_xml_get_widget (gui, "target_date"));
+ /* glade bug, need to show this ourselves */
+ gtk_widget_show((GtkWidget *)followup->target_date);
e_date_edit_set_time (followup->target_date, (time_t) -1);
followup->completed = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "completed"));
@@ -290,13 +304,13 @@ message_tag_followup_append_message (MessageTagFollowUp *editor,
const char *from,
const char *subject)
{
- char *text[3];
-
+ GtkTreeIter iter;
+ GtkListStore *model;
+
g_return_if_fail (IS_MESSAGE_TAG_FOLLOWUP (editor));
-
- text[0] = (char *)from;
- text[1] = (char *)subject;
- text[2] = NULL;
-
- gtk_clist_append (editor->message_list, text);
+
+ model = (GtkListStore *)gtk_tree_view_get_model(editor->message_list);
+
+ gtk_list_store_append (model, &iter);
+ gtk_list_store_set(model, &iter, 0, from, 1, subject, -1);
}
diff --git a/mail/message-tag-followup.h b/mail/message-tag-followup.h
index 025e3d4cba..ef75cd68bb 100644
--- a/mail/message-tag-followup.h
+++ b/mail/message-tag-followup.h
@@ -37,9 +37,9 @@ extern "C" {
#endif /* __cplusplus */
#define MESSAGE_TAG_FOLLOWUP_TYPE (message_tag_followup_get_type ())
-#define MESSAGE_TAG_FOLLOWUP(obj) (GTK_CHECK_CAST (obj, MESSAGE_TAG_FOLLOWUP_TYPE, MessageTagFollowUp))
-#define MESSAGE_TAG_FOLLOWUP_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, MESSAGE_TAG_FOLLOWUP_TYPE, MessageTagFollowUpClass))
-#define IS_MESSAGE_TAG_FOLLOWUP(obj) (GTK_CHECK_TYPE (obj, MESSAGE_TAG_FOLLOWUP_TYPE))
+#define MESSAGE_TAG_FOLLOWUP(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, MESSAGE_TAG_FOLLOWUP_TYPE, MessageTagFollowUp))
+#define MESSAGE_TAG_FOLLOWUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, MESSAGE_TAG_FOLLOWUP_TYPE, MessageTagFollowUpClass))
+#define IS_MESSAGE_TAG_FOLLOWUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, MESSAGE_TAG_FOLLOWUP_TYPE))
typedef struct _MessageTagFollowUp MessageTagFollowUp;
typedef struct _MessageTagFollowUpClass MessageTagFollowUpClass;
@@ -47,7 +47,7 @@ typedef struct _MessageTagFollowUpClass MessageTagFollowUpClass;
struct _MessageTagFollowUp {
MessageTagEditor parent;
- GtkCList *message_list;
+ GtkTreeView *message_list;
GtkCombo *combo;
diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c
index 2b94afb0f8..c8ef917c5e 100644
--- a/mail/subscribe-dialog.c
+++ b/mail/subscribe-dialog.c
@@ -1547,7 +1547,7 @@ populate_store_list (SubscribeDialog *sc)
sc->priv->none_item = gtk_menu_item_new_with_label (_("No server has been selected"));
g_signal_connect(sc->priv->none_item, "activate", G_CALLBACK(dummy_item_selected), sc);
gtk_widget_show (sc->priv->none_item);
- gtk_menu_prepend (GTK_MENU (menu), sc->priv->none_item);
+ gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), sc->priv->none_item);
gtk_widget_show (menu);
diff --git a/mail/subscribe-dialog.h b/mail/subscribe-dialog.h
index 537a4d73ce..c2e6b3d46f 100644
--- a/mail/subscribe-dialog.h
+++ b/mail/subscribe-dialog.h
@@ -35,10 +35,10 @@
#include "camel/camel-store.h"
#define SUBSCRIBE_DIALOG_TYPE (subscribe_dialog_get_type ())
-#define SUBSCRIBE_DIALOG(o) (GTK_CHECK_CAST ((o), SUBSCRIBE_DIALOG_TYPE, SubscribeDialog))
-#define SUBSCRIBE_DIALOG_CLASS(k) (GTK_CHECK_CLASS_CAST((k), SUBSCRIBE_DIALOG_TYPE, SubscribeDialogClass))
-#define IS_SUBSCRIBE_DIALOG(o) (GTK_CHECK_TYPE ((o), SUBSCRIBE_DIALOG_TYPE))
-#define IS_SUBSCRIBE_DIALOG_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SUBSCRIBE_DIALOG_TYPE))
+#define SUBSCRIBE_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SUBSCRIBE_DIALOG_TYPE, SubscribeDialog))
+#define SUBSCRIBE_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), SUBSCRIBE_DIALOG_TYPE, SubscribeDialogClass))
+#define IS_SUBSCRIBE_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SUBSCRIBE_DIALOG_TYPE))
+#define IS_SUBSCRIBE_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SUBSCRIBE_DIALOG_TYPE))
typedef struct _SubscribeDialogPrivate SubscribeDialogPrivate;