forked from AuroraMiddleware/gtk
gtk/gtklabel.c: Use accessor functions to access GtkWindow
This commit is contained in:
parent
e00ffe3872
commit
991eaa7580
@ -6398,17 +6398,22 @@ gtk_label_activate_current_link (GtkLabel *label)
|
||||
{
|
||||
GtkWidget *toplevel;
|
||||
GtkWindow *window;
|
||||
GtkWidget *default_widget, *focus_widget;
|
||||
|
||||
toplevel = gtk_widget_get_toplevel (widget);
|
||||
if (GTK_IS_WINDOW (toplevel))
|
||||
{
|
||||
window = GTK_WINDOW (toplevel);
|
||||
|
||||
if (window &&
|
||||
window->default_widget != widget &&
|
||||
!(widget == window->focus_widget &&
|
||||
(!window->default_widget || !gtk_widget_is_sensitive (window->default_widget))))
|
||||
gtk_window_activate_default (window);
|
||||
if (window)
|
||||
{
|
||||
default_widget = gtk_window_get_default_widget (window);
|
||||
focus_widget = gtk_window_get_focus (window);
|
||||
|
||||
if (default_widget != widget &&
|
||||
!(widget == focus_widget && (!default_widget || !gtk_widget_is_sensitive (default_widget))))
|
||||
gtk_window_activate_default (window);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user