[gtk/focus-cleanup: 3/3] Drop gtk_window_activate_focus
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/focus-cleanup: 3/3] Drop gtk_window_activate_focus
- Date: Sun, 28 Apr 2019 22:22:13 +0000 (UTC)
commit 3b62d9c027186fe0fddfb9d61fdf43c4d1d1483a
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 | 29 -----------------------------
gtk/gtkwindow.h | 2 --
3 files changed, 32 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 33f5984760..48a991be96 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_activate_default
gtk_window_set_modal
gtk_window_set_default_size
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 67dd10dc6f..b89d710db1 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -429,7 +429,6 @@ static void gtk_window_move_focus (GtkWidget *widget,
GtkDirectionType dir);
static void gtk_window_real_activate_default (GtkWindow *window);
-static void gtk_window_real_activate_focus (GtkWindow *window);
static void gtk_window_keys_changed (GtkWindow *window);
static gboolean gtk_window_enable_debugging (GtkWindow *window,
gboolean toggle);
@@ -801,7 +800,6 @@ gtk_window_class_init (GtkWindowClass *klass)
container_class->forall = gtk_window_forall;
klass->activate_default = gtk_window_real_activate_default;
- klass->activate_focus = gtk_window_real_activate_focus;
klass->keys_changed = gtk_window_keys_changed;
klass->enable_debugging = gtk_window_enable_debugging;
klass->close_request = gtk_window_close_request;
@@ -2838,27 +2836,6 @@ 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)
-{
- 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_window_get_focus:
* @window: a #GtkWindow
@@ -6237,12 +6214,6 @@ gtk_window_real_activate_default (GtkWindow *window)
gtk_window_activate_default (window);
}
-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 3a06f4b422..7f1f429c32 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]