Changeset e1d6f8b in git


Ignore:
Timestamp:
20/09/11 08:42:38 (8 years ago)
Author:
Olly Betts <olly@…>
Branches:
svn/1.0, svn/tags/1.0.40
Children:
e621597
Parents:
a2d293b
Message:

Backport changes from 1.2.0:
src/printwx.cc: Use stock wx button IDs wxID_PRINT and
wxID_PREVIEW where appropriate.
src/aven.cc,src/mainfrm.cc,src/mainfrm.h: Use more stock IDs.

git-svn-id: file:///home/survex-svn/survex/branches/1.0@3688 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    ra2d293b re1d6f8b  
     1Tue Sep 20 07:41:25 GMT 2011  Olly Betts <olly@survex.com>
     2
     3        * Backport changes from 1.2.0:
     4        * src/printwx.cc: Use stock wx button IDs wxID_PRINT and
     5          wxID_PREVIEW where appropriate.
     6        * src/aven.cc,src/mainfrm.cc,src/mainfrm.h: Use more stock IDs.
     7
    18Tue Sep 20 07:19:46 GMT 2011  Olly Betts <olly@survex.com>
    29
  • src/aven.cc

    ra2d293b re1d6f8b  
    55//
    66//  Copyright (C) 2001 Mark R. Shinwell.
    7 //  Copyright (C) 2002,2003,2004,2005 Olly Betts
     7//  Copyright (C) 2002,2003,2004,2005,2011 Olly Betts
    88//
    99//  This program is free software; you can redistribute it and/or modify
     
    5858{
    5959#ifdef __WXMAC__
    60     // Tell wxMac which the About menu item is so it can be put where MacOS
    61     // users expect it to be.
    62     wxApp::s_macAboutMenuItemId = menu_HELP_ABOUT;
    6360    // wxMac is supposed to remove this magic command line option (which
    6461    // Finder passes), but the code in 2.4.2 is bogus.  It just decrements
  • src/mainfrm.cc

    ra2d293b re1d6f8b  
    9292
    9393BEGIN_EVENT_TABLE(MainFrm, wxFrame)
    94     EVT_BUTTON(button_FIND, MainFrm::OnFind)
     94    EVT_BUTTON(wxID_FIND, MainFrm::OnFind)
    9595    EVT_BUTTON(button_HIDE, MainFrm::OnHide)
    9696
    97     EVT_MENU(menu_FILE_OPEN, MainFrm::OnOpen)
    98     EVT_MENU(menu_FILE_PRINT, MainFrm::OnPrint)
     97    EVT_MENU(wxID_OPEN, MainFrm::OnOpen)
     98    EVT_MENU(wxID_PRINT, MainFrm::OnPrint)
    9999    EVT_MENU(menu_FILE_PAGE_SETUP, MainFrm::OnPageSetup)
    100100    EVT_MENU(menu_FILE_EXPORT, MainFrm::OnExport)
    101     EVT_MENU(menu_FILE_QUIT, MainFrm::OnQuit)
     101    EVT_MENU(wxID_EXIT, MainFrm::OnQuit)
    102102    EVT_MENU_RANGE(wxID_FILE1, wxID_FILE9, MainFrm::OnMRUFile)
    103103
     
    125125    EVT_MENU(menu_ORIENT_HIGHER_VP, MainFrm::OnHigherViewpoint)
    126126    EVT_MENU(menu_ORIENT_LOWER_VP, MainFrm::OnLowerViewpoint)
    127     EVT_MENU(menu_ORIENT_ZOOM_IN, MainFrm::OnZoomIn)
    128     EVT_MENU(menu_ORIENT_ZOOM_OUT, MainFrm::OnZoomOut)
     127    EVT_MENU(wxID_ZOOM_IN, MainFrm::OnZoomIn)
     128    EVT_MENU(wxID_ZOOM_OUT, MainFrm::OnZoomOut)
    129129    EVT_MENU(menu_ORIENT_DEFAULTS, MainFrm::OnDefaults)
    130130    EVT_MENU(menu_VIEW_SHOW_LEGS, MainFrm::OnShowSurveyLegs)
     
    148148    EVT_MENU(menu_CTL_REVERSE, MainFrm::OnReverseControls)
    149149    EVT_MENU(menu_CTL_CANCEL_DIST_LINE, MainFrm::OnCancelDistLine)
    150     EVT_MENU(menu_HELP_ABOUT, MainFrm::OnAbout)
    151 
    152     EVT_UPDATE_UI(menu_FILE_PRINT, MainFrm::OnPrintUpdate)
     150    EVT_MENU(wxID_ABOUT, MainFrm::OnAbout)
     151
     152    EVT_UPDATE_UI(wxID_PRINT, MainFrm::OnPrintUpdate)
    153153    EVT_UPDATE_UI(menu_FILE_EXPORT, MainFrm::OnExportUpdate)
    154154    EVT_UPDATE_UI(menu_ROTATION_START, MainFrm::OnStartRotationUpdate)
     
    172172    EVT_UPDATE_UI(menu_ORIENT_HIGHER_VP, MainFrm::OnHigherViewpointUpdate)
    173173    EVT_UPDATE_UI(menu_ORIENT_LOWER_VP, MainFrm::OnLowerViewpointUpdate)
    174     EVT_UPDATE_UI(menu_ORIENT_ZOOM_IN, MainFrm::OnZoomInUpdate)
    175     EVT_UPDATE_UI(menu_ORIENT_ZOOM_OUT, MainFrm::OnZoomOutUpdate)
     174    EVT_UPDATE_UI(wxID_ZOOM_IN, MainFrm::OnZoomInUpdate)
     175    EVT_UPDATE_UI(wxID_ZOOM_OUT, MainFrm::OnZoomOutUpdate)
    176176    EVT_UPDATE_UI(menu_ORIENT_DEFAULTS, MainFrm::OnDefaultsUpdate)
    177177    EVT_UPDATE_UI(menu_VIEW_SHOW_LEGS, MainFrm::OnShowSurveyLegsUpdate)
     
    315315
    316316    wxMenu* filemenu = new wxMenu;
    317     filemenu->Append(menu_FILE_OPEN, GetTabMsg(/*@Open...##Ctrl+O*/220));
     317    // wxID_OPEN stock label lacks the ellipses
     318    filemenu->Append(wxID_OPEN, GetTabMsg(/*@Open...##Ctrl+O*/220));
    318319    filemenu->AppendSeparator();
    319     filemenu->Append(menu_FILE_PRINT, GetTabMsg(/*@Print...##Ctrl+P*/380));
     320    // wxID_PRINT stock label lacks the ellipses
     321    filemenu->Append(wxID_PRINT, GetTabMsg(/*@Print...##Ctrl+P*/380));
    320322    filemenu->Append(menu_FILE_PAGE_SETUP, GetTabMsg(/*P@age Setup...*/381));
    321323    filemenu->AppendSeparator();
    322324    filemenu->Append(menu_FILE_EXPORT, GetTabMsg(/*@Export as...*/382));
    323325    filemenu->AppendSeparator();
    324     filemenu->Append(menu_FILE_QUIT, GetTabMsg(/*@Quit##Ctrl+Q*/221));
     326    filemenu->Append(wxID_EXIT);
    325327
    326328    m_history.UseMenu(filemenu);
     
    356358    orientmenu->Append(menu_ORIENT_LOWER_VP, GetTabMsg(/*L@ower Viewpoint*/251));
    357359    orientmenu->AppendSeparator();
    358     orientmenu->Append(menu_ORIENT_ZOOM_IN, GetTabMsg(/*@Zoom In##]*/252));
    359     orientmenu->Append(menu_ORIENT_ZOOM_OUT, GetTabMsg(/*Zoo@m Out##[*/253));
     360    // Default labels for wxID_ZOOM_IN and wxID_ZOOM_OUT don't have accels.
     361    orientmenu->Append(wxID_ZOOM_IN, GetTabMsg(/*@Zoom In##]*/252));
     362    orientmenu->Append(wxID_ZOOM_OUT, GetTabMsg(/*Zoo@m Out##[*/253));
    360363    orientmenu->AppendSeparator();
    361364    orientmenu->Append(menu_ORIENT_DEFAULTS, GetTabMsg(/*Restore De@fault Settings*/254));
     
    395398
    396399    wxMenu* helpmenu = new wxMenu;
    397     helpmenu->Append(menu_HELP_ABOUT, GetTabMsg(/*@About...*/290));
     400    helpmenu->Append(wxID_ABOUT);
    398401
    399402    wxMenuBar* menubar = new wxMenuBar(wxMB_DOCKABLE);
     
    420423#endif
    421424
    422     toolbar->AddTool(menu_FILE_OPEN, TOOLBAR_BITMAP("open"), "Open a 3D file for viewing");
     425    toolbar->AddTool(wxID_OPEN, TOOLBAR_BITMAP("open"), "Open a 3D file for viewing");
    423426    toolbar->AddSeparator();
    424427    toolbar->AddTool(menu_ROTATION_TOGGLE, TOOLBAR_BITMAP("rotation"),
     
    461464    m_FindBox = new wxTextCtrl(find_panel, -1, "");
    462465    wxButton *find_button, *hide_button;
    463     find_button = new wxButton(find_panel, button_FIND, msg(/*Find*/332));
     466    find_button = new wxButton(find_panel, wxID_FIND, msg(/*Find*/332));
    464467    find_button->SetDefault();
    465468    // SetDefaultItem() was moved from wxPanel to wxTopLevelWindow in wx2.8.
  • src/mainfrm.h

    ra2d293b re1d6f8b  
    4343
    4444enum {
    45     menu_FILE_OPEN = 1000,
    46     menu_FILE_PRINT,
    47     menu_FILE_PAGE_SETUP,
     45    menu_FILE_PAGE_SETUP = 1000,
    4846    menu_FILE_EXPORT,
    49     menu_FILE_QUIT,
    5047    menu_ROTATION_START,
    5148    menu_ROTATION_STOP,
     
    6865    menu_ORIENT_HIGHER_VP,
    6966    menu_ORIENT_LOWER_VP,
    70     menu_ORIENT_ZOOM_IN,
    71     menu_ORIENT_ZOOM_OUT,
    7267    menu_ORIENT_DEFAULTS,
    7368    menu_VIEW_SHOW_LEGS,
     
    9388    menu_CTL_REVERSE,
    9489    menu_CTL_CANCEL_DIST_LINE,
    95     menu_HELP_ABOUT,
    96     button_FIND,
    9790    button_HIDE
    9891};
  • src/printwx.cc

    ra2d293b re1d6f8b  
    106106    EVT_SPINCTRL(svx_BEARING, svxPrintDlg::OnChangeSpin)
    107107    EVT_SPINCTRL(svx_TILT, svxPrintDlg::OnChangeSpin)
    108     EVT_BUTTON(svx_PRINT, svxPrintDlg::OnPrint)
    109     EVT_BUTTON(svx_PREVIEW, svxPrintDlg::OnPreview)
     108    EVT_BUTTON(wxID_PRINT, svxPrintDlg::OnPrint)
     109    EVT_BUTTON(wxID_PREVIEW, svxPrintDlg::OnPreview)
    110110    EVT_BUTTON(svx_PLAN, svxPrintDlg::OnPlan)
    111111    EVT_BUTTON(svx_ELEV, svxPrintDlg::OnElevation)
     
    241241    but = new wxButton(this, wxID_CANCEL, msg(/*&Cancel*/402));
    242242    h2->Add(but, 0, wxALIGN_RIGHT|wxALL, 5);
    243     but = new wxButton(this, svx_PREVIEW, msg(/*Pre&view*/401));
     243    but = new wxButton(this, wxID_PREVIEW, msg(/*Pre&view*/401));
    244244    h2->Add(but, 0, wxALIGN_RIGHT|wxALL, 5);
    245     but = new wxButton(this, svx_PRINT, msg(/*&Print*/400));
     245    but = new wxButton(this, wxID_PRINT, msg(/*&Print*/400));
    246246    but->SetDefault();
    247247    h2->Add(but, 0, wxALIGN_RIGHT|wxALL, 5);
Note: See TracChangeset for help on using the changeset viewer.