[gnome-builder] GbCommandBar: short circuit if we already shown/hiden.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] GbCommandBar: short circuit if we already shown/hiden.
- Date: Thu, 18 Dec 2014 05:07:40 +0000 (UTC)
commit f0fc2065a781f8d13555185a841b8f74d9c94e7e
Author: Christian Hergert <christian hergert me>
Date: Wed Dec 17 21:07:13 2014 -0800
GbCommandBar: short circuit if we already shown/hiden.
src/commands/gb-command-bar.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/commands/gb-command-bar.c b/src/commands/gb-command-bar.c
index 456f729..de21055 100644
--- a/src/commands/gb-command-bar.c
+++ b/src/commands/gb-command-bar.c
@@ -79,6 +79,9 @@ gb_command_bar_hide (GbCommandBar *bar)
g_return_if_fail (GB_IS_COMMAND_BAR (bar));
+ if (!gtk_revealer_get_reveal_child (GTK_REVEALER (bar)))
+ return;
+
gtk_revealer_set_reveal_child (GTK_REVEALER (bar), FALSE);
workbench = gb_widget_get_workbench (GTK_WIDGET (bar));
@@ -118,6 +121,9 @@ gb_command_bar_show (GbCommandBar *bar)
g_return_if_fail (GB_IS_COMMAND_BAR (bar));
+ if (gtk_revealer_get_reveal_child (GTK_REVEALER (bar)))
+ return;
+
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (bar));
focus = gtk_window_get_focus (GTK_WINDOW (toplevel));
gb_command_bar_set_last_focus (bar, focus);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]