[gtk/default-handling: 17/18] Drop gtk_window_activate_focus
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/default-handling: 17/18] Drop gtk_window_activate_focus
- Date: Sun, 28 Apr 2019 19:33:14 +0000 (UTC)
commit ceffc58eefb1e2f4e9ada1332f66be638327477f
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Apr 28 19:02:18 2019 +0000
Drop gtk_window_activate_focus
This api wasn't used anywhere in GTK. And since
we've dropped the variant for the default widget,
this one should go too. If it is needed, it should
become and action too.
docs/reference/gtk/gtk4-sections.txt | 1 -
gtk/gtkwindow.c | 24 +++---------------------
gtk/gtkwindow.h | 2 --
3 files changed, 3 insertions(+), 24 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 00331feb1b..0971e63708 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4647,7 +4647,6 @@ gtk_window_set_resizable
gtk_window_get_resizable
gtk_window_add_accel_group
gtk_window_remove_accel_group
-gtk_window_activate_focus
gtk_window_set_modal
gtk_window_set_default_size
gtk_window_set_hide_on_close
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 98d551460d..cc45d8f8e2 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -2878,25 +2878,13 @@ gtk_window_set_position (GtkWindow *window,
}
}
-/**
- * gtk_window_activate_focus:
- * @window: a #GtkWindow
- *
- * Activates the current focused widget within the window.
- *
- * Returns: %TRUE if a widget got activated.
- **/
-gboolean
-gtk_window_activate_focus (GtkWindow *window)
+static void
+gtk_window_real_activate_focus (GtkWindow *window)
{
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
- g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
-
if (priv->focus_widget && gtk_widget_is_sensitive (priv->focus_widget))
- return gtk_widget_activate (priv->focus_widget);
-
- return FALSE;
+ gtk_widget_activate (priv->focus_widget);
}
/**
@@ -6256,12 +6244,6 @@ get_active_region_type (GtkWindow *window, gint x, gint y)
return GTK_WINDOW_REGION_CONTENT;
}
-static void
-gtk_window_real_activate_focus (GtkWindow *window)
-{
- gtk_window_activate_focus (window);
-}
-
static void
do_focus_change (GtkWidget *widget,
gboolean in)
diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h
index 167df62b52..89e5365679 100644
--- a/gtk/gtkwindow.h
+++ b/gtk/gtkwindow.h
@@ -158,8 +158,6 @@ GDK_AVAILABLE_IN_ALL
void gtk_window_set_position (GtkWindow *window,
GtkWindowPosition position);
GDK_AVAILABLE_IN_ALL
-gboolean gtk_window_activate_focus (GtkWindow *window);
-GDK_AVAILABLE_IN_ALL
void gtk_window_set_focus (GtkWindow *window,
GtkWidget *focus);
GDK_AVAILABLE_IN_ALL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]