~ubuntu-branches/ubuntu/maverick/wxwidgets2.8/maverick-proposed

« back to all changes in this revision

Viewing changes to samples/treectrl/treetest.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Devid Filoni
  • Date: 2008-06-30 22:02:17 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080630220217-vag3tkfp91t0453d
Tags: 2.8.8.0-0ubuntu1
* New upstream version, based on the upstream tarball
  wxPython-src-2.8.8.0.tar.bz2, remove upstream debian dir (LP: #244355).
* Add debian/watch file, LP: #242164.
* Edit get-orig-source target to provide a .orig.tar.gz with the same md5 for
  each .orig.tar.gz generated.
* debian/rules: remove get-orig-source from .PHONY target.
* debian/control.in: add python-wxtools in python-wxgtk=V=U Suggests field.
* Do not apply fix_from_upstream_svn_r52465 patch, not needed.
* Regenerate octave_oct, tcl_tk_tcl patches for the new version.
* Fix spelling-error-in-description lintian warning.
* Fix depends-on-obsolete-package lintian error.
* Fix executable-not-elf-or-script lintian warnings.
* Fix script-not-executable lintian warnings.
* Fix missing-dependency-on-libc lintian error.
* Fix dbg-package-missing-depends lintian warnings.
* Fix package-contains-empty-directory lintian warnings.
* Fix manpage-has-errors-from-man lintian warning.
* Fix image-file-in-usr-lib lintian warnings:
  - add editra_pixmaps patch
  - add xrced_bitmaps patch
* Fix unused-override lintian info.
* Fix malformed-override lintian errors.
* Fix extra-license-file lintian warnings.
* Install upstream wx.pth instead of generated file links (LP: #211553).
* Add editra.png, pyshell.png (encoded using uuencode) icons, LP: #236876:
  - debian/rules: use uudecode to decode .png icons.
* Add a new pyshell.xpm icon.
* Fix doc-base-file-references-missing-file lintian error.
* Fix doc-base-unknown-section lintian warning.
* Fix ruby-script-but-no-ruby-dep lintian errors.
* Fix wish-script-but-no-wish-dep lintian errors.
* Fix missing-dep-for-interpreter errors.
* Bump Standards-Version to 3.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
// Author:      Julian Smart
5
5
// Modified by:
6
6
// Created:     04/01/98
7
 
// RCS-ID:      $Id: treetest.cpp 44769 2007-03-11 23:29:26Z PC $
 
7
// RCS-ID:      $Id: treetest.cpp 52196 2008-02-29 19:51:05Z VZ $
8
8
// Copyright:   (c) Julian Smart
9
9
// Licence:     wxWindows license
10
10
/////////////////////////////////////////////////////////////////////////////
327
327
    m_treeCtrl = new MyTreeCtrl(m_panel, TreeTest_Ctrl,
328
328
                                wxDefaultPosition, wxDefaultSize,
329
329
                                style);
 
330
 
 
331
    GetMenuBar()->Enable(TreeTest_SelectRoot, !(style & wxTR_HIDE_ROOT));
 
332
 
330
333
    Resize();
331
334
}
332
335
 
519
522
 
520
523
void MyFrame::OnSelectRoot(wxCommandEvent& WXUNUSED(event))
521
524
{
522
 
    m_treeCtrl->SelectItem(m_treeCtrl->GetRootItem());
 
525
    if ( !m_treeCtrl->HasFlag(wxTR_HIDE_ROOT) )
 
526
        m_treeCtrl->SelectItem(m_treeCtrl->GetRootItem());
523
527
}
524
528
 
525
529
void MyFrame::OnUnselect(wxCommandEvent& WXUNUSED(event))
862
866
    wxTreeItemId rootId = AddRoot(wxT("Root"),
863
867
                                  image, image,
864
868
                                  new MyTreeItemData(wxT("Root item")));
865
 
    if ( image != -1 )
 
869
    if ( !HasFlag(wxTR_HIDE_ROOT) && image != -1 )
866
870
    {
867
871
        SetItemImage(rootId, TreeCtrlIcon_FolderOpened, wxTreeItemIcon_Expanded);
868
872
    }
870
874
    AddItemsRecursively(rootId, numChildren, depth, 0);
871
875
 
872
876
    // set some colours/fonts for testing
873
 
    SetItemFont(rootId, *wxITALIC_FONT);
 
877
    if ( !HasFlag(wxTR_HIDE_ROOT) )
 
878
        SetItemFont(rootId, *wxITALIC_FONT);
874
879
 
875
880
    wxTreeItemIdValue cookie;
876
881
    wxTreeItemId id = GetFirstChild(rootId, cookie);