From 9e4f25d532f59d85034cbef768bb941f748fb1f2 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 13 Nov 2002 04:40:07 +0000 Subject: Added to cvs. Currently contains no configurable stuff, but maybe it will 2002-11-13 Not Zed * GNOME_Evolution_Mail.server.in.in: Added to cvs. Currently contains no configurable stuff, but maybe it will one day. * Makefile.am (server_DATA): change oaf stuff to server stuff for bonobo activation. * mail-preferences.c (mail_preferences_apply): handle const entry text. * mail-composer-prefs.c (url_requested): Fixed typo. (mail_composer_prefs_construct): gnomepixmap->gtkimage. * mail-callbacks.c (configure_mail): destroy dialogue before dealing with response. (mail_generate_reply): Fix a typo. (popup_listener_cb): fix prototype. (tag_editor_response): Handle gtk dialog response. (flag_for_followup): Change gnome dialog to gtk dialog stuff. (tag_editor_destroy_cb): (tag_editor_cancel): (tag_editor_ok): Removed, handled in _response(). (filter_editor_response): renamed from _clicked, handle gtk dialogue signal. (filter_editor_destroy): Removed. (footer_info_new): gnome font api changes. (do_mail_print): port to gnome print 2. * mail-autofilter.c (mail_filter_delete_uri): message_dialog uses a specific button enum, not the stock ones. * mail-accounts.c (mail_accounts_tab_get_type): gobjectify. (account_delete_clicked): gdkdialogise. * mail-account-gui.c (mail_account_gui_setup): Hack around font metric determination code. * mail-account-editor.c (mail_account_editor_get_type): gobjectise. (mail_account_editor_new): "" * folder-info.c (evolution_folder_info_notify_ready): use pbclient interface. * folder-browser-factory.c (control_destroy_cb): fix a typo. (folder_browser_factory_new_control): More typos. * folder-browser.c (on_right_click): cast around const warning. (context_menu_position_func): fix for api change. * e-searching-tokenizer.c (e_searching_tokenizer_finalise): Changed from destroy since it only frees memory. (e_searching_tokenizer_get_type): glibify. * component-factory.c (request_quit): gtkdialogise. (send_receive_cb): " (create_component): gdk_pixbuf api. (component_factory_init): bonobo activation stuff. (warning_response): renamed from warning_clicked. (owner_set_cb): gtkdialogise. svn path=/trunk/; revision=18731 --- mail/mail-composer-prefs.c | 52 +++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'mail/mail-composer-prefs.c') diff --git a/mail/mail-composer-prefs.c b/mail/mail-composer-prefs.c index 35d5670ee7..c6e03f6860 100644 --- a/mail/mail-composer-prefs.c +++ b/mail/mail-composer-prefs.c @@ -25,6 +25,8 @@ #include #endif +#include + #include "mail-composer-prefs.h" #include "composer/e-msg-composer.h" @@ -125,7 +127,7 @@ attach_style_info (GtkWidget *item, gpointer user_data) { int *style = user_data; - g_object_set_data((item), "style", GINT_TO_POINTER (*style)); + g_object_set_data((GObject *)(item), "style", GINT_TO_POINTER (*style)); (*style)++; } @@ -370,9 +372,8 @@ static void url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle) { GtkHTMLStreamStatus status; - char buf[1 << 7]; + char buf[128]; ssize_t size; - char *buf; int fd; if (!strncmp (url, "file:", 5)) @@ -679,7 +680,7 @@ spell_language_button_press (GtkWidget *widget, GdkEventButton *event, MailCompo GdkPixmap *pmap = NULL; GdkBitmap *bmap; - g_signal_emission_stop_by_name (widget, "button_press_event"); + g_signal_stop_emission_by_name (widget, "button_press_event"); gtk_clist_get_pixmap (GTK_CLIST (prefs->language), row, 0, &pmap, &bmap); if (pmap) @@ -731,20 +732,17 @@ spell_setup (MailComposerPrefs *prefs) static gboolean spell_setup_check_options (MailComposerPrefs *prefs) { - BonoboObjectClient *dictionary_client; GNOME_Spell_Dictionary dict; CORBA_Environment ev; char *dictionary_id; - + dictionary_id = "OAFIID:GNOME_Spell_Dictionary:" SPELL_API_VERSION; - dictionary_client = bonobo_object_activate (dictionary_id, 0); - - if (!dictionary_client) { + dict = bonobo_activation_activate_from_id(dictionary_id, 0, NULL, NULL); + if (dict == CORBA_OBJECT_NIL) { g_warning ("Cannot activate %s", dictionary_id); return FALSE; } - dict = bonobo_object_corba_objref (BONOBO_OBJECT (dictionary_client)); CORBA_exception_init (&ev); prefs->language_seq = GNOME_Spell_Dictionary_getLanguages (dict, &ev); @@ -779,7 +777,7 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs) gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "composer_tab", NULL); prefs->gui = gui; - prefs->sig_script_gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "vbox_add_script_signature"); + prefs->sig_script_gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "vbox_add_script_signature", NULL); /* get our toplevel widget */ toplevel = glade_xml_get_widget (gui, "toplevel"); @@ -795,36 +793,35 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs) /* Default Behavior */ prefs->send_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkSendHTML")); gtk_toggle_button_set_active (prefs->send_html, mail_config_get_send_html ()); - g_signal_connect (prefs->send_html, "toggled", - toggle_button_toggled, prefs); + g_signal_connect (prefs->send_html, "toggled", G_CALLBACK(toggle_button_toggled), prefs); prefs->auto_smileys = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkAutoSmileys")); - g_signal_connect (prefs->auto_smileys, "toggled", - toggle_button_toggled, prefs); + g_signal_connect (prefs->auto_smileys, "toggled", G_CALLBACK(toggle_button_toggled), prefs); prefs->prompt_empty_subject = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptEmptySubject")); gtk_toggle_button_set_active (prefs->prompt_empty_subject, mail_config_get_prompt_empty_subject ()); - g_signal_connect (prefs->prompt_empty_subject, "toggled", - toggle_button_toggled, prefs); + g_signal_connect (prefs->prompt_empty_subject, "toggled", G_CALLBACK(toggle_button_toggled), prefs); prefs->prompt_bcc_only = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptBccOnly")); gtk_toggle_button_set_active (prefs->prompt_bcc_only, mail_config_get_prompt_only_bcc ()); - g_signal_connect (prefs->prompt_bcc_only, "toggled", - toggle_button_toggled, prefs); + g_signal_connect (prefs->prompt_bcc_only, "toggled", G_CALLBACK(toggle_button_toggled), prefs); prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset")); menu = e_charset_picker_new (mail_config_get_default_charset ()); gtk_option_menu_set_menu (prefs->charset, GTK_WIDGET (menu)); option_menu_connect (prefs->charset, prefs); - + +#warning "gtkhtml prop manager" +#if 0 /* Spell Checking: GtkHTML part */ prefs->pman = GTK_HTML_PROPMANAGER (gtk_html_propmanager_new (NULL)); - g_signal_connect (prefs->pman, "changed", toggle_button_toggled, prefs); + g_signal_connect (prefs->pman, "changed", G_CALLBACK(toggle_button_toggled), prefs); g_object_ref((prefs->pman)); gtk_html_propmanager_set_names (prefs->pman, names); gtk_html_propmanager_set_gui (prefs->pman, gui, NULL); - +#endif + /* Spell Checking: GNOME Spell part */ prefs->colour = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerSpellCheckColor")); prefs->language = GTK_CLIST (glade_xml_get_widget (gui, "clistSpellCheckLanguage")); @@ -832,7 +829,7 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs) info_pixmap = glade_xml_get_widget (gui, "pixmapSpellInfo"); gtk_clist_set_column_justification (prefs->language, 0, GTK_JUSTIFY_RIGHT); gtk_clist_set_column_auto_resize (prefs->language, 0, TRUE); - gnome_pixmap_load_file (GNOME_PIXMAP (info_pixmap), EVOLUTION_IMAGES "/info-bulb.png"); + gtk_image_set_from_file(GTK_IMAGE (info_pixmap), EVOLUTION_IMAGES "/info-bulb.png"); if (!spell_setup_check_options (prefs)) { gtk_widget_hide (GTK_WIDGET (prefs->colour)); @@ -867,7 +864,7 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs) prefs->sig_add = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureAdd")); g_signal_connect (prefs->sig_add, "clicked", G_CALLBACK (sig_add), prefs); - glade_xml_signal_connect_data (gui, "cmdSignatureAddScriptClicked", sig_add_script, prefs); + glade_xml_signal_connect_data (gui, "cmdSignatureAddScriptClicked", G_CALLBACK(sig_add_script), prefs); prefs->sig_edit = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureEdit")); g_signal_connect (prefs->sig_edit, "clicked", G_CALLBACK (sig_edit), prefs); @@ -932,18 +929,21 @@ mail_composer_prefs_apply (MailComposerPrefs *prefs) } /* Spell Checking */ +#warning "gtkhtml propmanager" +#if 0 gtk_html_propmanager_apply (prefs->pman); +#endif spell_apply (prefs); /* Forwards and Replies */ menu = gtk_option_menu_get_menu (prefs->forward_style); item = gtk_menu_get_active (GTK_MENU (menu)); - val = GPOINTER_TO_INT (g_object_get_data((item), "style")); + val = GPOINTER_TO_INT (g_object_get_data((GObject *)item, "style")); mail_config_set_default_forward_style (val); menu = gtk_option_menu_get_menu (prefs->reply_style); item = gtk_menu_get_active (GTK_MENU (menu)); - val = GPOINTER_TO_INT (g_object_get_data((item), "style")); + val = GPOINTER_TO_INT (g_object_get_data((GObject *)item, "style")); mail_config_set_default_reply_style (val); /* Keyboard Shortcuts */ -- cgit