aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-12-18 04:38:25 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-12-18 04:38:25 +0800
commitf37b0a1ab7d9dd437905d10d85410992ad9abc0a (patch)
treec8d13292527ab275073420046acb7f786b4a4008
parente446a3dd9f6f82ef7152a98740092cb1c94af65c (diff)
downloadgsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.tar.gz
gsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.tar.zst
gsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.zip
...And a whole bunch more build fixes.
2002-12-17 Jeffrey Stedfast <fejj@ximian.com> ...And a whole bunch more build fixes. * mail-vfolder.c (mail_vfolder_delete_uri): Don't use g_string_sprintfa() anymore since it is apparently deprecated. * mail-session.c (main_get_filter_driver): Don't use g_string_sprintfa() anymore since it is apparently deprecated. * mail-ops.c (build_from): Don't use g_string_sprintfa() anymore since it is apparently deprecated. * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Don't use g_string_sprintfa() anymore since it is apparently deprecated. * mail-autofilter.c: Don't use g_string_sprintfa() anymore since it is apparently deprecated. * folder-browser.c: Don't use g_string_sprintfa() anymore since it is apparently deprecated. * mail-search.c (mail_search_set_subject): Remove the unnecessary g_strdup()'age as well as fix a possible buffer overrun. * mail-local.c (mail_local_folder_construct): Use g_path_get_basename(). * mail-config-druid.c (make_account): Don't use e_utf8_* functions. svn path=/trunk/; revision=19152
-rw-r--r--mail/ChangeLog31
-rw-r--r--mail/folder-browser.c124
-rw-r--r--mail/mail-accounts.h11
-rw-r--r--mail/mail-autofilter.c17
-rw-r--r--mail/mail-callbacks.c2
-rw-r--r--mail/mail-composer-prefs.c22
-rw-r--r--mail/mail-composer-prefs.h3
-rw-r--r--mail/mail-config-druid.c4
-rw-r--r--mail/mail-format.c24
-rw-r--r--mail/mail-local.c26
-rw-r--r--mail/mail-mt.c1
-rw-r--r--mail/mail-ops.c44
-rw-r--r--mail/mail-search-dialogue.c22
-rw-r--r--mail/mail-search-dialogue.h8
-rw-r--r--mail/mail-search.c209
-rw-r--r--mail/mail-session.c5
-rw-r--r--mail/mail-signature-editor.c1
-rw-r--r--mail/mail-tools.c16
-rw-r--r--mail/mail-vfolder.c70
-rw-r--r--mail/main.c1
-rw-r--r--mail/message-browser.c1
-rw-r--r--mail/message-tag-editor.c12
-rw-r--r--mail/message-tag-followup.c12
-rw-r--r--mail/subscribe-dialog.c1
24 files changed, 321 insertions, 346 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 482dad554e..18f0db9242 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,34 @@
+2002-12-17 Jeffrey Stedfast <fejj@ximian.com>
+
+ ...And a whole bunch more build fixes.
+
+ * mail-vfolder.c (mail_vfolder_delete_uri): Don't use
+ g_string_sprintfa() anymore since it is apparently deprecated.
+
+ * mail-session.c (main_get_filter_driver): Don't use
+ g_string_sprintfa() anymore since it is apparently deprecated.
+
+ * mail-ops.c (build_from): Don't use g_string_sprintfa() anymore
+ since it is apparently deprecated.
+
+ * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Don't use
+ g_string_sprintfa() anymore since it is apparently deprecated.
+
+ * mail-autofilter.c: Don't use g_string_sprintfa() anymore since
+ it is apparently deprecated.
+
+ * folder-browser.c: Don't use g_string_sprintfa() anymore since it
+ is apparently deprecated.
+
+ * mail-search.c (mail_search_set_subject): Remove the unnecessary
+ g_strdup()'age as well as fix a possible buffer overrun.
+
+ * mail-local.c (mail_local_folder_construct): Use
+ g_path_get_basename().
+
+ * mail-config-druid.c (make_account): Don't use e_utf8_*
+ functions.
+
2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c #define a STANDARD_ISSUE_TABLE_OPEN string used
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 1c024b28fd..0dad15eaeb 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -740,72 +740,72 @@ folder_browser_paste (GtkWidget *menuitem, FolderBrowser *fb)
/* all this crap so we can give the user a whoopee doo status bar */
static void
-update_status_bar(FolderBrowser *fb)
+update_status_bar (FolderBrowser *fb)
{
+ extern CamelFolder *outbox_folder, *sent_folder;
CORBA_Environment ev;
int tmp, total;
GString *work;
- extern CamelFolder *outbox_folder, *sent_folder;
-
+
if (fb->folder == NULL
|| fb->message_list == NULL
|| fb->shell_view == CORBA_OBJECT_NIL)
return;
-
- if (!fb->message_list->hidedeleted || !camel_folder_has_summary_capability(fb->folder)) {
- total = camel_folder_get_message_count(fb->folder);
+
+ if (!fb->message_list->hidedeleted || !camel_folder_has_summary_capability (fb->folder)) {
+ total = camel_folder_get_message_count (fb->folder);
} else {
- GPtrArray *sum = camel_folder_get_summary(fb->folder);
+ GPtrArray *sum = camel_folder_get_summary (fb->folder);
int i;
-
+
if (sum) {
total = 0;
- for (i=0;i<sum->len;i++) {
+ for (i = 0; i < sum->len; i++) {
CamelMessageInfo *info = sum->pdata[i];
if ((info->flags & CAMEL_MESSAGE_DELETED) == 0)
total++;
}
- camel_folder_free_summary(fb->folder, sum);
+ camel_folder_free_summary (fb->folder, sum);
} else {
- total = camel_folder_get_message_count(fb->folder);
+ total = camel_folder_get_message_count (fb->folder);
}
}
- work = g_string_new("");
- g_string_sprintfa(work, _("%d new"), camel_folder_get_unread_message_count(fb->folder));
- tmp = message_list_hidden(fb->message_list);
+ work = g_string_new ("");
+ g_string_append_printf (work, _("%d new"), camel_folder_get_unread_message_count (fb->folder));
+ tmp = message_list_hidden (fb->message_list);
if (0 < tmp && tmp < total) {
- g_string_append(work, _(", "));
+ g_string_append (work, _(", "));
if (tmp < total / 2)
- g_string_sprintfa(work, _("%d hidden"), tmp);
+ g_string_append_printf (work, _("%d hidden"), tmp);
else
- g_string_sprintfa(work, _("%d visible"), total - tmp);
+ g_string_append_printf (work, _("%d visible"), total - tmp);
}
- tmp = e_selection_model_selected_count(e_tree_get_selection_model(fb->message_list->tree));
+ tmp = e_selection_model_selected_count (e_tree_get_selection_model (fb->message_list->tree));
if (tmp) {
- g_string_append(work, _(", "));
- g_string_sprintfa(work, _("%d selected"), tmp);
+ g_string_append (work, _(", "));
+ g_string_append_printf (work, _("%d selected"), tmp);
}
- g_string_append(work, _(", "));
-
+ g_string_append (work, _(", "));
+
if (fb->folder == outbox_folder)
- g_string_sprintfa(work, _("%d unsent"), total);
+ g_string_append_printf (work, _("%d unsent"), total);
else if (fb->folder == sent_folder)
- g_string_sprintfa(work, _("%d sent"), total);
+ g_string_append_printf (work, _("%d sent"), total);
else
- g_string_sprintfa(work, _("%d total"), total);
-
- CORBA_exception_init(&ev);
- GNOME_Evolution_ShellView_setFolderBarLabel(fb->shell_view, work->str, &ev);
- CORBA_exception_free(&ev);
-
+ g_string_append_printf (work, _("%d total"), total);
+
+ CORBA_exception_init (&ev);
+ GNOME_Evolution_ShellView_setFolderBarLabel (fb->shell_view, work->str, &ev);
+ CORBA_exception_free (&ev);
+
if (fb->update_status_bar_idle_id != 0) {
g_source_remove (fb->update_status_bar_idle_id);
fb->update_status_bar_idle_id = 0;
}
-
- g_string_free(work, TRUE);
+
+ g_string_free (work, TRUE);
}
static gboolean
@@ -1153,9 +1153,9 @@ folder_browser_search_menu_activated (ESearchBar *esb, int id, FolderBrowser *fb
text = e_search_bar_get_text(esb);
name = g_strdup_printf("%s %s", rule->name, (text&&text[0])?text:"''");
- g_free(text);
+ g_free (text);
filter_rule_set_name(rule, name);
- g_free(name);
+ g_free (name);
filter_rule_set_source(rule, FILTER_SOURCE_INCOMING);
vfolder_rule_add_source((VfolderRule *)rule, fb->uri);
@@ -1195,7 +1195,7 @@ folder_browser_config_search (EFilterBar *efb, FilterRule *rule, int id, const c
words = camel_search_words_split(query);
for (i=0;i<words->len;i++)
e_searching_tokenizer_add_secondary_search_string (st, words->words[i]->word);
- camel_search_words_free(words);
+ camel_search_words_free (words);
} else if(!strcmp(part->name, "sender")) {
FilterInput *input = (FilterInput *)filter_part_find_element(part, "sender");
if (input)
@@ -1372,15 +1372,15 @@ vfolder_type_current(FolderBrowser *fb, int type)
}
/* external api to vfolder/filter on X, based on current message */
-void vfolder_subject(GtkWidget *w, FolderBrowser *fb) { vfolder_type_current(fb, AUTO_SUBJECT); }
-void vfolder_sender(GtkWidget *w, FolderBrowser *fb) { vfolder_type_current(fb, AUTO_FROM); }
-void vfolder_recipient(GtkWidget *w, FolderBrowser *fb) { vfolder_type_current(fb, AUTO_TO); }
-void vfolder_mlist(GtkWidget *w, FolderBrowser *fb) { vfolder_type_current(fb, AUTO_MLIST); }
+void vfolder_subject (GtkWidget *w, FolderBrowser *fb) { vfolder_type_current(fb, AUTO_SUBJECT); }
+void vfolder_sender (GtkWidget *w, FolderBrowser *fb) { vfolder_type_current(fb, AUTO_FROM); }
+void vfolder_recipient (GtkWidget *w, FolderBrowser *fb) { vfolder_type_current(fb, AUTO_TO); }
+void vfolder_mlist (GtkWidget *w, FolderBrowser *fb) { vfolder_type_current(fb, AUTO_MLIST); }
-static void filter_type_uid(CamelFolder *folder, const char *uid, const char *source, int type);
+static void filter_type_uid (CamelFolder *folder, const char *uid, const char *source, int type);
static void
-filter_type_current(FolderBrowser *fb, int type)
+filter_type_current (FolderBrowser *fb, int type)
{
GPtrArray *uids;
int i;
@@ -1403,10 +1403,10 @@ filter_type_current(FolderBrowser *fb, int type)
g_ptr_array_free (uids, TRUE);
}
-void filter_subject(GtkWidget *w, FolderBrowser *fb) { filter_type_current(fb, AUTO_SUBJECT); }
-void filter_sender(GtkWidget *w, FolderBrowser *fb) { filter_type_current(fb, AUTO_FROM); }
-void filter_recipient(GtkWidget *w, FolderBrowser *fb) { filter_type_current(fb, AUTO_TO); }
-void filter_mlist(GtkWidget *w, FolderBrowser *fb) { filter_type_current(fb, AUTO_MLIST); }
+void filter_subject (GtkWidget *w, FolderBrowser *fb) { filter_type_current (fb, AUTO_SUBJECT); }
+void filter_sender (GtkWidget *w, FolderBrowser *fb) { filter_type_current (fb, AUTO_FROM); }
+void filter_recipient (GtkWidget *w, FolderBrowser *fb) { filter_type_current (fb, AUTO_TO); }
+void filter_mlist (GtkWidget *w, FolderBrowser *fb) { filter_type_current (fb, AUTO_MLIST); }
/* ************************************************************ */
@@ -1421,7 +1421,7 @@ struct _filter_data {
};
static void
-filter_data_free(struct _filter_data *fdata)
+filter_data_free (struct _filter_data *fdata)
{
g_free (fdata->uid);
g_free (fdata->uri);
@@ -1439,7 +1439,7 @@ vfolder_type_got_message(CamelFolder *folder, const char *uid, CamelMimeMessage
if (msg)
vfolder_gui_add_from_message(msg, data->type, data->uri);
- filter_data_free(data);
+ filter_data_free (data);
}
static void
@@ -1466,7 +1466,7 @@ filter_type_got_message(CamelFolder *folder, const char *uid, CamelMimeMessage *
if (msg)
filter_gui_add_from_message(msg, data->source, data->type);
- filter_data_free(data);
+ filter_data_free (data);
}
static void
@@ -1488,7 +1488,7 @@ static void filter_mlist_uid(GtkWidget *w, struct _filter_data *fdata) { filter
void
hide_none(GtkWidget *w, FolderBrowser *fb)
{
- message_list_hide_clear(fb->message_list);
+ message_list_hide_clear (fb->message_list);
}
void
@@ -1560,11 +1560,11 @@ hide_subject(GtkWidget *w, FolderBrowser *fb)
if (subject) {
subject = strip_re(subject);
if (subject && subject[0]) {
- expr = g_string_new("(match-all (header-contains \"subject\" ");
- e_sexp_encode_string(expr, subject);
- g_string_append(expr, "))");
- message_list_hide_add(fb->message_list, expr->str, ML_HIDE_SAME, ML_HIDE_SAME);
- g_string_free(expr, TRUE);
+ expr = g_string_new ("(match-all (header-contains \"subject\" ");
+ e_sexp_encode_string (expr, subject);
+ g_string_append (expr, "))");
+ message_list_hide_add (fb->message_list, expr->str, ML_HIDE_SAME, ML_HIDE_SAME);
+ g_string_free (expr, TRUE);
return;
}
}
@@ -1572,20 +1572,20 @@ hide_subject(GtkWidget *w, FolderBrowser *fb)
}
void
-hide_sender(GtkWidget *w, FolderBrowser *fb)
+hide_sender (GtkWidget *w, FolderBrowser *fb)
{
const CamelInternetAddress *from;
const char *real, *addr;
GString *expr;
if (fb->mail_display->current_message) {
- from = camel_mime_message_get_from(fb->mail_display->current_message);
- if (camel_internet_address_get(from, 0, &real, &addr)) {
- expr = g_string_new("(match-all (header-contains \"from\" ");
- e_sexp_encode_string(expr, addr);
- g_string_append(expr, "))");
- message_list_hide_add(fb->message_list, expr->str, ML_HIDE_SAME, ML_HIDE_SAME);
- g_string_free(expr, TRUE);
+ from = camel_mime_message_get_from (fb->mail_display->current_message);
+ if (camel_internet_address_get (from, 0, &real, &addr)) {
+ expr = g_string_new ("(match-all (header-contains \"from\" ");
+ e_sexp_encode_string (expr, addr);
+ g_string_append (expr, "))");
+ message_list_hide_add (fb->message_list, expr->str, ML_HIDE_SAME, ML_HIDE_SAME);
+ g_string_free (expr, TRUE);
return;
}
}
diff --git a/mail/mail-accounts.h b/mail/mail-accounts.h
index 02d520faea..b69b12c349 100644
--- a/mail/mail-accounts.h
+++ b/mail/mail-accounts.h
@@ -65,23 +65,12 @@ struct _MailAccountsTab {
GdkBitmap *mark_bitmap;
GtkTreeView *table;
-#if 0
- ETable *table;
- ETableModel *model;
-#endif
GtkButton *mail_add;
GtkButton *mail_edit;
GtkButton *mail_delete;
GtkButton *mail_default;
GtkButton *mail_able;
-
- GtkCList *news;
- int news_row;
- GtkButton *news_add;
- GtkButton *news_edit;
- GtkButton *news_delete;
- GtkWidget *news_editor;
};
struct _MailAccountsTabClass {
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index da5c1798ce..3916b33c55 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -363,7 +363,7 @@ mail_filter_delete_uri(CamelStore *store, const char *uri)
system = EVOLUTION_DATADIR "/evolution/filtertypes.xml";
rule_context_load ((RuleContext *)fc, system, user);
- deleted = rule_context_delete_uri((RuleContext *)fc, uri, uri_cmp);
+ deleted = rule_context_delete_uri ((RuleContext *) fc, uri, uri_cmp);
if (deleted) {
GtkWidget *dialog;
GString *s;
@@ -372,13 +372,14 @@ mail_filter_delete_uri(CamelStore *store, const char *uri)
s = g_string_new (_("The following filter rule(s):\n"));
l = deleted;
while (l) {
- g_string_sprintfa(s, " %s\n", (char *)l->data);
+ g_string_append_printf (s, " %s\n", (char *)l->data);
l = l->next;
}
- g_string_sprintfa (s, _("Used the removed folder:\n '%s'\n"
- "And have been updated."), uri);
+ g_string_append_printf (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_BUTTONS_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);
@@ -386,9 +387,9 @@ mail_filter_delete_uri(CamelStore *store, const char *uri)
gtk_widget_show (dialog);
printf("Folder deleterename '%s' changed filters, resaving\n", uri);
- if (rule_context_save((RuleContext *)fc, user) == -1)
- g_warning("Could not write out changed filter rules\n");
- rule_context_free_uri_list((RuleContext *)fc, deleted);
+ if (rule_context_save ((RuleContext *) fc, user) == -1)
+ g_warning ("Could not write out changed filter rules\n");
+ rule_context_free_uri_list ((RuleContext *) fc, deleted);
}
g_free (user);
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 2b550bcb0a..4617f70bfe 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -255,7 +255,7 @@ ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EDestination **recip
name = e_destination_get_textrep (recipients[i]);
- g_string_sprintfa (str, " %s\n", name);
+ g_string_append_printf (str, " %s\n", name);
}
}
diff --git a/mail/mail-composer-prefs.c b/mail/mail-composer-prefs.c
index 3bc5a5e0f2..ccf856294a 100644
--- a/mail/mail-composer-prefs.c
+++ b/mail/mail-composer-prefs.c
@@ -213,7 +213,7 @@ sig_edit (GtkWidget *widget, MailComposerPrefs *prefs)
GtkTreeIter iter;
GtkTreeSelection *selection;
- selection = gtk_tree_view_get_selection (prefs->sig_clist);
+ selection = gtk_tree_view_get_selection (prefs->sig_list);
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
return;
@@ -239,8 +239,8 @@ mail_composer_prefs_new_signature (MailComposerPrefs *prefs, gboolean html, cons
GtkTreeSelection *selection;
char *name = NULL, *val;
- model = (GtkListStore *) gtk_tree_view_get_model (prefs->sig_clist);
- selection = gtk_tree_view_get_selection (prefs->sig_clist);
+ model = (GtkListStore *) gtk_tree_view_get_model (prefs->sig_list);
+ selection = gtk_tree_view_get_selection (prefs->sig_list);
if (sig->name)
val = name = g_strconcat (sig->name, " ", _("[script]"), NULL);
else
@@ -266,7 +266,7 @@ sig_delete (GtkWidget *widget, MailComposerPrefs *prefs)
GtkTreeSelection *selection;
GtkTreeIter iter;
- selection = gtk_tree_view_get_selection (prefs->sig_clist);
+ selection = gtk_tree_view_get_selection (prefs->sig_list);
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
gtk_tree_model_get (model, &iter, 1, &sig, -1);
gtk_list_store_remove ((GtkListStore *) model, &iter);
@@ -416,7 +416,7 @@ sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, MailCompos
d(printf ("accounts NAME CHANGED\n"));
/* this is one bizarro interface */
- model = gtk_tree_view_get_model (prefs->sig_clist);
+ model = gtk_tree_view_get_model (prefs->sig_list);
sprintf (path, "%d", sig->id);
if (gtk_tree_model_get_iter_from_string (model, &iter, path)) {
char *val, *name = NULL;
@@ -432,7 +432,7 @@ sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, MailCompos
break;
case MAIL_CONFIG_SIG_EVENT_CONTENT_CHANGED:
d(printf ("accounts CONTENT CHANGED\n"));
- selection = gtk_tree_view_get_selection (prefs->sig_clist);
+ selection = gtk_tree_view_get_selection (prefs->sig_list);
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
gtk_tree_model_get (model, &iter, 1, &current, -1);
if (sig == current)
@@ -864,18 +864,18 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs)
prefs->sig_delete = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureDelete"));
g_signal_connect (prefs->sig_delete, "clicked", G_CALLBACK (sig_delete), prefs);
- prefs->sig_clist = GTK_TREE_VIEW (glade_xml_get_widget (gui, "clistSignatures"));
+ prefs->sig_list = GTK_TREE_VIEW (glade_xml_get_widget (gui, "clistSignatures"));
model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
- gtk_tree_view_set_model (prefs->sig_clist, (GtkTreeModel *)model);
- gtk_tree_view_insert_column_with_attributes (prefs->sig_clist, -1, _("Signature(s)"),
+ gtk_tree_view_set_model (prefs->sig_list, (GtkTreeModel *)model);
+ gtk_tree_view_insert_column_with_attributes (prefs->sig_list, -1, _("Signature(s)"),
gtk_cell_renderer_text_new (),
"text", 0,
NULL);
- selection = gtk_tree_view_get_selection (prefs->sig_clist);
+ selection = gtk_tree_view_get_selection (prefs->sig_list);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
g_signal_connect (selection, "changed", G_CALLBACK (sig_selection_changed), prefs);
- sig_fill_clist (prefs->sig_clist);
+ sig_fill_clist (prefs->sig_list);
if (mail_config_get_signature_list () == NULL) {
gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_delete, FALSE);
gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_edit, FALSE);
diff --git a/mail/mail-composer-prefs.h b/mail/mail-composer-prefs.h
index 9ce7cf51e8..884953dd9e 100644
--- a/mail/mail-composer-prefs.h
+++ b/mail/mail-composer-prefs.h
@@ -96,10 +96,9 @@ struct _MailComposerPrefs {
/* Keyboard Shortcuts */
GtkOptionMenu *shortcuts_type;
- GtkCList *keybindings;
/* Signatures */
- GtkTreeView *sig_clist;
+ GtkTreeView *sig_list;
GtkButton *sig_add;
GtkButton *sig_edit;
GtkButton *sig_delete;
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index c64d90fb14..a198952358 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -38,7 +38,7 @@
#include <libgnomeui/gnome-druid-page-standard.h>
#include <glade/glade.h>
#include <gtkhtml/gtkhtml.h>
-#include <gal/widgets/e-unicode.h>
+
#include "mail-config-druid.h"
#include "mail-config.h"
#include "mail-ops.h"
@@ -473,7 +473,7 @@ make_account (void)
account->id = g_new0 (MailConfigIdentity, 1);
name = g_get_real_name ();
- account->id->name = e_utf8_from_locale_string (name);
+ account->id->name = g_strdup (name);
user = g_get_user_name ();
if (user && !uname (&uts) && strchr (uts.nodename, '.'))
account->id->address = g_strdup_printf ("%s@%s", user, uts.nodename);
diff --git a/mail/mail-format.c b/mail/mail-format.c
index fd77b06a74..f2f2c3d01f 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -1869,15 +1869,15 @@ mail_get_message_rfc822 (CamelMimeMessage *message, gboolean want_plain, gboolea
* <P> to <PRE> switch.
*/
if (!strncasecmp (text, "<pre>", 5))
- g_string_sprintfa (retval, "<PRE>");
+ g_string_append_printf (retval, "<PRE>");
/* create credits */
cia = camel_mime_message_get_from (message);
buf = camel_address_format (CAMEL_ADDRESS (cia));
if (buf) {
html = camel_text_to_html (buf, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0);
- g_string_sprintfa (retval, "%s<b>From:</b> %s<br>",
- citation, html);
+ g_string_append_printf (retval, "%s<b>From:</b> %s<br>",
+ citation, html);
g_free (html);
g_free (buf);
}
@@ -1886,8 +1886,8 @@ mail_get_message_rfc822 (CamelMimeMessage *message, gboolean want_plain, gboolea
buf = camel_address_format (CAMEL_ADDRESS (cia));
if (buf) {
html = camel_text_to_html (buf, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0);
- g_string_sprintfa (retval, "%s<b>To:</b> %s<br>",
- citation, html);
+ g_string_append_printf (retval, "%s<b>To:</b> %s<br>",
+ citation, html);
g_free (html);
g_free (buf);
}
@@ -1896,8 +1896,8 @@ mail_get_message_rfc822 (CamelMimeMessage *message, gboolean want_plain, gboolea
buf = camel_address_format (CAMEL_ADDRESS (cia));
if (buf) {
html = camel_text_to_html (buf, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0);
- g_string_sprintfa (retval, "%s<b>Cc:</b> %s<br>",
- citation, html);
+ g_string_append_printf (retval, "%s<b>Cc:</b> %s<br>",
+ citation, html);
g_free (html);
g_free (buf);
}
@@ -1906,22 +1906,22 @@ mail_get_message_rfc822 (CamelMimeMessage *message, gboolean want_plain, gboolea
if (buf) {
html = camel_text_to_html (buf, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL |
CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
- g_string_sprintfa (retval, "%s<b>Subject:</b> %s<br>",
- citation, html);
+ g_string_append_printf (retval, "%s<b>Subject:</b> %s<br>",
+ citation, html);
g_free (html);
}
date_val = camel_mime_message_get_date (message, &offset);
buf = header_format_date (date_val, offset);
html = camel_text_to_html (buf, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0);
- g_string_sprintfa (retval, "%s<b>Date:</b> %s<br>", citation, html);
+ g_string_append_printf (retval, "%s<b>Date:</b> %s<br>", citation, html);
g_free (html);
g_free (buf);
if (!strncasecmp (text, "<pre>", 5))
- g_string_sprintfa (retval, "%s<br>%s", citation, text + 5);
+ g_string_append_printf (retval, "%s<br>%s", citation, text + 5);
else
- g_string_sprintfa (retval, "%s<br>%s", citation, text);
+ g_string_append_printf (retval, "%s<br>%s", citation, text);
g_free (text);
buf = retval->str;
diff --git a/mail/mail-local.c b/mail/mail-local.c
index c8d80c8a5e..490514be9d 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -627,23 +627,21 @@ mail_local_folder_get_type (void)
}
static MailLocalFolder *
-mail_local_folder_construct(MailLocalFolder *mlf, MailLocalStore *parent_store, const char *full_name, CamelException *ex)
+mail_local_folder_construct(MailLocalFolder *mlf, MailLocalStore *parent_store, const char *full_name, CamelException *ex)
{
- const char *name;
- char *metapath;
+ char *metapath, *name;
- name = g_basename (full_name);
+ name = g_path_get_basename (full_name);
+ d(printf ("constructing local folder: full = %s, name = %s\n", full_name, name));
+ camel_folder_construct (CAMEL_FOLDER (mlf), CAMEL_STORE (parent_store), full_name, name);
+ g_free (name);
+
+ mlf->real_path = g_strdup (((CamelFolder *) mlf)->full_name);
+
+ metapath = g_strdup_printf ("%s/%s/local-metadata.xml", ((CamelService *) parent_store)->url->path, full_name);
+ mlf->meta = load_metainfo (metapath);
+ g_free (metapath);
- d(printf("constructing local folder: full = %s, name = %s\n", full_name, name));
-
- camel_folder_construct(CAMEL_FOLDER (mlf), CAMEL_STORE(parent_store), full_name, name);
-
- mlf->real_path = g_strdup(((CamelFolder *)mlf)->full_name);
-
- metapath = g_strdup_printf("%s/%s/local-metadata.xml", ((CamelService *)parent_store)->url->path, full_name);
- mlf->meta = load_metainfo(metapath);
- g_free(metapath);
-
return mlf;
}
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index c1d0289fb4..adbdbb0828 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -15,7 +15,6 @@
#include <gtk/gtkstock.h>
#include <libgnome/gnome-i18n.h>
#include <gal/widgets/e-gui-utils.h>
-#include <gal/widgets/e-unicode.h>
#include "folder-browser-factory.h"
#include "e-util/e-msgport.h"
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 81c5447f5d..c9de994aaa 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -33,7 +33,6 @@
#include <errno.h>
#include <libgnome/gnome-exec.h>
#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
#include <camel/camel-mime-filter-from.h>
#include <camel/camel-operation.h>
#include <camel/camel-vtrash-folder.h>
@@ -1823,46 +1822,49 @@ build_from(struct _header_raw *header)
time_t thetime;
int offset;
struct tm tm;
-
- tmp = header_raw_find(&header, "Sender", NULL);
+
+ tmp = header_raw_find (&header, "Sender", NULL);
if (tmp == NULL)
- tmp = header_raw_find(&header, "From", NULL);
+ tmp = header_raw_find (&header, "From", NULL);
if (tmp != NULL) {
- struct _header_address *addr = header_address_decode(tmp);
-
+ struct _header_address *addr = header_address_decode (tmp);
+
tmp = NULL;
if (addr) {
if (addr->type == HEADER_ADDRESS_NAME) {
- g_string_append(out, addr->v.addr);
+ g_string_append (out, addr->v.addr);
tmp = "";
}
- header_address_unref(addr);
+ header_address_unref (addr);
}
}
+
if (tmp == NULL)
- g_string_append(out, "unknown@nodomain.now.au");
-
+ g_string_append (out, "unknown@nodomain.now.au");
+
/* try use the received header to get the date */
- tmp = header_raw_find(&header, "Received", NULL);
+ tmp = header_raw_find (&header, "Received", NULL);
if (tmp) {
tmp = strrchr(tmp, ';');
if (tmp)
tmp++;
}
-
+
/* if there isn't one, try the Date field */
if (tmp == NULL)
- tmp = header_raw_find(&header, "Date", NULL);
-
- thetime = header_decode_date(tmp, &offset);
+ tmp = header_raw_find (&header, "Date", NULL);
+
+ thetime = header_decode_date (tmp, &offset);
thetime += ((offset / 100) * (60 * 60)) + (offset % 100) * 60;
- gmtime_r(&thetime, &tm);
- g_string_sprintfa(out, " %s %s %d %02d:%02d:%02d %4d\n",
- tz_days[tm.tm_wday],
- tz_months[tm.tm_mon], tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_year + 1900);
-
+ gmtime_r (&thetime, &tm);
+ g_string_append_printf (out, " %s %s %d %02d:%02d:%02d %4d\n",
+ tz_days[tm.tm_wday], tz_months[tm.tm_mon],
+ tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec,
+ tm.tm_year + 1900);
+
ret = out->str;
- g_string_free(out, FALSE);
+ g_string_free (out, FALSE);
+
return ret;
}
diff --git a/mail/mail-search-dialogue.c b/mail/mail-search-dialogue.c
index c15c3fd598..1bce657546 100644
--- a/mail/mail-search-dialogue.c
+++ b/mail/mail-search-dialogue.c
@@ -37,25 +37,25 @@ static void mail_search_dialogue_finalise (GObject *obj);
static GtkDialogClass *parent_class;
-guint
+GType
mail_search_dialogue_get_type (void)
{
static GType type = 0;
if (!type) {
- GTypeInfo type_info = {
- sizeof(MailSearchDialogueClass),
- NULL,
- NULL,
- (GClassInitFunc)mail_search_dialogue_class_init,
- NULL,
- NULL,
- sizeof(MailSearchDialogue),
+ static const GTypeInfo info = {
+ sizeof (MailSearchDialogueClass),
+ NULL, /* base_class_init */
+ NULL, /* base_class_finalize */
+ (GClassInitFunc) mail_search_dialogue_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (MailSearchDialogue),
0,
- (GtkObjectInitFunc)mail_search_dialogue_init,
+ (GInstanceInitFunc) mail_search_dialogue_init,
};
- type = g_type_register_static (gtk_dialog_get_type (), "MailSearchDialogue", &type_info, 0);
+ type = g_type_register_static (gtk_dialog_get_type (), "MailSearchDialogue", &info, 0);
}
return type;
diff --git a/mail/mail-search-dialogue.h b/mail/mail-search-dialogue.h
index 32793c0fd5..0bb0e7cb80 100644
--- a/mail/mail-search-dialogue.h
+++ b/mail/mail-search-dialogue.h
@@ -50,12 +50,12 @@ struct _MailSearchDialogueClass {
/* signals */
};
-guint mail_search_dialogue_get_type (void);
-MailSearchDialogue *mail_search_dialogue_new (void);
-MailSearchDialogue *mail_search_dialogue_new_with_rule(FilterRule *rule);
+GType mail_search_dialogue_get_type (void);
+MailSearchDialogue *mail_search_dialogue_new (void);
+MailSearchDialogue *mail_search_dialogue_new_with_rule (FilterRule *rule);
/* methods */
-char *mail_search_dialogue_get_query(MailSearchDialogue *msd);
+char *mail_search_dialogue_get_query (MailSearchDialogue *msd);
#endif /* ! _MAIL_SEARCH_DIALOGUE_H */
diff --git a/mail/mail-search.c b/mail/mail-search.c
index 4d7a4c4ed6..c1d42e6f4c 100644
--- a/mail/mail-search.c
+++ b/mail/mail-search.c
@@ -30,7 +30,6 @@
#include "mail-search.h"
#include "e-searching-tokenizer.h"
-#include <gal/widgets/e-unicode.h>
#include <gtkhtml/gtkhtml-search.h>
#include <gtkhtml/htmlengine.h>
#include <libgnomeui/gnome-window-icon.h>
@@ -106,43 +105,31 @@ mail_search_redisplay_message (MailSearch *ms)
}
static void
-mail_search_set_subject (MailSearch *ms, const gchar *subject)
+mail_search_set_subject (MailSearch *ms, const char *subject)
{
- gchar *utf8_subject = NULL;
- gchar *gtk_subject = NULL;
-
+ char *utf8_subject = NULL;
+
if (subject && *subject) {
-
utf8_subject = g_strdup (subject);
-
+
if (g_utf8_validate (utf8_subject, -1, NULL)) {
-
- const gint ARBITRARY_CUTOFF = 40;
-
- if (g_utf8_strlen (utf8_subject, -1) > ARBITRARY_CUTOFF) {
- gchar *p = g_utf8_offset_to_pointer (utf8_subject, ARBITRARY_CUTOFF);
+#define ARBITRARY_CUTOFF 40
+ if (g_utf8_strlen (utf8_subject, -1) > ARBITRARY_CUTOFF + 3) {
+ char *p = g_utf8_offset_to_pointer (utf8_subject, ARBITRARY_CUTOFF);
+
strcpy (p, "...");
}
-
} else {
/* If the subject contains bad utf8, don't show anything in the frame label. */
g_free (utf8_subject);
utf8_subject = NULL;
}
-
- if (utf8_subject) {
- gtk_subject = utf8_subject;
- utf8_subject = NULL;
- }
} else {
-
- gtk_subject = g_strdup (_("(Untitled Message)"));
-
+ utf8_subject = g_strdup (_("(Untitled Message)"));
}
-
- gtk_frame_set_label (GTK_FRAME (ms->msg_frame), gtk_subject);
-
- g_free (gtk_subject);
+
+ gtk_frame_set_label (GTK_FRAME (ms->msg_frame), utf8_subject);
+
g_free (utf8_subject);
}
@@ -154,7 +141,7 @@ static void
toggled_case_cb (GtkToggleButton *b, MailSearch *ms)
{
ms->case_sensitive = gtk_toggle_button_get_active (b);
-
+
e_searching_tokenizer_set_primary_case_sensitivity (mail_search_tokenizer (ms),
ms->case_sensitive);
mail_search_redisplay_message (ms);
@@ -174,45 +161,38 @@ static void
dialog_destroy_cb (GtkWidget *w, MailSearch *ms)
{
ESearchingTokenizer *st = mail_search_tokenizer (ms);
-
+
e_searching_tokenizer_set_primary_search_string (st, NULL);
mail_search_redisplay_message (ms);
}
static void
-dialog_clicked_cb (GtkWidget *w, gint button_number, MailSearch *ms)
+dialog_clicked_cb (GtkWidget *widget, gint button_number, MailSearch *ms)
{
ESearchingTokenizer *st = mail_search_tokenizer (ms);
if (button_number == 0) { /* "Search" */
-
- char *search_text, *tmp;
-
- tmp = gtk_editable_get_chars (GTK_EDITABLE (ms->entry), 0, -1);
-
- g_strstrip (tmp);
- search_text = e_utf8_from_gtk_string ((GtkWidget *) ms->entry, tmp);
- g_free (tmp);
-
- if (search_text && *search_text) {
+ char *search_text;
+ search_text = gtk_editable_get_chars (GTK_EDITABLE (ms->entry), 0, -1);
+ g_strstrip (search_text);
+
+ if (search_text && *search_text) {
if (ms->last_search && !strcmp (ms->last_search, search_text)) {
if (! gtk_html_engine_search_next (ms->mail->html)) {
g_free (ms->last_search);
ms->last_search = NULL;
}
-
} else {
-
g_free (ms->last_search);
ms->last_search = NULL;
-
+
e_searching_tokenizer_set_primary_search_string (st, search_text);
e_searching_tokenizer_set_primary_case_sensitivity (st, ms->case_sensitive);
-
+
mail_search_redisplay_message (ms);
-
+
if (gtk_html_engine_search (ms->mail->html, search_text,
ms->case_sensitive, ms->search_forward,
FALSE)) {
@@ -220,33 +200,27 @@ dialog_clicked_cb (GtkWidget *w, gint button_number, MailSearch *ms)
}
}
}
-
-
+
g_free (search_text);
-
} else if (button_number == 1) { /* "Close" */
- gtk_widget_destroy (w);
+ gtk_widget_destroy (widget);
}
}
static void
-begin_cb (ESearchingTokenizer *st, gchar *foo, MailSearch *ms)
+begin_cb (ESearchingTokenizer *st, char *foo, MailSearch *ms)
{
- const gchar *subject;
-
+ const char *subject;
+
if (ms && ms->mail && ms->mail->current_message) {
-
subject = ms->mail->current_message->subject;
-
+
if (subject == NULL)
subject = _("Untitled Message");
-
} else {
-
subject = _("Empty Message");
-
}
-
+
gtk_label_set_text (GTK_LABEL (ms->count_label), "0");
mail_search_set_subject (ms, subject);
}
@@ -254,7 +228,8 @@ begin_cb (ESearchingTokenizer *st, gchar *foo, MailSearch *ms)
static void
match_cb (ESearchingTokenizer *st, MailSearch *ms)
{
- gchar buf[16];
+ char buf[16];
+
g_snprintf (buf, 16, "%d", e_searching_tokenizer_match_count (st));
gtk_label_set_text (GTK_LABEL (ms->count_label), buf);
}
@@ -263,7 +238,7 @@ static void
entry_run_search(GtkWidget *w, MailSearch *ms)
{
/* run search when enter pressed on widget */
- gtk_dialog_response((GtkDialog *)ms, GTK_RESPONSE_ACCEPT);
+ gtk_dialog_response ((GtkDialog *) ms, GTK_RESPONSE_ACCEPT);
}
void
@@ -273,7 +248,6 @@ mail_search_construct (MailSearch *ms, MailDisplay *mail)
GtkWidget *matches_hbox;
GtkWidget *toggles_hbox;
GtkWidget *frame_vbox;
-
GtkWidget *entry;
GtkWidget *count_label;
GtkWidget *case_check;
@@ -283,35 +257,31 @@ mail_search_construct (MailSearch *ms, MailDisplay *mail)
GtkWidget *button;
GtkWidget *msg_hbox;
GtkWidget *msg_frame;
-
+
g_return_if_fail (ms != NULL && IS_MAIL_SEARCH (ms));
g_return_if_fail (mail != NULL && IS_MAIL_DISPLAY (mail));
-
+
/* Basic set-up */
-
+
ms->mail = mail;
- g_object_ref((mail));
-
- gtk_window_set_title((GtkWindow *)ms, _("Find in Message"));
-
- button = gtk_button_new_from_stock(GTK_STOCK_FIND);
- gtk_button_set_label((GtkButton *)button, _("Search"));
- gtk_dialog_add_action_widget((GtkDialog*)ms, button, GTK_RESPONSE_ACCEPT);
- gtk_dialog_add_button((GtkDialog *)ms, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
- gtk_dialog_set_default_response((GtkDialog *)ms, GTK_RESPONSE_ACCEPT);
-
+ g_object_ref (mail);
+
+ gtk_window_set_title ((GtkWindow *) ms, _("Find in Message"));
+
+ button = gtk_button_new_from_stock (GTK_STOCK_FIND);
+ gtk_button_set_label ((GtkButton *) button, _("Search"));
+ gtk_dialog_add_action_widget ((GtkDialog*) ms, button, GTK_RESPONSE_ACCEPT);
+ gtk_dialog_add_button ((GtkDialog *) ms, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ gtk_dialog_set_default_response ((GtkDialog *) ms, GTK_RESPONSE_ACCEPT);
+
ms->search_forward = TRUE;
ms->case_sensitive = FALSE;
-
- ms->begin_handler = g_signal_connect((ms->mail->html->engine->ht),
- "begin",
- G_CALLBACK (begin_cb),
- ms);
- ms->match_handler = g_signal_connect((ms->mail->html->engine->ht),
- "match",
- G_CALLBACK (match_cb),
- ms);
-
+
+ ms->begin_handler = g_signal_connect (ms->mail->html->engine->ht, "begin",
+ G_CALLBACK (begin_cb), ms);
+ ms->match_handler = g_signal_connect (ms->mail->html->engine->ht, "match",
+ G_CALLBACK (match_cb), ms);
+
/* Construct the dialog contents. */
msg_hbox = gtk_hbox_new (FALSE, 0);
@@ -319,43 +289,43 @@ mail_search_construct (MailSearch *ms, MailDisplay *mail)
matches_hbox = gtk_hbox_new (FALSE, 0);
toggles_hbox = gtk_hbox_new (FALSE, 0);
frame_vbox = gtk_vbox_new (FALSE, 0);
-
+
entry = gtk_entry_new ();
count_label = gtk_label_new ("0");
-
+
msg_frame = gtk_frame_new (NULL);
-
+
case_check = gtk_check_button_new_with_label (_("Case Sensitive"));
#if 0
fwd_check = gtk_check_button_new_with_label (_("Search Forward"));
#endif
-
+
ms->entry = entry;
ms->count_label = count_label;
-
+
ms->msg_frame = msg_frame;
-
+
if (mail->current_message->subject && *mail->current_message->subject)
mail_search_set_subject (ms, mail->current_message->subject);
else
mail_search_set_subject (ms, NULL);
-
+
#if 0
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fwd_check), ms->search_forward);
#endif
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (case_check), ms->case_sensitive);
-
+
gtk_box_pack_start (GTK_BOX (msg_hbox), GTK_WIDGET (msg_frame), FALSE, FALSE, 3);
-
+
gtk_box_pack_start (GTK_BOX (find_hbox), gtk_label_new (_("Find:")), FALSE, FALSE, 3);
gtk_box_pack_start (GTK_BOX (find_hbox), entry, TRUE, TRUE, 3);
gtk_box_pack_start (GTK_BOX (matches_hbox), gtk_hbox_new (FALSE, 0), TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (matches_hbox), gtk_label_new (_("Matches:")), FALSE, FALSE, 3);
gtk_box_pack_start (GTK_BOX (matches_hbox), count_label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (matches_hbox), gtk_hbox_new (FALSE, 0), TRUE, TRUE, 0);
-
+
gtk_box_pack_start (GTK_BOX (toggles_hbox), case_check, FALSE, FALSE, 4);
-
+
/*
* Disabling the forward/backward search button because there are problems with it
* (related to how gtkhtml handles searches), the GUI freeze is upon us, and I
@@ -366,48 +336,37 @@ mail_search_construct (MailSearch *ms, MailDisplay *mail)
#if 0
gtk_box_pack_start (GTK_BOX (toggles_hbox), fwd_check, FALSE, FALSE, 4);
#endif
-
+
gtk_box_pack_start (GTK_BOX (frame_vbox), find_hbox, TRUE, TRUE, 8);
gtk_box_pack_start (GTK_BOX (frame_vbox), matches_hbox, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (frame_vbox), toggles_hbox, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (msg_frame), GTK_WIDGET (frame_vbox));
-
+
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (ms)->vbox), msg_hbox, TRUE, TRUE, 0);
-
+
gtk_widget_grab_focus (entry); /* Give focus to entry by default */
- g_signal_connect(entry, "activate", G_CALLBACK(entry_run_search), ms);
+ g_signal_connect (entry, "activate", G_CALLBACK (entry_run_search), ms);
gnome_window_icon_set_from_file (GTK_WINDOW (ms), EVOLUTION_ICONSDIR "/find-message.xpm");
-
+
gtk_widget_show_all (msg_hbox);
gtk_widget_show_all (find_hbox);
gtk_widget_show_all (matches_hbox);
gtk_widget_show_all (toggles_hbox);
-
+
/* Hook up signals */
-
- g_signal_connect((case_check),
- "toggled",
- G_CALLBACK (toggled_case_cb),
- ms);
+
+ g_signal_connect (case_check, "toggled", G_CALLBACK (toggled_case_cb), ms);
#if 0
- g_signal_connect((fwd_check),
- "toggled",
- G_CALLBACK (toggled_fwd_cb),
- ms);
+ g_signal_connect (fwd_check, "toggled", G_CALLBACK (toggled_fwd_cb), ms);
#endif
- g_signal_connect((ms),
- "clicked",
- G_CALLBACK (dialog_clicked_cb),
- ms);
-
- gtk_signal_connect_object (GTK_OBJECT (ms),
- "destroy",
+ g_signal_connect (ms, "clicked", G_CALLBACK (dialog_clicked_cb), ms);
+
+ gtk_signal_connect_object (GTK_OBJECT (ms), "destroy",
G_CALLBACK (dialog_destroy_cb),
GTK_OBJECT (ms));
-
- gtk_signal_connect_object (GTK_OBJECT (ms->mail),
- "destroy",
+
+ gtk_signal_connect_object (GTK_OBJECT (ms->mail), "destroy",
G_CALLBACK (gtk_widget_destroy),
GTK_OBJECT (ms));
}
@@ -415,13 +374,13 @@ mail_search_construct (MailSearch *ms, MailDisplay *mail)
GtkWidget *
mail_search_new (MailDisplay *mail)
{
- gpointer ptr;
-
+ GtkWidget *widget;
+
g_return_val_if_fail (mail && IS_MAIL_DISPLAY (mail), NULL);
-
- ptr = g_object_new(mail_search_get_type (), NULL);
- mail_search_construct (MAIL_SEARCH (ptr), mail);
-
- return GTK_WIDGET (ptr);
+
+ widget = g_object_new (mail_search_get_type (), NULL);
+ mail_search_construct (MAIL_SEARCH (widget), mail);
+
+ return widget;
}
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 5a46ee76b2..6682bbba58 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -31,7 +31,6 @@
#include <libgnome/gnome-config.h>
#include <libgnome/gnome-sound.h>
-#include <gal/widgets/e-unicode.h>
#include "camel/camel-filter-driver.h"
#include "filter/filter-context.h"
@@ -797,8 +796,8 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException
g_string_append (faction, "\"(beep)\"");
break;
case MAIL_CONFIG_NOTIFY_PLAY_SOUND:
- g_string_sprintfa (faction, "\"(play-sound \\\"%s\\\")\"",
- mail_config_get_new_mail_notify_sound_file ());
+ g_string_append_printf (faction, "\"(play-sound \\\"%s\\\")\"",
+ mail_config_get_new_mail_notify_sound_file ());
break;
default:
break;
diff --git a/mail/mail-signature-editor.c b/mail/mail-signature-editor.c
index cc53d9e5f3..ce97e403fd 100644
--- a/mail/mail-signature-editor.c
+++ b/mail/mail-signature-editor.c
@@ -30,7 +30,6 @@
#include <bonobo/bonobo-stream-memory.h>
#include <gal/widgets/e-gui-utils.h>
-#include <gal/widgets/e-unicode.h>
#include "e-msg-composer.h"
#include "mail-signature-editor.h"
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index b219d744ee..96141e91ad 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -31,14 +31,16 @@
#include <ctype.h>
#include <errno.h>
#include <string.h>
-#include <gal/widgets/e-unicode.h>
-#include "camel/camel.h"
-#include "camel/camel-vee-folder.h"
+
+#include <camel/camel.h>
+#include <camel/camel-vee-folder.h>
+
+#include <filter/vfolder-rule.h>
+#include <filter/vfolder-context.h>
+#include <filter/filter-option.h>
+#include <filter/filter-input.h>
+
#include "mail-vfolder.h"
-#include "filter/vfolder-rule.h"
-#include "filter/vfolder-context.h"
-#include "filter/filter-option.h"
-#include "filter/filter-input.h"
#include "mail.h" /*session*/
#include "mail-tools.h"
#include "mail-local.h"
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 491fc172a2..2877a7786a 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -405,55 +405,55 @@ mail_vfolder_delete_uri(CamelStore *store, const char *uri)
if (context == NULL || !strncmp(uri, "vtrash:", 7))
return;
-
- d(printf("Deleting uri to check: %s\n", uri));
-
- g_assert(pthread_self() == mail_gui_thread);
-
- changed = g_string_new("");
-
+
+ d(printf ("Deleting uri to check: %s\n", uri));
+
+ g_assert (pthread_self() == mail_gui_thread);
+
+ changed = g_string_new ("");
+
LOCK();
-
+
/* see if any rules directly reference this removed uri */
rule = NULL;
- while ( (rule = rule_context_next_rule((RuleContext *)context, rule, NULL)) ) {
+ while ((rule = rule_context_next_rule ((RuleContext *) context, rule, NULL))) {
source = NULL;
- while ( (source = vfolder_rule_next_source((VfolderRule *)rule, source)) ) {
+ while ((source = vfolder_rule_next_source ((VfolderRule *) rule, source))) {
/* Remove all sources that match, ignore changed events though
because the adduri call above does the work async */
- if (uri_cmp(uri, source)) {
- vf = g_hash_table_lookup(vfolder_hash, rule->name);
- g_assert(vf);
- g_signal_handlers_disconnect_matched(rule, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
- 0, NULL, rule_changed, vf);
- vfolder_rule_remove_source((VfolderRule *)rule, source);
- g_signal_connect(rule, "changed", G_CALLBACK(rule_changed), vf);
- g_string_sprintfa(changed, " %s\n", rule->name);
+ if (uri_cmp (uri, source)) {
+ vf = g_hash_table_lookup (vfolder_hash, rule->name);
+ g_assert (vf != NULL);
+ g_signal_handlers_disconnect_matched (rule, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
+ 0, NULL, rule_changed, vf);
+ vfolder_rule_remove_source ((VfolderRule *)rule, source);
+ g_signal_connect (rule, "changed", G_CALLBACK(rule_changed), vf);
+ g_string_sprintfa (changed, " %s\n", rule->name);
source = NULL;
}
}
}
-
+
UNLOCK();
-
+
if (changed->str[0]) {
- GtkDialog *gd;
+ GtkWidget *dialog;
char *user;
-
- gd = (GtkDialog *)gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_OK,
- _("The following vFolder(s):\n%s"
- "Used the removed folder:\n '%s'\n"
- "And have been updated."),
- changed->str, uri);
- g_signal_connect_swapped(gd, "response", G_CALLBACK(gtk_widget_destroy), gd);
- gtk_widget_show((GtkWidget *)gd);
-
- user = g_strdup_printf("%s/vfolders.xml", evolution_dir);
- rule_context_save((RuleContext *)context, user);
- g_free(user);
+
+ dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_OK,
+ _("The following vFolder(s):\n%s"
+ "Used the removed folder:\n '%s'\n"
+ "And have been updated."),
+ changed->str, uri);
+ g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
+ gtk_widget_show (dialog);
+
+ user = g_strdup_printf ("%s/vfolders.xml", evolution_dir);
+ rule_context_save ((RuleContext *) context, user);
+ g_free (user);
}
-
- g_string_free(changed, TRUE);
+
+ g_string_free (changed, TRUE);
}
/* called when a uri is renamed in a store */
diff --git a/mail/main.c b/mail/main.c
index 692689330a..b2f146ce68 100644
--- a/mail/main.c
+++ b/mail/main.c
@@ -23,7 +23,6 @@
#include <gal/widgets/e-gui-utils.h>
#include <gal/widgets/e-cursors.h>
-#include <gal/widgets/e-unicode.h>
#include "e-util/e-passwords.h"
#include "e-util/e-proxy.h"
diff --git a/mail/message-browser.c b/mail/message-browser.c
index 8306d7ee1d..2aa53dac8d 100644
--- a/mail/message-browser.c
+++ b/mail/message-browser.c
@@ -25,7 +25,6 @@
#endif
#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-ui-component.h>
diff --git a/mail/message-tag-editor.c b/mail/message-tag-editor.c
index b7d8ca8f86..7d7f6d420b 100644
--- a/mail/message-tag-editor.c
+++ b/mail/message-tag-editor.c
@@ -44,19 +44,19 @@ message_tag_editor_get_type (void)
static GType type = 0;
if (!type) {
- GTypeInfo type_info = {
+ static const GTypeInfo info = {
sizeof (MessageTagEditorClass),
- NULL,
- NULL,
+ NULL, /* base_class_init */
+ NULL, /* base_class_finalize */
(GClassInitFunc) message_tag_editor_class_init,
- NULL,
- NULL,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
sizeof (MessageTagEditor),
0,
(GInstanceInitFunc) message_tag_editor_init,
};
- type = g_type_register_static (gtk_dialog_get_type (), "MessageTagEditor", &type_info, 0);
+ type = g_type_register_static (gtk_dialog_get_type (), "MessageTagEditor", &info, 0);
}
return type;
diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c
index 875918d05b..99de43a7c7 100644
--- a/mail/message-tag-followup.c
+++ b/mail/message-tag-followup.c
@@ -33,8 +33,6 @@
#include <libgnomeui/gnome-window-icon.h>
#include <libgnomeui/gnome-pixmap.h>
-#include <gal/widgets/e-unicode.h>
-
#include "message-tag-followup.h"
#include "mail-config.h"
@@ -72,17 +70,19 @@ message_tag_followup_get_type (void)
static GType type = 0;
if (!type) {
- GTypeInfo type_info = {
+ static const GTypeInfo info = {
sizeof (MessageTagFollowUpClass),
- NULL, NULL,
+ NULL, /* base_class_init */
+ NULL, /* base_class_finalize */
(GClassInitFunc) message_tag_followup_class_init,
- NULL, NULL,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
sizeof (MessageTagFollowUp),
0,
(GInstanceInitFunc) message_tag_followup_init,
};
- type = g_type_register_static (message_tag_editor_get_type (), "MessageTagFollowUp", &type_info, 0);
+ type = g_type_register_static (message_tag_editor_get_type (), "MessageTagFollowUp", &info, 0);
}
return type;
diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c
index c8ef917c5e..93e73c31f0 100644
--- a/mail/subscribe-dialog.c
+++ b/mail/subscribe-dialog.c
@@ -33,7 +33,6 @@
#include <libgnomeui/gnome-appbar.h>
#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
#include <gal/e-table/e-cell-toggle.h>
#include <gal/e-table/e-cell-text.h>