[gtk+] GtkWindow: Add gtk_window_has_group()



commit 6bac9dfd28524775deb7d6f5485efb4604221103
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Wed May 26 16:49:31 2010 +0200

    GtkWindow: Add gtk_window_has_group()
    
    To check whether the window has an explicit group
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=618271#c2

 gtk/gtk.symbols |    1 +
 gtk/gtkwindow.c |   18 ++++++++++++++++++
 gtk/gtkwindow.h |    1 +
 3 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 06ccf9c..cdaf5ff 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -4543,6 +4543,7 @@ gtk_window_group_new
 gtk_window_group_remove_window
 gtk_window_group_list_windows
 gtk_window_group_get_current_device_grab
+gtk_window_has_group
 gtk_window_has_toplevel_focus
 gtk_window_iconify
 gtk_window_is_active
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index eab1ff5..3d88254 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7849,6 +7849,24 @@ gtk_window_get_group (GtkWindow *window)
     }
 }
 
+/**
+ * gtk_window_has_group:
+ * @window: a #GtkWindow
+ *
+ * Returns whether @window has an explicit window group.
+ *
+ * Return value: %TRUE if @window has an explicit window group.
+ *
+ * Since 2.22
+ **/
+gboolean
+gtk_window_has_group (GtkWindow *window)
+{
+  g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
+
+  return window->group != NULL;
+}
+
 /* Return the current grab widget of the given group 
  */
 GtkWidget *
diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h
index fec9d99..1a36d67 100644
--- a/gtk/gtkwindow.h
+++ b/gtk/gtkwindow.h
@@ -378,6 +378,7 @@ void     gtk_window_get_position     (GtkWindow   *window,
 gboolean gtk_window_parse_geometry   (GtkWindow   *window,
                                       const gchar *geometry);
 GtkWindowGroup *gtk_window_get_group (GtkWindow   *window);
+gboolean gtk_window_has_group        (GtkWindow   *window);
 
 /* Ignore this unless you are writing a GUI builder */
 void     gtk_window_reshow_with_initial_size (GtkWindow *window);



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