[gtk+] Deprecate and hardcode the value of visible-focus setting
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Deprecate and hardcode the value of visible-focus setting
- Date: Mon, 8 Jul 2013 19:04:09 +0000 (UTC)
commit c9bfd12d2fd0d67d87171719c9237abe941a73cd
Author: William Jon McCann <william jon mccann gmail com>
Date: Mon Jul 8 12:53:23 2013 -0400
Deprecate and hardcode the value of visible-focus setting
Just use the default value of AUTOMATIC and make it just work.
gdk/x11/gdksettings.c | 1 -
gtk/gtkmain.c | 4 +---
gtk/gtksettings.c | 4 +++-
gtk/gtkwindow.c | 10 ++--------
4 files changed, 6 insertions(+), 13 deletions(-)
---
diff --git a/gdk/x11/gdksettings.c b/gdk/x11/gdksettings.c
index 3b0e2e1..bffcb05 100644
--- a/gdk/x11/gdksettings.c
+++ b/gdk/x11/gdksettings.c
@@ -54,7 +54,6 @@ static const struct {
{"Net/SoundThemeName", "gtk-sound-theme-name"},
{"Net/EnableInputFeedbackSounds", "gtk-enable-input-feedback-sounds"},
{"Net/EnableEventSounds", "gtk-enable-event-sounds"},
- {"Gtk/VisibleFocus", "gtk-visible-focus"},
{"Gtk/ShellShowsAppMenu", "gtk-shell-shows-app-menu"},
{"Gtk/ShellShowsMenubar", "gtk-shell-shows-menubar"},
{"Gtk/EnablePrimaryPaste", "gtk-enable-primary-paste"},
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 97c701d..4d814a9 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1675,11 +1675,9 @@ gtk_main_do_event (GdkEvent *event)
/* make focus visible in a window that receives a key event */
{
GtkWidget *window;
- GtkPolicyType visible_focus;
window = gtk_widget_get_toplevel (grab_widget);
- g_object_get (gtk_widget_get_settings (grab_widget), "gtk-visible-focus", &visible_focus, NULL);
- if (GTK_IS_WINDOW (window) && visible_focus != GTK_POLICY_NEVER)
+ if (GTK_IS_WINDOW (window))
gtk_window_set_focus_visible (GTK_WINDOW (window), TRUE);
}
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 47e3d2a..112bf73 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -1236,13 +1236,15 @@ gtk_settings_class_init (GtkSettingsClass *class)
* or hidden until the user starts to use the keyboard.
*
* Since: 3.2
+ *
+ * Deprecated: 3.10: This setting is ignored
*/
result = settings_install_property_parser (class,
g_param_spec_enum ("gtk-visible-focus",
P_("Visible Focus"),
P_("Whether 'focus rectangles' should be
hidden until the user starts to use the keyboard."),
GTK_TYPE_POLICY_TYPE,
- GTK_POLICY_ALWAYS,
+ GTK_POLICY_AUTOMATIC,
GTK_PARAM_READWRITE),
gtk_rc_property_parse_enum);
g_assert (result == PROP_VISIBLE_FOCUS);
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 15772df..497dde8 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -817,8 +817,7 @@ gtk_window_class_init (GtkWindowClass *klass)
*
* Whether 'focus rectangles' are currently visible in this window.
*
- * This property is maintained by GTK+ based on the
- * #GtkSettings:gtk-visible-focus setting and user input
+ * This property is maintained by GTK+ based on user input
* and should not be set by applications.
*
* Since: 2.20
@@ -5410,7 +5409,6 @@ gtk_window_map (GtkWidget *widget)
GtkWindow *window = GTK_WINDOW (widget);
GtkWindowPrivate *priv = window->priv;
GdkWindow *gdk_window;
- GtkPolicyType visible_focus;
if (!gtk_widget_is_toplevel (widget))
{
@@ -5502,10 +5500,6 @@ gtk_window_map (GtkWidget *widget)
/* if mnemonics visible is not already set
* (as in the case of popup menus), then hide mnemonics initially
*/
- g_object_get (gtk_widget_get_settings (widget),
- "gtk-visible-focus", &visible_focus,
- NULL);
-
if (!priv->mnemonics_visible_set)
gtk_window_set_mnemonics_visible (window, FALSE);
@@ -5515,7 +5509,7 @@ gtk_window_map (GtkWidget *widget)
if (priv->transient_parent)
gtk_window_set_focus_visible (window, gtk_window_get_focus_visible (priv->transient_parent));
else
- gtk_window_set_focus_visible (window, visible_focus == GTK_POLICY_ALWAYS);
+ gtk_window_set_focus_visible (window, FALSE);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]