Merge lp:~azzar1/unity/remove-startup-notify into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Stephen M. Webb
Approved revision: no longer in the source branch.
Merged at revision: 3901
Proposed branch: lp:~azzar1/unity/remove-startup-notify
Merge into: lp:unity
Diff against target: 157 lines (+0/-130)
3 files modified
plugins/unityshell/src/StartupNotifyService.cpp (+0/-73)
plugins/unityshell/src/StartupNotifyService.h (+0/-54)
plugins/unityshell/src/unityshell.cpp (+0/-3)
To merge this branch: bzr merge lp:~azzar1/unity/remove-startup-notify
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+245264@code.launchpad.net

Commit message

Remove unsed StartupNotifyService.*

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Stephen M. Webb (bregma) wrote :

Build does not break without this code. SInce it doesn;t actually appear to do anything or get used beyond constructing the object (ie., no signals get linked) I think it's OK.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file 'plugins/unityshell/src/StartupNotifyService.cpp'
--- plugins/unityshell/src/StartupNotifyService.cpp 2012-11-15 20:03:17 +0000
+++ plugins/unityshell/src/StartupNotifyService.cpp 1970-01-01 00:00:00 +0000
@@ -1,73 +0,0 @@
1// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2/*
3 * Copyright (C) 2010 Canonical Ltd
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authored by: Jason Smith <jason.smith@canonical.com>
18 */
19
20#include "StartupNotifyService.h"
21#include <stdio.h>
22
23StartupNotifyService* StartupNotifyService::_default = 0;
24
25StartupNotifyService*
26StartupNotifyService::Default()
27{
28 if (!_default)
29 _default = new StartupNotifyService();
30
31 return _default;
32}
33
34StartupNotifyService::StartupNotifyService()
35 : _sn_display(0)
36 , _sn_monitor(0)
37{
38}
39
40StartupNotifyService::~StartupNotifyService()
41{
42}
43
44void
45StartupNotifyService::OnMonitorEvent(SnMonitorEvent* sn_event, void* user_data)
46{
47 StartupNotifyService* service = (StartupNotifyService*) user_data;
48 SnStartupSequence* seq;
49 const char* id;
50
51 seq = sn_monitor_event_get_startup_sequence(sn_event);
52 id = sn_startup_sequence_get_id(seq);
53
54 switch (sn_monitor_event_get_type(sn_event))
55 {
56 case SN_MONITOR_EVENT_INITIATED:
57 service->StartupInitiated.emit(id);
58 break;
59 case SN_MONITOR_EVENT_COMPLETED:
60 service->StartupCompleted.emit(id);
61 break;
62 default:
63 break;
64 }
65
66}
67
68void
69StartupNotifyService::SetSnDisplay(SnDisplay* sn_display, int screen)
70{
71 _sn_display = sn_display;
72 _sn_monitor = sn_monitor_context_new(_sn_display, screen, &StartupNotifyService::OnMonitorEvent, this, NULL);
73}
740
=== removed file 'plugins/unityshell/src/StartupNotifyService.h'
--- plugins/unityshell/src/StartupNotifyService.h 2011-07-21 14:59:25 +0000
+++ plugins/unityshell/src/StartupNotifyService.h 1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
1// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2/*
3 * Copyright (C) 2010 Canonical Ltd
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authored by: Jason Smith <jason.smith@canonical.com>
18 */
19
20#ifndef STARTUPNOTIFYSERVICE_H
21#define STARTUPNOTIFYSERVICE_H
22
23#ifndef SN_API_NOT_YET_FROZEN
24#define SN_API_NOT_YET_FROZEN
25#endif
26#include <libsn/sn.h>
27
28#include <sigc++/sigc++.h>
29
30class StartupNotifyService : public sigc::trackable
31{
32
33public:
34 static StartupNotifyService* Default();
35
36 void SetSnDisplay(SnDisplay* sn_display, int screen);
37
38 sigc::signal<void, const char*> StartupInitiated;
39 sigc::signal<void, const char*> StartupCompleted;
40
41protected:
42 StartupNotifyService();
43 ~StartupNotifyService();
44
45private:
46 static void OnMonitorEvent(SnMonitorEvent* sn_event, void* user_data);
47
48 static StartupNotifyService* _default;
49
50 SnDisplay* _sn_display;
51 SnMonitorContext* _sn_monitor;
52};
53
54#endif // STARTUPNOTIFYSERVICE_H
550
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2014-11-28 12:55:36 +0000
+++ plugins/unityshell/src/unityshell.cpp 2014-12-20 13:21:37 +0000
@@ -41,7 +41,6 @@
41#include "PanelView.h"41#include "PanelView.h"
42#include "PluginAdapter.h"42#include "PluginAdapter.h"
43#include "QuicklistManager.h"43#include "QuicklistManager.h"
44#include "StartupNotifyService.h"
45#include "Timer.h"44#include "Timer.h"
46#include "XKeyboardUtil.h"45#include "XKeyboardUtil.h"
47#include "unityshell.h"46#include "unityshell.h"
@@ -286,8 +285,6 @@
286 PluginAdapter::Initialize(screen);285 PluginAdapter::Initialize(screen);
287 AddChild(&WindowManager::Default());286 AddChild(&WindowManager::Default());
288287
289 StartupNotifyService::Default()->SetSnDisplay(screen->snDisplay(), screen->screenNum());
290
291 nux::NuxInitialize(0);288 nux::NuxInitialize(0);
292#ifndef USE_GLES289#ifndef USE_GLES
293 wt.reset(nux::CreateFromForeignWindow(cScreen->output(),290 wt.reset(nux::CreateFromForeignWindow(cScreen->output(),