X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=hildon%2Fhildon-program.c;h=33205f0fc1b50325bb8160587244ac863531501b;hb=b45dddd7902bdd17946a12633d3b29c3a7cab10f;hp=f2b19062fa8ab81374d41227d5540c41bc1dd6e9;hpb=a9a9c6c5c73ba1727b907167026559ceb7208b99;p=hildon diff --git a/hildon/hildon-program.c b/hildon/hildon-program.c index f2b1906..33205f0 100644 --- a/hildon/hildon-program.c +++ b/hildon/hildon-program.c @@ -658,11 +658,17 @@ hildon_program_set_common_menu (HildonProgram *self, /* Only set the menu flag if there was no common menu and we are setting one. If we are unsetting the current common menu, remove the commmon menu flag. Otherwise, nothing to do. */ - if (!priv->common_menu && menu) { + + GList *menu_children = gtk_container_get_children (GTK_CONTAINER (menu)); + if (!priv->common_menu + && menu && menu_children != NULL) { hildon_program_set_common_menu_flag (self, TRUE); - } else if (priv->common_menu && !menu) { + } else if (priv->common_menu && + (!menu || menu_children == NULL)) + { hildon_program_set_common_menu_flag (self, FALSE); } + g_list_free (menu_children); priv->common_menu = menu;