diff options
| -rw-r--r-- | plugins/unityshell/src/StartupNotifyService.cpp | 73 | ||||
| -rw-r--r-- | plugins/unityshell/src/StartupNotifyService.h | 54 | ||||
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 3 |
3 files changed, 0 insertions, 130 deletions
diff --git a/plugins/unityshell/src/StartupNotifyService.cpp b/plugins/unityshell/src/StartupNotifyService.cpp deleted file mode 100644 index b35be6e7f..000000000 --- a/plugins/unityshell/src/StartupNotifyService.cpp +++ /dev/null @@ -1,73 +0,0 @@ -// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- -/* - * Copyright (C) 2010 Canonical Ltd - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * Authored by: Jason Smith <jason.smith@canonical.com> - */ - -#include "StartupNotifyService.h" -#include <stdio.h> - -StartupNotifyService* StartupNotifyService::_default = 0; - -StartupNotifyService* -StartupNotifyService::Default() -{ - if (!_default) - _default = new StartupNotifyService(); - - return _default; -} - -StartupNotifyService::StartupNotifyService() - : _sn_display(0) - , _sn_monitor(0) -{ -} - -StartupNotifyService::~StartupNotifyService() -{ -} - -void -StartupNotifyService::OnMonitorEvent(SnMonitorEvent* sn_event, void* user_data) -{ - StartupNotifyService* service = (StartupNotifyService*) user_data; - SnStartupSequence* seq; - const char* id; - - seq = sn_monitor_event_get_startup_sequence(sn_event); - id = sn_startup_sequence_get_id(seq); - - switch (sn_monitor_event_get_type(sn_event)) - { - case SN_MONITOR_EVENT_INITIATED: - service->StartupInitiated.emit(id); - break; - case SN_MONITOR_EVENT_COMPLETED: - service->StartupCompleted.emit(id); - break; - default: - break; - } - -} - -void -StartupNotifyService::SetSnDisplay(SnDisplay* sn_display, int screen) -{ - _sn_display = sn_display; - _sn_monitor = sn_monitor_context_new(_sn_display, screen, &StartupNotifyService::OnMonitorEvent, this, NULL); -} diff --git a/plugins/unityshell/src/StartupNotifyService.h b/plugins/unityshell/src/StartupNotifyService.h deleted file mode 100644 index 5f821dc64..000000000 --- a/plugins/unityshell/src/StartupNotifyService.h +++ /dev/null @@ -1,54 +0,0 @@ -// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- -/* - * Copyright (C) 2010 Canonical Ltd - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * Authored by: Jason Smith <jason.smith@canonical.com> - */ - -#ifndef STARTUPNOTIFYSERVICE_H -#define STARTUPNOTIFYSERVICE_H - -#ifndef SN_API_NOT_YET_FROZEN -#define SN_API_NOT_YET_FROZEN -#endif -#include <libsn/sn.h> - -#include <sigc++/sigc++.h> - -class StartupNotifyService : public sigc::trackable -{ - -public: - static StartupNotifyService* Default(); - - void SetSnDisplay(SnDisplay* sn_display, int screen); - - sigc::signal<void, const char*> StartupInitiated; - sigc::signal<void, const char*> StartupCompleted; - -protected: - StartupNotifyService(); - ~StartupNotifyService(); - -private: - static void OnMonitorEvent(SnMonitorEvent* sn_event, void* user_data); - - static StartupNotifyService* _default; - - SnDisplay* _sn_display; - SnMonitorContext* _sn_monitor; -}; - -#endif // STARTUPNOTIFYSERVICE_H diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index aebf862b3..ddb345eac 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -41,7 +41,6 @@ #include "PanelView.h" #include "PluginAdapter.h" #include "QuicklistManager.h" -#include "StartupNotifyService.h" #include "Timer.h" #include "XKeyboardUtil.h" #include "unityshell.h" @@ -286,8 +285,6 @@ UnityScreen::UnityScreen(CompScreen* screen) PluginAdapter::Initialize(screen); AddChild(&WindowManager::Default()); - StartupNotifyService::Default()->SetSnDisplay(screen->snDisplay(), screen->screenNum()); - nux::NuxInitialize(0); #ifndef USE_GLES wt.reset(nux::CreateFromForeignWindow(cScreen->output(), |
