gtk+ r20536 - trunk/gtk



Author: timj
Date: Fri Jun 20 11:02:08 2008
New Revision: 20536
URL: http://svn.gnome.org/viewvc/gtk+?rev=20536&view=rev

Log:
Add gtk_window_get_default()

* gtk/gtkwindow.[ch]: Add gtk_window_get_default().
* gtk/gtk.symbols: same here.


Modified:
   trunk/gtk/gtk.symbols
   trunk/gtk/gtkwindow.c
   trunk/gtk/gtkwindow.h

Modified: trunk/gtk/gtk.symbols
==============================================================================
--- trunk/gtk/gtk.symbols	(original)
+++ trunk/gtk/gtk.symbols	Fri Jun 20 11:02:08 2008
@@ -4772,6 +4772,7 @@
 gtk_window_get_accept_focus
 gtk_window_get_decorated
 gtk_window_get_deletable
+gtk_window_get_default
 gtk_window_get_default_icon_list
 gtk_window_get_default_size
 gtk_window_get_destroy_with_parent

Modified: trunk/gtk/gtkwindow.c
==============================================================================
--- trunk/gtk/gtkwindow.c	(original)
+++ trunk/gtk/gtkwindow.c	Fri Jun 20 11:02:08 2008
@@ -1513,6 +1513,25 @@
     }
 }
 
+/**
+ * gtk_window_get_default:
+ * @window: a #GtkWindow
+ *
+ * Returns the default widget for @window. See gtk_window_set_default()
+ * for more details.
+ *
+ * Returns: the default widget, or %NULL if there is none.
+ *
+ * Since: GSEAL-branch
+ **/
+GtkWidget *
+gtk_window_get_default (GtkWindow *window)
+{
+  g_return_val_if_fail (GTK_IS_WINDOW (window), NULL);
+
+  return window->default_widget;
+}
+
 void
 gtk_window_set_policy (GtkWindow *window,
 		       gboolean   allow_shrink,

Modified: trunk/gtk/gtkwindow.h
==============================================================================
--- trunk/gtk/gtkwindow.h	(original)
+++ trunk/gtk/gtkwindow.h	Fri Jun 20 11:02:08 2008
@@ -202,6 +202,7 @@
 GtkWidget *gtk_window_get_focus                (GtkWindow           *window);
 void       gtk_window_set_default              (GtkWindow           *window,
 						GtkWidget           *default_widget);
+GtkWidget *gtk_window_get_default              (GtkWindow           *window);
 gboolean   gtk_window_activate_default	       (GtkWindow           *window);
 
 void       gtk_window_set_transient_for        (GtkWindow           *window, 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]