2005-02-12 [paul] 1.0.1cvs4.4
authorPaul Mangan <paul@claws-mail.org>
Sat, 12 Feb 2005 12:45:29 +0000 (12:45 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sat, 12 Feb 2005 12:45:29 +0000 (12:45 +0000)
* src/textview.c
add 'Copy' to contextual menu on emails

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/textview.c

index bb33bca..8524166 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-12 [paul]      1.0.1cvs4.4
+
+       * src/textview.c
+               add 'Copy' to contextual menu on emails
+
 2005-02-11 [colin]     1.0.1cvs4.3
 
        * src/compose.c
index 16ff688..05c04b8 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.396.2.21 -r 1.396.2.22 ChangeLog; cvs diff -u -r 1.2504.2.47 -r 1.2504.2.48 ChangeLog.claws; cvs diff -u -r 1.391.2.21 -r 1.391.2.22 ChangeLog.jp; cvs diff -u -r 1.654.2.404 -r 1.654.2.405 configure.ac; cvs diff -u -r 1.382.2.97 -r 1.382.2.98 src/compose.c; ) > 1.0.1cvs4.1.patchset
 ( cvs diff -u -r 1.6.2.3 -r 1.6.2.4 po/Makefile.in.in; ) > 1.0.1cvs4.2.patchset
 ( cvs diff -u -r 1.382.2.98 -r 1.382.2.99 src/compose.c; ) > 1.0.1cvs4.3.patchset
+( cvs diff -u -r 1.96.2.44 -r 1.96.2.45 src/textview.c; ) > 1.0.1cvs4.4.patchset
index 6049972..f061aed 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=4
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.3
+EXTRA_GTK2_VERSION=.4
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index 8b2194e..5dfa78c 100644 (file)
@@ -198,6 +198,9 @@ static void add_uri_to_addrbook_cb          (TextView       *textview,
 static void mail_to_uri_cb                     (TextView       *textview, 
                                                 guint           action, 
                                                 void           *data);
+static void copy_mail_to_uri_cb                        (TextView       *textview,
+                                                guint           action,
+                                                void           *data);
 
 static GtkItemFactoryEntry textview_link_popup_entries[] = 
 {
@@ -209,6 +212,7 @@ static GtkItemFactoryEntry textview_mail_popup_entries[] =
 {
        {N_("/_Add to addressbook"),    NULL, add_uri_to_addrbook_cb, 0, NULL},
        {N_("/_Email"),                 NULL, mail_to_uri_cb, 0, NULL},
+       {N_("/_Copy"),                  NULL, copy_mail_to_uri_cb, 0, NULL},
 };
 
 
@@ -2199,4 +2203,20 @@ static void mail_to_uri_cb (TextView *textview, guint action, void *data)
        compose_new(account, uri->uri + 7, NULL);
 }
 
+static void copy_mail_to_uri_cb        (TextView *textview, guint action, void *data)
+{
+       gchar *fromaddress;
+       RemoteURI *uri = g_object_get_data(G_OBJECT(textview->mail_popup_menu),
+                                          "menu_button");
+       if (uri == NULL)
+               return;
+
+       fromaddress = g_strdup(uri->uri + 7);
+       
+       gtk_clipboard_set_text(gtk_clipboard_get(GDK_NONE), fromaddress, -1);
+       g_object_set_data(G_OBJECT(textview->mail_popup_menu), "menu_button",
+                         NULL);
+
+       g_free(fromaddress);
+}