* src/mimeview.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Wed, 30 Jul 2003 22:50:01 +0000 (22:50 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Wed, 30 Jul 2003 22:50:01 +0000 (22:50 +0000)
tweak icon box UI a bit more, now allowing right-clicks actions
getting the relevant mime data too; should fix #250, "Can't save
attachments sometimes".

ChangeLog.claws
configure.ac
src/mimeview.c

index 3b32fca247e6e35c443630db4857472d123d7ecc..8533e92d9696c6f0b07a36f74c21d930e5ec1f62 100644 (file)
@@ -1,3 +1,10 @@
+2003-07-31 [alfons]    0.9.3claws84
+
+       * src/mimeview.c
+               tweak icon box UI a bit more, now allowing right-clicks actions
+               getting the relevant mime data too; should fix #250, "Can't save 
+               attachments sometimes".
+
 2003-07-30 [alfons]    0.9.3claws83
 
        * src/compose.c
index 8a9a76e1ecc72a9464ba7f2c5644369f5fd1fecb..e86b5a19b1d7c19bab0855ff4792c31e070c4fb9 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=83
+EXTRA_VERSION=84
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index e1e8b0c08004b02ad1d339849c16b6abcb37027b..ee85858169b7121f6a3a72093bb7d53894e7e571 100644 (file)
@@ -834,7 +834,9 @@ static void part_button_pressed(MimeView *mimeview, GdkEventButton *event,
                                   "/Check signature",
                                   mimeview_is_signed(mimeview));
 #endif
-
+               gtk_object_set_data(GTK_OBJECT(mimeview->popupmenu),
+                                   "pop_partinfo", partinfo);
+                                   
                gtk_menu_popup(GTK_MENU(mimeview->popupmenu),
                               NULL, NULL, NULL, NULL,
                               event->button, event->time);
@@ -1029,6 +1031,14 @@ static void mimeview_display_as_text(MimeView *mimeview)
        if (!mimeview->opened) return;
 
        partinfo = mimeview_get_selected_part(mimeview);
+       if (!partinfo)  {
+               partinfo = (MimeInfo *) gtk_object_get_data
+                       (GTK_OBJECT(mimeview->popupmenu),
+                        "pop_partinfo");
+               gtk_object_set_data(GTK_OBJECT(mimeview->popupmenu),
+                                   "pop_partinfo", NULL);
+       
+       }                        
        g_return_if_fail(partinfo != NULL);
        mimeview_show_message_part(mimeview, partinfo);
 }
@@ -1044,6 +1054,13 @@ static void mimeview_save_as(MimeView *mimeview)
        if (!mimeview->file) return;
 
        partinfo = mimeview_get_selected_part(mimeview);
+       if (!partinfo) { 
+               partinfo = (MimeInfo *) gtk_object_get_data
+                       (GTK_OBJECT(mimeview->popupmenu),
+                        "pop_partinfo");
+               gtk_object_set_data(GTK_OBJECT(mimeview->popupmenu),
+                                   "pop_partinfo", NULL);
+       }                        
        g_return_if_fail(partinfo != NULL);
 
        if (partinfo->filename)
@@ -1079,6 +1096,13 @@ static void mimeview_launch(MimeView *mimeview)
        if (!mimeview->file) return;
 
        partinfo = mimeview_get_selected_part(mimeview);
+       if (!partinfo) { 
+               partinfo = (MimeInfo *) gtk_object_get_data
+                       (GTK_OBJECT(mimeview->popupmenu),
+                        "pop_partinfo");
+               gtk_object_set_data(GTK_OBJECT(mimeview->popupmenu),
+                                   "pop_partinfo", NULL);
+       }                        
        g_return_if_fail(partinfo != NULL);
 
        filename = procmime_get_tmp_file_name(partinfo);
@@ -1102,6 +1126,13 @@ static void mimeview_open_with(MimeView *mimeview)
        if (!mimeview->file) return;
 
        partinfo = mimeview_get_selected_part(mimeview);
+       if (!partinfo) { 
+               partinfo = (MimeInfo *) gtk_object_get_data
+                       (GTK_OBJECT(mimeview->popupmenu),
+                        "pop_partinfo");
+               gtk_object_set_data(GTK_OBJECT(mimeview->popupmenu),
+                                   "pop_partinfo", NULL);
+       }                        
        g_return_if_fail(partinfo != NULL);
 
        filename = procmime_get_tmp_file_name(partinfo);