2012-01-20 [pawel] 3.8.0cvs15
authorPaweł Pękala <c0rn@gazeta.pl>
Fri, 20 Jan 2012 22:30:05 +0000 (22:30 +0000)
committerPaweł Pękala <c0rn@gazeta.pl>
Fri, 20 Jan 2012 22:30:05 +0000 (22:30 +0000)
* src/mimeview.c
Fix bug #2582 'Expanded mimeview drag n drop no longer works'

ChangeLog
PATCHSETS
configure.ac
src/mimeview.c

index 6ac86f8..0abe83a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-20 [pawel]     3.8.0cvs15
+
+       * src/mimeview.c
+               Fix bug #2582 'Expanded mimeview drag n drop no longer works'
+
 2012-01-14 [colin]     3.8.0cvs14
 
        * commitHelper
index ab6e47b..1beed1e 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.442 -r 1.395.2.443 src/summaryview.c;  ) > 3.8.0cvs12.patchset
 ( cvs diff -u -r 1.274.2.340 -r 1.274.2.341 src/mainwindow.c;  cvs diff -u -r 1.39.2.62 -r 1.39.2.63 src/mainwindow.h;  cvs diff -u -r 1.43.2.124 -r 1.43.2.125 src/toolbar.c;  ) > 3.8.0cvs13.patchset
 ( cvs diff -u -r 1.1.2.39 -r 1.1.2.40 commitHelper;  ) > 3.8.0cvs14.patchset
+( cvs diff -u -r 1.83.2.187 -r 1.83.2.188 src/mimeview.c;  ) > 3.8.0cvs15.patchset
index c7baac5..c54d7fb 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=8
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=14
+EXTRA_VERSION=15
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index e706fd2..0ab2c88 100644 (file)
@@ -89,10 +89,6 @@ static gboolean mimeview_write_part          (const gchar    *filename,
 
 static void mimeview_selected          (GtkTreeSelection       *selection,
                                         MimeView       *mimeview);
-static void mimeview_start_drag        (GtkWidget      *widget,
-                                        gint            button,
-                                        GdkEvent       *event,
-                                        MimeView       *mimeview);
 static gint mimeview_button_pressed    (GtkWidget      *widget,
                                         GdkEventButton *event,
                                         MimeView       *mimeview);
@@ -337,16 +333,16 @@ MimeView *mimeview_create(MainWindow *mainwin)
 
        gtk_widget_show(ctree);
        gtk_container_add(GTK_CONTAINER(scrolledwin), ctree);
+       gtk_drag_source_set(ctree, GDK_BUTTON1_MASK|GDK_BUTTON3_MASK, 
+                           mimeview_mime_types, 1, GDK_ACTION_COPY);
 
        g_signal_connect(G_OBJECT(selection), "changed",
                         G_CALLBACK(mimeview_selected), mimeview);
-       g_signal_connect(G_OBJECT(ctree), "button-release-event",
+       g_signal_connect(G_OBJECT(ctree), "button_release_event",
                         G_CALLBACK(mimeview_button_pressed), mimeview);
-       g_signal_connect(G_OBJECT(ctree), "key-press-event",
+       g_signal_connect(G_OBJECT(ctree), "key_press_event",
                         G_CALLBACK(mimeview_key_pressed), mimeview);
-       g_signal_connect(G_OBJECT (ctree),"drag-begin",
-                        G_CALLBACK (mimeview_start_drag), mimeview);
-       g_signal_connect(G_OBJECT(ctree), "drag-data-get",
+       g_signal_connect(G_OBJECT(ctree), "drag_data_get",
                         G_CALLBACK(mimeview_drag_data_get), mimeview);
 
        mime_notebook = gtk_notebook_new();
@@ -1449,24 +1445,6 @@ static void mimeview_selected(GtkTreeSelection *selection, MimeView *mimeview)
        }
 }
 
-static void mimeview_start_drag(GtkWidget *widget, gint button,
-                               GdkEvent *event, MimeView *mimeview)
-{
-       GdkDragContext *context;
-       MimeInfo *partinfo;
-
-       cm_return_if_fail(mimeview != NULL);
-
-       partinfo = mimeview_get_selected_part(mimeview);
-       if (partinfo == NULL || 
-           partinfo->disposition == DISPOSITIONTYPE_INLINE)
-               return;
-
-       context = gtk_drag_begin(widget, mimeview->target_list,
-                                GDK_ACTION_COPY, button, event);
-       gtk_drag_set_icon_default(context);
-}
-
 static gint mimeview_button_pressed(GtkWidget *widget, GdkEventButton *event,
                                    MimeView *mimeview)
 {