summaryrefslogtreecommitdiff
path: root/gtk/gtkapplicationwindow.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-12-04 18:40:19 -0500
committerRyan Lortie <desrt@desrt.ca>2011-12-19 12:51:10 -0500
commit898bc98d3bae8baf60c3d666d8b540c55a54b645 (patch)
tree32c50eb4cb1ff32e3b447a1d1a193aacc2b984b7 /gtk/gtkapplicationwindow.c
parent3205a40b84a2db349978754251a54b2f24fca2e1 (diff)
downloadgtk+-898bc98d3bae8baf60c3d666d8b540c55a54b645.tar.gz
Update GtkApplicationWindow docs
Diffstat (limited to 'gtk/gtkapplicationwindow.c')
-rw-r--r--gtk/gtkapplicationwindow.c38
1 files changed, 35 insertions, 3 deletions
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index 3577842c0d..24adfce16c 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -49,7 +49,7 @@
* If the desktop environment does not display the application menu
* as part of the desktop shell, then #GApplicationWindow will
* automatically show the menu as part of a menubar. This behaviour
- * can be overridden with the #GtkApplicationWindow:show-app-menu
+ * can be overridden with the #GtkApplicationWindow:show-menubar
* property.
*/
struct _GtkApplicationWindowPrivate
@@ -568,11 +568,22 @@ gtk_application_window_class_init (GtkApplicationWindowClass *class)
object_class->set_property = gtk_application_window_set_property;
object_class->dispose = gtk_application_window_dispose;
+ /**
+ * GtkApplicationWindow:show-menubar:
+ *
+ * If this property is %TRUE, the window will display a menubar
+ * that includes the app menu and menubar, unless these are
+ * shown by the desktop shell. See g_application_set_app_menu()
+ * and g_application_set_menubar().
+ *
+ * If %FALSE, the window will not display a menubar, regardless
+ * of whether the desktop shell is showing the menus or not.
+ */
gtk_application_window_properties[PROP_SHOW_MENUBAR] =
g_param_spec_boolean ("show-menubar",
P_("Show a menubar"),
- P_("TRUE if the application's menus should be included "
- "in the menubar at the top of the window"),
+ P_("TRUE if the window should show a "
+ "menubar at the top of the window"),
TRUE, G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE);
g_object_class_install_properties (object_class, N_PROPS, gtk_application_window_properties);
g_type_class_add_private (class, sizeof (GtkApplicationWindowPrivate));
@@ -598,12 +609,33 @@ gtk_application_window_new (GtkApplication *application)
NULL);
}
+/**
+ * gtk_application_window_get_show_menubar:
+ * @window: a #GtkApplicationWindow
+ *
+ * Returns whether the window will display a menubar for the app menu
+ * and menubar as needed.
+ *
+ * Returns: %TRUE if @window will display a menubar when needed
+ *
+ * Since: 3.4
+ */
gboolean
gtk_application_window_get_show_menubar (GtkApplicationWindow *window)
{
return window->priv->show_menubar;
}
+/**
+ * gtk_application_window_set_show_menubar:
+ * @window: a #GtkApplicationWindow
+ * @show_menubar: whether to show a menubar when needed
+ *
+ * Sets whether the window will display a menubar for the app menu
+ * and menubar as needed.
+ *
+ * Since: 3.4
+ */
void
gtk_application_window_set_show_menubar (GtkApplicationWindow *window,
gboolean show_menubar)