Audacity  2.2.2
Public Member Functions | Public Attributes | List of all members
TitleRestorer Class Reference

Public Member Functions

 TitleRestorer (AudacityProject *p)
 
 ~TitleRestorer ()
 

Public Attributes

wxString sProjNumber
 
wxString sProjName
 
int UnnamedCount
 

Detailed Description

Definition at line 2468 of file Project.cpp.

Constructor & Destructor Documentation

TitleRestorer::TitleRestorer ( AudacityProject p)
inline

Definition at line 2470 of file Project.cpp.

References _(), AudacityProject::CountUnnamed(), AudacityProject::GetName(), AudacityProject::GetProjectNumber(), AudacityProject::RefreshAllTitles(), sProjName, sProjNumber, and UnnamedCount.

2470  {
2471  if( p->IsIconized() )
2472  p->Restore();
2473  p->Raise(); // May help identifying the window on Mac
2474 
2475  // Construct this projects name and number.
2476  sProjNumber = "";
2477  sProjName = p->GetName();
2478  if (sProjName.IsEmpty()){
2479  sProjName = _("<untitled>");
2481  if( UnnamedCount > 1 ){
2482  sProjNumber.Printf( "[Project %02i] ", p->GetProjectNumber()+1 );
2484  }
2485  } else {
2486  UnnamedCount = 0;
2487  }
2488  };
wxString sProjNumber
Definition: Project.cpp:2492
static void RefreshAllTitles(bool bShowProjectNumbers)
Definition: Project.cpp:2128
wxString sProjName
Definition: Project.cpp:2494
static int CountUnnamed()
Definition: Project.cpp:2117
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
wxString GetName()
Definition: Project.cpp:1465
int GetProjectNumber()
Definition: Project.h:393
TitleRestorer::~TitleRestorer ( )
inline

Definition at line 2489 of file Project.cpp.

References AudacityProject::RefreshAllTitles(), and UnnamedCount.

2489  {
2490  if( UnnamedCount > 1 )
2492  };
static void RefreshAllTitles(bool bShowProjectNumbers)
Definition: Project.cpp:2128

Member Data Documentation

wxString TitleRestorer::sProjName
wxString TitleRestorer::sProjNumber
int TitleRestorer::UnnamedCount

Definition at line 2495 of file Project.cpp.

Referenced by TitleRestorer(), and ~TitleRestorer().


The documentation for this class was generated from the following file: