diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-10-31 20:41:02 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-10-31 20:41:02 +0000 |
commit | 328d834e6d943235e3a2f3590c9bb4b55bb6609a (patch) | |
tree | 7d92e4b4955ca07b3216390de8d2ce6635e59576 | |
parent | 30f9fab4b418b1adc94bd4a49a987477481a460a (diff) | |
download | gtk+-328d834e6d943235e3a2f3590c9bb4b55bb6609a.tar.gz |
Add a gtk_window_get_focus() getter to determine the currently focused
Wed Oct 31 15:38:14 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.[ch] (gtk_window_get_focus): Add a
gtk_window_get_focus() getter to determine the currently
focused widget within the window. (#63145, request
from Damian Ivereigh)
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 9 | ||||
-rw-r--r-- | gtk/gtkwindow.c | 20 | ||||
-rw-r--r-- | gtk/gtkwindow.h | 1 |
9 files changed, 77 insertions, 7 deletions
@@ -1,3 +1,10 @@ +Wed Oct 31 15:38:14 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.[ch] (gtk_window_get_focus): Add a + gtk_window_get_focus() getter to determine the currently + focused widget within the window. (#63145, request + from Damian Ivereigh) + Wed Oct 31 14:45:08 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkenums.h (enum): Add GTK_SELECTION_NONE enum, #61695 @@ -77,7 +84,7 @@ Mon Oct 29 12:27:51 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (gtk_file_selection_rename_file): Grab the focus to the fileop entry for create dir / rename - file. + file. (#62838) Mon Oct 29 12:21:49 2001 Owen Taylor <otaylor@redhat.com> diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 2b5ac14310..ffc0cb5c7d 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Wed Oct 31 15:38:14 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.[ch] (gtk_window_get_focus): Add a + gtk_window_get_focus() getter to determine the currently + focused widget within the window. (#63145, request + from Damian Ivereigh) + Wed Oct 31 14:45:08 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkenums.h (enum): Add GTK_SELECTION_NONE enum, #61695 @@ -77,7 +84,7 @@ Mon Oct 29 12:27:51 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (gtk_file_selection_rename_file): Grab the focus to the fileop entry for create dir / rename - file. + file. (#62838) Mon Oct 29 12:21:49 2001 Owen Taylor <otaylor@redhat.com> diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2b5ac14310..ffc0cb5c7d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Wed Oct 31 15:38:14 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.[ch] (gtk_window_get_focus): Add a + gtk_window_get_focus() getter to determine the currently + focused widget within the window. (#63145, request + from Damian Ivereigh) + Wed Oct 31 14:45:08 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkenums.h (enum): Add GTK_SELECTION_NONE enum, #61695 @@ -77,7 +84,7 @@ Mon Oct 29 12:27:51 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (gtk_file_selection_rename_file): Grab the focus to the fileop entry for create dir / rename - file. + file. (#62838) Mon Oct 29 12:21:49 2001 Owen Taylor <otaylor@redhat.com> diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 2b5ac14310..ffc0cb5c7d 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Wed Oct 31 15:38:14 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.[ch] (gtk_window_get_focus): Add a + gtk_window_get_focus() getter to determine the currently + focused widget within the window. (#63145, request + from Damian Ivereigh) + Wed Oct 31 14:45:08 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkenums.h (enum): Add GTK_SELECTION_NONE enum, #61695 @@ -77,7 +84,7 @@ Mon Oct 29 12:27:51 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (gtk_file_selection_rename_file): Grab the focus to the fileop entry for create dir / rename - file. + file. (#62838) Mon Oct 29 12:21:49 2001 Owen Taylor <otaylor@redhat.com> diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 2b5ac14310..ffc0cb5c7d 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Wed Oct 31 15:38:14 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.[ch] (gtk_window_get_focus): Add a + gtk_window_get_focus() getter to determine the currently + focused widget within the window. (#63145, request + from Damian Ivereigh) + Wed Oct 31 14:45:08 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkenums.h (enum): Add GTK_SELECTION_NONE enum, #61695 @@ -77,7 +84,7 @@ Mon Oct 29 12:27:51 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (gtk_file_selection_rename_file): Grab the focus to the fileop entry for create dir / rename - file. + file. (#62838) Mon Oct 29 12:21:49 2001 Owen Taylor <otaylor@redhat.com> diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 2b5ac14310..ffc0cb5c7d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Wed Oct 31 15:38:14 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.[ch] (gtk_window_get_focus): Add a + gtk_window_get_focus() getter to determine the currently + focused widget within the window. (#63145, request + from Damian Ivereigh) + Wed Oct 31 14:45:08 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkenums.h (enum): Add GTK_SELECTION_NONE enum, #61695 @@ -77,7 +84,7 @@ Mon Oct 29 12:27:51 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (gtk_file_selection_rename_file): Grab the focus to the fileop entry for create dir / rename - file. + file. (#62838) Mon Oct 29 12:21:49 2001 Owen Taylor <otaylor@redhat.com> diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 2b5ac14310..ffc0cb5c7d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Wed Oct 31 15:38:14 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.[ch] (gtk_window_get_focus): Add a + gtk_window_get_focus() getter to determine the currently + focused widget within the window. (#63145, request + from Damian Ivereigh) + Wed Oct 31 14:45:08 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkenums.h (enum): Add GTK_SELECTION_NONE enum, #61695 @@ -77,7 +84,7 @@ Mon Oct 29 12:27:51 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (gtk_file_selection_rename_file): Grab the focus to the fileop entry for create dir / rename - file. + file. (#62838) Mon Oct 29 12:21:49 2001 Owen Taylor <otaylor@redhat.com> diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 1a6d88a041..86ea0b9bac 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1202,6 +1202,26 @@ gtk_window_activate_focus (GtkWindow *window) return FALSE; } +/** + * gtk_window_get_focus: + * @window: a #GtkWindow + * + * Retrieves the current focused widget within the window. + * Note that this is the widget that would have the focus + * if the toplevel window focused; if the toplevel window + * is not focused the GTK_WIDGET_HAS_FOCUS(widget) will + * not be %TRUE for the widget. + * + * Return value: the currently focused widget. + **/ +GtkWidget * +gtk_window_get_focus (GtkWindow *window) +{ + g_return_val_if_fail (GTK_IS_WINDOW (window), NULL); + + return window->focus_widget; +} + gboolean gtk_window_activate_default (GtkWindow *window) { diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h index 4135997f59..b98c20a6b3 100644 --- a/gtk/gtkwindow.h +++ b/gtk/gtkwindow.h @@ -163,6 +163,7 @@ void gtk_window_remove_accel_group (GtkWindow *window, void gtk_window_set_position (GtkWindow *window, GtkWindowPosition position); gboolean gtk_window_activate_focus (GtkWindow *window); +GtkWidget *gtk_window_get_focus (GtkWindow *window); gboolean gtk_window_activate_default (GtkWindow *window); void gtk_window_set_transient_for (GtkWindow *window, |