aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-04-27 17:34:11 +0800
committerMilan Crha <mcrha@redhat.com>2009-04-27 17:34:11 +0800
commit0f7060ee7dcceac8d10aaa9100c919712de491ff (patch)
treed9eb5b7f00d21884f4b6add882d3371863ca85e4
parent631d0bfd080409da87545d42de7bc4588abdf5b7 (diff)
downloadgsoc2013-evolution-0f7060ee7dcceac8d10aaa9100c919712de491ff.tar
gsoc2013-evolution-0f7060ee7dcceac8d10aaa9100c919712de491ff.tar.gz
gsoc2013-evolution-0f7060ee7dcceac8d10aaa9100c919712de491ff.tar.bz2
gsoc2013-evolution-0f7060ee7dcceac8d10aaa9100c919712de491ff.tar.lz
gsoc2013-evolution-0f7060ee7dcceac8d10aaa9100c919712de491ff.tar.xz
gsoc2013-evolution-0f7060ee7dcceac8d10aaa9100c919712de491ff.tar.zst
gsoc2013-evolution-0f7060ee7dcceac8d10aaa9100c919712de491ff.zip
Define .error files correctly and external-editor crash fix
** Fix for bug #561188
-rw-r--r--e-util/ChangeLog7
-rw-r--r--e-util/e-error.c12
-rw-r--r--plugins/external-editor/ChangeLog11
-rw-r--r--plugins/external-editor/Makefile.am6
-rw-r--r--plugins/external-editor/external-editor.c143
-rw-r--r--plugins/external-editor/org-gnome-external-editor.error.xml (renamed from plugins/external-editor/org-gnome-external-editor-errors.xml)0
-rw-r--r--plugins/face/ChangeLog8
-rw-r--r--plugins/face/Makefile.am6
-rw-r--r--plugins/face/org-gnome-face.error.xml (renamed from plugins/face/org-gnome-face.errors.xml)0
-rw-r--r--plugins/groupwise-features/ChangeLog15
-rw-r--r--plugins/groupwise-features/Makefile.am17
-rw-r--r--plugins/groupwise-features/org-gnome-mail-retract.error.xml (renamed from plugins/groupwise-features/org-gnome-mail-retract-errors.xml)0
-rw-r--r--plugins/groupwise-features/org-gnome-proxy-login.error.xml (renamed from plugins/groupwise-features/org-gnome-proxy-login-errors.xml)0
-rw-r--r--plugins/groupwise-features/org-gnome-proxy.error.xml (renamed from plugins/groupwise-features/org-gnome-proxy-errors.xml)0
-rw-r--r--plugins/groupwise-features/org-gnome-shared-folder.error.xml (renamed from plugins/groupwise-features/org-gnome-shared-folder.errors.xml)0
15 files changed, 137 insertions, 88 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 69db24d87d..77d035cccd 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-27 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #561188
+
+ * e-error.c: (e_error_newv): Do not localize already localized text.
+ Use default title for empty titles too, not only for NULL titles.
+
2009-04-24 Milan Crha <mcrha@redhat.com>
** Fix for bug #572348
diff --git a/e-util/e-error.c b/e-util/e-error.c
index da4d034606..7c1248bb7b 100644
--- a/e-util/e-error.c
+++ b/e-util/e-error.c
@@ -507,8 +507,8 @@ e_error_newv(GtkWindow *parent, const char *tag, const char *arg0, va_list ap)
out = g_string_new("");
- if (e->title) {
- ee_build_label(out, dgettext(table->translation_domain, e->title), args, FALSE);
+ if (e->title && *e->title) {
+ ee_build_label(out, e->title, args, FALSE);
gtk_window_set_title((GtkWindow *)dialog, out->str);
g_string_truncate(out, 0);
} else
@@ -517,19 +517,19 @@ e_error_newv(GtkWindow *parent, const char *tag, const char *arg0, va_list ap)
if (e->primary) {
g_string_append(out, "<span weight=\"bold\" size=\"larger\">");
- ee_build_label(out, dgettext(table->translation_domain, e->primary), args, TRUE);
+ ee_build_label(out, e->primary, args, TRUE);
g_string_append(out, "</span>\n\n");
oerr = g_string_new("");
- ee_build_label(oerr, dgettext(table->translation_domain, e->primary), args, FALSE);
+ ee_build_label(oerr, e->primary, args, FALSE);
perr = g_strdup (oerr->str);
g_string_free (oerr, TRUE);
} else
perr = g_strdup (gtk_window_get_title (GTK_WINDOW (dialog)));
if (e->secondary) {
- ee_build_label(out, dgettext(table->translation_domain, e->secondary), args, TRUE);
+ ee_build_label(out, e->secondary, args, TRUE);
oerr = g_string_new("");
- ee_build_label(oerr, dgettext(table->translation_domain, e->secondary), args, TRUE);
+ ee_build_label(oerr, e->secondary, args, TRUE);
serr = g_strdup (oerr->str);
g_string_free (oerr, TRUE);
}
diff --git a/plugins/external-editor/ChangeLog b/plugins/external-editor/ChangeLog
index 3bf30a612f..dae79fc9a7 100644
--- a/plugins/external-editor/ChangeLog
+++ b/plugins/external-editor/ChangeLog
@@ -1,3 +1,14 @@
+2009-04-27 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #561188
+
+ * external-editor.c: (show_error), (read_file),
+ (async_external_editor), (show_composer_dialog):
+ Do more things in main thread.
+ * Makefile.am:
+ * org-gnome-external-editor-errors.xml: Renamed to:
+ * org-gnome-external-editor.error.xml: Create .error file properly.
+
2009-01-28 Tor Lillqvist <tml@novell.com>
Windows port by Fridrich Strba.
diff --git a/plugins/external-editor/Makefile.am b/plugins/external-editor/Makefile.am
index bae2c640a5..ff64941a28 100644
--- a/plugins/external-editor/Makefile.am
+++ b/plugins/external-editor/Makefile.am
@@ -21,7 +21,7 @@ INCLUDES = \
@EVO_PLUGIN_RULE@
-error_DATA = org-gnome-external-editor-errors.xml
+error_DATA = org-gnome-external-editor.error
errordir = $(privdatadir)/errors
plugin_DATA = \
@@ -53,12 +53,12 @@ install-data-local:
EXTRA_DIST = \
org-gnome-external-editor.eplug.xml \
- org-gnome-external-editor-errors.xml \
+ org-gnome-external-editor.error.xml \
org-gnome-external-editor.xml \
$(schema_in_files)
BUILT_SOURCES = org-gnome-external-editor.eplug \
- $(error_i18n)
+ org-gnome-external-editor.error
CLEANFILES = $(BUILT_SOURCES)
diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c
index 140eff1089..c541124e53 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -54,8 +54,6 @@
void org_gnome_external_editor (EPlugin *ep, EMMenuTargetSelect *select);
void ee_editor_command_changed (GtkWidget *textbox);
GtkWidget * e_plugin_lib_get_configure_widget (EPlugin *epl);
-void async_external_editor (GArray *array);
-static gboolean show_composer_dialog (EMsgComposer *composer);
/* Utility function to convert an email address to CamelInternetAddress.
May be this should belong to CamelInternetAddress.h file itself. */
@@ -132,7 +130,76 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
return vbox;
}
-void
+static gboolean
+show_error (const char *id)
+{
+ if (id)
+ e_error_run (NULL, id, NULL);
+ return FALSE;
+}
+
+static gboolean
+read_file (char *filename)
+{
+ gchar *buf;
+ CamelMimeMessage *message;
+ EMsgComposer *composer;
+
+ message = camel_mime_message_new ();
+
+ if (filename && g_file_get_contents (filename, &buf, NULL, NULL)) {
+ gchar **tokens;
+ int i, j;
+
+ tokens = g_strsplit (buf, "###|||", 6);
+
+ for (i = 1; tokens[i]; ++i) {
+
+ for (j = 0; tokens[i][j] && tokens[i][j] != '\n'; ++j) {
+ tokens [i][j] = ' ';
+ }
+
+ if (tokens[i][j] == '\n')
+ tokens[i][j] = ' ';
+
+ d(printf ("\nstripped off token[%d] is : %s \n", i, tokens[i]));
+ }
+
+ camel_mime_message_set_recipients (message, "To", convert_to_camel_internet_address(g_strchug(g_strdup(tokens[1]))));
+ camel_mime_message_set_recipients (message, "Cc", convert_to_camel_internet_address(g_strchug(g_strdup(tokens[2]))));
+ camel_mime_message_set_recipients (message, "Bcc", convert_to_camel_internet_address(g_strchug(g_strdup(tokens[3]))));
+ camel_mime_message_set_subject (message, tokens[4]);
+ camel_mime_part_set_content ((CamelMimePart *)message, tokens [5], strlen (tokens [5]), "text/plain");
+
+ /* FIXME: We need to make mail-remote working properly.
+ So that we neednot invoke composer widget at all.
+
+ May be we can do it now itself by invoking local CamelTransport.
+ But all that is not needed for the first release.
+
+ People might want to format mails using their editor (80 cols width etc.)
+ But might want to use evolution addressbook for auto-completion etc.
+ So starting the composer window anyway.
+ */
+
+ composer = e_msg_composer_new_with_message (message);
+ g_signal_connect (GTK_OBJECT (composer), "send", G_CALLBACK (em_utils_composer_send_cb), NULL);
+ g_signal_connect (GTK_OBJECT (composer), "save-draft", G_CALLBACK (em_utils_composer_save_draft_cb), NULL);
+
+ gtk_widget_show (GTK_WIDGET (composer));
+
+ g_strfreev (tokens);
+
+ /* We no longer need that temporary file */
+ g_remove (filename);
+ }
+
+ g_free (filename);
+
+ return FALSE;
+}
+
+static void
async_external_editor (GArray *array)
{
char *filename = NULL;
@@ -148,9 +215,9 @@ async_external_editor (GArray *array)
if (!g_spawn_sync (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, &status, NULL))
{
g_warning ("Unable to launch %s: ", argv[0]);
- e_error_run (NULL, "org.gnome.evolution.plugins.external-editor:editor-not-launchable", NULL);
+ g_idle_add ((GSourceFunc)show_error, "org.gnome.evolution.plugins.external-editor:editor-not-launchable");
g_free (filename);
- return ;
+ return;
}
#ifdef HAVE_SYS_WAIT_H
@@ -159,73 +226,13 @@ async_external_editor (GArray *array)
if (status) {
#endif
d(printf ("\n\nsome problem here with external editor\n\n"));
- return ;
+ g_free (filename);
+ return;
} else {
- gchar *buf;
- CamelMimeMessage *message;
- EMsgComposer *composer;
-
- message = camel_mime_message_new ();
-
- if (g_file_get_contents (filename, &buf, NULL, NULL)) {
- gchar **tokens;
- int i, j;
-
- tokens = g_strsplit (buf, "###|||", 6);
-
- for (i = 1; tokens[i]; ++i) {
-
- for (j = 0; tokens[i][j] && tokens[i][j] != '\n'; ++j) {
- tokens [i][j] = ' ';
- }
-
- if (tokens[i][j] == '\n')
- tokens[i][j] = ' ';
-
- d(printf ("\nstripped off token[%d] is : %s \n", i, tokens[i]));
- }
-
- camel_mime_message_set_recipients (message, "To", convert_to_camel_internet_address(g_strchug(g_strdup(tokens[1]))));
- camel_mime_message_set_recipients (message, "Cc", convert_to_camel_internet_address(g_strchug(g_strdup(tokens[2]))));
- camel_mime_message_set_recipients (message, "Bcc", convert_to_camel_internet_address(g_strchug(g_strdup(tokens[3]))));
- camel_mime_message_set_subject (message, tokens[4]);
- camel_mime_part_set_content ((CamelMimePart *)message, tokens [5], strlen (tokens [5]), "text/plain");
-
-
- /* FIXME: We need to make mail-remote working properly.
- So that we neednot invoke composer widget at all.
-
- May be we can do it now itself by invoking local CamelTransport.
- But all that is not needed for the first release.
-
- People might want to format mails using their editor (80 cols width etc.)
- But might want to use evolution addressbook for auto-completion etc.
- So starting the composer window anyway.
- */
-
- composer = e_msg_composer_new_with_message (message);
- g_signal_connect (GTK_OBJECT (composer), "send", G_CALLBACK (em_utils_composer_send_cb), NULL);
- g_signal_connect (GTK_OBJECT (composer), "save-draft", G_CALLBACK (em_utils_composer_save_draft_cb), NULL);
-
- /* Composer cannot be shown in any random thread. Should happen in main thread */
- g_idle_add ((GSourceFunc) show_composer_dialog, composer);
-
- g_strfreev (tokens);
-
- /* We no longer need that temporary file */
- g_remove (filename);
- g_free (filename);
- }
+ g_idle_add ((GSourceFunc)read_file, filename);
}
}
-static gboolean
-show_composer_dialog (EMsgComposer *composer)
-{
- gtk_widget_show (GTK_WIDGET(composer));
- return FALSE;
-}
-
void org_gnome_external_editor (EPlugin *ep, EMMenuTargetSelect *select)
{
/* The template to be used in the external editor */
diff --git a/plugins/external-editor/org-gnome-external-editor-errors.xml b/plugins/external-editor/org-gnome-external-editor.error.xml
index c6f0bebfa3..c6f0bebfa3 100644
--- a/plugins/external-editor/org-gnome-external-editor-errors.xml
+++ b/plugins/external-editor/org-gnome-external-editor.error.xml
diff --git a/plugins/face/ChangeLog b/plugins/face/ChangeLog
index 81bb76d3cb..7737ac777e 100644
--- a/plugins/face/ChangeLog
+++ b/plugins/face/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-27 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #561188
+
+ * Makefile.am:
+ * org-gnome-face.errors.xml: Renamed to:
+ * org-gnome-face.error.xml: Create .error file properly.
+
2008-08-27 Sankar P <psankar@novell.com>
License Changes
diff --git a/plugins/face/Makefile.am b/plugins/face/Makefile.am
index 8a44c94815..a29c6585ea 100644
--- a/plugins/face/Makefile.am
+++ b/plugins/face/Makefile.am
@@ -29,16 +29,16 @@ liborg_gnome_face_la_LIBADD = \
liborg_gnome_face_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
error_DATA = \
- org-gnome-face.errors.xml
+ org-gnome-face.error
errordir = $(privdatadir)/errors
EXTRA_DIST = \
org-gnome-face.eplug.xml \
- $(error_DATA)
+ org-gnome-face.error.xml
BUILT_SOURCES = \
org-gnome-face.eplug \
- $(error_i18n)
+ org-gnome-face.error
CLEANFILES = $(BUILT_SOURCES)
diff --git a/plugins/face/org-gnome-face.errors.xml b/plugins/face/org-gnome-face.error.xml
index 02695dd758..02695dd758 100644
--- a/plugins/face/org-gnome-face.errors.xml
+++ b/plugins/face/org-gnome-face.error.xml
diff --git a/plugins/groupwise-features/ChangeLog b/plugins/groupwise-features/ChangeLog
index 2afaec6080..085b62155c 100644
--- a/plugins/groupwise-features/ChangeLog
+++ b/plugins/groupwise-features/ChangeLog
@@ -1,3 +1,18 @@
+2009-04-27 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #561188
+
+ * Makefile.am:
+ * org-gnome-proxy-login-errors.xml: Renamed to:
+ * org-gnome-proxy-login.error.xml:
+ * org-gnome-mail-retract-errors.xml: Renamed to:
+ * org-gnome-mail-retract.error.xml:
+ * org-gnome-shared-folder.errors.xml: Renamed to:
+ * org-gnome-shared-folder.error.xml:
+ * org-gnome-proxy-errors.xml: Renamed to:
+ * org-gnome-proxy.error.xml:
+ Create .error files properly.
+
2009-01-21 Suman Manjunath <msuman@novell.com>
** Fix for bug #541209
diff --git a/plugins/groupwise-features/Makefile.am b/plugins/groupwise-features/Makefile.am
index 3ece8b0569..d18a7c87f4 100644
--- a/plugins/groupwise-features/Makefile.am
+++ b/plugins/groupwise-features/Makefile.am
@@ -62,22 +62,23 @@ glade_DATA = \
proxy-listing.glade \
proxy-login-dialog.glade
-error_DATA = \
- org-gnome-shared-folder.errors.xml \
- org-gnome-proxy-errors.xml \
- org-gnome-proxy-login-errors.xml \
- org-gnome-mail-retract-errors.xml
+error_DATA = \
+ org-gnome-shared-folder.error \
+ org-gnome-proxy.error \
+ org-gnome-proxy-login.error \
+ org-gnome-mail-retract.error
errordir = $(privdatadir)/errors
BUILT_SOURCES = org-gnome-groupwise-features.eplug $(error_i18n)
EXTRA_DIST = \
- $(error_DATA) \
$(glade_DATA) \
org-gnome-compose-send-options.xml \
org-gnome-groupwise-features.eplug.xml \
- org-gnome-proxy-login-errors.xml \
- org-gnome-mail-retract-errors.xml
+ org-gnome-shared-folder.error.xml \
+ org-gnome-proxy.error.xml \
+ org-gnome-proxy-login.error.xml \
+ org-gnome-mail-retract.error.xml
CLEANFILES = $(BUILT_SOURCES)
diff --git a/plugins/groupwise-features/org-gnome-mail-retract-errors.xml b/plugins/groupwise-features/org-gnome-mail-retract.error.xml
index 64e2ce2f1e..64e2ce2f1e 100644
--- a/plugins/groupwise-features/org-gnome-mail-retract-errors.xml
+++ b/plugins/groupwise-features/org-gnome-mail-retract.error.xml
diff --git a/plugins/groupwise-features/org-gnome-proxy-login-errors.xml b/plugins/groupwise-features/org-gnome-proxy-login.error.xml
index fccddfd6c6..fccddfd6c6 100644
--- a/plugins/groupwise-features/org-gnome-proxy-login-errors.xml
+++ b/plugins/groupwise-features/org-gnome-proxy-login.error.xml
diff --git a/plugins/groupwise-features/org-gnome-proxy-errors.xml b/plugins/groupwise-features/org-gnome-proxy.error.xml
index dad6fbe8f1..dad6fbe8f1 100644
--- a/plugins/groupwise-features/org-gnome-proxy-errors.xml
+++ b/plugins/groupwise-features/org-gnome-proxy.error.xml
diff --git a/plugins/groupwise-features/org-gnome-shared-folder.errors.xml b/plugins/groupwise-features/org-gnome-shared-folder.error.xml
index ca63ad80aa..ca63ad80aa 100644
--- a/plugins/groupwise-features/org-gnome-shared-folder.errors.xml
+++ b/plugins/groupwise-features/org-gnome-shared-folder.error.xml