diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/bbdb/gaimbuddies.c | 25 | ||||
-rw-r--r-- | plugins/bogo-junk-plugin/bf-junk-filter.c | 12 | ||||
-rw-r--r-- | plugins/groupwise-features/share-folder-common.c | 2 | ||||
-rw-r--r-- | plugins/profiler/profiler.c | 2 | ||||
-rw-r--r-- | plugins/pst-import/pst-importer.c | 4 | ||||
-rw-r--r-- | plugins/sa-junk-plugin/em-junk-filter.c | 12 | ||||
-rw-r--r-- | plugins/startup-wizard/startup-wizard.c | 8 |
7 files changed, 51 insertions, 14 deletions
diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c index 184c071e39..66f77bcc99 100644 --- a/plugins/bbdb/gaimbuddies.c +++ b/plugins/bbdb/gaimbuddies.c @@ -40,7 +40,6 @@ #include <string.h> #include <libebook/e-book.h> -#include <libedataserver/md5-utils.h> #include <libedataserverui/e-source-combo-box.h> #include <sys/time.h> @@ -75,15 +74,29 @@ get_buddy_filename (void) static gchar * get_md5_as_string (const gchar *filename) { - guchar d[16]; + GMappedFile *mapped_file; + const gchar *contents; + gchar *digest; + gsize length; + GError *error = NULL; g_return_val_if_fail (filename != NULL, NULL); - md5_get_digest_from_file (filename, d); + mapped_file = g_mapped_file_new (filename, FALSE, &error); + if (mapped_file == NULL) { + g_warning ("%s", error->message); + return NULL; + } + + contents = g_mapped_file_get_contents (mapped_file); + length = g_mapped_file_get_length (mapped_file); + + digest = g_compute_checksum_for_data ( + G_CHECKSUM_MD5, (guchar *) contents, length); + + g_mapped_file_unref (mapped_file); - return g_strdup_printf ("%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x", - d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], - d[8], d[9], d[10], d[11], d[12], d[13], d[14], d[15]); + return digest; } void diff --git a/plugins/bogo-junk-plugin/bf-junk-filter.c b/plugins/bogo-junk-plugin/bf-junk-filter.c index 6d315da575..4190eebe86 100644 --- a/plugins/bogo-junk-plugin/bf-junk-filter.c +++ b/plugins/bogo-junk-plugin/bf-junk-filter.c @@ -51,6 +51,7 @@ #include <camel/camel-stream-fs.h> #include <camel/camel-debug.h> #include <gconf/gconf-client.h> +#include "shell/e-shell.h" #ifndef BOGOFILTER_BINARY #define BOGOFILTER_BINARY "/usr/bin/bogofilter" @@ -388,6 +389,7 @@ convert_unicode_cb (GtkWidget *widget, gpointer data) GtkWidget * org_gnome_bogo_convert_unicode (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data) { + EShell *shell; GtkWidget *check; guint i = ((GtkTable *)data->parent)->nrows; @@ -399,7 +401,13 @@ org_gnome_bogo_convert_unicode (struct _EPlugin *epl, struct _EConfigHookItemFac gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), em_junk_bf_unicode); g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (convert_unicode_cb), (gpointer) "/apps/evolution/mail/junk/bogofilter/unicode"); gtk_table_attach((GtkTable *)data->parent, check, 0, 1, i, i+1, 0, 0, 0, 0); - gtk_widget_show (check); - return (GtkWidget *)check; + + shell = e_shell_get_default (); + if (e_shell_get_express_mode (shell)) + gtk_widget_hide (check); + else + gtk_widget_show (check); + + return check; } diff --git a/plugins/groupwise-features/share-folder-common.c b/plugins/groupwise-features/share-folder-common.c index 14e3b0e5bd..992664f863 100644 --- a/plugins/groupwise-features/share-folder-common.c +++ b/plugins/groupwise-features/share-folder-common.c @@ -138,7 +138,7 @@ struct _EMCreateFolder { static gchar * create_folder_desc (struct _EMCreateFolder *m) { - return g_strdup_printf (_("Creating folder `%s'"), m->full_name); + return g_strdup_printf (_("Creating folder '%s'"), m->full_name); } static void diff --git a/plugins/profiler/profiler.c b/plugins/profiler/profiler.c index b57ba83817..e3ecd07a9e 100644 --- a/plugins/profiler/profiler.c +++ b/plugins/profiler/profiler.c @@ -45,7 +45,7 @@ org_gnome_evolution_profiler_event(EPlugin *ep, EProfileEventTarget *t) name = g_strdup_printf("eprofile.%ld", (glong) getpid()); fp = fopen(name, "w"); if (fp) - fprintf(stderr, "Generating profiling data in `%s'\n", name); + fprintf(stderr, "Generating profiling data in '%s'\n", name); g_free(name); } diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c index 7d2868042a..fa0b61e993 100644 --- a/plugins/pst-import/pst-importer.c +++ b/plugins/pst-import/pst-importer.c @@ -453,7 +453,7 @@ pst_import_file (PstImporter *m) filename = g_filename_from_uri (((EImportTargetURI *)m->target)->uri_src, NULL, NULL); m->parent_uri = g_strdup (((EImportTargetURI *)m->target)->uri_dest); /* Destination folder, was set in our widget */ - camel_operation_start (NULL, _("Importing `%s'"), filename); + camel_operation_start (NULL, _("Importing '%s'"), filename); if (GPOINTER_TO_INT (g_datalist_get_data (&m->target->data, "pst-do-mail"))) { mail_tool_uri_to_folder (m->parent_uri, CAMEL_STORE_FOLDER_CREATE, &m->base.ex); @@ -559,7 +559,7 @@ pst_process_item (PstImporter *m, pst_desc_tree *d_ptr) if (item->folder != NULL) { pst_process_folder (m, item); - camel_operation_start (NULL, _("Importing `%s'"), item->file_as.str); + camel_operation_start (NULL, _("Importing '%s'"), item->file_as.str); } else { if (m->folder_count && (m->current_item < m->folder_count)) { camel_operation_progress (NULL, (m->current_item * 100) / m->folder_count); diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c index c0b59891a1..c8c53c6169 100644 --- a/plugins/sa-junk-plugin/em-junk-filter.c +++ b/plugins/sa-junk-plugin/em-junk-filter.c @@ -47,6 +47,7 @@ #include <gtk/gtk.h> #include "mail/em-config.h" +#include "shell/e-shell.h" #include <gconf/gconf-client.h> @@ -926,6 +927,7 @@ use_remote_tests_cb (GtkWidget *widget, gpointer data) GtkWidget * org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data) { + EShell *shell; GtkWidget *check, *vbox, *label; gchar *text = g_strdup_printf (" <small>%s</small>", _("This will make SpamAssassin more reliable, but slower")); guint i = ((GtkTable *)data->parent)->nrows; @@ -944,7 +946,13 @@ org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFact gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), !em_junk_sa_local_only); g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (use_remote_tests_cb), (gpointer) "/apps/evolution/mail/junk/sa/local_only"); gtk_table_attach((GtkTable *)data->parent, vbox, 0, 1, i, i+1, 0, 0, 0, 0); - gtk_widget_show_all (vbox); - return (GtkWidget *)vbox; + + shell = e_shell_get_default (); + if (e_shell_get_express_mode (shell)) + gtk_widget_hide (vbox); + else + gtk_widget_show_all (vbox); + + return vbox; } diff --git a/plugins/startup-wizard/startup-wizard.c b/plugins/startup-wizard/startup-wizard.c index a38b2d9e9a..97d2297480 100644 --- a/plugins/startup-wizard/startup-wizard.c +++ b/plugins/startup-wizard/startup-wizard.c @@ -66,7 +66,15 @@ startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target) GSList *accounts; EConfig *config; EMAccountEditor *emae; + char *req_view; + req_view = e_shell_get_startup_view(e_shell_get_default()); + + if (req_view && strcmp (req_view, "mail") && e_shell_get_express_mode(e_shell_get_default())) { + return; + } + + client = gconf_client_get_default (); accounts = gconf_client_get_list (client, "/apps/evolution/mail/accounts", GCONF_VALUE_STRING, NULL); g_object_unref (client); |