[Evolution] Portable Evolution / Mail on Desktop and Notebook
Is there a portable version of Evolution for Linux (eg. Ubuntu)? Or another way to use the same mailbox on desktop and notebook? Thank you for helping me in this question! Michael ___ Evolution-list mailing list Evolution-list@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-list
[Evolution] [PATCH][BUILD] make external editor plugin pass cursor pos to vim
This appears to work for me, opening the email in gvim with the cursor properly located. Along with a review, it likely needs a 'quickfix' with regard to the htmlengine.h include. I'm not familiar enough with the build environment to know if there is a more proper/correct way of getting it included. There is also a single change to mono-plugin.c that I had to make in order to get mono-plugin.c to compile. Signed-off-by: Reid Thompson --- plugins/external-editor/external-editor.c | 66 - plugins/mono/mono-plugin.c|2 +- 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c index a7f06b6..0ed4d8f 100644 --- a/plugins/external-editor/external-editor.c +++ b/plugins/external-editor/external-editor.c @@ -34,6 +34,8 @@ #include #include +#include "/media/disk-1/home/evo-src/git/gtkhtml/gtkhtml/htmlengine.h" + #include #include #include @@ -62,6 +64,7 @@ static void ee_editor_immediate_launch_changed (GtkWidget *checkbox); static void async_external_editor (EMsgComposer *composer); static gboolean editor_running (void); static gboolean key_press_cb(GtkWidget * widget, GdkEventKey * event, EMsgComposer *composer); +static gint numlines(gchar *text, gint pos); /* used to track when the external editor is active */ static GThread *editor_thread; @@ -214,8 +217,19 @@ async_external_editor (EMsgComposer *composer) GConfClient *gconf; gchar *editor_cmd_line = NULL; gint fd; + GtkHTML *html; + GtkhtmlEditor *editor; + gint cursor_position = 0; + gint cursor_offset = 0; + gint lineno = 0; + gchar *contents; + gchar *linenostr; + gchar *cursor_offsetstr; + gsize length = 0; - fd = g_file_open_tmp (NULL, &filename, NULL); + +/* prefix temp files with evo so .*vimrc can be setup to recognize them */ + fd = g_file_open_tmp ("evoXX", &filename, NULL); if (fd > 0) { close (fd); /* Push the text (if there is one) from the composer to the file */ @@ -242,6 +256,35 @@ async_external_editor (EMsgComposer *composer) } g_object_unref (gconf); + /* if gvim is editor, configure editor_cmd_line to pass cursor location */ + if (g_strrstr(editor_cmd_line, "vim") != NULL) + { + editor = GTKHTML_EDITOR (composer); + html = gtkhtml_editor_get_html (editor); + cursor_position = html->engine->cursor->position; + cursor_offset = html->engine->cursor->offset; + + /* increment 1 so that entering vim insert mode places you in the same + * entry position you were at in the html */ + ++cursor_offset; + + /* calculate the line number that the cursor is in */ + contents = gtkhtml_editor_get_text_plain (editor, &length); + lineno = numlines(contents, cursor_position); + g_free(contents); + + /* setup the editor_cmd_line */ + editor_cmd_line = g_strconcat(editor_cmd_line, " \"+call cursor(", NULL); + linenostr = g_strdup_printf("%d", lineno); + editor_cmd_line = g_strconcat(editor_cmd_line, linenostr, NULL); + editor_cmd_line = g_strconcat(editor_cmd_line, ",", NULL); + cursor_offsetstr = g_strdup_printf("%d", cursor_offset); + editor_cmd_line = g_strconcat(editor_cmd_line, cursor_offsetstr, NULL); + editor_cmd_line = g_strconcat(editor_cmd_line, ")\"", NULL); + g_free(linenostr); + g_free(cursor_offsetstr); + } + editor_cmd_line = g_strconcat(editor_cmd_line, " ", filename, NULL); if (!g_spawn_command_line_sync(editor_cmd_line, NULL, NULL, &status, NULL)) @@ -393,3 +436,24 @@ e_plugin_ui_init (GtkUIManager *manager, EMsgComposer *composer) return TRUE; } + +static gint +numlines(gchar *text, gint pos) +{ +gint ctr = 0; +gint lineno = 0; + +for (ctr = 0; ctr <= pos; ++ctr) +{ +if (text[ctr] == '\n') +{ +++lineno; +} +} +if (lineno > 0) +{ +++lineno; +} + +return(lineno); +} diff --git a/plugins/mono/mono-plugin.c b/plugins/mono/mono-plugin.c index 76b1e42..86bbb43 100644 --- a/plugins/mono/mono-plugin.c +++ b/plugins/mono/mono-plugin.c @@ -159,7 +159,7 @@ epm_invoke(EPlugin *ep, const gchar *name, gpointer data) if (res) { gpointer *p = mono_object_unbox(res); - d(printf("mono method returned '%p' %ld\n", *p, (long gint)*p)); + d(printf("mono method returned '%p' %ld\n", *p, (long int)*p)); return *p; } else return NULL; -- 1.6.0.6 ___ Evolution-list mailing list Evoluti
Re: [Evolution] Portable Evolution / Mail on Desktop and Notebook
Anjal is the way to go here. Its evolution-lite, I would call so. There are some packages in hggdh's ppa in ubuntu which you can try, but its may not be upto date. -Srini. On Tue, 2009-06-16 at 17:16 +0200, Michael Gasperl wrote: > Is there a portable version of Evolution for Linux (eg. Ubuntu)? Or > another way to use the same mailbox on desktop and notebook? > Thank you for helping me in this question! Michael > ___ > Evolution-list mailing list > Evolution-list@gnome.org > http://mail.gnome.org/mailman/listinfo/evolution-list ___ Evolution-list mailing list Evolution-list@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-list
Re: [Evolution] Portable Evolution / Mail on Desktop and Notebook
On Tue, 2009-06-16 at 17:16 +0200, Michael Gasperl wrote: > Is there a portable version of Evolution for Linux (eg. Ubuntu)? Or > another way to use the same mailbox on desktop and notebook? > Thank you for helping me in this question! Michael Note sure what you mean by "portable". You can keep your mail on an IMAP server and access it from anywhere, but maybe you mean something else. poc ___ Evolution-list mailing list Evolution-list@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-list
[Evolution] Evolution will soon bid farewell to Bonobo
I blogged today about some work I've been doing on a separate Evolution branch. See http://mbarnes.livejournal.com/2606.html or Planet GNOME. Thought the list would be a good place to recruit testers. So if you're keen on surfing the -edge- of the bleeding edge, I invite you to: git clone git://git.gnome.org/evolution cd evolution git checkout kill-bonobo Build it, run it, report bugs. I'm also looking at rolling some unofficial Fedora 12 RPMs. I'll post again when they're up. ETA for this thing is still under discussion. I have to finish it first, then we'll see where we're at. Matthew Barnes signature.asc Description: This is a digitally signed message part ___ Evolution-list mailing list Evolution-list@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-list
[Evolution] Trash mails can't be cleared?
Dear List, I'm used to use Evolution 2.24.3, and now run version 2.26.1. When I delete all trash mails from "Trash" folder, I get "Error while Expunging folder". And there is a lot of mails that can't be deleted. 2.24.3 also has this problem? Can anyone helps? Thanks in advance. -- Daniel Li ___ Evolution-list mailing list Evolution-list@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-list
Re: [Evolution] Trash mails can't be cleared?
On Thu, 2009-06-18 at 11:28 +0800, Daniel.Li wrote: > Dear List, > > I'm used to use Evolution 2.24.3, and now run version 2.26.1. > > When I delete all trash mails from "Trash" folder, I get "Error while > Expunging folder". And there is a lot of mails that can't be deleted. > > 2.24.3 also has this problem? Can anyone helps? Thanks in advance. > It's a known issue. http://bugzilla.gnome.org/show_bug.cgi?id=550414 - Akhil signature.asc Description: PGP signature ___ Evolution-list mailing list Evolution-list@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-list
Re: [Evolution] Trash mails can't be cleared?
Thanks. Below command works for me. $ rm ~/.evolution/mail/local/folders.db On Wed, 2009-06-17 at 21:52 -0600, Akhil Laddha wrote: > On Thu, 2009-06-18 at 11:28 +0800, Daniel.Li wrote: > > Dear List, > > > > I'm used to use Evolution 2.24.3, and now run version 2.26.1. > > > > When I delete all trash mails from "Trash" folder, I get "Error while > > Expunging folder". And there is a lot of mails that can't be deleted. > > > > 2.24.3 also has this problem? Can anyone helps? Thanks in advance. > > > It's a known issue. > > http://bugzilla.gnome.org/show_bug.cgi?id=550414 > > - Akhil > > > -- Daniel Li ___ Evolution-list mailing list Evolution-list@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-list