2006-09-05 [colin] 2.4.0cvs150
authorColin Leroy <colin@colino.net>
Tue, 5 Sep 2006 16:26:59 +0000 (16:26 +0000)
committerColin Leroy <colin@colino.net>
Tue, 5 Sep 2006 16:26:59 +0000 (16:26 +0000)
* src/mimeview.c
Don't select part on right-click either

ChangeLog
PATCHSETS
configure.ac
src/mimeview.c

index 9a641d0823f232b5ffbac1004c13b2598684165f..c273fa61bfeed596830bc6b64c53d8288525fd18 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-05 [colin]     2.4.0cvs150
+
+       * src/mimeview.c
+               Don't select part on right-click either
+
 2006-09-05 [paul]      2.4.0cvs149
 
        * src/mimeview.c
index a7654892702ce72d74c61aae995f8f99340a6236..bc3db908a68f937fea7f68a30e58d8e1433d4e0e 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.83.2.84 -r 1.83.2.85 src/mimeview.c;  ) > 2.4.0cvs147.patchset
 ( cvs diff -u -r 1.83.2.85 -r 1.83.2.86 src/mimeview.c;  ) > 2.4.0cvs148.patchset
 ( cvs diff -u -r 1.83.2.86 -r 1.83.2.87 src/mimeview.c;  ) > 2.4.0cvs149.patchset
+( cvs diff -u -r 1.83.2.87 -r 1.83.2.88 src/mimeview.c;  ) > 2.4.0cvs150.patchset
index 31841429bbbcfc31e832a2ce43192f67673784ca..6b88a5087aaf3ce6892e8462d526914313cf763d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=149
+EXTRA_VERSION=150
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 2be0e497b399ab6e03847409456d506517c5aa50..c17559f67d08064ddbc97095a1d6a0a8efcc5346 100644 (file)
@@ -157,10 +157,11 @@ static gboolean part_button_pressed       (MimeView       *mimeview,
 static void icon_scroll_size_allocate_cb(GtkWidget     *widget, 
                                         GtkAllocation  *layout_size, 
                                         MimeView       *mimeview);
+static MimeInfo *mimeview_get_part_to_use(MimeView *mimeview);
 
 static void mimeview_launch_cb(MimeView *mimeview)
 {
-       mimeview_launch(mimeview, NULL);
+       mimeview_launch(mimeview, mimeview_get_part_to_use(mimeview));
 }
 static GtkItemFactoryEntry mimeview_popup_entries[] =
 {
@@ -1505,13 +1506,13 @@ static MimeInfo *mimeview_get_part_to_use(MimeView *mimeview)
                partinfo = mimeview->spec_part;
                mimeview->spec_part = NULL;
        } else {
-               partinfo = mimeview_get_selected_part(mimeview);
+               partinfo = (MimeInfo *) g_object_get_data
+                        (G_OBJECT(mimeview->popupmenu),
+                        "pop_partinfo");
+               g_object_set_data(G_OBJECT(mimeview->popupmenu),
+                                 "pop_partinfo", NULL);
                if (!partinfo) { 
-                       partinfo = (MimeInfo *) g_object_get_data
-                                (G_OBJECT(mimeview->popupmenu),
-                                "pop_partinfo");
-                       g_object_set_data(G_OBJECT(mimeview->popupmenu),
-                                         "pop_partinfo", NULL);
+                       partinfo = mimeview_get_selected_part(mimeview);
                }                        
        }
 
@@ -1775,14 +1776,11 @@ static gboolean icon_clicked_cb (GtkWidget *button, GdkEventButton *event, MimeV
        num      = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button), "icon_number"));
        partinfo = g_object_get_data(G_OBJECT(button), "partinfo");
 
-       if (event->button != 2) {
+       if (event->button == 1) {
                icon_selected(mimeview, num, partinfo);
                gtk_widget_grab_focus(button);
                if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button))) {
                        toggle_icon(GTK_TOGGLE_BUTTON(button), mimeview);
-                       if (event->button == 3)
-                               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button),
-                                                            TRUE);
                }
        }
        part_button_pressed(mimeview, event, partinfo);
@@ -2237,7 +2235,10 @@ void mimeview_handle_cmd(MimeView *mimeview, const gchar *cmd, GdkEventButton *e
        if (!mainwin)
                return;
                
-       else if (!strcmp(cmd, "sc://view_log"))
+       g_object_set_data(G_OBJECT(mimeview->popupmenu),
+                         "pop_partinfo", NULL);
+
+       if (!strcmp(cmd, "sc://view_log"))
                log_window_show(mainwin->logwin);
        else if (!strcmp(cmd, "sc://save_as"))
                mimeview_save_as(mimeview);