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
1=== removed file 'plugins/unityshell/src/StartupNotifyService.cpp'
2--- plugins/unityshell/src/StartupNotifyService.cpp 2012-11-15 20:03:17 +0000
3+++ plugins/unityshell/src/StartupNotifyService.cpp 1970-01-01 00:00:00 +0000
4@@ -1,73 +0,0 @@
5-// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
6-/*
7- * Copyright (C) 2010 Canonical Ltd
8- *
9- * This program is free software: you can redistribute it and/or modify
10- * it under the terms of the GNU General Public License version 3 as
11- * published by the Free Software Foundation.
12- *
13- * This program is distributed in the hope that it will be useful,
14- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16- * GNU General Public License for more details.
17- *
18- * You should have received a copy of the GNU General Public License
19- * along with this program. If not, see <http://www.gnu.org/licenses/>.
20- *
21- * Authored by: Jason Smith <jason.smith@canonical.com>
22- */
23-
24-#include "StartupNotifyService.h"
25-#include <stdio.h>
26-
27-StartupNotifyService* StartupNotifyService::_default = 0;
28-
29-StartupNotifyService*
30-StartupNotifyService::Default()
31-{
32- if (!_default)
33- _default = new StartupNotifyService();
34-
35- return _default;
36-}
37-
38-StartupNotifyService::StartupNotifyService()
39- : _sn_display(0)
40- , _sn_monitor(0)
41-{
42-}
43-
44-StartupNotifyService::~StartupNotifyService()
45-{
46-}
47-
48-void
49-StartupNotifyService::OnMonitorEvent(SnMonitorEvent* sn_event, void* user_data)
50-{
51- StartupNotifyService* service = (StartupNotifyService*) user_data;
52- SnStartupSequence* seq;
53- const char* id;
54-
55- seq = sn_monitor_event_get_startup_sequence(sn_event);
56- id = sn_startup_sequence_get_id(seq);
57-
58- switch (sn_monitor_event_get_type(sn_event))
59- {
60- case SN_MONITOR_EVENT_INITIATED:
61- service->StartupInitiated.emit(id);
62- break;
63- case SN_MONITOR_EVENT_COMPLETED:
64- service->StartupCompleted.emit(id);
65- break;
66- default:
67- break;
68- }
69-
70-}
71-
72-void
73-StartupNotifyService::SetSnDisplay(SnDisplay* sn_display, int screen)
74-{
75- _sn_display = sn_display;
76- _sn_monitor = sn_monitor_context_new(_sn_display, screen, &StartupNotifyService::OnMonitorEvent, this, NULL);
77-}
78
79=== removed file 'plugins/unityshell/src/StartupNotifyService.h'
80--- plugins/unityshell/src/StartupNotifyService.h 2011-07-21 14:59:25 +0000
81+++ plugins/unityshell/src/StartupNotifyService.h 1970-01-01 00:00:00 +0000
82@@ -1,54 +0,0 @@
83-// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
84-/*
85- * Copyright (C) 2010 Canonical Ltd
86- *
87- * This program is free software: you can redistribute it and/or modify
88- * it under the terms of the GNU General Public License version 3 as
89- * published by the Free Software Foundation.
90- *
91- * This program is distributed in the hope that it will be useful,
92- * but WITHOUT ANY WARRANTY; without even the implied warranty of
93- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
94- * GNU General Public License for more details.
95- *
96- * You should have received a copy of the GNU General Public License
97- * along with this program. If not, see <http://www.gnu.org/licenses/>.
98- *
99- * Authored by: Jason Smith <jason.smith@canonical.com>
100- */
101-
102-#ifndef STARTUPNOTIFYSERVICE_H
103-#define STARTUPNOTIFYSERVICE_H
104-
105-#ifndef SN_API_NOT_YET_FROZEN
106-#define SN_API_NOT_YET_FROZEN
107-#endif
108-#include <libsn/sn.h>
109-
110-#include <sigc++/sigc++.h>
111-
112-class StartupNotifyService : public sigc::trackable
113-{
114-
115-public:
116- static StartupNotifyService* Default();
117-
118- void SetSnDisplay(SnDisplay* sn_display, int screen);
119-
120- sigc::signal<void, const char*> StartupInitiated;
121- sigc::signal<void, const char*> StartupCompleted;
122-
123-protected:
124- StartupNotifyService();
125- ~StartupNotifyService();
126-
127-private:
128- static void OnMonitorEvent(SnMonitorEvent* sn_event, void* user_data);
129-
130- static StartupNotifyService* _default;
131-
132- SnDisplay* _sn_display;
133- SnMonitorContext* _sn_monitor;
134-};
135-
136-#endif // STARTUPNOTIFYSERVICE_H
137
138=== modified file 'plugins/unityshell/src/unityshell.cpp'
139--- plugins/unityshell/src/unityshell.cpp 2014-11-28 12:55:36 +0000
140+++ plugins/unityshell/src/unityshell.cpp 2014-12-20 13:21:37 +0000
141@@ -41,7 +41,6 @@
142 #include "PanelView.h"
143 #include "PluginAdapter.h"
144 #include "QuicklistManager.h"
145-#include "StartupNotifyService.h"
146 #include "Timer.h"
147 #include "XKeyboardUtil.h"
148 #include "unityshell.h"
149@@ -286,8 +285,6 @@
150 PluginAdapter::Initialize(screen);
151 AddChild(&WindowManager::Default());
152
153- StartupNotifyService::Default()->SetSnDisplay(screen->snDisplay(), screen->screenNum());
154-
155 nux::NuxInitialize(0);
156 #ifndef USE_GLES
157 wt.reset(nux::CreateFromForeignWindow(cScreen->output(),