[gtk+] shortcuts: Make sure that hidden shortcuts stay hidden
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] shortcuts: Make sure that hidden shortcuts stay hidden
- Date: Wed, 16 Dec 2015 11:32:21 +0000 (UTC)
commit a56a8a8c0262420bc6acce38686c08257cde537c
Author: Bastien Nocera <hadess hadess net>
Date: Wed Dec 16 12:20:47 2015 +0100
shortcuts: Make sure that hidden shortcuts stay hidden
When doing a gtk_widget_show_all() on the shortcuts window,
accelerators for both RTL and LTR directions are being shown.
Make sure that no-show-all is set by default on hidden shortcuts, and
updated if the widget direction changes.
https://bugzilla.gnome.org/show_bug.cgi?id=759541
gtk/gtkshortcutsshortcut.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkshortcutsshortcut.c b/gtk/gtkshortcutsshortcut.c
index 967a536..cd44674 100644
--- a/gtk/gtkshortcutsshortcut.c
+++ b/gtk/gtkshortcutsshortcut.c
@@ -259,9 +259,15 @@ update_visible_from_direction (GtkShortcutsShortcut *self)
{
if (self->direction == GTK_TEXT_DIR_NONE ||
self->direction == gtk_widget_get_direction (GTK_WIDGET (self)))
- gtk_widget_set_visible (GTK_WIDGET (self), TRUE);
+ {
+ gtk_widget_set_visible (GTK_WIDGET (self), TRUE);
+ gtk_widget_set_no_show_all (GTK_WIDGET (self), FALSE);
+ }
else
- gtk_widget_set_visible (GTK_WIDGET (self), FALSE);
+ {
+ gtk_widget_set_visible (GTK_WIDGET (self), FALSE);
+ gtk_widget_set_no_show_all (GTK_WIDGET (self), TRUE);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]