[evolution-patches] 42395: 1st pass on dnd to shortcut-bar



The patch gets the insertion point hint and dnd to the primary shortcut
group working.  Still can't drag to added groups.

Mike
Index: gal/shortcut-bar/e-icon-bar.c
===================================================================
RCS file: /cvs/gnome/gal/gal/shortcut-bar/e-icon-bar.c,v
retrieving revision 1.43
diff -u -p -r1.43 e-icon-bar.c
--- gal/shortcut-bar/e-icon-bar.c	17 Apr 2003 18:44:40 -0000	1.43
+++ gal/shortcut-bar/e-icon-bar.c	7 May 2003 17:14:46 -0000
@@ -1557,6 +1557,7 @@ e_icon_bar_drag_motion (GtkWidget      *
 						     x + scroll_x,
 						     y + scroll_y,
 						     &before_item);
+
 	e_icon_bar_item_motion (icon_bar, item_num, NULL);
 	e_icon_bar_set_dragging_before_item (icon_bar, before_item);
 
@@ -1573,7 +1574,8 @@ e_icon_bar_drag_motion (GtkWidget      *
 			gtk_timeout_remove (icon_bar->auto_scroll_timeout_id);
 			icon_bar->auto_scroll_timeout_id = 0;
 		}
-		return TRUE;
+		gdk_drag_status(context, GDK_ACTION_MOVE, time);
+		return FALSE;
 	}
 
 	if (icon_bar->auto_scroll_timeout_id == 0) {
@@ -1581,7 +1583,8 @@ e_icon_bar_drag_motion (GtkWidget      *
 		icon_bar->auto_scroll_delay = E_ICON_BAR_SCROLL_DELAY;
 	}
 
-	return TRUE;
+	gdk_drag_status(context, GDK_ACTION_MOVE, time);
+	return FALSE;
 }
 
 
Index: gal/shortcut-bar/e-shortcut-bar.c
===================================================================
RCS file: /cvs/gnome/gal/gal/shortcut-bar/e-shortcut-bar.c,v
retrieving revision 1.44
diff -u -p -r1.44 e-shortcut-bar.c
--- gal/shortcut-bar/e-shortcut-bar.c	25 Feb 2003 16:47:58 -0000	1.44
+++ gal/shortcut-bar/e-shortcut-bar.c	7 May 2003 17:14:47 -0000
@@ -554,7 +554,7 @@ e_shortcut_bar_add_group	(EShortcutBar	*
 	g_signal_connect (group->icon_bar, "drag_data_get",
 			  G_CALLBACK (e_shortcut_bar_on_drag_data_get),
 			  shortcut_bar);
-	g_signal_connect (group->icon_bar, "drag_motion",
+	g_signal_connect_after (group->icon_bar, "drag_motion",
 			  G_CALLBACK (e_shortcut_bar_on_drag_motion),
 			  shortcut_bar);
 	g_signal_connect (group->icon_bar, "drag_drop",
@@ -827,7 +827,6 @@ e_shortcut_bar_on_drag_motion (GtkWidget
 						     &before_item);
 	group_num = e_group_bar_get_group_num (E_GROUP_BAR (shortcut_bar),
 					       GTK_WIDGET (icon_bar)->parent);
-
 
 	/* We only care about the current group.  */
 	if (group_num != E_GROUP_BAR (shortcut_bar)->current_group_num) {


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