summaryrefslogtreecommitdiff
path: root/plugins
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2012-09-07 17:49:40 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2012-09-07 17:49:40 +0200
commite76f577edabc6ad361bfff03271e20a97991cf1f (patch)
tree3850fbc8fb1f67564cb711f299b405a3a683b89f /plugins
parente1599c07d0112030407f5b81a242d806b6d45ef8 (diff)
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)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/unityshell/src/unityshell.cpp12
-rw-r--r--plugins/unityshell/unityshell.xml.in6
2 files changed, 5 insertions, 13 deletions
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<launcher::Controller>(screen->dpy());
+ launcher_controller_ = std::make_shared<launcher::Controller>();
AddChild(launcher_controller_.get());
switcher_controller_ = std::make_shared<switcher::Controller>();
diff --git a/plugins/unityshell/unityshell.xml.in b/plugins/unityshell/unityshell.xml.in
index 98571394a..abaa07cba 100644
--- a/plugins/unityshell/unityshell.xml.in
+++ b/plugins/unityshell/unityshell.xml.in
@@ -400,12 +400,6 @@
<default>true</default>
</option>
- <option name="show_desktop_icon" type="bool">
- <_short>Show "Desktop Icon" in the launcher</_short>
- <_long>Enable/Disable "Show Desktop Icon" in the launcher.</_long>
- <default>false</default>
- </option>
-
<option name="menus_fadein" type="int">
<_short>Menus Fade-in duration</_short>
<_long>Duration (in milliseconds) of the menus fade-in animation, used when the mouse goes over the top-panel.</_long>