Commit 8ea96d1d authored by Maciej Stachowiak's avatar Maciej Stachowiak

Reorder code so "context_click" is actually emitted on a button 3 press.

	* libnautilus/gnome-icon-container.c (handle_icon_button_press):
	Reorder code so "context_click" is actually emitted on a button 3
	press.
parent 54ff776e
2000-01-10 Maciej Stachowiak <mjs@eazel.com>
* libnautilus/gnome-icon-container.c (handle_icon_button_press):
Reorder code so "context_click" is actually emitted on a button 3
press.
* src/file-manager/fm-main.c,
src/file-manager/fm-directory-view.c,
src/file-manager/fm-directory-view.h: Changed FMDirectoryView to
......
......@@ -2206,6 +2206,20 @@ handle_icon_button_press (GnomeIconContainer *container,
GnomeIconContainerPrivate *priv;
gdouble world_x, world_y;
if (event->button == 3) {
/* FIXME this means you cannot drag with right click. Instead,
we should setup a timeout and emit this signal if the
timeout expires without movement. */
priv->drag_button = 0;
priv->drag_icon = NULL;
gtk_signal_emit (GTK_OBJECT (container),
signals[CONTEXT_CLICK],
icon->text, icon->data);
return TRUE;
}
if (event->button != 1)
return FALSE;
......@@ -2237,20 +2251,6 @@ handle_icon_button_press (GnomeIconContainer *container,
return TRUE;
}
if (event->button == 3) {
/* FIXME this means you cannot drag with right click. Instead,
we should setup a timeout and emit this signal if the
timeout expires without movement. */
priv->drag_button = 0;
priv->drag_icon = NULL;
gtk_signal_emit (GTK_OBJECT (container),
signals[CONTEXT_CLICK],
icon->text, icon->data);
return TRUE;
}
priv->drag_button = event->button;
priv->drag_icon = icon;
priv->drag_x = event->x;
......
......@@ -2206,6 +2206,20 @@ handle_icon_button_press (GnomeIconContainer *container,
GnomeIconContainerPrivate *priv;
gdouble world_x, world_y;
if (event->button == 3) {
/* FIXME this means you cannot drag with right click. Instead,
we should setup a timeout and emit this signal if the
timeout expires without movement. */
priv->drag_button = 0;
priv->drag_icon = NULL;
gtk_signal_emit (GTK_OBJECT (container),
signals[CONTEXT_CLICK],
icon->text, icon->data);
return TRUE;
}
if (event->button != 1)
return FALSE;
......@@ -2237,20 +2251,6 @@ handle_icon_button_press (GnomeIconContainer *container,
return TRUE;
}
if (event->button == 3) {
/* FIXME this means you cannot drag with right click. Instead,
we should setup a timeout and emit this signal if the
timeout expires without movement. */
priv->drag_button = 0;
priv->drag_icon = NULL;
gtk_signal_emit (GTK_OBJECT (container),
signals[CONTEXT_CLICK],
icon->text, icon->data);
return TRUE;
}
priv->drag_button = event->button;
priv->drag_icon = icon;
priv->drag_x = event->x;
......
......@@ -2206,6 +2206,20 @@ handle_icon_button_press (GnomeIconContainer *container,
GnomeIconContainerPrivate *priv;
gdouble world_x, world_y;
if (event->button == 3) {
/* FIXME this means you cannot drag with right click. Instead,
we should setup a timeout and emit this signal if the
timeout expires without movement. */
priv->drag_button = 0;
priv->drag_icon = NULL;
gtk_signal_emit (GTK_OBJECT (container),
signals[CONTEXT_CLICK],
icon->text, icon->data);
return TRUE;
}
if (event->button != 1)
return FALSE;
......@@ -2237,20 +2251,6 @@ handle_icon_button_press (GnomeIconContainer *container,
return TRUE;
}
if (event->button == 3) {
/* FIXME this means you cannot drag with right click. Instead,
we should setup a timeout and emit this signal if the
timeout expires without movement. */
priv->drag_button = 0;
priv->drag_icon = NULL;
gtk_signal_emit (GTK_OBJECT (container),
signals[CONTEXT_CLICK],
icon->text, icon->data);
return TRUE;
}
priv->drag_button = event->button;
priv->drag_icon = icon;
priv->drag_x = event->x;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment