]> Pileus Git - ~andy/gtk/commitdiff
Add a gtk_window_get_focus() getter to determine the currently focused
authorOwen Taylor <otaylor@redhat.com>
Wed, 31 Oct 2001 20:41:02 +0000 (20:41 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 31 Oct 2001 20:41:02 +0000 (20:41 +0000)
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)

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkwindow.c
gtk/gtkwindow.h

index 2b5ac1431077dd05c0e3bae78206b5335625c732..ffc0cb5c7d95d1bf29aa7852e38a7cefc5b409a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
index 2b5ac1431077dd05c0e3bae78206b5335625c732..ffc0cb5c7d95d1bf29aa7852e38a7cefc5b409a8 100644 (file)
@@ -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>
 
index 2b5ac1431077dd05c0e3bae78206b5335625c732..ffc0cb5c7d95d1bf29aa7852e38a7cefc5b409a8 100644 (file)
@@ -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>
 
index 2b5ac1431077dd05c0e3bae78206b5335625c732..ffc0cb5c7d95d1bf29aa7852e38a7cefc5b409a8 100644 (file)
@@ -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>
 
index 2b5ac1431077dd05c0e3bae78206b5335625c732..ffc0cb5c7d95d1bf29aa7852e38a7cefc5b409a8 100644 (file)
@@ -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>
 
index 2b5ac1431077dd05c0e3bae78206b5335625c732..ffc0cb5c7d95d1bf29aa7852e38a7cefc5b409a8 100644 (file)
@@ -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>
 
index 2b5ac1431077dd05c0e3bae78206b5335625c732..ffc0cb5c7d95d1bf29aa7852e38a7cefc5b409a8 100644 (file)
@@ -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>
 
index 1a6d88a041962986d6cd33384822f33739495dc6..86ea0b9bac13cdeb9fabb5537037118821200b3e 100644 (file)
@@ -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)
 {
index 4135997f596f3adc8e9363100ce8b91ca505ebef..b98c20a6b31e4b1a26f1fe8542ccbc20d866b0ea 100644 (file)
@@ -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,