Merge lp:~unity-team/unity/dash-fixes-2011-02-11 into lp:unity

Proposed by Neil J. Patel
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 870
Proposed branch: lp:~unity-team/unity/dash-fixes-2011-02-11
Merge into: lp:unity
Diff against target: 193 lines (+50/-10)
11 files modified
CMakeLists.txt (+7/-1)
services/CMakeLists.txt (+1/-0)
src/PlaceFactoryFile.cpp (+2/-2)
src/PlacesController.cpp (+1/-1)
src/PlacesResultsController.cpp (+10/-0)
src/PlacesResultsView.cpp (+3/-0)
src/PlacesView.cpp (+16/-0)
tests/CMakeLists.txt (+1/-0)
tests/TestPlacesGroup.cpp (+3/-2)
tests/TestPlacesResults.cpp (+3/-2)
tests/TestPlacesTiles.cpp (+3/-2)
To merge this branch: bzr merge lp:~unity-team/unity/dash-fixes-2011-02-11
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+50189@code.launchpad.net

Description of the change

Fixes the linked bugs, as well as adds -Werror and friends by default and also fixes drawing issues in dash (you'll need latest nux)

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

OK, perhaps I'm missing something here, but these changes seem to do
absolutely nothing. Why are they here?

You are creating a temporary, and casting a pointer, which is then discarded.

Why?

On Fri, 18 Feb 2011 05:39:05 you wrote:
> === modified file 'tests/TestPlacesGroup.cpp'
> --- tests/TestPlacesGroup.cpp 2011-02-07 11:43:30 +0000
> +++ tests/TestPlacesGroup.cpp 2011-02-17 16:38:31 +0000
> @@ -134,8 +134,9 @@
> nux::SleepForMilliseconds (3000);
> printf ("ControlThread successfully started\n");
>
> - nux::WindowThread* mainWindowThread = NUX_STATIC_CAST
> (nux::WindowThread*, -
> data);
> + nux::WindowThread* mainWindowThread;
> +
> + mainWindowThread = NUX_STATIC_CAST (nux::WindowThread*, data);
> }
>
>
>
> === modified file 'tests/TestPlacesResults.cpp'
> --- tests/TestPlacesResults.cpp 2011-02-10 16:34:36 +0000
> +++ tests/TestPlacesResults.cpp 2011-02-17 16:38:31 +0000
> @@ -135,8 +135,9 @@
> nux::SleepForMilliseconds (3000);
> printf ("ControlThread successfully started\n");
>
> - nux::WindowThread* mainWindowThread = NUX_STATIC_CAST
> (nux::WindowThread*, -
> data);
> + nux::WindowThread* mainWindowThread;
> +
> + mainWindowThread = NUX_STATIC_CAST (nux::WindowThread*, data);
> }
>
>
>
> === modified file 'tests/TestPlacesTiles.cpp'
> --- tests/TestPlacesTiles.cpp 2011-01-19 17:08:14 +0000
> +++ tests/TestPlacesTiles.cpp 2011-02-17 16:38:31 +0000
> @@ -83,8 +83,9 @@
> nux::SleepForMilliseconds (3000);
> printf ("ControlThread successfully started\n");
>
> - nux::WindowThread* mainWindowThread = NUX_STATIC_CAST
> (nux::WindowThread*, -
> data);
> + nux::WindowThread* mainWindowThread;
> +
> + mainWindowThread = NUX_STATIC_CAST (nux::WindowThread*, data);
> }

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2011-02-14 16:51:05 +0000
3+++ CMakeLists.txt 2011-02-17 16:38:31 +0000
4@@ -85,6 +85,12 @@
5 SET (BOOT_LOGGER_FLAG "-DENABLE_LOGGER")
6 endif (BOOT_LOGGER)
7
8+SET (MAINTAINER_CFLAGS "-Werror -Wall -Wcast-align -Wno-uninitialized -Wempty-body -Wformat-security -Winit-self")
9+option (DISABLE_MAINTAINER_CFLAGS "Disable maintainer CFlags" OFF)
10+if (DISABLE_MAINTAINER_CFLAGS)
11+ SET (MAINTAINER_CFLAGS "")
12+endif (DISABLE_MAINTAINER_CFLAGS)
13+
14 #
15 # src (Compiz Plugin)
16 #
17@@ -95,7 +101,7 @@
18 compiz_plugin (unityshell
19 PKGDEPS ${UNITY_PLUGIN_DEPS}
20 PLUGINDEPS composite opengl
21- CFLAGSADD "-DINSTALLPREFIX='\"${CMAKE_INSTALL_PREFIX}\"' -DPKGDATADIR='\"${CMAKE_INSTALL_PREFIX}/share/unity/3\"' -I${CMAKE_BINARY_DIR} ${BOOT_LOGGER_FLAG} -DGETTEXT_PACKAGE='\"unity\"'"
22+ CFLAGSADD "-DINSTALLPREFIX='\"${CMAKE_INSTALL_PREFIX}\"' -DPKGDATADIR='\"${CMAKE_INSTALL_PREFIX}/share/unity/3\"' -I${CMAKE_BINARY_DIR} ${BOOT_LOGGER_FLAG} -DGETTEXT_PACKAGE='\"unity\"' ${MAINTAINER_CFLAGS}"
23 )
24
25 #
26
27=== modified file 'services/CMakeLists.txt'
28--- services/CMakeLists.txt 2011-02-08 11:50:18 +0000
29+++ services/CMakeLists.txt 2011-02-17 16:38:31 +0000
30@@ -10,6 +10,7 @@
31 set(CFLAGS
32 ${SERVICE_DEPS_CFLAGS}
33 ${SERVICE_DEPS_CFLAGS_OTHER}
34+ ${MAINTAINER_CFLAGS}
35 "-DGETTEXT_PACKAGE=\"unity\""
36 "-DINDICATORDIR=\"${_indicatordir}\""
37 "-DINDICATORICONDIR=\"${_iconsdir}\""
38
39=== modified file 'src/PlaceFactoryFile.cpp'
40--- src/PlaceFactoryFile.cpp 2011-01-31 14:53:06 +0000
41+++ src/PlaceFactoryFile.cpp 2011-02-17 16:38:31 +0000
42@@ -28,8 +28,8 @@
43 PlaceFactoryFile::PlaceFactoryFile (const char *directory)
44 {
45 //FIXME: This is a temporary Alpha 2 fix
46- g_spawn_command_line_async ("killall unity-files-daemon", NULL);
47- g_spawn_command_line_async ("killall unity-applications-daemon", NULL);
48+ g_spawn_command_line_sync ("killall unity-files-daemon", NULL, NULL, NULL, NULL);
49+ g_spawn_command_line_sync ("killall unity-applications-daemon", NULL, NULL, NULL, NULL);
50
51 /* Use the default lookup location */
52 if (directory == NULL)
53
54=== modified file 'src/PlacesController.cpp'
55--- src/PlacesController.cpp 2011-02-13 00:46:10 +0000
56+++ src/PlacesController.cpp 2011-02-17 16:38:31 +0000
57@@ -48,7 +48,7 @@
58 _window_layout = new nux::HLayout ();
59
60 _window = new nux::BaseWindow ("Dash");
61- _window->SetBackgroundColor (nux::Color (0.0, 0.0, 0.0, 0.7));
62+ _window->SetBackgroundColor (nux::Color (0.0, 0.0, 0.0, 0.85));
63 _window->SinkReference ();
64 _window->SetConfigureNotifyCallback(&PlacesController::WindowConfigureCallback, this);
65 _window->ShowWindow(false);
66
67=== modified file 'src/PlacesResultsController.cpp'
68--- src/PlacesResultsController.cpp 2011-02-15 13:22:40 +0000
69+++ src/PlacesResultsController.cpp 2011-02-17 16:38:31 +0000
70@@ -81,6 +81,10 @@
71 {
72 group->SetVisible (true);
73 _results_view->ReJiggyGroups ();
74+
75+ group->QueueDraw ();
76+ group->ComputeChildLayout ();
77+ group->GetLayout ()->QueueDraw ();
78 }
79 }
80
81@@ -102,6 +106,12 @@
82 group->SetVisible (false);
83 _results_view->ReJiggyGroups ();
84 }
85+ else
86+ {
87+ group->QueueDraw ();
88+ group->GetLayout ()->QueueDraw ();
89+ group->ComputeChildLayout ();
90+ }
91 }
92 else
93 {
94
95=== modified file 'src/PlacesResultsView.cpp'
96--- src/PlacesResultsView.cpp 2011-02-10 14:34:30 +0000
97+++ src/PlacesResultsView.cpp 2011-02-17 16:38:31 +0000
98@@ -57,6 +57,9 @@
99 if ((*it)->IsVisible ())
100 {
101 _layout->AddView ((*it), 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
102+ _layout->QueueDraw ();
103+ (*it)->QueueDraw ();
104+ QueueDraw ();
105 }
106 }
107 }
108
109=== modified file 'src/PlacesView.cpp'
110--- src/PlacesView.cpp 2011-02-10 16:34:36 +0000
111+++ src/PlacesView.cpp 2011-02-17 16:38:31 +0000
112@@ -88,7 +88,23 @@
113 long
114 PlacesView::ProcessEvent(nux::IEvent &ievent, long TraverseInfo, long ProcessEventInfo)
115 {
116+ // FIXME: This breaks with multi-monitor
117+ nux::Geometry homebutton (0.0f, 0.0f, 66.0f, 24.0f);
118 long ret = TraverseInfo;
119+
120+ if (ievent.e_event == nux::NUX_KEYDOWN
121+ && ievent.GetKeySym () == NUX_VK_ESCAPE)
122+ {
123+ SetActiveEntry (NULL, 0, "");
124+ return TraverseInfo;
125+ }
126+
127+ if (ievent.e_event == nux::NUX_MOUSE_RELEASED)
128+ {
129+ if (homebutton.IsPointInside (ievent.e_x, ievent.e_y))
130+ SetActiveEntry (NULL, 0, "");
131+ return TraverseInfo;
132+ }
133
134 ret = _layout->ProcessEvent (ievent, ret, ProcessEventInfo);
135 return ret;
136
137=== modified file 'tests/CMakeLists.txt'
138--- tests/CMakeLists.txt 2011-02-17 13:41:39 +0000
139+++ tests/CMakeLists.txt 2011-02-17 16:38:31 +0000
140@@ -14,6 +14,7 @@
141 set (CFLAGS
142 ${TEST_UNIT_DEPS_CFLAGS}
143 ${TEST_UNIT_DEPS_CFLAGS_OTHER}
144+ ${MAINTAINER_CFLAGS}
145 "-DTESTDATADIR=${TESTDATADIR}"
146 "-DGETTEXT_PACKAGE=\"unity\""
147 "-DINDICATORDIR=\"${CMAKE_BINARY_DIR}/tests\""
148
149=== modified file 'tests/TestPlacesGroup.cpp'
150--- tests/TestPlacesGroup.cpp 2011-02-07 11:43:30 +0000
151+++ tests/TestPlacesGroup.cpp 2011-02-17 16:38:31 +0000
152@@ -134,8 +134,9 @@
153 nux::SleepForMilliseconds (3000);
154 printf ("ControlThread successfully started\n");
155
156- nux::WindowThread* mainWindowThread = NUX_STATIC_CAST (nux::WindowThread*,
157- data);
158+ nux::WindowThread* mainWindowThread;
159+
160+ mainWindowThread = NUX_STATIC_CAST (nux::WindowThread*, data);
161 }
162
163
164
165=== modified file 'tests/TestPlacesResults.cpp'
166--- tests/TestPlacesResults.cpp 2011-02-10 16:34:36 +0000
167+++ tests/TestPlacesResults.cpp 2011-02-17 16:38:31 +0000
168@@ -135,8 +135,9 @@
169 nux::SleepForMilliseconds (3000);
170 printf ("ControlThread successfully started\n");
171
172- nux::WindowThread* mainWindowThread = NUX_STATIC_CAST (nux::WindowThread*,
173- data);
174+ nux::WindowThread* mainWindowThread;
175+
176+ mainWindowThread = NUX_STATIC_CAST (nux::WindowThread*, data);
177 }
178
179
180
181=== modified file 'tests/TestPlacesTiles.cpp'
182--- tests/TestPlacesTiles.cpp 2011-01-19 17:08:14 +0000
183+++ tests/TestPlacesTiles.cpp 2011-02-17 16:38:31 +0000
184@@ -83,8 +83,9 @@
185 nux::SleepForMilliseconds (3000);
186 printf ("ControlThread successfully started\n");
187
188- nux::WindowThread* mainWindowThread = NUX_STATIC_CAST (nux::WindowThread*,
189- data);
190+ nux::WindowThread* mainWindowThread;
191+
192+ mainWindowThread = NUX_STATIC_CAST (nux::WindowThread*, data);
193 }
194
195