[nautilus] Don't hide the floating-bar on hover if it is interactive
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Don't hide the floating-bar on hover if it is interactive
- Date: Wed, 7 Sep 2011 16:34:57 +0000 (UTC)
commit 00b108c687408db87ebb617186aa8fa62f35c7de
Author: Luke Symes <allsymes gmail com>
Date: Sat Jul 16 17:31:26 2011 +1200
Don't hide the floating-bar on hover if it is interactive
If there are actions set on the floating bar, avoid escaping the
pointer.
https://bugzilla.gnome.org/show_bug.cgi?id=654558
src/nautilus-floating-bar.c | 9 +++++++++
src/nautilus-window-manage-views.c | 2 ++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-floating-bar.c b/src/nautilus-floating-bar.c
index 92acbc6..38a2a9e 100644
--- a/src/nautilus-floating-bar.c
+++ b/src/nautilus-floating-bar.c
@@ -33,6 +33,7 @@ struct _NautilusFloatingBarDetails {
GtkWidget *label_widget;
GtkWidget *spinner;
gboolean show_spinner;
+ gboolean is_interactive;
guint escaping_distance;
GtkAllocation initial_allocation;
@@ -146,6 +147,10 @@ overlay_enter_notify_cb (GtkWidget *parent,
return FALSE;
}
+ if (NAUTILUS_FLOATING_BAR (widget)->priv->is_interactive) {
+ return FALSE;
+ }
+
if (gtk_widget_get_halign (widget) == GTK_ALIGN_START) {
gtk_widget_set_halign (widget, GTK_ALIGN_END);
} else {
@@ -371,6 +376,8 @@ nautilus_floating_bar_add_action (NautilusFloatingBar *self,
g_signal_connect (button, "clicked",
G_CALLBACK (action_button_clicked_cb), self);
+
+ self->priv->is_interactive = TRUE;
}
void
@@ -395,4 +402,6 @@ nautilus_floating_bar_cleanup_actions (NautilusFloatingBar *self)
}
g_list_free (children);
+
+ self->priv->is_interactive = FALSE;
}
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index ea82b07..247f66a 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -1227,6 +1227,8 @@ real_setup_loading_floating_bar (NautilusWindowSlot *slot)
nautilus_floating_bar_add_action (NAUTILUS_FLOATING_BAR (slot->floating_bar),
GTK_STOCK_STOP,
NAUTILUS_FLOATING_BAR_ACTION_ID_STOP);
+
+ gtk_widget_set_halign (slot->floating_bar, GTK_ALIGN_END);
gtk_widget_show (slot->floating_bar);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]