[file-roller] window: set the paned as the drag destination



commit 9fab128701258b9c8a44138fcac8f7dd9f59b6e9
Author: Ernestas Kulik <ernestas kulik gmail com>
Date:   Mon Jun 13 22:59:02 2016 +0300

    window: set the paned as the drag destination
    
    Setting the window as the drag destination along with the
    GTK_DEST_DEFAULT_HIGHLIGHT flag causes the window to misbehave. This
    commit fixes that by setting the paned as the drag destination.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767621

 src/fr-window.c |   27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index 9552215..3faf28b 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -5511,20 +5511,6 @@ fr_window_construct (FrWindow *window)
                                     g_settings_get_int (window->priv->settings_ui, PREF_UI_WINDOW_WIDTH),
                                     g_settings_get_int (window->priv->settings_ui, PREF_UI_WINDOW_HEIGHT));
 
-       gtk_drag_dest_set (GTK_WIDGET (window),
-                          GTK_DEST_DEFAULT_ALL,
-                          target_table, G_N_ELEMENTS (target_table),
-                          GDK_ACTION_COPY);
-
-       g_signal_connect (G_OBJECT (window),
-                         "drag_data_received",
-                         G_CALLBACK (fr_window_drag_data_received),
-                         window);
-       g_signal_connect (G_OBJECT (window),
-                         "drag_motion",
-                         G_CALLBACK (fr_window_drag_motion),
-                         window);
-
        g_signal_connect (G_OBJECT (window),
                          "key_press_event",
                          G_CALLBACK (key_press_cb),
@@ -5738,6 +5724,19 @@ fr_window_construct (FrWindow *window)
        gtk_paned_pack1 (GTK_PANED (window->priv->paned), window->priv->sidepane, FALSE, TRUE);
        gtk_paned_pack2 (GTK_PANED (window->priv->paned), list_scrolled_window, TRUE, TRUE);
        gtk_paned_set_position (GTK_PANED (window->priv->paned), g_settings_get_int 
(window->priv->settings_ui, PREF_UI_SIDEBAR_WIDTH));
+       gtk_drag_dest_set (GTK_WIDGET (window->priv->paned),
+                          GTK_DEST_DEFAULT_ALL,
+                          target_table, G_N_ELEMENTS (target_table),
+                          GDK_ACTION_COPY);
+
+       g_signal_connect (G_OBJECT (window->priv->paned),
+                         "drag_data_received",
+                         G_CALLBACK (fr_window_drag_data_received),
+                         window);
+       g_signal_connect (G_OBJECT (window->priv->paned),
+                         "drag_motion",
+                         G_CALLBACK (fr_window_drag_motion),
+                         window);
 
        fr_window_attach (FR_WINDOW (window), window->priv->paned, FR_WINDOW_AREA_CONTENTS);
        gtk_widget_show_all (window->priv->paned);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]