~ubuntu-branches/ubuntu/raring/wxwidgets2.8/raring

« back to all changes in this revision

Viewing changes to src/gtk/frame.cpp

  • Committer: Package Import Robot
  • Author(s): Benjamin Drung
  • Date: 2012-05-27 17:32:13 UTC
  • mfrom: (5.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20120527173213-e0dcxtnrefaa1if5
Tags: 2.8.12.1-9ubuntu1
* Merge from Debian unstable. Remaining changes:
  - debian/rules: re-enable mediactrl. This allows libwx_gtk2u_media-2.8 to be
    built, as this is required by some applications (LP: #632984)
  - debian/control:
    - Build-dep on libxt-dev, libgstreamer-plugins-base0.10-dev,
      and libgconf2-dev for mediactrl.
    - Add conflict on python-wxgtk2.8 (<< 2.8.12.1-6ubuntu1~) to
      python-wxversion to guarantee upgrade ordering when moving from
      pycentral to dh_python2.
  - Patches
    + fix-bashism-in-example.patch
* Backport patch to fix calling SetMenuBar() twice causes the menubar to not
  resize correctly in GTK. (LP: #996407)

Show diffs side-by-side

added added

removed removed

Lines of Context:
559
559
    wxFrameBase::OnInternalIdle();
560
560
 
561
561
#if wxUSE_MENUS_NATIVE
562
 
    if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
563
 
 
564
 
    // UpdateMenuBarSize may return a height of zero on some
565
 
    // systems (e.g. Ubuntu 11.04 Alpha as of 2010-12-06),
566
 
    // when the menubar widget has not been fully realized.
567
 
    // Update the menu bar size again at this point, otherwise
568
 
    // the menu would not be visible at all.
569
 
    if (!m_menuBarHeight)
 
562
    if (m_frameMenuBar)
570
563
    {
571
 
        UpdateMenuBarSize();
 
564
        m_frameMenuBar->OnInternalIdle();
 
565
 
 
566
        // UpdateMenuBarSize may return a height of zero on some
 
567
        // systems (e.g. Ubuntu 11.04 Alpha as of 2010-12-06),
 
568
        // when the menubar widget has not been fully realized.
 
569
        // Update the menu bar size again at this point, otherwise
 
570
        // the menu would not be visible at all.
 
571
        if (!m_menuBarHeight)
 
572
        {
 
573
            UpdateMenuBarSize();
 
574
        }
572
575
    }
573
576
#endif // wxUSE_MENUS_NATIVE
574
577
#if wxUSE_TOOLBAR
671
674
 
672
675
void wxFrame::UpdateMenuBarSize()
673
676
{
674
 
    int oldMenuBarHeight = m_menuBarHeight;
675
677
    m_menuBarHeight = 2;
676
678
 
677
679
    // this is called after Remove with a NULL m_frameMenuBar
688
690
    }
689
691
 
690
692
    // resize window in OnInternalIdle
691
 
    if (oldMenuBarHeight != m_menuBarHeight)
692
 
        GtkUpdateSize();
 
693
    GtkUpdateSize();
693
694
}
694
695
 
695
696
#endif // wxUSE_MENUS_NATIVE