[gtk/default-handling: 15/25] label: Activate default via action
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/default-handling: 15/25] label: Activate default via action
- Date: Sun, 28 Apr 2019 23:31:16 +0000 (UTC)
commit 7553d0c471ba774bfd5def5091a0b4a0fc6f1a78
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Apr 28 18:12:15 2019 +0000
label: Activate default via action
Switch to the new way of activating default.
gtk/gtklabel.c | 26 ++------------------------
1 file changed, 2 insertions(+), 24 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 05f2c8c537..5d18a7567f 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -6203,31 +6203,9 @@ gtk_label_activate_current_link (GtkLabel *label)
link = gtk_label_get_focus_link (label);
if (link)
- {
- emit_activate_link (label, link);
- }
+ emit_activate_link (label, link);
else
- {
- 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)
- {
- default_widget = gtk_window_get_default_widget (window);
- focus_widget = gtk_root_get_focus (GTK_ROOT (window));
-
- if (default_widget != widget &&
- !(widget == focus_widget && (!default_widget || !gtk_widget_is_sensitive
(default_widget))))
- gtk_window_activate_default (window);
- }
- }
- }
+ gtk_widget_activate_default (widget);
}
static GtkLabelLink *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]