From e76f577edabc6ad361bfff03271e20a97991cf1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 7 Sep 2012 17:49:40 +0200 Subject: unityshell: remove the ShowDesktopIcon option, correctly set the workspaces size even when vsize changes And, of course, change the launcher::Controller initialization. (bzr r2529.14.49) --- plugins/unityshell/src/unityshell.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'plugins/unityshell/src') diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 640fd3654..2fb14925e 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -318,7 +318,6 @@ UnityScreen::UnityScreen(CompScreen* screen) optionSetAutohideAnimationNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); optionSetDashBlurExperimentalNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); optionSetShortcutOverlayNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); - optionSetShowDesktopIconNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); optionSetShowLauncherInitiate(boost::bind(&UnityScreen::showLauncherKeyInitiate, this, _1, _2, _3)); optionSetShowLauncherTerminate(boost::bind(&UnityScreen::showLauncherKeyTerminate, this, _1, _2, _3)); optionSetKeyboardFocusInitiate(boost::bind(&UnityScreen::setKeyboardFocusKeyInitiate, this, _1, _2, _3)); @@ -3043,9 +3042,6 @@ void UnityScreen::optionChanged(CompOption* opt, UnityshellOptions::Options num) enable_shortcut_overlay_ = optionGetShortcutOverlay(); shortcut_controller_->SetEnabled(enable_shortcut_overlay_); break; - case UnityshellOptions::ShowDesktopIcon: - launcher_controller_->SetShowDesktopIcon(optionGetShowDesktopIcon()); - break; case UnityshellOptions::DecayRate: launcher_options->edge_decay_rate = optionGetDecayRate() * 100; break; @@ -3126,11 +3122,13 @@ bool UnityScreen::setOptionForPlugin(const char* plugin, const char* name, CompOption::Value& v) { bool status = screen->setOptionForPlugin(plugin, name, v); + if (status) { - if (strcmp(plugin, "core") == 0 && strcmp(name, "hsize") == 0) + if (strcmp(plugin, "core") == 0) { - launcher_controller_->UpdateNumWorkspaces(screen->vpSize().width() * screen->vpSize().height()); + if (strcmp(name, "hsize") == 0 || strcmp(name, "vsize") == 0) + launcher_controller_->UpdateNumWorkspaces(screen->vpSize().width() * screen->vpSize().height()); } } return status; @@ -3161,7 +3159,7 @@ void UnityScreen::OnDashRealized () void UnityScreen::initLauncher() { Timer timer; - launcher_controller_ = std::make_shared(screen->dpy()); + launcher_controller_ = std::make_shared(); AddChild(launcher_controller_.get()); switcher_controller_ = std::make_shared(); -- cgit v1.2.3