From 20572f6f481553378965dca0ded53e96fbf829ef Mon Sep 17 00:00:00 2001 From: Jekyll Wu Date: Thu, 13 Oct 2011 16:51:52 +0800 Subject: [PATCH] Rename 'info' to 'profile' --- src/ViewManager.cpp | 70 ++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp index a17db8160..29f998501 100644 --- a/src/ViewManager.cpp +++ b/src/ViewManager.cpp @@ -444,8 +444,8 @@ void ViewManager::splitView(Qt::Orientation orientation) { Session* session = _sessionMap[(TerminalDisplay*)existingViewIter.next()]; TerminalDisplay* display = createTerminalDisplay(session); - const Profile::Ptr info = SessionManager::instance()->sessionProfile(session); - applyProfileToView(display, info); + const Profile::Ptr profile = SessionManager::instance()->sessionProfile(session); + applyProfileToView(display, profile); ViewProperties* properties = createController(session,display); _sessionMap[display] = session; @@ -454,8 +454,8 @@ void ViewManager::splitView(Qt::Orientation orientation) // session in the previous container if ( !container ) { - container = createContainer(info); - applyProfileToContainer(container, info); + container = createContainer(profile); + applyProfileToContainer(container, profile); } container->addView(display,properties); @@ -622,8 +622,8 @@ void ViewManager::createView(Session* session) // setting. The current implementation is limited by the design of Profile.h // It should be re-implmented at some appropriate time in the future. // comment by jekyllwu - Profile::Ptr info = SessionManager::instance()->sessionProfile(session); - int newTabBehavior = info->property(Profile::NewTabBehavior); + Profile::Ptr profile = SessionManager::instance()->sessionProfile(session); + int newTabBehavior = profile->property(Profile::NewTabBehavior); if ( newTabBehavior == Profile::PutNewTabAfterCurrentTab ) { QWidget* view = activeView(); @@ -645,11 +645,11 @@ void ViewManager::createView(Session* session) } } -ViewContainer* ViewManager::createContainer(const Profile::Ptr info) +ViewContainer* ViewManager::createContainer(const Profile::Ptr profile) { - Q_ASSERT( info ); + Q_ASSERT( profile ); - const int tabPosition = info->property(Profile::TabBarPosition); + const int tabPosition = profile->property(Profile::TabBarPosition); ViewContainer::NavigationPosition position = ( tabPosition == Profile::TabBarTop ) ? ViewContainer::NavigationPositionTop : @@ -681,7 +681,7 @@ ViewContainer* ViewManager::createContainer(const Profile::Ptr info) container = new StackedViewContainer(_viewSplitter); } - applyProfileToContainer(container, info); + applyProfileToContainer(container, profile); // connect signals and slots connect( container , SIGNAL(viewAdded(QWidget*,ViewProperties*)) , _containerSignalMapper , @@ -808,10 +808,10 @@ TerminalDisplay* ViewManager::createTerminalDisplay(Session* session) return display; } -const ColorScheme* ViewManager::colorSchemeForProfile(const Profile::Ptr info) const +const ColorScheme* ViewManager::colorSchemeForProfile(const Profile::Ptr profile) const { const ColorScheme* colorScheme = ColorSchemeManager::instance()-> - findColorScheme(info->colorScheme()); + findColorScheme(profile->colorScheme()); if ( !colorScheme ) colorScheme = ColorSchemeManager::instance()->defaultColorScheme(); Q_ASSERT( colorScheme ); @@ -819,16 +819,16 @@ const ColorScheme* ViewManager::colorSchemeForProfile(const Profile::Ptr info) c return colorScheme; } -void ViewManager::applyProfileToView(TerminalDisplay* view , const Profile::Ptr info) +void ViewManager::applyProfileToView(TerminalDisplay* view , const Profile::Ptr profile) { - Q_ASSERT( info ); + Q_ASSERT( profile ); - const ColorScheme* colorScheme = colorSchemeForProfile(info); + const ColorScheme* colorScheme = colorSchemeForProfile(profile); // menu bar visibility - emit setMenuBarVisibleRequest( info->property(Profile::ShowMenuBar) ); + emit setMenuBarVisibleRequest( profile->property(Profile::ShowMenuBar) ); - emit setSaveGeometryOnExitRequest( info->property(Profile::SaveGeometryOnExit) ); + emit setSaveGeometryOnExitRequest( profile->property(Profile::SaveGeometryOnExit) ); emit updateWindowIcon(); @@ -841,12 +841,12 @@ void ViewManager::applyProfileToView(TerminalDisplay* view , const Profile::Ptr view->setWallpaper(colorScheme->wallpaper()); // load font - view->setAntialias(info->property(Profile::AntiAliasFonts)); - view->setBoldIntense(info->property(Profile::BoldIntense)); - view->setVTFont(info->font()); + view->setAntialias(profile->property(Profile::AntiAliasFonts)); + view->setBoldIntense(profile->property(Profile::BoldIntense)); + view->setVTFont(profile->font()); // set scroll-bar position - int scrollBarPosition = info->property(Profile::ScrollBarPosition); + int scrollBarPosition = profile->property(Profile::ScrollBarPosition); if ( scrollBarPosition == Profile::ScrollBarLeft ) view->setScrollBarPosition(TerminalDisplay::ScrollBarLeft); @@ -856,25 +856,25 @@ void ViewManager::applyProfileToView(TerminalDisplay* view , const Profile::Ptr view->setScrollBarPosition(TerminalDisplay::ScrollBarHidden); // show hint about termianl size after resizing - view->setShowTerminalSizeHint(info->property(Profile::ShowTerminalSizeHint)); + view->setShowTerminalSizeHint(profile->property(Profile::ShowTerminalSizeHint)); // terminal features - bool blinkingCursor = info->property(Profile::BlinkingCursorEnabled); + bool blinkingCursor = profile->property(Profile::BlinkingCursorEnabled); view->setBlinkingCursorEnabled(blinkingCursor); - bool blinkingText = info->property(Profile::BlinkingTextEnabled); + bool blinkingText = profile->property(Profile::BlinkingTextEnabled); view->setBlinkingTextEnabled(blinkingText); - int tripleClickMode = info->property(Profile::TripleClickMode); + int tripleClickMode = profile->property(Profile::TripleClickMode); view->setTripleClickMode( TerminalDisplay::TripleClickMode(tripleClickMode) ); - view->setUnderlineLinks(info->property(Profile::UnderlineLinksEnabled)); + view->setUnderlineLinks(profile->property(Profile::UnderlineLinksEnabled)); - bool bidiEnabled = info->property(Profile::BidiRenderingEnabled); + bool bidiEnabled = profile->property(Profile::BidiRenderingEnabled); view->setBidiEnabled(bidiEnabled); // cursor shape - int cursorShape = info->property(Profile::CursorShape); + int cursorShape = profile->property(Profile::CursorShape); if ( cursorShape == Profile::BlockCursor ) view->setKeyboardCursorShape(TerminalDisplay::BlockCursor); @@ -884,20 +884,20 @@ void ViewManager::applyProfileToView(TerminalDisplay* view , const Profile::Ptr view->setKeyboardCursorShape(TerminalDisplay::UnderlineCursor); // cursor color - bool useCustomColor = info->property(Profile::UseCustomCursorColor); - const QColor& cursorColor = info->property(Profile::CustomCursorColor); + bool useCustomColor = profile->property(Profile::UseCustomCursorColor); + const QColor& cursorColor = profile->property(Profile::CustomCursorColor); view->setKeyboardCursorColor(!useCustomColor,cursorColor); // word characters - view->setWordCharacters( info->property(Profile::WordCharacters) ); + view->setWordCharacters( profile->property(Profile::WordCharacters) ); } -void ViewManager::applyProfileToContainer(ViewContainer* container , const Profile::Ptr info) +void ViewManager::applyProfileToContainer(ViewContainer* container , const Profile::Ptr profile) { - int tabBarMode = info->property(Profile::TabBarMode); - int tabBarPosition = info->property(Profile::TabBarPosition); - bool showNewCloseButtons = info->property(Profile::ShowNewAndCloseTabButtons); + int tabBarMode = profile->property(Profile::TabBarMode); + int tabBarPosition = profile->property(Profile::TabBarPosition); + bool showNewCloseButtons = profile->property(Profile::ShowNewAndCloseTabButtons); if ( tabBarMode == Profile::AlwaysHideTabBar ) container->setNavigationDisplayMode(ViewContainer::AlwaysHideNavigation);