From 1aa789848cb42b483dbdf940229eddfd0793294c Mon Sep 17 00:00:00 2001 From: Alfons Hoogervorst Date: Mon, 21 May 2001 17:16:41 +0000 Subject: [PATCH] adding mail addresses to address book from the textview, and some minor gnome config changes --- ChangeLog.claws | 11 +++++++++++ configure.in | 4 ++-- src/textview.c | 18 ++++++++++++++++-- sylpheed.desktop | 2 +- 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 36ffd2264..7586d3a5f 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,14 @@ +2001-05-21 [alfons] + + Minor things: + + * configure.in: if gnome-config not found, "no" is displayed + + * sylpheed.desktop: "Hello World" is replaced with "Sylpheed Mail" + + * src/textview.c: now also possible to add mail addresses by right + clicking in the text view + 2001-05-20 [alfons] Added installation of gnome specific things: diff --git a/configure.in b/configure.in index 965145244..f904b5daa 100644 --- a/configure.in +++ b/configure.in @@ -17,8 +17,8 @@ AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION") dnl GNOME installed? -AC_PATH_PROG(GNOME_CONFIG, gnome-config, false) -if test "$GNOME_CONFIG" != false; then +AC_PATH_PROG(GNOME_CONFIG, gnome-config, no) +if test "$GNOME_CONFIG" != no; then gnomedir="`gnome-config --prefix`" AC_SUBST(gnomedir) fi diff --git a/src/textview.c b/src/textview.c index 87151fb45..9a37ddb27 100644 --- a/src/textview.c +++ b/src/textview.c @@ -1256,8 +1256,22 @@ static void textview_button_pressed(GtkWidget *widget, GdkEventButton *event, if (current_pos >= uri->start && current_pos < uri->end) { if (!g_strncasecmp(uri->uri, "mailto:", 7)) { - compose_new_with_recipient - (NULL, uri->uri + 7); + if (event->button == 3) { + gchar *fromname, *fromaddress; + /* extract url */ + fromaddress = g_strdup(uri->uri + 7); + /* Hiroyuki: please put this function in utils.c! */ + fromname = procheader_get_fromname(fromaddress); + extract_address(fromaddress); + g_message("adding from textview %s <%s>", fromname, fromaddress); + addressbook_add_contact_by_menu(NULL, fromname, fromaddress, NULL); + g_free(fromaddress); + g_free(fromname); + } + else { + compose_new_with_recipient + (NULL, uri->uri + 7); + } } else open_uri(uri->uri, diff --git a/sylpheed.desktop b/sylpheed.desktop index fa7ef91e0..08e137af3 100644 --- a/sylpheed.desktop +++ b/sylpheed.desktop @@ -1,6 +1,6 @@ [desktop Entry] Name=Sylpheed -Comment=Hello World +Comment=Sylpheed Mail Exec=sylpheed Icon=sylpheed.png Terminal=0 -- 2.25.1