[glib] GApplication: menu can change after registration



commit a9f03596fa6da9999f3493d1deb8771f52efea3f
Author: Ryan Lortie <desrt desrt ca>
Date:   Fri Dec 2 15:17:56 2011 -0500

    GApplication: menu can change after registration
    
    Allow the menu to be changed after registration.  This is quite useful
    for setting up the menus from the ::startup handler instead of having to
    do it before registration because it lets you skip the work if you're
    not the primary instance.

 gio/gapplication.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index 4f5c7b5..2337623 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -472,9 +472,6 @@ g_application_set_action_group (GApplication *application,
  * If supported, the application menu will be rendered by the desktop
  * environment.
  *
- * It is an error to call this function after the application has been
- * registered.
- *
  * Since: 2.32
  */
 void
@@ -482,7 +479,6 @@ g_application_set_app_menu (GApplication *application,
                             GMenuModel   *app_menu)
 {
   g_return_if_fail (G_IS_APPLICATION (application));
-  g_return_if_fail (!application->priv->is_registered);
 
   if (app_menu != application->priv->app_menu)
     {
@@ -534,9 +530,6 @@ g_application_get_app_menu (GApplication *application)
  * example, the application menu may be rendered by the desktop shell
  * while the menubar (if set) remains in each individual window.
  *
- * It is an error to call this function after the application has been
- * registered.
- *
  * Since: 2.32
  */
 void
@@ -544,7 +537,6 @@ g_application_set_menubar (GApplication *application,
                             GMenuModel   *menubar)
 {
   g_return_if_fail (G_IS_APPLICATION (application));
-  g_return_if_fail (!application->priv->is_registered);
 
   if (menubar != application->priv->menubar)
     {



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