adding mail addresses to address book from the textview, and some minor gnome config...
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Mon, 21 May 2001 17:16:41 +0000 (17:16 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Mon, 21 May 2001 17:16:41 +0000 (17:16 +0000)
ChangeLog.claws
configure.in
src/textview.c
sylpheed.desktop

index 36ffd22..7586d3a 100644 (file)
@@ -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:
index 9651452..f904b5d 100644 (file)
@@ -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
index 87151fb..9a37ddb 100644 (file)
@@ -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,
index fa7ef91..08e137a 100644 (file)
@@ -1,6 +1,6 @@
 [desktop Entry]
 Name=Sylpheed
-Comment=Hello World
+Comment=Sylpheed Mail
 Exec=sylpheed
 Icon=sylpheed.png
 Terminal=0