How to calculate U.S government interest and foreign dividends

I'd like to confirm my understanding of calculating U.S government interest as well as foreign dividends from a 1099-DIV sent by my investment brokerage. This is with regards to the following questions asked in TurboTax:

 
"Enter U.S. Government interest
Enter the amount of dividends reported on this 1099-DIV from XXX that represents interest from U.S. Government obligations."
 
"Tell us about your foreign dividends
You entered $XXX of foreign taxes paid. Now enter the portion of the $XXX dividends and distributions that was from a foreign country or U.S. possession."

 

Here's how I have gone about calculating both, which follow a similar process...

For U.S government interest:

The 1099-DIV provides the federal source income percentage for each of my investment funds. For each fund, I add up the qualified and non-qualified dividends I received for the tax year. Then, I multiply the total dividends  by the fund's federal source income percentage to obtain the amount of U.S government dividends received. Once I do this for each fund, I add up all of the calculated U.S government dividends to arrive at the total.

 

Similarly, for foreign dividends:

The 1099-DIV also provides the foreign source income percentage for each fund. So again, for each fund I calculate the total dividends (qualified and non-qualified) received during the tax year and multiply the total by the fund's foreign source income percentage. This gives me the foreign dividends received for a fund. Then, I just add up the foreign dividends received from all of my funds to get the total. 

 

Is this correct?