aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog61
-rw-r--r--mail/GNOME_Evolution_Mail.server.in.in309
-rw-r--r--mail/Makefile.am59
-rw-r--r--mail/component-factory.c104
-rw-r--r--mail/e-searching-tokenizer.c38
-rw-r--r--mail/e-searching-tokenizer.h10
-rw-r--r--mail/folder-browser-factory.c18
-rw-r--r--mail/folder-browser-ui.c17
-rw-r--r--mail/folder-browser.c14
-rw-r--r--mail/folder-info.c12
-rw-r--r--mail/mail-account-editor.c31
-rw-r--r--mail/mail-account-gui.c98
-rw-r--r--mail/mail-accounts.c115
-rw-r--r--mail/mail-autofilter.c3
-rw-r--r--mail/mail-callbacks.c198
-rw-r--r--mail/mail-composer-prefs.c52
-rw-r--r--mail/mail-composer-prefs.h6
-rw-r--r--mail/mail-config-factory.c9
-rw-r--r--mail/mail-preferences.c73
-rw-r--r--mail/mail-preferences.h5
20 files changed, 783 insertions, 449 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 178e0c81f4..8677d2f58d 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,64 @@
+2002-11-13 Not Zed <NotZed@Ximian.com>
+
+ * 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.
+
2002-11-12 Jeffrey Stedfast <fejj@ximian.com>
* Makefile.am: Added files I've ported.
diff --git a/mail/GNOME_Evolution_Mail.server.in.in b/mail/GNOME_Evolution_Mail.server.in.in
new file mode 100644
index 0000000000..4d6f4ea33a
--- /dev/null
+++ b/mail/GNOME_Evolution_Mail.server.in.in
@@ -0,0 +1,309 @@
+<oaf_info>
+
+ <!-- Folder display control -->
+
+ <!-- (control) -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Control"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_Mail_ControlFactory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:BonoboControl/evolution-mail:1.0"/>
+ <item value="IDL:GNOME/Control:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ _value="Evolution mail folder display component."/>
+ </oaf_server>
+
+ <!-- (factory) -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ControlFactory"
+ type="exe"
+ location="evolution-mail">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/ObjectFactory:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ _value="Evolution mail folder factory component."/>
+ </oaf_server>
+
+ <!-- Shell Component -->
+
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ShellComponent"
+ type="exe"
+ location="evolution-mail">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Evolution/ShellComponent:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ _value="Evolution component for handling mail."/>
+
+ <oaf_attribute name="evolution:shell_component_icon" type="string"
+ value="evolution-inbox.png"/>
+ <oaf_attribute name="evolution:shell_component_launch_order" type="number"
+ value="1"/>
+ </oaf_server>
+
+ <!-- Summary component, for showing info in the summary -->
+
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponentFactory"
+ type="exe"
+ location="evolution-mail">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ _value="Factory for the Mail Summary component."/>
+ </oaf_server>
+
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponent"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponentFactory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Evolution:Summary:ComponentFactory:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ _value="Evolution mail executive summary component."/>
+ </oaf_server>
+
+ <!-- Message composer -->
+
+ <!-- (factory) -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ComposerFactory"
+ type="exe"
+ location="evolution-mail">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ _value="Factory for the Evolution composer."/>
+ </oaf_server>
+
+ <!-- (composer) -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Composer"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_Mail_ComposerFactory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Evolution:Composer:1.0"/>
+ <item value="IDL:Bonobo/ItemContainer:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ _value="Evolution mail composer."/>
+ </oaf_server>
+
+ <!-- Config Wizard interface -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_MailConfig_Factory"
+ type="exe"
+ location="evolution-mail">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+ </oaf_server>
+
+ <oaf_server iid="OAFIID:GNOME_Evolution_MailConfig"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_MailConfig_Factory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Evolution/MailConfig:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ _value="Mail configuration interface"/>
+ </oaf_server>
+
+ <!-- MailConfig interface -->
+
+ <!-- (factory) -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_MailConfig_Factory"
+ type="exe"
+ location="evolution-mail">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+ </oaf_server>
+
+ <!-- (interface) -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_MailConfig"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_MailConfig_Factory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Evolution/MailConfig:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ _value="Mail configuration interface"/>
+ </oaf_server>
+
+ <!-- FolderInfo interface -->
+
+ <!-- (factory) -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_FolderInfo_Factory"
+ type="exe"
+ location="evolution-mail">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+ </oaf_server>
+
+ <!-- (interface) -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_FolderInfo"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_FolderInfo_Factory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Evolution/FolderInfo:1.0"/>
+ </oaf_attribute>
+ </oaf_server>
+
+ <!-- Startup Wizard -->
+
+ <!-- (factory) -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Wizard_Factory"
+ type="exe"
+ location="evolution-mail">
+ </oaf_server>
+
+ <!-- (wizard) -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Wizard"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_Mail_Wizard_Factory">
+ </oaf_server>
+
+
+ <!-- Configuration pages -->
+
+ <!-- (factory) -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ConfigControlFactory"
+ type="exe"
+ location="evolution-mail">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+ </oaf_server>
+
+ <!-- Account Editor -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Accounts_ConfigControl"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_Mail_ConfigControlFactory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Evolution/ConfigControl:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="evolution:config_item:title" type="string"
+ _value="Mail Accounts"/>
+
+ <oaf_attribute name="evolution:config_item:description" type="string"
+ _value="Configure your email accounts here"/>
+
+ <oaf_attribute name="evolution:config_item:icon_name" type="string"
+ value="mail-accounts-settings.png"/>
+
+ <oaf_attribute name="evolution:config_item:type" type="stringv">
+ <item value="mail"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="evolution:config_item:priority" type="string" value="-10"/>
+
+ <oaf_attribute name="description" type="string"
+ _value="Configuration control for the Evolution Mail Accounts."/>
+
+ </oaf_server>
+
+ <!-- Mail Preferences -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Preferences_ConfigControl"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_Mail_ConfigControlFactory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Evolution/ConfigControl:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="evolution:config_item:title" type="string"
+ _value="Mail Preferences"/>
+
+ <oaf_attribute name="evolution:config_item:description" type="string"
+ _value="Configure mail preferences, including security and message display, here"/>
+
+ <oaf_attribute name="evolution:config_item:icon_name" type="string"
+ value="mail-config-druid.png"/>
+
+ <oaf_attribute name="evolution:config_item:priority" type="string" value="-9"/>
+
+ <oaf_attribute name="description" type="string"
+ _value="Configuration control for the Evolution Mailer."/>
+
+ </oaf_server>
+
+ <!-- Font Preferences -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_FontPrefs_ConfigControl"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_Mail_ConfigControlFactory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Evolution/ConfigControl:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="evolution:config_item:title" type="string"
+ _value="Font Preferences"/>
+
+ <oaf_attribute name="evolution:config_item:description" type="string"
+ _value="Configure the fonts used by Evolution here"/>
+
+ <oaf_attribute name="evolution:config_item:icon_name" type="string"
+ value="font.png"/>
+
+ <oaf_attribute name="evolution:config_item:priority" type="string" value="-6"/>
+
+ <oaf_attribute name="description" type="string"
+ _value="Configuration control for the Evolution Display Fonts."/>
+
+ </oaf_server>
+
+ <!-- Composer Preferences -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ComposerPrefs_ConfigControl"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_Mail_ConfigControlFactory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Evolution/ConfigControl:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="evolution:config_item:title" type="string"
+ _value="Composer Preferences"/>
+
+ <oaf_attribute name="evolution:config_item:description" type="string"
+ _value="Configure spell-checking, signatures, and the message composer here"/>
+
+ <oaf_attribute name="evolution:config_item:icon_name" type="string"
+ value="composer-settings.png"/>
+
+ <oaf_attribute name="evolution:config_item:priority" type="string" value="-8"/>
+
+ <oaf_attribute name="description" type="string"
+ _value="Configuration control for the Evolution Message Composer."/>
+
+ </oaf_server>
+
+</oaf_info>
+
+
+
diff --git a/mail/Makefile.am b/mail/Makefile.am
index b0bd18c2ee..224aee96ab 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -1,8 +1,8 @@
#SUBDIRS = importers
bin_PROGRAMS = \
- evolution-mail \
- evolution-mail-upgrade
+ evolution-mail
+# evolution-mail-upgrade
importerdir = $(privlibdir)/evolution-mail-importers
@@ -84,6 +84,10 @@ evolution_mail_SOURCES = \
mail-config-druid.h \
mail-crypto.c \
mail-crypto.h \
+ mail-config-factory.c \
+ mail-config-factory.h \
+ mail-preferences.c \
+ mail-preferences.h \
mail-display.c \
mail-display.h \
mail-folder-cache.c \
@@ -130,39 +134,10 @@ evolution_mail_SOURCES = \
subscribe-dialog.h \
mail.h
-# component-factory.c \
-# component-factory.h \
-# e-searching-tokenizer.c \
-# e-searching-tokenizer.h \
-# folder-browser.c \
-# folder-browser.h \
-# folder-browser-factory.c \
-# folder-browser-factory.h \
-# folder-browser-ui.c \
-# folder-browser-ui.h \
-# folder-info.c \
-# folder-info.h \
-# mail-accounts.c \
-# mail-accounts.h \
-# mail-account-editor.c \
-# mail-account-editor.h \
-# mail-account-gui.c \
-# mail-account-gui.h \
-# mail-autofilter.c \
-# mail-autofilter.h \
-# mail-callbacks.c \
-# mail-callbacks.h \
-# mail-composer-prefs.c \
-# mail-composer-prefs.h \
+# needs gtkhtml prop manager ported
# mail-font-prefs.c \
# mail-font-prefs.h \
-# mail-config-factory.c \
-# mail-config-factory.h \
-
-# mail-preferences.c \
-# mail-preferences.h \
-
evolution_mail_LDADD = \
$(top_builddir)/camel/libcamel.la \
$(top_builddir)/e-util/libeutil.la \
@@ -181,15 +156,15 @@ evolution_mail_LDADD = \
evolution_mail_LDFLAGS = \
-export-dynamic
-evolution_mail_upgrade_SOURCES = upgrade-mailer.c
-evolution_mail_upgrade_LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(EVOLUTION_MAIL_LIBS)
+#evolution_mail_upgrade_SOURCES = upgrade-mailer.c
+#evolution_mail_upgrade_LDADD = \
+# $(top_builddir)/camel/libcamel.la \
+# $(top_builddir)/e-util/libeutil.la \
+# $(EVOLUTION_MAIL_LIBS)
-oafdir = $(datadir)/oaf
-oaf_in_files = GNOME_Evolution_Mail.oaf.in
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
+serverdir = $(libdir)/bonobo/servers
+server_in_files = GNOME_Evolution_Mail.server.in
+server_DATA = $(server_in_files:.server.in=.server)
@INTLTOOL_SERVER_RULE@
@@ -212,8 +187,8 @@ EXTRA_DIST = \
Mailer.idl \
$(SPELL_IDL) \
$(glade_DATA) \
- $(oaf_in_files) \
- $(oaf_DATA) \
+ $(server_in_files) \
+ $(server_DATA) \
$(etspec_DATA)
if ENABLE_PURIFY
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 188b4c8302..fe10799347 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -27,6 +27,8 @@
#include <bonobo/bonobo-generic-factory.h>
#include <gal/widgets/e-gui-utils.h>
+#include <string.h>
+
#include "camel.h"
#include "Evolution.h"
@@ -438,7 +440,9 @@ populate_folder_context_menu (EvolutionShellComponent *shell_component,
if ((strncmp(physical_uri, "vfolder:", 8) == 0
&& strstr(physical_uri, "#" CAMEL_UNMATCHED_NAME) == NULL)
|| strncmp(physical_uri, "file:", 5) == 0) {
- bonobo_ui_component_add_verb_full(uic, "ChangeFolderPropertiesPopUp", configure_folder_popup, g_strdup(physical_uri), g_free);
+ bonobo_ui_component_add_verb_full(uic, "ChangeFolderPropertiesPopUp",
+ g_cclosure_new(G_CALLBACK(configure_folder_popup),
+ g_strdup(physical_uri), (GClosureNotify)g_free));
bonobo_ui_component_set_translate (uic, EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER, popup_xml, NULL);
}
}
@@ -731,7 +735,7 @@ shell_client_destroy (GtkObject *object)
}
static void
-warning_clicked (GtkWidget *dialog, gpointer user_data)
+warning_response (GtkWidget *dialog, int button, gpointer user_data)
{
gtk_widget_destroy (dialog);
}
@@ -748,8 +752,7 @@ owner_set_cb (EvolutionShellComponent *shell_component,
/* FIXME: should we ref this? */
global_shell_client = shell_client;
- gtk_signal_connect (GTK_OBJECT (shell_client), "destroy",
- shell_client_destroy, NULL);
+ g_signal_connect(shell_client, "destroy", G_CALLBACK(shell_client_destroy), NULL);
evolution_dir = g_strdup (evolution_homedir);
mail_session_init ();
@@ -784,8 +787,8 @@ owner_set_cb (EvolutionShellComponent *shell_component,
char *system = g_strdup (EVOLUTION_DATADIR "/evolution/vfoldertypes.xml");
search_context = rule_context_new ();
- gtk_object_set_data_full (GTK_OBJECT (search_context), "user", user, g_free);
- gtk_object_set_data_full (GTK_OBJECT (search_context), "system", system, g_free);
+ g_object_set_data_full(G_OBJECT(search_context), "user", user, g_free);
+ g_object_set_data_full(G_OBJECT(search_context), "system", system, g_free);
rule_context_add_part_set (search_context, "partset", filter_part_get_type (),
rule_context_add_part, rule_context_next_part);
@@ -800,11 +803,11 @@ owner_set_cb (EvolutionShellComponent *shell_component,
if (mail_config_is_corrupt ()) {
GtkWidget *dialog;
-
- dialog = gnome_warning_dialog (_("Some of your mail settings seem corrupt, "
+
+ dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE,
+ _("Some of your mail settings seem corrupt, "
"please check that everything is in order."));
- gtk_signal_connect (GTK_OBJECT (dialog), "clicked", warning_clicked, NULL);
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+ g_signal_connect(dialog, "response", G_CALLBACK(warning_response), NULL);
gtk_widget_show (dialog);
}
@@ -914,16 +917,16 @@ static void owner_unset_cb (EvolutionShellComponent *shell_component, gpointer u
/* Table for signal handler setup/cleanup */
static struct {
char *sig;
- GtkSignalFunc func;
+ GCallback func;
int hand;
} shell_component_handlers[] = {
- { "owner_set", owner_set_cb, },
- { "owner_unset", owner_unset_cb, },
- { "debug", debug_cb, },
- { "interactive", interactive_cb },
- { "destroy", owner_unset_cb, },
- { "handle_external_uri", handle_external_uri_cb, },
- { "user_create_new_item", user_create_new_item_cb }
+ { "owner_set", G_CALLBACK(owner_set_cb), },
+ { "owner_unset", G_CALLBACK(owner_unset_cb), },
+ { "debug", G_CALLBACK(debug_cb), },
+ { "interactive", G_CALLBACK(interactive_cb) },
+ { "destroy", G_CALLBACK(owner_unset_cb), },
+ { "handle_external_uri", G_CALLBACK(handle_external_uri_cb), },
+ { "user_create_new_item", G_CALLBACK(user_create_new_item_cb) }
};
static void
@@ -932,7 +935,7 @@ owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data)
int i;
for (i=0;i<sizeof(shell_component_handlers)/sizeof(shell_component_handlers[0]);i++)
- gtk_signal_disconnect((GtkObject *)shell_component, shell_component_handlers[i].hand);
+ g_signal_handler_disconnect((GtkObject *)shell_component, shell_component_handlers[i].hand);
if (mail_config_get_empty_trash_on_exit ())
empty_trash (NULL, NULL, NULL);
@@ -943,7 +946,7 @@ owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data)
global_shell_client = NULL;
mail_session_set_interactive (FALSE);
- gtk_object_unref (GTK_OBJECT (search_context));
+ g_object_unref((search_context));
search_context = NULL;
g_timeout_add(100, idle_quit, NULL);
@@ -966,9 +969,11 @@ send_receive_cb (EvolutionShellComponent *shell_component,
if (!account || !account->transport) {
GtkWidget *dialog;
- dialog = gnome_error_dialog (_("You have not set a mail transport method"));
- gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
- gtk_widget_show (dialog);
+ dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+ _("You have not set a mail transport method"));
+ gtk_dialog_run((GtkDialog *)dialog);
+ gtk_widget_destroy(dialog);
+ g_object_unref(dialog);
return;
}
@@ -981,25 +986,22 @@ request_quit (EvolutionShellComponent *shell_component,
void *closure)
{
GtkWidget *dialog;
-
+ int resp;
+
if (!e_msg_composer_request_close_all ())
return FALSE;
if (!outbox_folder || !camel_folder_get_message_count (outbox_folder))
return TRUE;
-
- dialog = gnome_message_box_new (_("You have unsent messages, do you wish to quit anyway?"),
- GNOME_MESSAGE_BOX_QUESTION,
- GNOME_STOCK_BUTTON_YES, /* Quit */
- GNOME_STOCK_BUTTON_NO, /* Don't quit */
- NULL);
-
- gtk_window_set_title (GTK_WINDOW (dialog), _("Warning: Unsent Messages"));
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 1);
- if (gnome_dialog_run_and_close (GNOME_DIALOG (dialog)) == 0)
- return TRUE;
-
- return FALSE;
+
+ dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_YES_NO,
+ _("You have unsent messages, do you wish to quit anyway?"));
+ gtk_dialog_set_default_response((GtkDialog *)dialog, GTK_RESPONSE_NO);
+ resp = gtk_dialog_run((GtkDialog *)dialog);
+ gtk_widget_destroy(dialog);
+ g_object_unref(dialog);
+
+ return resp == GTK_RESPONSE_YES;
}
static BonoboObject *
@@ -1022,8 +1024,8 @@ create_component (void)
request_quit,
NULL);
- gtk_signal_connect (GTK_OBJECT (shell_component), "send_receive",
- GTK_SIGNAL_FUNC (send_receive_cb), NULL);
+ g_signal_connect((shell_component), "send_receive",
+ G_CALLBACK (send_receive_cb), NULL);
destination_interface = evolution_shell_component_dnd_destination_folder_new (destination_folder_handle_motion,
destination_folder_handle_drop,
@@ -1034,26 +1036,26 @@ create_component (void)
evolution_mail_config_wizard_init ();
- icon = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/new-message.xpm");
+ icon = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/new-message.xpm", NULL);
evolution_shell_component_add_user_creatable_item (shell_component, "message",
_("New Mail Message"), _("_Mail Message"),
_("Compose a new mail message"),
"mail", 'm',
icon);
if (icon != NULL)
- gdk_pixbuf_unref (icon);
+ g_object_unref (icon);
- icon = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/post-message-16.png");
+ icon = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/post-message-16.png", NULL);
evolution_shell_component_add_user_creatable_item (shell_component, "post",
_("New Message Post"), _("_Post Message"),
_("Post a new mail message"),
"mail/public", 'p',
icon);
if (icon != NULL)
- gdk_pixbuf_unref (icon);
+ g_object_unref (icon);
for (i=0;i<sizeof(shell_component_handlers)/sizeof(shell_component_handlers[0]);i++) {
- shell_component_handlers[i].hand = gtk_signal_connect(GTK_OBJECT(shell_component),
+ shell_component_handlers[i].hand = g_signal_connect((shell_component),
shell_component_handlers[i].sig,
shell_component_handlers[i].func, NULL);
}
@@ -1071,12 +1073,12 @@ component_factory_init (void)
int result;
shell_component = create_component ();
- result = oaf_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (shell_component));
- if (result == OAF_REG_ERROR) {
+ 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,
_("Cannot initialize the Evolution mail component."));
exit (1);
- } else if (result == OAF_REG_ALREADY_ACTIVE) {
+ } else if (result == Bonobo_ACTIVATION_REG_ALREADY_ACTIVE) {
g_warning ("evolution-mail is already running");
exit (1);
}
@@ -1351,10 +1353,10 @@ add_storage (const char *name, const char *uri, CamelService *store,
EvolutionStorageResult res;
storage = evolution_storage_new (name, FALSE);
- gtk_signal_connect (GTK_OBJECT (storage), "open_folder", storage_connect, store);
- gtk_signal_connect (GTK_OBJECT (storage), "create_folder", storage_create_folder, store);
- gtk_signal_connect (GTK_OBJECT (storage), "remove_folder", storage_remove_folder, store);
- gtk_signal_connect ((GtkObject *)storage, "xfer_folder", storage_xfer_folder, store);
+ g_signal_connect(storage, "open_folder", G_CALLBACK(storage_connect), store);
+ g_signal_connect(storage, "create_folder", G_CALLBACK(storage_create_folder), store);
+ g_signal_connect(storage, "remove_folder", G_CALLBACK(storage_remove_folder), store);
+ g_signal_connect(storage, "xfer_folder", G_CALLBACK(storage_xfer_folder), store);
res = evolution_storage_register_on_shell (storage, corba_shell);
diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c
index ec77a2be4c..bc6e37b7be 100644
--- a/mail/e-searching-tokenizer.c
+++ b/mail/e-searching-tokenizer.c
@@ -963,9 +963,8 @@ struct _ESearchingTokenizerPrivate {
/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-/* shoudlnt' this be finalise? */
static void
-e_searching_tokenizer_destroy (GtkObject *obj)
+e_searching_tokenizer_finalise (GObject *obj)
{
ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (obj);
struct _ESearchingTokenizerPrivate *p = st->priv;
@@ -981,14 +980,14 @@ e_searching_tokenizer_destroy (GtkObject *obj)
g_free (p);
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ G_OBJECT_CLASS (parent_class)->finalize(obj);
}
static void
e_searching_tokenizer_class_init (ESearchingTokenizerClass *klass)
{
- GtkObjectClass *obj_class = (GtkObjectClass *) klass;
+ GObjectClass *obj_class = (GObjectClass *) klass;
HTMLTokenizerClass *tok_class = HTML_TOKENIZER_CLASS (klass);
parent_class = g_type_class_ref (HTML_TYPE_TOKENIZER);
@@ -1000,10 +999,10 @@ e_searching_tokenizer_class_init (ESearchingTokenizerClass *klass)
G_STRUCT_OFFSET (ESearchingTokenizerClass, match),
NULL,
NULL,
- gtk_marshal_NONE__NONE,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- obj_class->destroy = e_searching_tokenizer_destroy;
+ obj_class->finalize = e_searching_tokenizer_finalise;
tok_class->begin = e_searching_tokenizer_begin;
tok_class->end = e_searching_tokenizer_end;
@@ -1030,24 +1029,23 @@ e_searching_tokenizer_init (ESearchingTokenizer *st)
search_info_set_colour(p->secondary, "purple");
}
-GtkType
+GType
e_searching_tokenizer_get_type (void)
{
- static GtkType type = 0;
+ static GType type = 0;
if (!type) {
- static const GtkTypeInfo info = {
- "ESearchingTokenizer",
- sizeof (ESearchingTokenizer),
+ static const GTypeInfo info = {
sizeof (ESearchingTokenizerClass),
- (GtkClassInitFunc) e_searching_tokenizer_class_init,
- (GtkObjectInitFunc) e_searching_tokenizer_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL, NULL,
+ (GClassInitFunc) e_searching_tokenizer_class_init,
+ NULL, NULL,
+ sizeof (ESearchingTokenizer),
+ 0,
+ (GInstanceInitFunc) e_searching_tokenizer_init,
};
- type = gtk_type_unique (HTML_TYPE_TOKENIZER, &info);
+ type = g_type_register_static (HTML_TYPE_TOKENIZER, "ESearchingTokenizer", &info, 0);
}
return type;
@@ -1056,7 +1054,7 @@ e_searching_tokenizer_get_type (void)
HTMLTokenizer *
e_searching_tokenizer_new (void)
{
- return (HTMLTokenizer *) gtk_type_new (E_TYPE_SEARCHING_TOKENIZER);
+ return (HTMLTokenizer *) g_object_new (E_TYPE_SEARCHING_TOKENIZER, NULL);
}
/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
@@ -1183,7 +1181,7 @@ e_searching_tokenizer_clone (HTMLTokenizer *tok)
new_st->priv->shared = orig_st->priv->shared;
#endif
- g_signal_connect_swapped (new_st, "match", GTK_SIGNAL_FUNC (matched), orig_st);
+ g_signal_connect_swapped (new_st, "match", G_CALLBACK(matched), orig_st);
return HTML_TOKENIZER (new_st);
}
diff --git a/mail/e-searching-tokenizer.h b/mail/e-searching-tokenizer.h
index 8dbcf83e17..9cdd3cb3c2 100644
--- a/mail/e-searching-tokenizer.h
+++ b/mail/e-searching-tokenizer.h
@@ -31,10 +31,10 @@
#include <gtkhtml/htmltokenizer.h>
#define E_TYPE_SEARCHING_TOKENIZER (e_searching_tokenizer_get_type ())
-#define E_SEARCHING_TOKENIZER(o) (GTK_CHECK_CAST ((o), E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizer))
-#define E_SEARCHING_TOKENIZER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizerClass))
-#define E_IS_SEARCHING_TOKENIZER(o) (GTK_CHECK_TYPE ((o), E_TYPE_SEARCHING_TOKENIZER))
-#define E_IS_SEARCHING_TOKENIZER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_TYPE_SEARCHING_TOKENIZER))
+#define E_SEARCHING_TOKENIZER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizer))
+#define E_SEARCHING_TOKENIZER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizerClass))
+#define E_IS_SEARCHING_TOKENIZER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_SEARCHING_TOKENIZER))
+#define E_IS_SEARCHING_TOKENIZER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_SEARCHING_TOKENIZER))
typedef struct _ESearchingTokenizer ESearchingTokenizer;
typedef struct _ESearchingTokenizerClass ESearchingTokenizerClass;
@@ -53,7 +53,7 @@ struct _ESearchingTokenizerClass {
void (*match) (ESearchingTokenizer *);
};
-GtkType e_searching_tokenizer_get_type (void);
+GType e_searching_tokenizer_get_type (void);
HTMLTokenizer *e_searching_tokenizer_new (void);
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index 763605bf9d..6f7fe4d809 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -65,7 +65,7 @@ fb_get_svi (BonoboControl *control)
GNOME_Evolution_ShellView shell_view_interface;
CORBA_Environment ev;
- control_frame = bonobo_control_get_control_frame (control);
+ control_frame = bonobo_control_get_control_frame (control, NULL);
if (control_frame == NULL)
return CORBA_OBJECT_NIL;
@@ -90,8 +90,8 @@ control_activate (BonoboControl *control,
GtkWidget *folder_browser;
Bonobo_UIContainer container;
- container = bonobo_control_get_remote_ui_container (control);
- bonobo_ui_component_set_container (uic, container);
+ container = bonobo_control_get_remote_ui_container (control, NULL);
+ bonobo_ui_component_set_container (uic, container, NULL);
bonobo_object_release_unref (container, NULL);
g_assert (container == bonobo_ui_component_get_container (uic));
@@ -155,7 +155,7 @@ control_activate_cb (BonoboControl *control,
static void
control_destroy_cb (GtkObject *fb, GObject *deadbeef)
{
- gtk_object_destroy (folder_browser);
+ gtk_object_destroy (fb);
}
static void
@@ -191,11 +191,11 @@ folder_browser_factory_new_control (const char *uri,
if (!(fb = folder_browser_new (shell, uri)))
return NULL;
- FOLDER_BROWSER (folder_browser)->pref_master = TRUE; /* save UI settings changed in this FB */
+ FOLDER_BROWSER (fb)->pref_master = TRUE; /* save UI settings changed in this FB */
- gtk_widget_show (folder_browser);
+ gtk_widget_show (fb);
- control = bonobo_control_new (folder_browser);
+ control = bonobo_control_new (fb);
if (control == NULL) {
g_object_unref (fb);
@@ -204,8 +204,8 @@ folder_browser_factory_new_control (const char *uri,
g_signal_connect (control, "activate", GTK_SIGNAL_FUNC (control_activate_cb), fb);
- g_object_weak_ref (control, (GWeakNotify) control_destroy_cb, fb);
- g_object_weak_ref (fb, (GWeakNotify) browser_destroy_cb, control);
+ g_object_weak_ref (G_OBJECT(control), (GWeakNotify) control_destroy_cb, fb);
+ g_object_weak_ref (G_OBJECT(fb), (GWeakNotify) browser_destroy_cb, control);
if (!control_list)
control_list = e_list_new (NULL, NULL, NULL);
diff --git a/mail/folder-browser-ui.c b/mail/folder-browser-ui.c
index a4736baedf..f053acf6a8 100644
--- a/mail/folder-browser-ui.c
+++ b/mail/folder-browser-ui.c
@@ -26,6 +26,8 @@
#include <config.h>
#endif
+#include <string.h>
+
#include <libgnome/gnome-util.h> /* gnome_util_prepend_user_home */
#include <bonobo/bonobo-exception.h>
@@ -305,7 +307,7 @@ ui_add (FolderBrowser *fb, const char *name, BonoboUIVerb verb[], EPixmap pixcac
/*bonobo_ui_component_freeze (uic, NULL);*/
file = g_strconcat ("evolution-mail-", name, ".xml", NULL);
- bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR, file, "evolution-mail");
+ bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR, file, "evolution-mail", NULL);
g_free (file);
e_pixmaps_update (uic, pixcache);
@@ -472,12 +474,8 @@ folder_browser_setup_property_menu (FolderBrowser *fb, BonoboUIComponent *uic)
CamelURL *url;
url = camel_url_new (fb->uri, NULL);
- if (url) {
- if (url->fragment)
- base = basename (url->fragment);
- else
- base = basename (url->path);
- }
+ if (url)
+ base = g_path_get_basename(url->fragment?url->fragment:url->path);
if (base && base[0] != '\0')
name = g_strdup_printf (_("Properties for \"%s\""), base);
@@ -488,7 +486,8 @@ folder_browser_setup_property_menu (FolderBrowser *fb, BonoboUIComponent *uic)
uic, "/menu/File/Folder/ComponentPlaceholder/ChangeFolderProperties",
"label", name, NULL);
g_free (name);
-
+ g_free(base);
+
if (url)
camel_url_free (url);
@@ -629,7 +628,7 @@ folder_browser_ui_rm_all (FolderBrowser *fb)
BonoboUIComponent *uic = fb->uicomp;
bonobo_ui_component_rm (uic, "/", NULL);
- bonobo_ui_component_unset_container (uic);
+ bonobo_ui_component_unset_container (uic, NULL);
if (fb->sensitise_state) {
g_hash_table_destroy (fb->sensitise_state);
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 7b52727220..fee9adc3a2 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -804,8 +804,10 @@ static gboolean
update_status_bar_idle_cb(gpointer data)
{
FolderBrowser *fb = data;
-
+
+#if 0
if (!GTK_OBJECT_DESTROYED (fb))
+#endif
update_status_bar (fb);
fb->update_status_bar_idle_id = 0;
@@ -1826,7 +1828,7 @@ struct cmpf_data {
static void
context_menu_position_func (GtkMenu *menu, gint *x, gint *y,
- gpointer user_data)
+ gboolean *push_in, gpointer user_data)
{
int tx, ty, tw, th;
struct cmpf_data *closure = user_data;
@@ -2083,7 +2085,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 = mail_config_get_label_name (i);
+ 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].closure = closure;
}
@@ -2096,12 +2098,10 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
menu = e_popup_menu_create (context_menu, enable_mask, hide_mask, fb);
e_auto_kill_popup_menu_on_hide (menu);
- g_object_set_data_full (menu, "label_closures", closures,
- (GtkDestroyNotify) label_closures_free);
+ g_object_set_data_full (G_OBJECT(menu), "label_closures", closures, (GtkDestroyNotify) label_closures_free);
if (fdata)
- g_object_set_data_full (menu, "filter_data", fdata,
- (GtkDestroyNotify) filter_data_free);
+ g_object_set_data_full (G_OBJECT(menu), "filter_data", fdata, (GtkDestroyNotify) filter_data_free);
if (event->type == GDK_KEY_PRESS) {
struct cmpf_data closure;
diff --git a/mail/folder-info.c b/mail/folder-info.c
index eca156d1f0..1a31cba597 100644
--- a/mail/folder-info.c
+++ b/mail/folder-info.c
@@ -227,6 +227,7 @@ get_prop (BonoboPropertyBag *bag,
static BonoboObject *
evolution_folder_info_factory_fn (BonoboGenericFactory *factory,
+ const char *id,
void *closure)
{
EvolutionFolderInfo *info;
@@ -279,13 +280,10 @@ evolution_folder_info_notify_ready (void)
ready = TRUE;
for (p = folder_infos; p; p = p->next) {
- BonoboArg arg;
- CORBA_boolean b = ready;
EvolutionFolderInfo *info = p->data;
-
- arg._value = &b;
- arg._type = (CORBA_TypeCode) TC_boolean;
- bonobo_property_bag_set_value (BONOBO_PROPERTY_BAG (info->pb),
- "folder-info-ready", &arg, NULL);
+ Bonobo_PropertyBag bag;
+
+ bag = (Bonobo_PropertyBag)bonobo_object_corba_objref(BONOBO_OBJECT(info->pb));
+ bonobo_pbclient_set_boolean("folder-info-ready", ready, NULL);
}
}
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
index 69de0a66d4..751c95519b 100644
--- a/mail/mail-account-editor.c
+++ b/mail/mail-account-editor.c
@@ -29,8 +29,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock.h>
#include <camel/camel-url.h>
#include <gal/widgets/e-gui-utils.h>
@@ -43,24 +41,23 @@ static void mail_account_editor_finalize (GObject *obj);
static GtkDialogClass *parent_class = NULL;
-GtkType
+GType
mail_account_editor_get_type ()
{
static GtkType type = 0;
if (!type) {
- GtkTypeInfo type_info = {
- "MailAccountEditor",
- sizeof (MailAccountEditor),
+ GTypeInfo type_info = {
sizeof (MailAccountEditorClass),
- (GtkClassInitFunc) mail_account_editor_class_init,
- (GtkObjectInitFunc) NULL,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL, NULL,
+ (GClassInitFunc) mail_account_editor_class_init,
+ NULL, NULL,
+ sizeof (MailAccountEditor),
+ 0,
+ NULL
};
- type = gtk_type_unique (gtk_dialog_get_type (), &type_info);
+ type = g_type_register_static (gtk_dialog_get_type (), "MailAccountEditor", &type_info, 0);
}
return type;
@@ -71,7 +68,7 @@ mail_account_editor_class_init (MailAccountEditorClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- parent_class = gtk_type_class (gtk_dialog_get_type ());
+ parent_class = g_type_class_ref(gtk_dialog_get_type ());
gobject_class->finalize = mail_account_editor_finalize;
}
@@ -120,7 +117,7 @@ apply_changes (MailAccountEditor *editor)
}
static void
-editor_response_cb (GtkWidget *widget, int button, gpointr user_data)
+editor_response_cb (GtkWidget *widget, int button, gpointer user_data)
{
MailAccountEditor *editor = user_data;
@@ -156,7 +153,7 @@ construct (MailAccountEditor *editor, MailConfigAccount *account, MailAccountsTa
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
NULL);
- g_signal_connect (editor, "response", GTK_SIGNAL_FUNC (editor_response_cb), editor);
+ g_signal_connect (editor, "response", G_CALLBACK (editor_response_cb), editor);
mail_account_gui_setup (editor->gui, GTK_WIDGET (editor));
@@ -170,8 +167,8 @@ mail_account_editor_new (MailConfigAccount *account, GtkWindow *parent, MailAcco
{
MailAccountEditor *new;
- new = (MailAccountEditor *) gtk_type_new (mail_account_editor_get_type ());
- gtk_widget_set_parent_window ((GtkWidget *) new, parent->window);
+ new = (MailAccountEditor *) g_object_new(mail_account_editor_get_type (), NULL);
+ gtk_widget_set_parent_window ((GtkWidget *) new, ((GtkWidget *)parent)->window);
construct (new, account, dialog);
return new;
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index da01920567..935f95585a 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -103,7 +103,7 @@ get_focused_widget (GtkWidget *def, ...)
gboolean
mail_account_gui_identity_complete (MailAccountGui *gui, GtkWidget **incomplete)
{
- char *text;
+ const char *text;
text = gtk_entry_get_text (gui->full_name);
if (!text || !*text) {
@@ -151,7 +151,7 @@ service_complete (MailAccountGuiService *service, GHashTable *extra_config, GtkW
{
const CamelProvider *prov = service->provider;
GtkWidget *path;
- char *text;
+ const char *text;
if (!prov)
return TRUE;
@@ -221,7 +221,8 @@ mail_account_gui_auto_detect_extra_conf (MailAccountGui *gui)
GtkWidget *path;
CamelURL *url;
char *text;
-
+ const char *tmp;
+
if (!prov)
return;
@@ -258,9 +259,9 @@ mail_account_gui_auto_detect_extra_conf (MailAccountGui *gui)
}
if (path && CAMEL_PROVIDER_ALLOWS (prov, CAMEL_URL_PART_PATH)) {
- text = gtk_entry_get_text (service->path);
- if (text && *text)
- camel_url_set_path (url, text);
+ tmp = gtk_entry_get_text (service->path);
+ if (tmp && *tmp)
+ camel_url_set_path (url, tmp);
}
camel_provider_auto_detect (prov, url, &auto_detected, NULL);
@@ -344,7 +345,7 @@ mail_account_gui_transport_complete (MailAccountGui *gui, GtkWidget **incomplete
/* FIXME? */
if (gtk_toggle_button_get_active (gui->transport_needs_auth) &&
CAMEL_PROVIDER_ALLOWS (gui->transport.provider, CAMEL_URL_PART_USER)) {
- char *text = gtk_entry_get_text (gui->transport.username);
+ const char *text = gtk_entry_get_text (gui->transport.username);
if (!text || !*text) {
if (incomplete)
@@ -361,7 +362,7 @@ mail_account_gui_transport_complete (MailAccountGui *gui, GtkWidget **incomplete
gboolean
mail_account_gui_management_complete (MailAccountGui *gui, GtkWidget **incomplete)
{
- char *text;
+ const char *text;
text = gtk_entry_get_text (gui->account_name);
if (text && *text)
@@ -425,9 +426,9 @@ build_auth_menu (MailAccountGuiService *service, GList *all_authtypes,
}
g_object_set_data ((GObject *) item, "authtype", authtype);
- g_signal_connect (item, "activate", GTK_SIGNAL_FUNC (service_authtype_changed), service);
+ g_signal_connect (item, "activate", G_CALLBACK (service_authtype_changed), service);
- gtk_menu_append (GTK_MENU (menu), item);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
gtk_widget_show (item);
}
@@ -713,7 +714,7 @@ setup_toggle (GtkWidget *widget, const char *depname, MailAccountGui *gui)
}
toggle = g_hash_table_lookup (gui->extra_config, depname);
- g_signal_connect (toggle, "toggled", GTK_SIGNAL_FUNC (toggle_sensitivity), widget);
+ g_signal_connect (toggle, "toggled", G_CALLBACK (toggle_sensitivity), widget);
toggle_sensitivity (toggle, widget);
}
@@ -1173,9 +1174,9 @@ construct_ssl_menu (MailAccountGuiService *service)
for (i = 0; i < num_ssl_options; i++) {
item = gtk_menu_item_new_with_label (_(ssl_options[i].label));
g_object_set_data ((GObject *) item, "use_ssl", ssl_options[i].value);
- g_signal_connect (item, "activate", GTK_SIGNAL_FUNC (ssl_option_activate), service);
+ g_signal_connect (item, "activate", G_CALLBACK (ssl_option_activate), service);
gtk_widget_show (item);
- gtk_menu_append (GTK_MENU (menu), item);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
}
gtk_option_menu_remove_menu (service->use_ssl);
@@ -1221,16 +1222,16 @@ sig_fill_options (MailAccountGui *gui)
else
menu = gtk_menu_new ();
- gtk_menu_append (GTK_MENU (menu), gtk_menu_item_new_with_label (_("None")));
- gtk_menu_append (GTK_MENU (menu), gtk_menu_item_new_with_label (_("Autogenerated")));
- /* gtk_menu_append (GTK_MENU (menu), gtk_menu_item_new_with_label (_("Random"))); */
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_menu_item_new_with_label (_("None")));
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_menu_item_new_with_label (_("Autogenerated")));
+ /* gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_menu_item_new_with_label (_("Random"))); */
for (l = mail_config_get_signature_list (); l; l = l->next) {
sig = l->data;
mi = gtk_menu_item_new_with_label (sig->name);
g_object_set_data ((GObject *) mi, "sig", sig);
gtk_widget_show (mi);
- gtk_menu_append (GTK_MENU (menu), mi);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
}
}
@@ -1243,7 +1244,7 @@ sig_changed (GtkWidget *w, MailAccountGui *gui)
active = gtk_menu_get_active (GTK_MENU (w));
index = g_list_index (GTK_MENU_SHELL (w)->children, active);
- gui->def_signature = (MailConfigSignature *) gtk_object_get_data (GTK_OBJECT (active), "sig");
+ gui->def_signature = (MailConfigSignature *) g_object_get_data(G_OBJECT(active), "sig");
gui->auto_signature = index == 1 ? TRUE : FALSE;
}
@@ -1290,7 +1291,7 @@ sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, MailAccoun
g_object_set_data ((GObject *) mi, "sig", sig);
gtk_widget_show (mi);
menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (gui->sig_option_menu));
- gtk_menu_append (GTK_MENU (menu), mi);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
break;
}
@@ -1341,10 +1342,10 @@ prepare_signatures (MailAccountGui *gui)
gui->sig_option_menu = glade_xml_get_widget (gui->xml, "sigOption");
sig_fill_options (gui);
g_signal_connect (gtk_option_menu_get_menu (GTK_OPTION_MENU (gui->sig_option_menu)),
- "selection-done", sig_changed, gui);
+ "selection-done", G_CALLBACK(sig_changed), gui);
glade_xml_signal_connect_data (gui->xml, "sigAddNewClicked",
- GTK_SIGNAL_FUNC (sig_add_new_signature), gui);
+ G_CALLBACK (sig_add_new_signature), gui);
if (!gui->dialog) {
gtk_widget_hide (glade_xml_get_widget (gui->xml, "sigLabel"));
@@ -1365,7 +1366,7 @@ mail_account_gui_new (MailConfigAccount *account, MailAccountsTab *dialog)
gui = g_new0 (MailAccountGui, 1);
gui->account = account;
gui->dialog = dialog;
- gui->xml = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", NULL);
+ gui->xml = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", NULL, NULL);
/* Management */
gui->account_name = GTK_ENTRY (glade_xml_get_widget (gui->xml, "management_name"));
@@ -1403,13 +1404,13 @@ mail_account_gui_new (MailConfigAccount *account, MailAccountsTab *dialog)
gui->source.description = GTK_LABEL (glade_xml_get_widget (gui->xml, "source_description"));
gui->source.hostname = GTK_ENTRY (glade_xml_get_widget (gui->xml, "source_host"));
g_signal_connect (gui->source.hostname, "changed",
- GTK_SIGNAL_FUNC (service_changed), &gui->source);
+ G_CALLBACK (service_changed), &gui->source);
gui->source.username = GTK_ENTRY (glade_xml_get_widget (gui->xml, "source_user"));
g_signal_connect (gui->source.username, "changed",
- GTK_SIGNAL_FUNC (service_changed), &gui->source);
+ G_CALLBACK (service_changed), &gui->source);
gui->source.path = GTK_ENTRY (glade_xml_get_widget (gui->xml, "source_path"));
g_signal_connect (gui->source.path, "changed",
- GTK_SIGNAL_FUNC (service_changed), &gui->source);
+ G_CALLBACK (service_changed), &gui->source);
gui->source.ssl_hbox = glade_xml_get_widget (gui->xml, "source_ssl_hbox");
gui->source.use_ssl = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "source_use_ssl"));
construct_ssl_menu (&gui->source);
@@ -1418,7 +1419,7 @@ mail_account_gui_new (MailConfigAccount *account, MailAccountsTab *dialog)
gui->source.remember = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "source_remember_password"));
gui->source.check_supported = GTK_BUTTON (glade_xml_get_widget (gui->xml, "source_check_supported"));
g_signal_connect (gui->source.check_supported, "clicked",
- GTK_SIGNAL_FUNC (service_check_supported), &gui->source);
+ G_CALLBACK (service_check_supported), &gui->source);
gui->source_auto_check = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "extra_auto_check"));
gui->source_auto_check_min = GTK_SPIN_BUTTON (glade_xml_get_widget (gui->xml, "extra_auto_check_min"));
@@ -1428,27 +1429,27 @@ mail_account_gui_new (MailConfigAccount *account, MailAccountsTab *dialog)
gui->transport.description = GTK_LABEL (glade_xml_get_widget (gui->xml, "transport_description"));
gui->transport.hostname = GTK_ENTRY (glade_xml_get_widget (gui->xml, "transport_host"));
g_signal_connect (gui->transport.hostname, "changed",
- GTK_SIGNAL_FUNC (service_changed), &gui->transport);
+ G_CALLBACK (service_changed), &gui->transport);
gui->transport.username = GTK_ENTRY (glade_xml_get_widget (gui->xml, "transport_user"));
g_signal_connect (gui->transport.username, "changed",
- GTK_SIGNAL_FUNC (service_changed), &gui->transport);
+ G_CALLBACK (service_changed), &gui->transport);
gui->transport.ssl_hbox = glade_xml_get_widget (gui->xml, "transport_ssl_hbox");
gui->transport.use_ssl = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "transport_use_ssl"));
construct_ssl_menu (&gui->transport);
gui->transport.no_ssl = glade_xml_get_widget (gui->xml, "transport_ssl_disabled");
gui->transport_needs_auth = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "transport_needs_auth"));
g_signal_connect (gui->transport_needs_auth, "toggled",
- GTK_SIGNAL_FUNC (transport_needs_auth_toggled), gui);
+ G_CALLBACK (transport_needs_auth_toggled), gui);
gui->transport.authtype = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "transport_auth_omenu"));
gui->transport.remember = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "transport_remember_password"));
gui->transport.check_supported = GTK_BUTTON (glade_xml_get_widget (gui->xml, "transport_check_supported"));
g_signal_connect (gui->transport.check_supported, "clicked",
- GTK_SIGNAL_FUNC (service_check_supported), &gui->transport);
+ G_CALLBACK (service_check_supported), &gui->transport);
/* Drafts folder */
gui->drafts_folder_button = GTK_BUTTON (glade_xml_get_widget (gui->xml, "drafts_button"));
g_signal_connect (gui->drafts_folder_button, "selected",
- GTK_SIGNAL_FUNC (folder_selected), &gui->drafts_folder_uri);
+ G_CALLBACK (folder_selected), &gui->drafts_folder_uri);
if (account->drafts_folder_uri)
gui->drafts_folder_uri = g_strdup (account->drafts_folder_uri);
else
@@ -1462,7 +1463,7 @@ mail_account_gui_new (MailConfigAccount *account, MailAccountsTab *dialog)
/* Sent folder */
gui->sent_folder_button = GTK_BUTTON (glade_xml_get_widget (gui->xml, "sent_button"));
g_signal_connect (gui->sent_folder_button, "selected",
- GTK_SIGNAL_FUNC (folder_selected), &gui->sent_folder_uri);
+ G_CALLBACK (folder_selected), &gui->sent_folder_uri);
if (account->sent_folder_uri)
gui->sent_folder_uri = g_strdup (account->sent_folder_uri);
else
@@ -1475,7 +1476,7 @@ mail_account_gui_new (MailConfigAccount *account, MailAccountsTab *dialog)
/* Special Folders "Reset Defaults" button */
button = glade_xml_get_widget (gui->xml, "default_folders_button");
- g_signal_connect (button, "clicked", GTK_SIGNAL_FUNC (default_folders_clicked), gui);
+ g_signal_connect (button, "clicked", G_CALLBACK (default_folders_clicked), gui);
/* Always Cc */
gui->always_cc = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "always_cc"));
@@ -1566,9 +1567,9 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top)
g_object_set_data ((GObject *) gui->source.type, provider->protocol, item);
g_object_set_data ((GObject *) item, "provider", provider);
g_object_set_data ((GObject *) item, "number", GUINT_TO_POINTER (si));
- g_signal_connect (item, "activate", GTK_SIGNAL_FUNC (source_type_changed), gui);
+ g_signal_connect (item, "activate", G_CALLBACK (source_type_changed), gui);
- gtk_menu_append (GTK_MENU (stores), item);
+ gtk_menu_shell_append(GTK_MENU_SHELL(stores), item);
gtk_widget_show (item);
@@ -1590,9 +1591,9 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top)
g_object_set_data ((GObject *) gui->transport.type, provider->protocol, item);
g_object_set_data ((GObject *) item, "provider", provider);
g_object_set_data ((GObject *) item, "number", GUINT_TO_POINTER (ti));
- g_signal_connect (item, "activate", GTK_SIGNAL_FUNC (transport_type_changed), gui);
+ g_signal_connect (item, "activate", G_CALLBACK (transport_type_changed), gui);
- gtk_menu_append (GTK_MENU (transports), item);
+ gtk_menu_shell_append(GTK_MENU_SHELL(transports), item);
gtk_widget_show (item);
@@ -1613,7 +1614,7 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top)
}
if (item && provider->authtypes) {
- GdkFont *font = GTK_WIDGET (item)->style->font;
+ /*GdkFont *font = GTK_WIDGET (item)->style->font;*/
CamelServiceAuthType *at;
int width;
GList *a;
@@ -1621,7 +1622,10 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top)
for (a = provider->authtypes; a; a = a->next) {
at = a->data;
- width = gdk_string_width (font, at->name);
+ /* Just using string length is probably good enough,
+ as we only use the width of the widget, not the string */
+ /*width = gdk_string_width (font, at->name);*/
+ width = strlen(at->name) * 14;
if (width > max_width) {
max_authname = at->name;
max_width = width;
@@ -1634,9 +1638,9 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top)
/* add a "None" option to the stores menu */
item = gtk_menu_item_new_with_label (_("None"));
g_object_set_data ((GObject *) item, "provider", NULL);
- g_signal_connect (item, "activate", GTK_SIGNAL_FUNC (source_type_changed), gui);
+ g_signal_connect (item, "activate", G_CALLBACK (source_type_changed), gui);
- gtk_menu_append (GTK_MENU (stores), item);
+ gtk_menu_shell_append(GTK_MENU_SHELL(stores), item);
gtk_widget_show (item);
@@ -1659,16 +1663,16 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top)
menu = gtk_menu_new ();
item = gtk_menu_item_new_with_label (max_authname);
- gtk_menu_append (GTK_MENU (menu), item);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
gtk_widget_show_all (menu);
gtk_option_menu_set_menu (gui->source.authtype, menu);
gtk_widget_show (GTK_WIDGET (gui->source.authtype));
gtk_widget_size_request (GTK_WIDGET (gui->source.authtype),
&size_req);
- gtk_widget_set_usize (GTK_WIDGET (gui->source.authtype),
+ gtk_widget_set_size_request (GTK_WIDGET (gui->source.authtype),
size_req.width, -1);
- gtk_widget_set_usize (GTK_WIDGET (gui->transport.authtype),
+ gtk_widget_set_size_request (GTK_WIDGET (gui->transport.authtype),
size_req.width, -1);
}
@@ -1710,7 +1714,7 @@ save_service (MailAccountGuiService *gsvc, GHashTable *extra_config,
MailConfigService *service)
{
CamelURL *url;
- char *str;
+ const char *str;
if (!gsvc->provider) {
g_free (service->url);
@@ -1731,7 +1735,7 @@ save_service (MailAccountGuiService *gsvc, GHashTable *extra_config,
GTK_WIDGET_IS_SENSITIVE (gsvc->authtype) && gsvc->authitem && url->user) {
CamelServiceAuthType *authtype;
- authtype = gtk_object_get_data (GTK_OBJECT (gsvc->authitem), "authtype");
+ authtype = g_object_get_data(G_OBJECT(gsvc->authitem), "authtype");
if (authtype && authtype->authproto && *authtype->authproto)
url->authmech = g_strdup (authtype->authproto);
@@ -1761,7 +1765,7 @@ save_service (MailAccountGuiService *gsvc, GHashTable *extra_config,
if (gsvc->provider->flags & CAMEL_PROVIDER_SUPPORTS_SSL) {
const char *use_ssl;
- use_ssl = gtk_object_get_data (GTK_OBJECT (gsvc->ssl_selected), "use_ssl");
+ use_ssl = g_object_get_data(G_OBJECT(gsvc->ssl_selected), "use_ssl");
/* set the value to either "always" or "when-possible"
but don't bother setting it for "never" */
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c
index 5074469e3e..784805481c 100644
--- a/mail/mail-accounts.c
+++ b/mail/mail-accounts.c
@@ -27,12 +27,9 @@
#include "mail-accounts.h"
-#include <libgnomeui/gnome-stock.h>
-#include <libgnomeui/gnome-messagebox.h>
#include <gal/e-table/e-table-memory-store.h>
#include <gal/e-table/e-table-scrolled.h>
#include <gal/e-table/e-cell-toggle.h>
-#include <gal/util/e-unicode-i18n.h>
#include <gal/widgets/e-unicode.h>
#include <camel/camel-url.h>
@@ -50,7 +47,7 @@
static void mail_accounts_tab_class_init (MailAccountsTabClass *class);
static void mail_accounts_tab_init (MailAccountsTab *prefs);
-static void mail_accounts_tab_finalise (GtkObject *obj);
+static void mail_accounts_tab_finalise (GObject *obj);
static void mail_accounts_load (MailAccountsTab *tab);
@@ -63,23 +60,23 @@ static GtkVBoxClass *parent_class = NULL;
#define PREFS_WINDOW(prefs) GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (prefs), GTK_TYPE_WINDOW))
-GtkType
+GType
mail_accounts_tab_get_type (void)
{
- static GtkType type = 0;
+ static GType type = 0;
if (!type) {
- GtkTypeInfo type_info = {
- "MailAccountsTab",
- sizeof (MailAccountsTab),
+ GTypeInfo type_info = {
sizeof (MailAccountsTabClass),
- (GtkClassInitFunc) mail_accounts_tab_class_init,
- (GtkObjectInitFunc) mail_accounts_tab_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
+ NULL, NULL,
+ (GClassInitFunc) mail_accounts_tab_class_init,
+ NULL, NULL,
+ sizeof (MailAccountsTab),
+ 0,
+ (GInstanceInitFunc) mail_accounts_tab_init,
};
- type = gtk_type_unique (gtk_vbox_get_type (), &type_info);
+ type = g_type_register_static (gtk_vbox_get_type (), "MailAccountsTab", &type_info, 0);
}
return type;
@@ -88,10 +85,10 @@ mail_accounts_tab_get_type (void)
static void
mail_accounts_tab_class_init (MailAccountsTabClass *klass)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
- object_class = (GtkObjectClass *) klass;
- parent_class = gtk_type_class (gtk_vbox_get_type ());
+ object_class = (GObjectClass *) klass;
+ parent_class = g_type_class_ref(gtk_vbox_get_type ());
object_class->finalize = mail_accounts_tab_finalise;
/* override methods */
@@ -112,15 +109,15 @@ mail_accounts_tab_init (MailAccountsTab *prefs)
}
static void
-mail_accounts_tab_finalise (GtkObject *obj)
+mail_accounts_tab_finalise (GObject *obj)
{
MailAccountsTab *prefs = (MailAccountsTab *) obj;
- gtk_object_unref (GTK_OBJECT (prefs->gui));
+ g_object_unref((prefs->gui));
gdk_pixmap_unref (prefs->mark_pixmap);
- gdk_bitmap_unref (prefs->mark_bitmap);
+ g_object_unref (prefs->mark_bitmap);
- ((GtkObjectClass *)(parent_class))->finalize (obj);
+ ((GObjectClass *)(parent_class))->finalize (obj);
}
static void
@@ -130,11 +127,14 @@ account_add_finished (GtkWidget *widget, gpointer user_data)
MailAccountsTab *prefs = user_data;
prefs->druid = NULL;
-
+
+#warning "GTK_OBJECT_DESTROYED"
+#if 0
if (!GTK_OBJECT_DESTROYED (prefs))
+#endif
mail_accounts_load (prefs);
- gtk_object_unref ((GtkObject *) prefs);
+ g_object_unref ((GtkObject *) prefs);
}
static void
@@ -144,11 +144,11 @@ account_add_clicked (GtkButton *button, gpointer user_data)
if (prefs->druid == NULL) {
prefs->druid = (GtkWidget *) mail_config_druid_new (prefs->shell);
- gtk_signal_connect (GTK_OBJECT (prefs->druid), "destroy",
- GTK_SIGNAL_FUNC (account_add_finished), prefs);
+ g_signal_connect((prefs->druid), "destroy",
+ G_CALLBACK (account_add_finished), prefs);
gtk_widget_show (prefs->druid);
- gtk_object_ref ((GtkObject *) prefs);
+ g_object_ref ((GtkObject *) prefs);
} else {
gdk_window_raise (prefs->druid->window);
}
@@ -161,10 +161,12 @@ account_edit_finished (GtkWidget *widget, gpointer user_data)
prefs->editor = NULL;
+#if 0
if (!GTK_OBJECT_DESTROYED (prefs))
+#endif
mail_accounts_load (prefs);
- gtk_object_unref ((GtkObject *) prefs);
+ g_object_unref(prefs);
}
static void
@@ -191,11 +193,11 @@ account_edit_clicked (GtkButton *button, gpointer user_data)
account = gtk_clist_get_row_data (prefs->table, row);
#endif
prefs->editor = (GtkWidget *) mail_account_editor_new (account, GTK_WINDOW (window), prefs);
- gtk_signal_connect (GTK_OBJECT (prefs->editor), "destroy",
- GTK_SIGNAL_FUNC (account_edit_finished),
+ g_signal_connect((prefs->editor), "destroy",
+ G_CALLBACK (account_edit_finished),
prefs);
gtk_widget_show (prefs->editor);
- gtk_object_ref ((GtkObject *) prefs);
+ g_object_ref ((GtkObject *) prefs);
}
} else {
gdk_window_raise (prefs->editor->window);
@@ -207,7 +209,8 @@ account_delete_clicked (GtkButton *button, gpointer user_data)
{
MailAccountsTab *prefs = user_data;
const MailConfigAccount *account;
- GnomeDialog *confirm;
+ GtkDialog *confirm;
+ GtkButton *tmp;
const GSList *list;
int row, ans;
@@ -220,7 +223,21 @@ account_delete_clicked (GtkButton *button, gpointer user_data)
/* make sure we have a valid account selected and that we aren't editing anything... */
if (row < 0 || prefs->editor != NULL)
return;
-
+
+ confirm = (GtkDialog *)gtk_message_dialog_new(PREFS_WINDOW (prefs),
+ GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
+ _("Are you sure you want to delete this account?"));
+ tmp = (GtkButton *)gtk_button_new_from_stock(GTK_STOCK_YES);
+ gtk_button_set_label(tmp, _("Delete"));
+ gtk_dialog_add_action_widget(confirm, (GtkWidget *)tmp, GTK_RESPONSE_YES);
+ tmp = (GtkButton *)gtk_button_new_from_stock(GTK_STOCK_NO);
+ gtk_button_set_label(tmp, _("Don't delete"));
+ gtk_dialog_add_action_widget(confirm, (GtkWidget *)tmp, GTK_RESPONSE_NO);
+ 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));
@@ -231,8 +248,8 @@ account_delete_clicked (GtkButton *button, gpointer user_data)
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);
-
- if (ans == 0) {
+#endif
+ if (ans == GTK_RESPONSE_YES) {
int select, len;
#if USE_ETABLE
@@ -537,7 +554,7 @@ mail_accounts_etable_new (char *widget_name, char *string1, char *string2, int i
gtk_container_add (GTK_CONTAINER (scrolled), table);
- gtk_object_set_data (GTK_OBJECT (scrolled), "table", table);
+ g_object_set_data(G_OBJECT(scrolled), "table", table);
gtk_widget_show (scrolled);
gtk_widget_show (table);
@@ -552,7 +569,7 @@ mail_accounts_tab_construct (MailAccountsTab *prefs)
GtkWidget *toplevel, *widget;
GladeXML *gui;
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "accounts_tab");
+ gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "accounts_tab", NULL);
prefs->gui = gui;
/* get our toplevel widget */
@@ -570,19 +587,18 @@ mail_accounts_tab_construct (MailAccountsTab *prefs)
prefs->table = e_table_scrolled_get_table (E_TABLE_SCROLLED (widget));
prefs->model = prefs->table->model;
- gtk_signal_connect (GTK_OBJECT (prefs->table), "cursor_change",
+ g_signal_connect((prefs->table), "cursor_change",
account_cursor_change, prefs);
- gtk_signal_connect (GTK_OBJECT (prefs->table), "double_click",
+ g_signal_connect((prefs->table), "double_click",
account_double_click, prefs);
mail_accounts_load (prefs);
#else
- prefs->table = GTK_CLIST (gtk_object_get_data (GTK_OBJECT (widget), "table"));
+ prefs->table = GTK_CLIST (g_object_get_data(G_OBJECT(widget), "table"));
gtk_clist_set_column_justification (prefs->table, 0, GTK_JUSTIFY_RIGHT);
- gtk_signal_connect (GTK_OBJECT (prefs->table), "select-row",
- account_cursor_change, prefs);
+ g_signal_connect(prefs->table, "select-row", G_CALLBACK(account_cursor_change), prefs);
mail_accounts_load (prefs);
@@ -596,24 +612,19 @@ mail_accounts_tab_construct (MailAccountsTab *prefs)
#endif
prefs->mail_add = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountAdd"));
- gtk_signal_connect (GTK_OBJECT (prefs->mail_add), "clicked",
- account_add_clicked, prefs);
-
+ g_signal_connect(prefs->mail_add, "clicked", G_CALLBACK(account_add_clicked), prefs);
+
prefs->mail_edit = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountEdit"));
- gtk_signal_connect (GTK_OBJECT (prefs->mail_edit), "clicked",
- account_edit_clicked, prefs);
+ g_signal_connect(prefs->mail_edit, "clicked", G_CALLBACK(account_edit_clicked), prefs);
prefs->mail_delete = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountDelete"));
- gtk_signal_connect (GTK_OBJECT (prefs->mail_delete), "clicked",
- account_delete_clicked, prefs);
+ g_signal_connect(prefs->mail_delete, "clicked", G_CALLBACK(account_delete_clicked), prefs);
prefs->mail_default = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountDefault"));
- gtk_signal_connect (GTK_OBJECT (prefs->mail_default), "clicked",
- account_default_clicked, prefs);
+ g_signal_connect(prefs->mail_default, "clicked", G_CALLBACK(account_default_clicked), prefs);
prefs->mail_able = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountAble"));
- gtk_signal_connect (GTK_OBJECT (prefs->mail_able), "clicked",
- account_able_clicked, prefs);
+ g_signal_connect(prefs->mail_able, "clicked", G_CALLBACK(account_able_clicked), prefs);
}
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index 0d2bae88e9..da5c1798ce 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -29,6 +29,7 @@
#endif
#include <ctype.h>
+#include <string.h>
#include <glib.h>
#include <libgnome/gnome-i18n.h>
@@ -377,7 +378,7 @@ mail_filter_delete_uri(CamelStore *store, const char *uri)
g_string_sprintfa (s, _("Used the removed folder:\n '%s'\n"
"And have been updated."), uri);
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_STOCK_CLOSE, "%s", s->str);
+ dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, "%s", s->str);
g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
g_string_free (s, TRUE);
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 9b18aba22c..a768550f17 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -35,7 +35,8 @@
#include <libgnome/gnome-paper.h>
#include <libgnome/gnome-paper.h>
#include <libgnomeprint/gnome-print-master.h>
-#include <libgnomeprint/gnome-print-master-preview.h>
+#include <libgnomeprintui/gnome-print-dialog.h>
+#include <libgnomeprintui/gnome-print-master-preview.h>
#include <bonobo/bonobo-widget.h>
#include <bonobo/bonobo-socket.h>
#include <gal/e-table/e-table.h>
@@ -147,7 +148,8 @@ configure_mail (FolderBrowser *fb)
{
MailConfigDruid *druid;
GtkWidget *dialog;
-
+ int resp;
+
dialog = gtk_message_dialog_new (FB_WINDOW (fb), GTK_DIALOG_MODAL,
GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s",
_("You have not configured the mail client.\n"
@@ -155,14 +157,17 @@ configure_mail (FolderBrowser *fb)
"receive or compose mail.\n"
"Would you like to configure it now?"));
- gtk_dialog_set_default_response ((GtkDialog *) dialog, GTK_RESPONSE_YES)
+ gtk_dialog_set_default_response ((GtkDialog *) dialog, GTK_RESPONSE_YES);
- switch (gtk_dialog_run (GTK_DIALOG (dialog))) {
+ resp = gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy(dialog);
+
+ switch (resp) {
case GTK_RESPONSE_YES:
druid = mail_config_druid_new (fb->shell);
g_object_weak_ref ((GObject *) druid, (GWeakNotify) druid_destroy_cb, NULL);
- gtk_widget_show (druid);
- gtk_grab_add (druid);
+ gtk_widget_show ((GtkWidget *)druid);
+ gtk_grab_add ((GtkWidget *)druid);
gtk_main ();
break;
case GTK_RESPONSE_NO:
@@ -404,10 +409,10 @@ composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessag
ccd = ccd_new ();
/* disconnect the previous signal handlers */
- gtk_signal_disconnect_by_func (GTK_OBJECT (send->composer),
- GTK_SIGNAL_FUNC (composer_send_cb), NULL);
- gtk_signal_disconnect_by_func (GTK_OBJECT (send->composer),
- GTK_SIGNAL_FUNC (composer_save_draft_cb), NULL);
+ g_signal_handlers_disconnect_matched(send->composer, G_SIGNAL_MATCH_FUNC, 0,
+ 0, NULL, composer_send_cb, NULL);
+ g_signal_handlers_disconnect_matched(send->composer, G_SIGNAL_MATCH_FUNC, 0,
+ 0, NULL, composer_save_draft_cb, NULL);
/* reconnect to the signals using a non-NULL ccd for the callback data */
g_signal_connect (send->composer, "send", G_CALLBACK (composer_send_cb), ccd);
@@ -648,9 +653,9 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i
/* disconnect the previous signal handlers */
gtk_signal_disconnect_by_func (GTK_OBJECT (sdi->composer),
- GTK_SIGNAL_FUNC (composer_send_cb), NULL);
+ G_CALLBACK (composer_send_cb), NULL);
gtk_signal_disconnect_by_func (GTK_OBJECT (sdi->composer),
- GTK_SIGNAL_FUNC (composer_save_draft_cb), NULL);
+ G_CALLBACK (composer_save_draft_cb), NULL);
/* reconnect to the signals using a non-NULL ccd for the callback data */
g_signal_connect (sdi->composer, "send", G_CALLBACK (composer_send_cb), ccd);
@@ -1179,8 +1184,7 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
}
date = camel_mime_message_get_date (message, NULL);
- strftime (format, sizeof (date_str), _("On %a, %Y-%m-%d at %H:%M, %%s wrote:"),
- localtime (&date));
+ strftime (format, sizeof (format), _("On %a, %Y-%m-%d at %H:%M, %%s wrote:"), localtime (&date));
text = mail_tool_quote_message (message, format, name && *name ? name : address);
mail_ignore (composer, name, address);
if (text) {
@@ -1751,8 +1755,8 @@ find_socket (GtkContainer *container)
static void
popup_listener_cb (BonoboListener *listener,
- char *event_name,
- CORBA_any *any,
+ const char *event_name,
+ const CORBA_any *any,
CORBA_Environment *ev,
gpointer user_data)
{
@@ -1804,7 +1808,7 @@ addrbook_sender (GtkWidget *widget, gpointer user_data)
socket = find_socket (GTK_CONTAINER (control));
gtk_signal_connect_object (GTK_OBJECT (socket),
"destroy",
- GTK_SIGNAL_FUNC (gtk_widget_destroy),
+ G_CALLBACK (gtk_widget_destroy),
GTK_OBJECT (win));
gtk_container_add (GTK_CONTAINER (win), control);
@@ -2078,50 +2082,32 @@ struct _tag_editor_data {
};
static void
-tag_editor_ok (GtkWidget *button, gpointer user_data)
+tag_editor_response(GtkWidget *gd, int button, struct _tag_editor_data *data)
{
- struct _tag_editor_data *data = user_data;
CamelFolder *folder;
CamelTag *tags, *t;
GPtrArray *uids;
int i;
+
+ /*if (FOLDER_BROWSER_IS_DESTROYED (data->fb))
+ goto done;*/
+
+ if (button == GTK_RESPONSE_OK
+ && (tags = message_tag_editor_get_tag_list (data->editor))) {
+ folder = data->fb->folder;
+ uids = data->uids;
- if (FOLDER_BROWSER_IS_DESTROYED (data->fb))
- goto done;
-
- tags = message_tag_editor_get_tag_list (data->editor);
- if (tags == NULL)
- goto done;
-
- folder = data->fb->folder;
- uids = data->uids;
-
- camel_folder_freeze (folder);
- for (i = 0; i < uids->len; i++) {
- for (t = tags; t; t = t->next)
- camel_folder_set_message_user_tag (folder, uids->pdata[i], t->name, t->value);
+ camel_folder_freeze (folder);
+ for (i = 0; i < uids->len; i++) {
+ for (t = tags; t; t = t->next)
+ camel_folder_set_message_user_tag (folder, uids->pdata[i], t->name, t->value);
+ }
+ camel_folder_thaw (folder);
+ camel_tag_list_free (&tags);
}
- camel_folder_thaw (folder);
-
- camel_tag_list_free (&tags);
-
- done:
- gtk_widget_destroy (GTK_WIDGET (data->editor));
-}
-static void
-tag_editor_cancel (GtkWidget *button, gpointer user_data)
-{
- struct _tag_editor_data *data = user_data;
-
- gtk_widget_destroy (GTK_WIDGET (data->editor));
-}
+ gtk_widget_destroy(gd);
-static void
-tag_editor_destroy_cb (gpointer user_data, GObject *deadbeef)
-{
- struct _tag_editor_data *data = user_data;
-
g_object_unref (data->fb);
g_ptr_array_free (data->uids, TRUE);
g_free (data);
@@ -2158,10 +2144,8 @@ flag_for_followup (BonoboUIComponent *uih, void *user_data, const char *path)
camel_message_info_from (info),
camel_message_info_subject (info));
}
-
- gnome_dialog_button_connect (GNOME_DIALOG (editor), 0, tag_editor_ok, data);
- gnome_dialog_button_connect (GNOME_DIALOG (editor), 1, tag_editor_cancel, data);
- gnome_dialog_set_close (GNOME_DIALOG (editor), TRUE);
+
+ g_signal_connect(editor, "response", G_CALLBACK(tag_editor_response), data);
/* special-case... */
if (uids->len == 1) {
@@ -2175,8 +2159,6 @@ flag_for_followup (BonoboUIComponent *uih, void *user_data, const char *path)
}
}
- g_object_weak_ref ((GObject *) editor, (GWeakNotify) tag_editor_destroy_cb, data);
-
gtk_widget_show (editor);
}
@@ -2628,7 +2610,7 @@ confirm_goto_next_folder (FolderBrowser *fb)
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."));
- gtk_object_ref (GTK_OBJECT (checkbox));
+ g_object_ref((checkbox));
gtk_widget_show (checkbox);
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), checkbox, TRUE, TRUE, 4);
@@ -2637,7 +2619,7 @@ confirm_goto_next_folder (FolderBrowser *fb)
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)))
mail_config_set_confirm_goto_next_folder (FALSE);
- gtk_object_unref (GTK_OBJECT (checkbox));
+ g_object_unref((checkbox));
if (button == 0) {
mail_config_set_goto_next_folder (TRUE);
@@ -2870,7 +2852,7 @@ confirm_expunge (FolderBrowser *fb)
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."));
- gtk_object_ref (GTK_OBJECT (checkbox));
+ g_object_ref((checkbox));
gtk_widget_show (checkbox);
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), checkbox, TRUE, TRUE, 4);
@@ -2882,7 +2864,7 @@ confirm_expunge (FolderBrowser *fb)
if (button == 0 && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)))
mail_config_set_confirm_expunge (FALSE);
- gtk_object_unref (GTK_OBJECT (checkbox));
+ g_object_unref((checkbox));
if (button == 0)
return TRUE;
@@ -2923,28 +2905,22 @@ expunge_folder (BonoboUIComponent *uih, void *user_data, const char *path)
static GtkWidget *filter_editor = NULL;
static void
-filter_editor_destroy (GtkWidget *dialog, gpointer user_data)
-{
- filter_editor = NULL;
-}
-
-static void
-filter_editor_clicked (GtkWidget *dialog, int button, FolderBrowser *fb)
+filter_editor_response (GtkWidget *dialog, int button, FolderBrowser *fb)
{
FilterContext *fc;
- if (button == 0) {
+ if (button == GTK_RESPONSE_ACCEPT) {
char *user;
- fc = gtk_object_get_data (GTK_OBJECT (dialog), "context");
+ fc = g_object_get_data(G_OBJECT(dialog), "context");
user = g_strdup_printf ("%s/filters.xml", evolution_dir);
rule_context_save ((RuleContext *)fc, user);
g_free (user);
}
-
- if (button != -1) {
- gnome_dialog_close (GNOME_DIALOG (dialog));
- }
+
+ gtk_widget_destroy(dialog);
+
+ filter_editor = NULL;
}
static const char *filter_source_names[] = {
@@ -2986,13 +2962,12 @@ filter_edit (BonoboUIComponent *uih, void *user_data, const char *path)
}
filter_editor = (GtkWidget *)filter_editor_new (fc, filter_source_names);
- gnome_dialog_set_parent (GNOME_DIALOG (filter_editor), FB_WINDOW (fb));
+ /* maybe this needs destroy func? */
+ gtk_window_set_transient_for((GtkWindow *)filter_editor, FB_WINDOW(fb));
gtk_window_set_title (GTK_WINDOW (filter_editor), _("Filters"));
-
- gtk_object_set_data_full (GTK_OBJECT (filter_editor), "context", fc, (GtkDestroyNotify)gtk_object_unref);
- gtk_signal_connect (GTK_OBJECT (filter_editor), "clicked", filter_editor_clicked, fb);
- gtk_signal_connect (GTK_OBJECT (filter_editor), "destroy", filter_editor_destroy, NULL);
- gnome_dialog_append_buttons(GNOME_DIALOG(filter_editor), GNOME_STOCK_BUTTON_CANCEL, NULL);
+ gtk_dialog_add_button((GtkDialog *)filter_editor, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ g_object_set_data_full(G_OBJECT(filter_editor), "context", fc, (GtkDestroyNotify)g_object_unref);
+ g_signal_connect(filter_editor, "response", G_CALLBACK(filter_editor_response), fb);
gtk_widget_show (GTK_WIDGET (filter_editor));
}
@@ -3061,7 +3036,7 @@ footer_info_new (GtkHTML *html, GnomePrintContext *pc, gdouble *line)
struct footer_info *info;
info = g_new (struct footer_info, 1);
- info->local_font = gnome_font_new_closest ("Helvetica", GNOME_FONT_BOOK, FALSE, 10);
+ info->local_font = gnome_font_find_closest ("Helvetica", 10.0);
if (info->local_font) {
*line = gnome_font_get_ascender (info->local_font) + gnome_font_get_descender (info->local_font);
}
@@ -3078,47 +3053,40 @@ do_mail_print (FolderBrowser *fb, gboolean preview)
GnomePrintContext *print_context;
GnomePrintMaster *print_master;
GnomePrintDialog *dialog;
- GnomePrinter *printer = NULL;
+ GnomePrintConfig *config = NULL;
GnomePaper *paper;
gdouble line = 0.0;
- int copies = 1;
- int collate = FALSE;
struct footer_info *info;
if (!preview) {
dialog = GNOME_PRINT_DIALOG (gnome_print_dialog_new (_("Print Message"),
GNOME_PRINT_DIALOG_COPIES));
- gnome_dialog_set_default (GNOME_DIALOG (dialog), GNOME_PRINT_PRINT);
+ gtk_dialog_set_default_response((GtkDialog *)dialog, GNOME_PRINT_DIALOG_RESPONSE_PRINT);
e_gnome_dialog_set_parent (GNOME_DIALOG (dialog), FB_WINDOW (fb));
- switch (gnome_dialog_run (GNOME_DIALOG (dialog))) {
- case GNOME_PRINT_PRINT:
+ switch(gtk_dialog_run((GtkDialog *)dialog)) {
+ case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
break;
- case GNOME_PRINT_PREVIEW:
+ case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
preview = TRUE;
break;
- case -1:
- return;
default:
- gnome_dialog_close (GNOME_DIALOG (dialog));
+ gtk_widget_destroy((GtkWidget *)dialog);
return;
}
- gnome_print_dialog_get_copies (dialog, &copies, &collate);
- printer = gnome_print_dialog_get_printer (dialog);
- gnome_dialog_close (GNOME_DIALOG (dialog));
+ config = gnome_print_dialog_get_config(dialog);
+ gtk_widget_destroy((GtkWidget *)dialog);
}
- print_master = gnome_print_master_new ();
+ if (config) {
+ print_master = gnome_print_master_new_from_config(config);
+ gnome_print_config_unref(config);
+ } else
+ print_master = gnome_print_master_new ();
- if (printer)
- gnome_print_master_set_printer (print_master, printer);
- paper = (GnomePaper *) gnome_paper_with_name (_("US-Letter"));
-
- if (!paper)
- paper = (GnomePaper *) gnome_paper_with_name (gnome_paper_name_default ());
- gnome_print_master_set_paper (print_master, paper);
- gnome_print_master_set_copies (print_master, copies, collate);
+ /* paper size settings? */
+ /*gnome_print_master_set_paper (print_master, paper);*/
print_context = gnome_print_master_get_context (print_master);
html = GTK_HTML (gtk_html_new ());
@@ -3143,12 +3111,10 @@ do_mail_print (FolderBrowser *fb, gboolean preview)
gnome_print_master_close (print_master);
if (preview){
- gboolean landscape = FALSE;
- GnomePrintMasterPreview *preview;
-
- preview = gnome_print_master_preview_new_with_orientation (
- print_master, _("Print Preview"), landscape);
- gtk_widget_show (GTK_WIDGET (preview));
+ GtkWidget *preview;
+
+ preview = gnome_print_master_preview_new(print_master, _("Print Preview"));
+ gtk_widget_show(preview);
} else {
int result = gnome_print_master_print (print_master);
@@ -3258,7 +3224,7 @@ static GtkObject *subscribe_dialog = NULL;
static void
subscribe_dialog_destroy (GtkWidget *widget, gpointer user_data)
{
- gtk_object_unref (subscribe_dialog);
+ g_object_unref (subscribe_dialog);
subscribe_dialog = NULL;
}
@@ -3267,8 +3233,8 @@ manage_subscriptions (BonoboUIComponent *uih, void *user_data, const char *path)
{
if (!subscribe_dialog) {
subscribe_dialog = subscribe_dialog_new ();
- gtk_signal_connect (GTK_OBJECT (SUBSCRIBE_DIALOG (subscribe_dialog)->app), "destroy",
- subscribe_dialog_destroy, NULL);
+ g_signal_connect(SUBSCRIBE_DIALOG (subscribe_dialog)->app, "destroy",
+ G_CALLBACK(subscribe_dialog_destroy), NULL);
subscribe_dialog_show (subscribe_dialog);
} else {
@@ -3284,7 +3250,7 @@ local_configure_done(const char *uri, CamelFolder *folder, void *data)
FolderBrowser *fb = data;
if (FOLDER_BROWSER_IS_DESTROYED (fb)) {
- gtk_object_unref((GtkObject *)fb);
+ g_object_unref((GtkObject *)fb);
return;
}
@@ -3292,7 +3258,7 @@ local_configure_done(const char *uri, CamelFolder *folder, void *data)
folder = fb->folder;
message_list_set_folder(fb->message_list, folder, FALSE);
- gtk_object_unref((GtkObject *)fb);
+ g_object_unref((GtkObject *)fb);
}
void
@@ -3308,7 +3274,7 @@ configure_folder (BonoboUIComponent *uih, void *user_data, const char *path)
vfolder_edit_rule (fb->uri);
} else {
message_list_set_folder(fb->message_list, NULL, FALSE);
- gtk_object_ref((GtkObject *)fb);
+ g_object_ref((GtkObject *)fb);
mail_local_reconfigure_folder(fb->uri, local_configure_done, fb);
}
}
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 <config.h>
#endif
+#include <string.h>
+
#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 */
diff --git a/mail/mail-composer-prefs.h b/mail/mail-composer-prefs.h
index d0cc55592c..8e0086942e 100644
--- a/mail/mail-composer-prefs.h
+++ b/mail/mail-composer-prefs.h
@@ -32,7 +32,9 @@ extern "C" {
#include <gtk/gtk.h>
#include <glade/glade.h>
#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-propmanager.h>
+#warning "re-add gtkhtml prop manager"
+/* this isn't ported in gtkhtml yet */
+/*#include <gtkhtml/gtkhtml-propmanager.h>*/
#include <libgnomeui/gnome-color-picker.h>
#include <libgnomeui/gnome-file-entry.h>
@@ -73,7 +75,7 @@ struct _MailComposerPrefs {
GtkOptionMenu *charset;
/* Spell Checking */
- GtkHTMLPropmanager *pman;
+ struct _GtkHTMLPropmanager *pman;
GtkToggleButton *spell_check;
GnomeColorPicker *colour;
GtkCList *language;
diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c
index c34d7a6b55..fe1aa9cb2e 100644
--- a/mail/mail-config-factory.c
+++ b/mail/mail-config-factory.c
@@ -28,7 +28,8 @@
#include "mail-accounts.h"
#include "mail-preferences.h"
#include "mail-composer-prefs.h"
-#include "mail-font-prefs.h"
+#warning "mail-font-prefs"
+/*#include "mail-font-prefs.h"*/
#include "mail-config-factory.h"
@@ -83,9 +84,13 @@ config_control_factory_cb (BonoboGenericFactory *factory, const char *component_
} else if (!strcmp (component_id, MAIL_COMPOSER_PREFS_CONTROL_ID)) {
prefs = mail_composer_prefs_new ();
data->apply = (ApplyFunc) mail_composer_prefs_apply;
+#warning "font prefs"
+/* & see below */
+#if 0
} else if (!strcmp (component_id, MAIL_FONT_PREFS_CONTROL_ID)) {
prefs = mail_font_prefs_new ();
data->apply = (ApplyFunc) mail_font_prefs_apply;
+#endif
} else {
g_assert_not_reached ();
}
@@ -103,8 +108,10 @@ config_control_factory_cb (BonoboGenericFactory *factory, const char *component_
MAIL_PREFERENCES (prefs)->control = control;
} else if (!strcmp (component_id, MAIL_COMPOSER_PREFS_CONTROL_ID)) {
MAIL_COMPOSER_PREFS (prefs)->control = control;
+#if 0
} else if (!strcmp (component_id, MAIL_FONT_PREFS_CONTROL_ID)) {
MAIL_FONT_PREFS (prefs)->control = control;
+#endif
} else {
g_assert_not_reached ();
}
diff --git a/mail/mail-preferences.c b/mail/mail-preferences.c
index d81de371ce..c102d6c02a 100644
--- a/mail/mail-preferences.c
+++ b/mail/mail-preferences.c
@@ -38,7 +38,7 @@
static void mail_preferences_class_init (MailPreferencesClass *class);
static void mail_preferences_init (MailPreferences *dialog);
-static void mail_preferences_finalise (GtkObject *obj);
+static void mail_preferences_finalise (GObject *obj);
static GtkVBoxClass *parent_class = NULL;
@@ -83,7 +83,7 @@ mail_preferences_init (MailPreferences *preferences)
}
static void
-mail_preferences_finalise (GtkObject *obj)
+mail_preferences_finalise (GObject *obj)
{
MailPreferences *prefs = (MailPreferences *) obj;
@@ -152,7 +152,7 @@ restore_labels_clicked (GtkWidget *widget, gpointer user_data)
int i;
for (i = 0; i < 5; i++) {
- gtk_entry_set_text(prefs->labels[i].name, U_(label_defaults[i].name));
+ gtk_entry_set_text(prefs->labels[i].name, _(label_defaults[i].name));
colorpicker_set_color (prefs->labels[i].color, label_defaults[i].color);
}
}
@@ -177,7 +177,7 @@ option_menu_connect (GtkOptionMenu *omenu, gpointer user_data)
items = GTK_MENU_SHELL (menu)->children;
while (items) {
item = items->data;
- g_signal_connect(item, "activate", menu_changed, user_data);
+ g_signal_connect(item, "activate", G_CALLBACK(menu_changed), user_data);
items = items->next;
}
}
@@ -212,11 +212,11 @@ mail_preferences_construct (MailPreferences *prefs)
/* Message Display */
prefs->timeout_toggle = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkMarkTimeout"));
gtk_toggle_button_set_active (prefs->timeout_toggle, mail_config_get_do_seen_timeout ());
- g_signal_connect(prefs->timeout_toggle, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->timeout_toggle, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->timeout = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spinMarkTimeout"));
gtk_spin_button_set_value (prefs->timeout, (1.0 * mail_config_get_mark_as_seen_timeout ()) / 1000.0);
- g_signal_connect(prefs->timeout, "changed", entry_changed, prefs);
+ g_signal_connect(prefs->timeout, "changed", G_CALLBACK(entry_changed), prefs);
prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset"));
menu = e_charset_picker_new (mail_config_get_default_charset ());
@@ -225,71 +225,72 @@ mail_preferences_construct (MailPreferences *prefs)
prefs->citation_highlight = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkHighlightCitations"));
gtk_toggle_button_set_active (prefs->citation_highlight, mail_config_get_citation_highlight ());
- g_signal_connect(prefs->citation_highlight, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->citation_highlight, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->citation_color = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerHighlightCitations"));
colorpicker_set_color (prefs->citation_color, mail_config_get_citation_color ());
- g_signal_connect(prefs->citation_color, "color-set", color_set, prefs);
+ g_signal_connect(prefs->citation_color, "color-set", G_CALLBACK(color_set), prefs);
/* Deleting Mail */
prefs->empty_trash = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEmptyTrashOnExit"));
gtk_toggle_button_set_active (prefs->empty_trash, mail_config_get_empty_trash_on_exit ());
- g_signal_connect(prefs->empty_trash, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->empty_trash, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->confirm_expunge = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkConfirmExpunge"));
gtk_toggle_button_set_active (prefs->confirm_expunge, mail_config_get_confirm_expunge ());
- g_signal_connect(prefs->confirm_expunge, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->confirm_expunge, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
/* New Mail Notification */
prefs->notify_not = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyNot"));
gtk_toggle_button_set_active (prefs->notify_not, mail_config_get_new_mail_notify () == MAIL_CONFIG_NOTIFY_NOT);
- g_signal_connect(prefs->notify_not, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->notify_not, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->notify_beep = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyBeep"));
gtk_toggle_button_set_active (prefs->notify_beep, mail_config_get_new_mail_notify () == MAIL_CONFIG_NOTIFY_BEEP);
- g_signal_connect(prefs->notify_beep, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->notify_beep, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->notify_play_sound = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyPlaySound"));
gtk_toggle_button_set_active (prefs->notify_play_sound,
mail_config_get_new_mail_notify () == MAIL_CONFIG_NOTIFY_PLAY_SOUND);
- g_signal_connect(prefs->notify_play_sound, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->notify_play_sound, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->notify_sound_file = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileNotifyPlaySound"));
text = mail_config_get_new_mail_notify_sound_file ();
- gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)),
- text ? text : "");
- g_signal_connect(gnome_file_entry_gtk_entry (prefs->notify_sound_file), "changed",
- entry_changed, prefs);
+ gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)), text ? text : "");
+ g_signal_connect(gnome_file_entry_gtk_entry (prefs->notify_sound_file), "changed", G_CALLBACK(entry_changed), prefs);
/* HTML Mail tab */
/* Loading Images */
prefs->images_never = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesNever"));
gtk_toggle_button_set_active (prefs->images_never, mail_config_get_http_mode () == MAIL_CONFIG_HTTP_NEVER);
- g_signal_connect(prefs->images_never, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->images_never, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->images_sometimes = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesSometimes"));
gtk_toggle_button_set_active (prefs->images_sometimes, mail_config_get_http_mode () == MAIL_CONFIG_HTTP_SOMETIMES);
- g_signal_connect(prefs->images_sometimes, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->images_sometimes, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->images_always = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesAlways"));
gtk_toggle_button_set_active (prefs->images_always, mail_config_get_http_mode () == MAIL_CONFIG_HTTP_ALWAYS);
- g_signal_connect(prefs->images_always, "toggled", toggle_button_toggled, prefs);
-
+ g_signal_connect(prefs->images_always, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
+
+#warning "gtkhtml prop manager"
+#if 0
prefs->pman = GTK_HTML_PROPMANAGER (gtk_html_propmanager_new (prefs->gconf));
- 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);
for (i = 0; names[i][0] != NULL; i++) {
widget = glade_xml_get_widget (gui, names[i][1]);
- g_signal_connect(widget, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(widget, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
}
-
+#endif
+
prefs->prompt_unwanted_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptWantHTML"));
gtk_toggle_button_set_active (prefs->prompt_unwanted_html, mail_config_get_confirm_unwanted_html ());
- g_signal_connect(prefs->prompt_unwanted_html, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->prompt_unwanted_html, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
/* Labels and Colours tab */
for (i = 0; i < 5; i++) {
@@ -300,16 +301,16 @@ mail_preferences_construct (MailPreferences *prefs)
g_free (widget_name);
text = mail_config_get_label_name (i);
gtk_entry_set_text(prefs->labels[i].name, text ? text : "");
- g_signal_connect(prefs->labels[i].name, "changed", entry_changed, prefs);
+ g_signal_connect(prefs->labels[i].name, "changed", G_CALLBACK(entry_changed), prefs);
widget_name = g_strdup_printf ("colorLabel%d", i);
prefs->labels[i].color = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, widget_name));
g_free (widget_name);
colorpicker_set_color (prefs->labels[i].color, mail_config_get_label_color (i));
- g_signal_connect(prefs->labels[i].color, "color_set", color_set, prefs);
+ g_signal_connect(prefs->labels[i].color, "color_set", G_CALLBACK(color_set), prefs);
}
prefs->restore_labels = GTK_BUTTON (glade_xml_get_widget (gui, "cmdRestoreLabels"));
- g_signal_connect(prefs->restore_labels, "clicked", restore_labels_clicked, prefs);
+ g_signal_connect(prefs->restore_labels, "clicked", G_CALLBACK(restore_labels_clicked), prefs);
}
@@ -330,6 +331,7 @@ mail_preferences_apply (MailPreferences *prefs)
{
GtkWidget *entry, *menu;
char *string;
+ const char *cstring;
guint32 rgb;
int i, val;
@@ -367,8 +369,8 @@ mail_preferences_apply (MailPreferences *prefs)
mail_config_set_new_mail_notify (MAIL_CONFIG_NOTIFY_PLAY_SOUND);
entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (prefs->notify_sound_file));
- string = gtk_entry_get_text (GTK_ENTRY (entry));
- mail_config_set_new_mail_notify_sound_file (string);
+ cstring = gtk_entry_get_text (GTK_ENTRY (entry));
+ mail_config_set_new_mail_notify_sound_file (cstring);
/* HTML Mail */
if (gtk_toggle_button_get_active (prefs->images_always))
@@ -377,17 +379,18 @@ mail_preferences_apply (MailPreferences *prefs)
mail_config_set_http_mode (MAIL_CONFIG_HTTP_SOMETIMES);
else
mail_config_set_http_mode (MAIL_CONFIG_HTTP_NEVER);
-
+
+#warning "gtkhtml propmanager"
+#if 0
gtk_html_propmanager_apply (prefs->pman);
-
+#endif
mail_config_set_confirm_unwanted_html (gtk_toggle_button_get_active (prefs->prompt_unwanted_html));
/* Labels and Colours */
for (i = 0; i < 5; i++) {
/* save the label... */
- string = gtk_entry_get_text(prefs->labels[i].name);
- mail_config_set_label_name (i, string);
- g_free (string);
+ cstring = gtk_entry_get_text(prefs->labels[i].name);
+ mail_config_set_label_name (i, cstring);
/* save the colour... */
rgb = colorpicker_get_color (prefs->labels[i].color);
diff --git a/mail/mail-preferences.h b/mail/mail-preferences.h
index b9e1b537a9..8b630e88ce 100644
--- a/mail/mail-preferences.h
+++ b/mail/mail-preferences.h
@@ -33,7 +33,8 @@ extern "C" {
#include <libgnomeui/gnome-color-picker.h>
#include <libgnomeui/gnome-file-entry.h>
#include <glade/glade.h>
-#include <gtkhtml/gtkhtml-propmanager.h>
+#warning "gtkhtml-propmanger"
+/*#include <gtkhtml/gtkhtml-propmanager.h>*/
#include <gconf/gconf-client.h>
#include "evolution-config-control.h"
@@ -90,7 +91,7 @@ struct _MailPreferences {
GtkToggleButton *prompt_unwanted_html;
/* GtkHTML Properties */
- GtkHTMLPropmanager *pman;
+ struct _GtkHTMLPropmanager *pman;
/* Labels and Colours tab */
struct {