mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
Deprecate and hardcode the value of visible-focus setting
Just use the default value of AUTOMATIC and make it just work.
This commit is contained in:
parent
eb62084f2a
commit
c9bfd12d2f
@ -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"},
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user