diff options
author | Tomas Popela <tpopela@redhat.com> | 2014-06-09 22:32:25 +0800 |
---|---|---|
committer | Tomas Popela <tpopela@redhat.com> | 2014-06-09 22:32:25 +0800 |
commit | 8650fb139a9143f04615de74ff569bce3e0c4ce3 (patch) | |
tree | 89a41d08f179a5359b8eaee0c9344b8a5bf07cb3 /modules/backup-restore | |
parent | 04b7c97275ae420dca43f3e65c2ef54d02f01bdd (diff) | |
download | gsoc2013-evolution-8650fb139a9143f04615de74ff569bce3e0c4ce3.tar.gz gsoc2013-evolution-8650fb139a9143f04615de74ff569bce3e0c4ce3.tar.zst gsoc2013-evolution-8650fb139a9143f04615de74ff569bce3e0c4ce3.zip |
Bug 540362: [webkit-composer] Use webkit for composer
Merge wip/webkit-composer branch into master.
Diffstat (limited to 'modules/backup-restore')
-rw-r--r-- | modules/backup-restore/Makefile.am | 4 | ||||
-rw-r--r-- | modules/backup-restore/evolution-backup-tool.c | 44 |
2 files changed, 6 insertions, 42 deletions
diff --git a/modules/backup-restore/Makefile.am b/modules/backup-restore/Makefile.am index 98d130197f..9dffc4a3df 100644 --- a/modules/backup-restore/Makefile.am +++ b/modules/backup-restore/Makefile.am @@ -14,7 +14,6 @@ module_backup_restore_la_CPPFLAGS = \ -DLIBDIR=\""$(libdir)"\" \ $(EVOLUTION_DATA_SERVER_CFLAGS) \ $(GNOME_PLATFORM_CFLAGS) \ - $(GTKHTML_CFLAGS) \ $(CODE_COVERAGE_CFLAGS) \ $(NULL) @@ -33,7 +32,6 @@ module_backup_restore_la_LIBADD = \ $(top_builddir)/libemail-engine/libemail-engine.la \ $(EVOLUTION_DATA_SERVER_LIBS) \ $(GNOME_PLATFORM_LIBS) \ - $(GTKHTML_LIBS) \ $(NULL) module_backup_restore_la_LDFLAGS = \ @@ -53,7 +51,6 @@ evolution_backup_CPPFLAGS = \ -DDBUS_SERVICES_DIR=\"'${datadir}'/dbus-1/services\" \ $(EVOLUTION_DATA_SERVER_CFLAGS) \ $(GNOME_PLATFORM_CFLAGS) \ - $(GTKHTML_CFLAGS) \ $(NULL) evolution_backup_SOURCES = \ @@ -64,7 +61,6 @@ evolution_backup_LDADD = \ $(top_builddir)/e-util/libevolution-util.la \ $(EVOLUTION_DATA_SERVER_LIBS) \ $(GNOME_PLATFORM_LIBS) \ - $(GTKHTML_LIBS) \ $(NULL) if OS_WIN32 diff --git a/modules/backup-restore/evolution-backup-tool.c b/modules/backup-restore/evolution-backup-tool.c index 4b75f8a790..728b8f96f4 100644 --- a/modules/backup-restore/evolution-backup-tool.c +++ b/modules/backup-restore/evolution-backup-tool.c @@ -101,38 +101,6 @@ static GOptionEntry options[] = { static gboolean check (const gchar *filename, gboolean *is_new_format); -static GString * -replace_string (const gchar *text, - const gchar *find, - const gchar *replace) -{ - const gchar *p, *next; - GString *str; - gint find_len; - - g_return_val_if_fail (text != NULL, NULL); - g_return_val_if_fail (find != NULL, NULL); - g_return_val_if_fail (*find, NULL); - - find_len = strlen (find); - str = g_string_new (""); - - p = text; - while (next = strstr (p, find), next) { - if (p < next) - g_string_append_len (str, p, next - p); - - if (replace && *replace) - g_string_append (str, replace); - - p = next + find_len; - } - - g_string_append (str, p); - - return str; -} - static const gchar * strip_home_dir (const gchar *dir) { @@ -166,11 +134,11 @@ replace_variables (const gchar *str, strip_datadir = strip_home_dir (e_get_user_data_dir ()); strip_configdir = strip_home_dir (e_get_user_config_dir ()); - #define repl(_find, _replace) \ - use = replace_string (res ? res->str : str, _find, _replace); \ - g_return_val_if_fail (use != NULL, NULL); \ - if (res) \ - g_string_free (res, TRUE); \ + #define repl(_find, _replace) \ + use = e_str_replace_string (res ? res->str : str, _find, _replace); \ + g_return_val_if_fail (use != NULL, NULL); \ + if (res) \ + g_string_free (res, TRUE); \ res = use; repl ("$HOME", g_get_home_dir ()); @@ -223,7 +191,7 @@ replace_in_file (const gchar *filename, } if (g_file_get_contents (filename, &content, NULL, &error)) { - GString *str = replace_string (content, find, replace); + GString *str = e_str_replace_string (content, find, replace); if (str) { if (!g_file_set_contents (filename, str->str, -1, &error) && error) { |