Merge lp:~victored/wingpanel/lp-1295634 into lp:~elementary-pantheon/wingpanel/old-trunk
- lp-1295634
- Merge into old-trunk
Status: | Superseded | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Proposed branch: | lp:~victored/wingpanel/lp-1295634 | ||||||||||||
Merge into: | lp:~elementary-pantheon/wingpanel/old-trunk | ||||||||||||
Diff against target: |
1144 lines (+459/-285) (has conflicts) 14 files modified
CMakeLists.txt (+31/-3) org.pantheon.desktop.wingpanel.gschema.xml (+11/-1) src/Indicator/IndicatorFactory.vala (+72/-16) src/Indicator/IndicatorFileModel.vala (+0/-94) src/Indicator/IndicatorObject.vala (+7/-7) src/Indicator/IndicatorObjectEntry.vala (+7/-30) src/Services/BackgroundManager.vala (+110/-0) src/Services/IndicatorSorter.vala (+8/-1) src/Services/Settings.vala (+2/-0) src/Widgets/BasePanel.vala (+112/-19) src/Widgets/Panel.vala (+19/-4) src/WingpanelApp.vala (+54/-56) vapi/indicator3-0.4.vapi (+22/-54) vapi/libido3-0.1.vapi (+4/-0) Text conflict in CMakeLists.txt Text conflict in vapi/indicator3-0.4.vapi |
||||||||||||
To merge this branch: | bzr merge lp:~victored/wingpanel/lp-1295634 | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
elementary Pantheon team | Pending | ||
Review via email: mp+212541@code.launchpad.net |
This proposal has been superseded by a proposal from 2014-03-25.
Commit message
Go fully opaque only when there are visible maximized windows in the current workspace. Fixes lp:1295634
Description of the change
Go fully opaque only when there are visible maximized windows. Fixes lp:1295634
- 157. By Victor Martinez
-
Update panel opacity when opening and closing windows. Fixes lp:1294430 and lp:1294432
Unmerged revisions
- 157. By Victor Martinez
-
Update panel opacity when opening and closing windows. Fixes lp:1294430 and lp:1294432
- 156. By Victor Martinez
-
Only go fully opaque if there are visible maximized windows. Fixes lp:1295634
- 155. By Victor Martinez
-
Uses the gala dbus API to get the alpha value of the background. Adds a transition when changing alpha and uses wnck to check for maximized windows on the current screen
- 154. By Rico Tzschichholz
-
vapi: Update indicator3-0.4 bindings
- 153. By Victor Martinez
-
Support newer valac versions (>= 0.16)
- Remove duplicate code from IndicatorFileMo
del.vala and move it to IndicatorFactor y.vala to avoid copying data structures
- Update WingpanelApp.vala to make proper use of GLib.Application.startup and GLib.Applicatio n.activate
- Update respective license formats
- CMake corrections - 152. By David Gomes
-
Fixed code style.
- 151. By Tom Beckmann
-
replace tabs with spaces, adding credit here: indicator vapi is from unity-greeter
- 150. By Tom Beckmann
-
add support for the new indicator files
Preview Diff
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2014-01-24 17:27:31 +0000 | |||
3 | +++ CMakeLists.txt 2014-03-25 04:00:57 +0000 | |||
4 | @@ -1,6 +1,6 @@ | |||
5 | 1 | # Check http://webdev.elementaryos.org/docs/developer-guide/cmake for documentation | 1 | # Check http://webdev.elementaryos.org/docs/developer-guide/cmake for documentation |
6 | 2 | 2 | ||
8 | 3 | project (wingpanel) | 3 | project (wingpanel C) |
9 | 4 | cmake_minimum_required (VERSION 2.8) | 4 | cmake_minimum_required (VERSION 2.8) |
10 | 5 | cmake_policy (VERSION 2.8) | 5 | cmake_policy (VERSION 2.8) |
11 | 6 | 6 | ||
12 | @@ -33,8 +33,29 @@ | |||
13 | 33 | add_custom_target (dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) | 33 | add_custom_target (dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) |
14 | 34 | 34 | ||
15 | 35 | # Set dependencies | 35 | # Set dependencies |
16 | 36 | <<<<<<< TREE | ||
17 | 36 | set (WINGPANEL_DEPS "gobject-2.0;glib-2.0;gio-2.0;gee-0.8;gdk-x11-3.0;x11;gtk+-3.0;granite") | 37 | set (WINGPANEL_DEPS "gobject-2.0;glib-2.0;gio-2.0;gee-0.8;gdk-x11-3.0;x11;gtk+-3.0;granite") |
18 | 37 | set (WINGPANEL_DEPS_NOVALA "gthread-2.0;indicator3-0.4") | 38 | set (WINGPANEL_DEPS_NOVALA "gthread-2.0;indicator3-0.4") |
19 | 39 | ======= | ||
20 | 40 | set (WINGPANEL_DEPS | ||
21 | 41 | gobject-2.0 | ||
22 | 42 | glib-2.0 | ||
23 | 43 | gio-2.0 | ||
24 | 44 | gee-0.8 | ||
25 | 45 | gdk-x11-3.0 | ||
26 | 46 | x11 | ||
27 | 47 | gtk+-3.0 | ||
28 | 48 | granite | ||
29 | 49 | indicator3-0.4 | ||
30 | 50 | libido3-0.1 | ||
31 | 51 | libwnck-3.0 | ||
32 | 52 | ) | ||
33 | 53 | |||
34 | 54 | set (WINGPANEL_DEPS_NOVALA | ||
35 | 55 | gthread-2.0 | ||
36 | 56 | ) | ||
37 | 57 | |||
38 | 58 | >>>>>>> MERGE-SOURCE | ||
39 | 38 | find_package (PkgConfig) | 59 | find_package (PkgConfig) |
40 | 39 | pkg_check_modules (DEPS REQUIRED ${WINGPANEL_DEPS}) | 60 | pkg_check_modules (DEPS REQUIRED ${WINGPANEL_DEPS}) |
41 | 40 | pkg_check_modules (DEPS_NOVALA REQUIRED ${WINGPANEL_DEPS_NOVALA}) | 61 | pkg_check_modules (DEPS_NOVALA REQUIRED ${WINGPANEL_DEPS_NOVALA}) |
42 | @@ -57,6 +78,8 @@ | |||
43 | 57 | link_libraries(${DEPS_LIBRARIES} ${DEPS_NOVALA_LIBRARIES}) | 78 | link_libraries(${DEPS_LIBRARIES} ${DEPS_NOVALA_LIBRARIES}) |
44 | 58 | link_directories(${DEPS_LIBRARY_DIRS} ${DEPS_NOVALA_DIRS}) | 79 | link_directories(${DEPS_LIBRARY_DIRS} ${DEPS_NOVALA_DIRS}) |
45 | 59 | 80 | ||
46 | 81 | add_definitions (-DWNCK_I_KNOW_THIS_IS_UNSTABLE) | ||
47 | 82 | |||
48 | 60 | # Handle Vala Compilation | 83 | # Handle Vala Compilation |
49 | 61 | find_package(Vala REQUIRED) | 84 | find_package(Vala REQUIRED) |
50 | 62 | include(ValaVersion) | 85 | include(ValaVersion) |
51 | @@ -69,7 +92,6 @@ | |||
52 | 69 | src/IndicatorIface.vala | 92 | src/IndicatorIface.vala |
53 | 70 | src/IndicatorLoader.vala | 93 | src/IndicatorLoader.vala |
54 | 71 | 94 | ||
55 | 72 | src/Indicator/IndicatorFileModel.vala | ||
56 | 73 | src/Indicator/IndicatorObjectEntry.vala | 95 | src/Indicator/IndicatorObjectEntry.vala |
57 | 74 | src/Indicator/IndicatorObject.vala | 96 | src/Indicator/IndicatorObject.vala |
58 | 75 | src/Indicator/IndicatorFactory.vala | 97 | src/Indicator/IndicatorFactory.vala |
59 | @@ -87,14 +109,19 @@ | |||
60 | 87 | src/Services/AppLauncherService.vala | 109 | src/Services/AppLauncherService.vala |
61 | 88 | src/Services/LauncherRunner.vala | 110 | src/Services/LauncherRunner.vala |
62 | 89 | src/Services/IndicatorSorter.vala | 111 | src/Services/IndicatorSorter.vala |
63 | 112 | src/Services/BackgroundManager.vala | ||
64 | 90 | PACKAGES | 113 | PACKAGES |
65 | 91 | ${WINGPANEL_DEPS} | 114 | ${WINGPANEL_DEPS} |
66 | 92 | CUSTOM_VAPIS | 115 | CUSTOM_VAPIS |
67 | 93 | vapi/config.vapi | 116 | vapi/config.vapi |
68 | 94 | vapi/indicator-0.4.vapi | ||
69 | 95 | OPTIONS | 117 | OPTIONS |
70 | 118 | -g | ||
71 | 96 | --thread | 119 | --thread |
72 | 120 | <<<<<<< TREE | ||
73 | 97 | -g | 121 | -g |
74 | 122 | ======= | ||
75 | 123 | --vapidir=${CMAKE_CURRENT_SOURCE_DIR}/vapi/ | ||
76 | 124 | >>>>>>> MERGE-SOURCE | ||
77 | 98 | ) | 125 | ) |
78 | 99 | 126 | ||
79 | 100 | # Settings Schema | 127 | # Settings Schema |
80 | @@ -106,6 +133,7 @@ | |||
81 | 106 | 133 | ||
82 | 107 | # Create the Executable | 134 | # Create the Executable |
83 | 108 | add_executable(${EXEC_NAME} ${VALA_C}) | 135 | add_executable(${EXEC_NAME} ${VALA_C}) |
84 | 136 | target_link_libraries(${EXEC_NAME} m) | ||
85 | 109 | 137 | ||
86 | 110 | # Installation | 138 | # Installation |
87 | 111 | install (TARGETS ${EXEC_NAME} RUNTIME DESTINATION bin) | 139 | install (TARGETS ${EXEC_NAME} RUNTIME DESTINATION bin) |
88 | 112 | 140 | ||
89 | === modified file 'org.pantheon.desktop.wingpanel.gschema.xml' | |||
90 | --- org.pantheon.desktop.wingpanel.gschema.xml 2012-07-08 03:02:36 +0000 | |||
91 | +++ org.pantheon.desktop.wingpanel.gschema.xml 2014-03-25 04:00:57 +0000 | |||
92 | @@ -13,7 +13,17 @@ | |||
93 | 13 | <key type="s" name="default-launcher"> | 13 | <key type="s" name="default-launcher"> |
94 | 14 | <default>"slingshot-launcher"</default> | 14 | <default>"slingshot-launcher"</default> |
95 | 15 | <summary>The default program to use as App launcher.</summary> | 15 | <summary>The default program to use as App launcher.</summary> |
97 | 16 | <description>Description</description> | 16 | <description>The default program to use as App launcher.</description> |
98 | 17 | </key> | ||
99 | 18 | <key type="d" name="background-alpha"> | ||
100 | 19 | <default>0.8</default> | ||
101 | 20 | <summary>Background opacity variable.</summary> | ||
102 | 21 | <description>Background opacity variable (must be between zero and one).</description> | ||
103 | 22 | </key> | ||
104 | 23 | <key type="b" name="auto-adjust-alpha"> | ||
105 | 24 | <default>true</default> | ||
106 | 25 | <summary>Automatically update background alpha.</summary> | ||
107 | 26 | <description>Automatically update the background alpha to zero if it will be readable, else 0.8.</description> | ||
108 | 17 | </key> | 27 | </key> |
109 | 18 | </schema> | 28 | </schema> |
110 | 19 | </schemalist> | 29 | </schemalist> |
111 | 20 | 30 | ||
112 | === modified file 'src/Indicator/IndicatorFactory.vala' | |||
113 | --- src/Indicator/IndicatorFactory.vala 2013-04-14 17:37:10 +0000 | |||
114 | +++ src/Indicator/IndicatorFactory.vala 2014-03-25 04:00:57 +0000 | |||
115 | @@ -1,45 +1,101 @@ | |||
116 | 1 | // -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | // -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- |
118 | 2 | // | 2 | // |
119 | 3 | // Copyright (C) 2013 Wingpanel Developers | 3 | // Copyright (C) 2013 Wingpanel Developers |
121 | 4 | // | 4 | // |
122 | 5 | // This program is free software: you can redistribute it and/or modify | 5 | // This program is free software: you can redistribute it and/or modify |
123 | 6 | // it under the terms of the GNU General Public License as published by | 6 | // it under the terms of the GNU General Public License as published by |
124 | 7 | // the Free Software Foundation, either version 3 of the License, or | 7 | // the Free Software Foundation, either version 3 of the License, or |
125 | 8 | // (at your option) any later version. | 8 | // (at your option) any later version. |
127 | 9 | // | 9 | // |
128 | 10 | // This program is distributed in the hope that it will be useful, | 10 | // This program is distributed in the hope that it will be useful, |
129 | 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
130 | 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
131 | 13 | // GNU General Public License for more details. | 13 | // GNU General Public License for more details. |
133 | 14 | // | 14 | // |
134 | 15 | // You should have received a copy of the GNU General Public License | 15 | // You should have received a copy of the GNU General Public License |
135 | 16 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
136 | 17 | 17 | ||
137 | 18 | public class Wingpanel.Backend.IndicatorFactory : Object, IndicatorLoader { | 18 | public class Wingpanel.Backend.IndicatorFactory : Object, IndicatorLoader { |
138 | 19 | private IndicatorFileModel model; | ||
139 | 20 | private Gee.Collection<IndicatorIface> indicators; | 19 | private Gee.Collection<IndicatorIface> indicators; |
141 | 21 | private bool initted = false; | 20 | private string[] settings_blacklist; |
142 | 22 | 21 | ||
145 | 23 | public IndicatorFactory (Services.Settings settings) { | 22 | public IndicatorFactory (string[] settings_blacklist) { |
146 | 24 | model = new IndicatorFileModel (settings); | 23 | this.settings_blacklist = settings_blacklist; |
147 | 25 | } | 24 | } |
148 | 26 | 25 | ||
149 | 27 | public Gee.Collection<IndicatorIface> get_indicators () { | 26 | public Gee.Collection<IndicatorIface> get_indicators () { |
151 | 28 | if (!initted) { | 27 | if (indicators == null) { |
152 | 28 | indicators = new Gee.LinkedList<IndicatorIface> (); | ||
153 | 29 | load_indicators (); | 29 | load_indicators (); |
154 | 30 | initted = true; | ||
155 | 31 | } | 30 | } |
156 | 32 | 31 | ||
157 | 33 | return indicators.read_only_view; | 32 | return indicators.read_only_view; |
158 | 34 | } | 33 | } |
159 | 35 | 34 | ||
160 | 36 | private void load_indicators () { | 35 | private void load_indicators () { |
167 | 37 | indicators = new Gee.LinkedList<IndicatorIface> (); | 36 | // Fetch list of indicators that should not be loaded |
168 | 38 | var indicators_list = model.get_indicators (); | 37 | string skip_list = Environment.get_variable ("UNITY_PANEL_INDICATORS_SKIP") ?? ""; |
169 | 39 | 38 | ||
170 | 40 | foreach (var indicator in indicators_list) { | 39 | if (skip_list == "all") { |
171 | 41 | string name = model.get_indicator_name (indicator); | 40 | warning ("Skipping all indicator loading"); |
172 | 42 | indicators.add (new IndicatorObject (indicator, name)); | 41 | return; |
173 | 42 | } | ||
174 | 43 | |||
175 | 44 | foreach (string blocked_indicator in settings_blacklist) | ||
176 | 45 | skip_list += "," + blocked_indicator; | ||
177 | 46 | |||
178 | 47 | debug ("Blacklisted Indicators: %s", skip_list); | ||
179 | 48 | |||
180 | 49 | // Legacy indicator libraries | ||
181 | 50 | load_indicators_from_dir (Build.INDICATORDIR, true, skip_list); | ||
182 | 51 | |||
183 | 52 | // Ng indicators | ||
184 | 53 | load_indicators_from_dir ("/usr/share/unity/indicators", false, skip_list); | ||
185 | 54 | } | ||
186 | 55 | |||
187 | 56 | private void load_indicators_from_dir (string dir_path, bool legacy_libs_only, string skip_list) { | ||
188 | 57 | try { | ||
189 | 58 | var dir = File.new_for_path (dir_path); | ||
190 | 59 | var enumerator = dir.enumerate_children (FileAttribute.STANDARD_NAME, | ||
191 | 60 | FileQueryInfoFlags.NONE, null); | ||
192 | 61 | FileInfo file_info; | ||
193 | 62 | |||
194 | 63 | while ((file_info = enumerator.next_file (null)) != null) { | ||
195 | 64 | string name = file_info.get_name (); | ||
196 | 65 | |||
197 | 66 | if (name in skip_list) | ||
198 | 67 | continue; | ||
199 | 68 | |||
200 | 69 | load_indicator (dir, legacy_libs_only, name); | ||
201 | 70 | } | ||
202 | 71 | } catch (Error err) { | ||
203 | 72 | warning ("Unable to read indicators: %s", err.message); | ||
204 | 73 | } | ||
205 | 74 | } | ||
206 | 75 | |||
207 | 76 | private void load_indicator (File parent_dir, bool legacy_lib, string name) { | ||
208 | 77 | string indicator_path = parent_dir.get_child (name).get_path (); | ||
209 | 78 | |||
210 | 79 | try { | ||
211 | 80 | Indicator.Object indicator = null; | ||
212 | 81 | |||
213 | 82 | if (legacy_lib) { | ||
214 | 83 | if (!name.has_suffix (".so")) | ||
215 | 84 | return; | ||
216 | 85 | |||
217 | 86 | debug ("Loading Indicator Library: %s", name); | ||
218 | 87 | indicator = new Indicator.Object.from_file (indicator_path); | ||
219 | 88 | } else { | ||
220 | 89 | debug ("Loading Indicator File: %s", name); | ||
221 | 90 | indicator = new Indicator.Ng.for_profile (indicator_path, "desktop"); | ||
222 | 91 | } | ||
223 | 92 | |||
224 | 93 | if (indicator != null) | ||
225 | 94 | indicators.add (new IndicatorObject (indicator, name)); | ||
226 | 95 | else | ||
227 | 96 | critical ("Unable to load %s: invalid object.", name); | ||
228 | 97 | } catch (Error err) { | ||
229 | 98 | warning ("Could not load indicator at %s: %s", indicator_path, err.message); | ||
230 | 43 | } | 99 | } |
231 | 44 | } | 100 | } |
232 | 45 | } | 101 | } |
233 | 46 | 102 | ||
234 | === removed file 'src/Indicator/IndicatorFileModel.vala' | |||
235 | --- src/Indicator/IndicatorFileModel.vala 2013-04-14 17:31:20 +0000 | |||
236 | +++ src/Indicator/IndicatorFileModel.vala 1970-01-01 00:00:00 +0000 | |||
237 | @@ -1,94 +0,0 @@ | |||
238 | 1 | // -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- | ||
239 | 2 | /*** | ||
240 | 3 | BEGIN LICENSE | ||
241 | 4 | |||
242 | 5 | Copyright (C) 2010-2012 Canonical Ltd | ||
243 | 6 | This program is free software: you can redistribute it and/or modify it | ||
244 | 7 | under the terms of the GNU Lesser General Public License version 3, as published | ||
245 | 8 | by the Free Software Foundation. | ||
246 | 9 | |||
247 | 10 | This program is distributed in the hope that it will be useful, but | ||
248 | 11 | WITHOUT ANY WARRANTY; without even the implied warranties of | ||
249 | 12 | MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
250 | 13 | PURPOSE. See the GNU General Public License for more details. | ||
251 | 14 | |||
252 | 15 | You should have received a copy of the GNU General Public License along | ||
253 | 16 | with this program. If not, see <http://www.gnu.org/licenses/> | ||
254 | 17 | |||
255 | 18 | END LICENSE | ||
256 | 19 | |||
257 | 20 | Authored by canonical.com | ||
258 | 21 | ***/ | ||
259 | 22 | |||
260 | 23 | namespace Wingpanel.Backend { | ||
261 | 24 | |||
262 | 25 | public class IndicatorFileModel { | ||
263 | 26 | private Gee.HashMap<Indicator.Object, string> indicator_map; | ||
264 | 27 | |||
265 | 28 | public IndicatorFileModel (Services.Settings settings) { | ||
266 | 29 | indicator_map = new Gee.HashMap<Indicator.Object, string> (); | ||
267 | 30 | |||
268 | 31 | // Indicators we don't want to load | ||
269 | 32 | string skip_list = Environment.get_variable ("UNITY_PANEL_INDICATORS_SKIP") ?? ""; | ||
270 | 33 | |||
271 | 34 | if (skip_list == "all") { | ||
272 | 35 | warning ("Skipping all indicator loading"); | ||
273 | 36 | return; | ||
274 | 37 | } | ||
275 | 38 | |||
276 | 39 | foreach (string blocked_indicator in settings.blacklist) { | ||
277 | 40 | skip_list += "," + blocked_indicator; | ||
278 | 41 | debug ("Blacklisting %s", blocked_indicator); | ||
279 | 42 | } | ||
280 | 43 | |||
281 | 44 | debug ("Blacklisted Indicators: %s", skip_list); | ||
282 | 45 | |||
283 | 46 | var indicators_to_load = new Gee.ArrayList<string> (); | ||
284 | 47 | var dir = File.new_for_path (Build.INDICATORDIR); | ||
285 | 48 | debug ("Indicator Directory: %s", dir.get_path ()); | ||
286 | 49 | |||
287 | 50 | try { | ||
288 | 51 | var enumerator = dir.enumerate_children (FileAttribute.STANDARD_NAME, | ||
289 | 52 | FileQueryInfoFlags.NONE, null); | ||
290 | 53 | |||
291 | 54 | FileInfo file_info; | ||
292 | 55 | |||
293 | 56 | while ((file_info = enumerator.next_file (null)) != null) { | ||
294 | 57 | string leaf = file_info.get_name (); | ||
295 | 58 | |||
296 | 59 | if (leaf in skip_list) { | ||
297 | 60 | warning ("SKIP LOADING: %s", leaf); | ||
298 | 61 | continue; | ||
299 | 62 | } | ||
300 | 63 | |||
301 | 64 | if (leaf.has_suffix (".so")) | ||
302 | 65 | indicators_to_load.add (leaf); | ||
303 | 66 | } | ||
304 | 67 | } catch (Error err) { | ||
305 | 68 | error ("Unable to read indicators: %s", err.message); | ||
306 | 69 | } | ||
307 | 70 | |||
308 | 71 | foreach (string leaf in indicators_to_load) | ||
309 | 72 | load_indicator (dir.get_child (leaf).get_path (), leaf); | ||
310 | 73 | } | ||
311 | 74 | |||
312 | 75 | public Gee.Collection<Indicator.Object> get_indicators () { | ||
313 | 76 | return indicator_map.keys; | ||
314 | 77 | } | ||
315 | 78 | |||
316 | 79 | public string get_indicator_name (Indicator.Object indicator) { | ||
317 | 80 | return indicator_map.get (indicator); | ||
318 | 81 | } | ||
319 | 82 | |||
320 | 83 | private void load_indicator (string filename, string leaf) { | ||
321 | 84 | debug ("LOADING: %s", leaf); | ||
322 | 85 | |||
323 | 86 | var indicator = new Indicator.Object.from_file (filename); | ||
324 | 87 | |||
325 | 88 | if (indicator is Indicator.Object) | ||
326 | 89 | indicator_map.set (indicator, leaf); | ||
327 | 90 | else | ||
328 | 91 | critical ("Unable to load %s", filename); | ||
329 | 92 | } | ||
330 | 93 | } | ||
331 | 94 | } | ||
332 | 95 | 0 | ||
333 | === modified file 'src/Indicator/IndicatorObject.vala' | |||
334 | --- src/Indicator/IndicatorObject.vala 2013-04-14 17:39:47 +0000 | |||
335 | +++ src/Indicator/IndicatorObject.vala 2014-03-25 04:00:57 +0000 | |||
336 | @@ -1,17 +1,17 @@ | |||
337 | 1 | // -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | // -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- |
339 | 2 | // | 2 | // |
340 | 3 | // Copyright (C) 2013 Wingpanel Developers | 3 | // Copyright (C) 2013 Wingpanel Developers |
342 | 4 | // | 4 | // |
343 | 5 | // This program is free software: you can redistribute it and/or modify | 5 | // This program is free software: you can redistribute it and/or modify |
344 | 6 | // it under the terms of the GNU General Public License as published by | 6 | // it under the terms of the GNU General Public License as published by |
345 | 7 | // the Free Software Foundation, either version 3 of the License, or | 7 | // the Free Software Foundation, either version 3 of the License, or |
346 | 8 | // (at your option) any later version. | 8 | // (at your option) any later version. |
348 | 9 | // | 9 | // |
349 | 10 | // This program is distributed in the hope that it will be useful, | 10 | // This program is distributed in the hope that it will be useful, |
350 | 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
351 | 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
352 | 13 | // GNU General Public License for more details. | 13 | // GNU General Public License for more details. |
354 | 14 | // | 14 | // |
355 | 15 | // You should have received a copy of the GNU General Public License | 15 | // You should have received a copy of the GNU General Public License |
356 | 16 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
357 | 17 | 17 | ||
358 | @@ -63,14 +63,14 @@ | |||
359 | 63 | 63 | ||
360 | 64 | private void on_entry_removed (Indicator.Object object, Indicator.ObjectEntry entry) { | 64 | private void on_entry_removed (Indicator.Object object, Indicator.ObjectEntry entry) { |
361 | 65 | assert (this.object == object); | 65 | assert (this.object == object); |
363 | 66 | 66 | ||
364 | 67 | var entry_widget = entries.get (entry); | 67 | var entry_widget = entries.get (entry); |
365 | 68 | entries.unset (entry); | 68 | entries.unset (entry); |
367 | 69 | 69 | ||
368 | 70 | entry_removed (entry_widget); | 70 | entry_removed (entry_widget); |
369 | 71 | } | 71 | } |
370 | 72 | 72 | ||
371 | 73 | private IndicatorWidget create_entry (Indicator.ObjectEntry entry) { | 73 | private IndicatorWidget create_entry (Indicator.ObjectEntry entry) { |
373 | 74 | return new IndicatorObjectEntry (entry, this); | 74 | return new IndicatorObjectEntry (entry, object, this); |
374 | 75 | } | 75 | } |
375 | 76 | } | 76 | } |
376 | 77 | 77 | ||
377 | === modified file 'src/Indicator/IndicatorObjectEntry.vala' | |||
378 | --- src/Indicator/IndicatorObjectEntry.vala 2013-08-25 14:47:58 +0000 | |||
379 | +++ src/Indicator/IndicatorObjectEntry.vala 2014-03-25 04:00:57 +0000 | |||
380 | @@ -18,10 +18,11 @@ | |||
381 | 18 | END LICENSE | 18 | END LICENSE |
382 | 19 | ***/ | 19 | ***/ |
383 | 20 | 20 | ||
386 | 21 | namespace Wingpanel.Backend | 21 | namespace Wingpanel.Backend { |
387 | 22 | { | 22 | |
388 | 23 | public class IndicatorObjectEntry: Widgets.IndicatorButton, IndicatorWidget { | 23 | public class IndicatorObjectEntry: Widgets.IndicatorButton, IndicatorWidget { |
389 | 24 | private unowned Indicator.ObjectEntry entry; | 24 | private unowned Indicator.ObjectEntry entry; |
390 | 25 | private unowned Indicator.Object parent_object; | ||
391 | 25 | private IndicatorIface indicator; | 26 | private IndicatorIface indicator; |
392 | 26 | 27 | ||
393 | 27 | // used for drawing | 28 | // used for drawing |
394 | @@ -37,17 +38,18 @@ | |||
395 | 37 | .menu { | 38 | .menu { |
396 | 38 | background-color:@transparent; | 39 | background-color:@transparent; |
397 | 39 | border-color:@transparent; | 40 | border-color:@transparent; |
398 | 40 | -unico-inner-stroke-width: 0; | ||
399 | 41 | background-image:none; | 41 | background-image:none; |
400 | 42 | border-width:0; | ||
401 | 42 | } | 43 | } |
402 | 43 | .popover_bg { | 44 | .popover_bg { |
403 | 44 | background-color:#fff; | 45 | background-color:#fff; |
404 | 45 | } | 46 | } |
405 | 46 | """; | 47 | """; |
406 | 47 | 48 | ||
408 | 48 | public IndicatorObjectEntry (Indicator.ObjectEntry entry, IndicatorIface indicator) { | 49 | public IndicatorObjectEntry (Indicator.ObjectEntry entry, Indicator.Object obj, IndicatorIface indicator) { |
409 | 49 | this.entry = entry; | 50 | this.entry = entry; |
410 | 50 | this.indicator = indicator; | 51 | this.indicator = indicator; |
411 | 52 | parent_object = obj; | ||
412 | 51 | 53 | ||
413 | 52 | var image = entry.image; | 54 | var image = entry.image; |
414 | 53 | if (image != null && image is Gtk.Image) | 55 | if (image != null && image is Gtk.Image) |
415 | @@ -218,32 +220,7 @@ | |||
416 | 218 | } | 220 | } |
417 | 219 | 221 | ||
418 | 220 | public override bool scroll_event (Gdk.EventScroll event) { | 222 | public override bool scroll_event (Gdk.EventScroll event) { |
445 | 221 | var direction = Indicator.ScrollDirection.UP; | 223 | parent_object.entry_scrolled (entry, 1, (Indicator.ScrollDirection) event.direction); |
420 | 222 | double delta = 0; | ||
421 | 223 | |||
422 | 224 | switch (event.direction) { | ||
423 | 225 | case Gdk.ScrollDirection.UP: | ||
424 | 226 | delta = event.delta_y; | ||
425 | 227 | direction = Indicator.ScrollDirection.UP; | ||
426 | 228 | break; | ||
427 | 229 | case Gdk.ScrollDirection.DOWN: | ||
428 | 230 | delta = event.delta_y; | ||
429 | 231 | direction = Indicator.ScrollDirection.DOWN; | ||
430 | 232 | break; | ||
431 | 233 | case Gdk.ScrollDirection.LEFT: | ||
432 | 234 | delta = event.delta_x; | ||
433 | 235 | direction = Indicator.ScrollDirection.LEFT; | ||
434 | 236 | break; | ||
435 | 237 | case Gdk.ScrollDirection.RIGHT: | ||
436 | 238 | delta = event.delta_x; | ||
437 | 239 | direction = Indicator.ScrollDirection.RIGHT; | ||
438 | 240 | break; | ||
439 | 241 | default: | ||
440 | 242 | break; | ||
441 | 243 | } | ||
442 | 244 | |||
443 | 245 | entry.parent_object.entry_scrolled (entry, (uint) delta, direction); | ||
444 | 246 | |||
446 | 247 | return false; | 224 | return false; |
447 | 248 | } | 225 | } |
448 | 249 | } | 226 | } |
449 | 250 | 227 | ||
450 | === added file 'src/Services/BackgroundManager.vala' | |||
451 | --- src/Services/BackgroundManager.vala 1970-01-01 00:00:00 +0000 | |||
452 | +++ src/Services/BackgroundManager.vala 2014-03-25 04:00:57 +0000 | |||
453 | @@ -0,0 +1,110 @@ | |||
454 | 1 | // -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- | ||
455 | 2 | // | ||
456 | 3 | // Copyright (C) 2014 Wingpanel Developers | ||
457 | 4 | // | ||
458 | 5 | // This program is free software: you can redistribute it and/or modify | ||
459 | 6 | // it under the terms of the GNU General Public License as published by | ||
460 | 7 | // the Free Software Foundation, either version 3 of the License, or | ||
461 | 8 | // (at your option) any later version. | ||
462 | 9 | // | ||
463 | 10 | // This program is distributed in the hope that it will be useful, | ||
464 | 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
465 | 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
466 | 13 | // GNU General Public License for more details. | ||
467 | 14 | // | ||
468 | 15 | // You should have received a copy of the GNU General Public License | ||
469 | 16 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
470 | 17 | |||
471 | 18 | namespace Wingpanel.Services { | ||
472 | 19 | struct ColorInformation { | ||
473 | 20 | double average_red; | ||
474 | 21 | double average_green; | ||
475 | 22 | double average_blue; | ||
476 | 23 | double mean; | ||
477 | 24 | double variance; | ||
478 | 25 | } | ||
479 | 26 | |||
480 | 27 | [DBus (name = "org.pantheon.gala")] | ||
481 | 28 | interface GalaDBus : Object { | ||
482 | 29 | public signal void background_changed (); | ||
483 | 30 | public async abstract ColorInformation get_background_color_information (int monitor, | ||
484 | 31 | int x, int y, int width, int height) throws IOError; | ||
485 | 32 | } | ||
486 | 33 | |||
487 | 34 | public class BackgroundManager : Object { | ||
488 | 35 | public static const double MIN_ALPHA = 0.3; | ||
489 | 36 | |||
490 | 37 | private const int HEIGHT = 50; | ||
491 | 38 | private const double MIN_VARIANCE = 50; | ||
492 | 39 | private const double MIN_LUM = 25; | ||
493 | 40 | |||
494 | 41 | /** | ||
495 | 42 | * Emitted when the background changed. It supplies the alpha value that | ||
496 | 43 | * can be used with this wallpaper while maintining legibility | ||
497 | 44 | */ | ||
498 | 45 | public signal void update_background_alpha (double legible_alpha_value); | ||
499 | 46 | |||
500 | 47 | private Services.Settings settings; | ||
501 | 48 | private Gdk.Screen screen; | ||
502 | 49 | private GalaDBus gala_dbus; | ||
503 | 50 | |||
504 | 51 | public BackgroundManager (Services.Settings settings, Gdk.Screen screen) { | ||
505 | 52 | this.settings = settings; | ||
506 | 53 | this.screen = screen; | ||
507 | 54 | establish_connection (); | ||
508 | 55 | } | ||
509 | 56 | |||
510 | 57 | private void establish_connection () { | ||
511 | 58 | try { | ||
512 | 59 | gala_dbus = Bus.get_proxy_sync (BusType.SESSION, | ||
513 | 60 | "org.pantheon.gala", | ||
514 | 61 | "/org/pantheon/gala"); | ||
515 | 62 | gala_dbus.background_changed.connect (on_background_change); | ||
516 | 63 | on_background_change (); | ||
517 | 64 | } catch (Error e) { | ||
518 | 65 | gala_dbus = null; | ||
519 | 66 | warning ("Auto-adjustment of background opacity not available, " + | ||
520 | 67 | "connecting to gala dbus failed: %s", e.message); | ||
521 | 68 | return; | ||
522 | 69 | } | ||
523 | 70 | } | ||
524 | 71 | |||
525 | 72 | private void on_background_change () { | ||
526 | 73 | if (!settings.auto_adjust_alpha) | ||
527 | 74 | return; | ||
528 | 75 | |||
529 | 76 | calculate_alpha.begin ((obj, res) => { | ||
530 | 77 | var alpha = calculate_alpha.end (res); | ||
531 | 78 | update_background_alpha (alpha); | ||
532 | 79 | }); | ||
533 | 80 | } | ||
534 | 81 | |||
535 | 82 | private async double calculate_alpha () { | ||
536 | 83 | double alpha = 0; | ||
537 | 84 | Gdk.Rectangle monitor_geometry; | ||
538 | 85 | ColorInformation? color_info = null; | ||
539 | 86 | |||
540 | 87 | var primary = screen.get_primary_monitor (); | ||
541 | 88 | screen.get_monitor_geometry (primary, out monitor_geometry); | ||
542 | 89 | |||
543 | 90 | try { | ||
544 | 91 | color_info = yield gala_dbus.get_background_color_information ( | ||
545 | 92 | primary, // monitor index | ||
546 | 93 | 0, // x of reference rect | ||
547 | 94 | 0, // y of rect | ||
548 | 95 | monitor_geometry.width, // width of rect | ||
549 | 96 | HEIGHT); // height of rect | ||
550 | 97 | } catch (Error e) { | ||
551 | 98 | warning (e.message); | ||
552 | 99 | alpha = MIN_ALPHA; | ||
553 | 100 | } | ||
554 | 101 | |||
555 | 102 | if (color_info != null | ||
556 | 103 | && (color_info.mean > MIN_LUM | ||
557 | 104 | || color_info.variance > MIN_VARIANCE)) | ||
558 | 105 | alpha = MIN_ALPHA; | ||
559 | 106 | |||
560 | 107 | return alpha; | ||
561 | 108 | } | ||
562 | 109 | } | ||
563 | 110 | } | ||
564 | 0 | 111 | ||
565 | === modified file 'src/Services/IndicatorSorter.vala' | |||
566 | --- src/Services/IndicatorSorter.vala 2013-04-14 10:19:10 +0000 | |||
567 | +++ src/Services/IndicatorSorter.vala 2014-03-25 04:00:57 +0000 | |||
568 | @@ -23,6 +23,7 @@ | |||
569 | 23 | * be passed as CompareFuncs. | 23 | * be passed as CompareFuncs. |
570 | 24 | */ | 24 | */ |
571 | 25 | public class Wingpanel.Services.IndicatorSorter { | 25 | public class Wingpanel.Services.IndicatorSorter { |
572 | 26 | |||
573 | 26 | private struct IndicatorOrderNode { | 27 | private struct IndicatorOrderNode { |
574 | 27 | public string name; // name of indicator (library) | 28 | public string name; // name of indicator (library) |
575 | 28 | public string? entry_name; // name of entry (menu item) | 29 | public string? entry_name; // name of entry (menu item) |
576 | @@ -32,19 +33,25 @@ | |||
577 | 32 | { "libapplication.so", null }, // indicator-application (App indicators) | 33 | { "libapplication.so", null }, // indicator-application (App indicators) |
578 | 33 | { "libapplication.so", "keyboard" }, // Keyboard layout selector (old) | 34 | { "libapplication.so", "keyboard" }, // Keyboard layout selector (old) |
579 | 34 | { "libapplication.so", "gsd-keyboard-xkb" }, // keyboard layout selector | 35 | { "libapplication.so", "gsd-keyboard-xkb" }, // keyboard layout selector |
580 | 36 | { "com.canonical.indicator.keyboard", null }, | ||
581 | 35 | { "libsoundmenu.so", null }, // indicator-sound | 37 | { "libsoundmenu.so", null }, // indicator-sound |
582 | 38 | { "com.canonical.indicator.sound", null }, | ||
583 | 36 | { "libnetwork.so", null }, // indicator-network | 39 | { "libnetwork.so", null }, // indicator-network |
584 | 37 | { "libnetworkmenu.so", null }, // indicator-network | 40 | { "libnetworkmenu.so", null }, // indicator-network |
585 | 38 | { "libapplication.so", "nm-applet" }, // network manager | 41 | { "libapplication.so", "nm-applet" }, // network manager |
586 | 39 | { "libbluetooth.so", null }, // indicator-bluetooth | 42 | { "libbluetooth.so", null }, // indicator-bluetooth |
587 | 40 | { "libapplication.so", "bluetooth-manager" }, // indicator-gnome-bluetooth (old) | 43 | { "libapplication.so", "bluetooth-manager" }, // indicator-gnome-bluetooth (old) |
588 | 44 | { "com.canonical.indicator.bluetooth", null }, | ||
589 | 41 | { "libprintersmenu.so", null }, // indicator-printers | 45 | { "libprintersmenu.so", null }, // indicator-printers |
590 | 42 | { "libsyncindicator.so", null }, // indicator-sync | 46 | { "libsyncindicator.so", null }, // indicator-sync |
591 | 43 | { "libpower.so", null }, // indicator-power | 47 | { "libpower.so", null }, // indicator-power |
592 | 48 | { "com.canonical.indicator.power", null }, | ||
593 | 44 | { "libmessaging.so", null }, // indicator-messages | 49 | { "libmessaging.so", null }, // indicator-messages |
594 | 50 | { "com.canonical.indicator.messages", null }, | ||
595 | 45 | { "libsession.so", null }, // indicator-session | 51 | { "libsession.so", null }, // indicator-session |
596 | 46 | { "libsession.so", "indicator-session-users" }, // indicator-session | 52 | { "libsession.so", "indicator-session-users" }, // indicator-session |
598 | 47 | { "libsession.so", "indicator-session-devices" } // indicator-session | 53 | { "libsession.so", "indicator-session-devices" },// indicator-session |
599 | 54 | { "com.canonical.indicator.session", null } | ||
600 | 48 | }; | 55 | }; |
601 | 49 | 56 | ||
602 | 50 | public static int compare_func (IndicatorWidget? a, IndicatorWidget? b) { | 57 | public static int compare_func (IndicatorWidget? a, IndicatorWidget? b) { |
603 | 51 | 58 | ||
604 | === modified file 'src/Services/Settings.vala' | |||
605 | --- src/Services/Settings.vala 2013-04-14 07:54:25 +0000 | |||
606 | +++ src/Services/Settings.vala 2014-03-25 04:00:57 +0000 | |||
607 | @@ -23,6 +23,8 @@ | |||
608 | 23 | public string[] blacklist { get; set; } | 23 | public string[] blacklist { get; set; } |
609 | 24 | public bool show_launcher { get; set; } | 24 | public bool show_launcher { get; set; } |
610 | 25 | public string default_launcher { get; set; } | 25 | public string default_launcher { get; set; } |
611 | 26 | public double background_alpha { get; set; } | ||
612 | 27 | public bool auto_adjust_alpha { get; set; } | ||
613 | 26 | 28 | ||
614 | 27 | public Settings () { | 29 | public Settings () { |
615 | 28 | base ("org.pantheon.desktop.wingpanel"); | 30 | base ("org.pantheon.desktop.wingpanel"); |
616 | 29 | 31 | ||
617 | === modified file 'src/Widgets/BasePanel.vala' | |||
618 | --- src/Widgets/BasePanel.vala 2013-08-07 10:18:24 +0000 | |||
619 | +++ src/Widgets/BasePanel.vala 2014-03-25 04:00:57 +0000 | |||
620 | @@ -1,17 +1,17 @@ | |||
621 | 1 | // -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | // -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- |
625 | 2 | // | 2 | // |
626 | 3 | // Copyright (C) 2011-2013 Wingpanel Developers | 3 | // Copyright (C) 2011-2014 Wingpanel Developers |
627 | 4 | // | 4 | // |
628 | 5 | // This program is free software: you can redistribute it and/or modify | 5 | // This program is free software: you can redistribute it and/or modify |
629 | 6 | // it under the terms of the GNU General Public License as published by | 6 | // it under the terms of the GNU General Public License as published by |
630 | 7 | // the Free Software Foundation, either version 3 of the License, or | 7 | // the Free Software Foundation, either version 3 of the License, or |
631 | 8 | // (at your option) any later version. | 8 | // (at your option) any later version. |
633 | 9 | // | 9 | // |
634 | 10 | // This program is distributed in the hope that it will be useful, | 10 | // This program is distributed in the hope that it will be useful, |
635 | 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
636 | 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
637 | 13 | // GNU General Public License for more details. | 13 | // GNU General Public License for more details. |
639 | 14 | // | 14 | // |
640 | 15 | // You should have received a copy of the GNU General Public License | 15 | // You should have received a copy of the GNU General Public License |
641 | 16 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
642 | 17 | 17 | ||
643 | @@ -32,6 +32,8 @@ | |||
644 | 32 | N_VALUES | 32 | N_VALUES |
645 | 33 | } | 33 | } |
646 | 34 | 34 | ||
647 | 35 | protected Services.Settings settings { get; private set; } | ||
648 | 36 | |||
649 | 35 | private const int SHADOW_SIZE = 4; | 37 | private const int SHADOW_SIZE = 4; |
650 | 36 | 38 | ||
651 | 37 | private int panel_height = 0; | 39 | private int panel_height = 0; |
652 | @@ -41,9 +43,19 @@ | |||
653 | 41 | private int panel_displacement = -40; | 43 | private int panel_displacement = -40; |
654 | 42 | private uint animation_timer = 0; | 44 | private uint animation_timer = 0; |
655 | 43 | 45 | ||
656 | 46 | private double legible_alpha_value = -1.0; | ||
657 | 47 | private double panel_alpha = 0.0; | ||
658 | 48 | private double panel_current_alpha = 0.0; | ||
659 | 49 | private uint panel_alpha_timer = 0; | ||
660 | 50 | const int FPS = 60; | ||
661 | 51 | const double ALPHA_ANIMATION_STEP = 0.05; | ||
662 | 52 | |||
663 | 44 | private PanelShadow shadow = new PanelShadow (); | 53 | private PanelShadow shadow = new PanelShadow (); |
666 | 45 | 54 | private Wnck.Screen wnck_screen; | |
667 | 46 | public BasePanel () { | 55 | |
668 | 56 | public BasePanel (Services.Settings settings) { | ||
669 | 57 | this.settings = settings; | ||
670 | 58 | |||
671 | 47 | decorated = false; | 59 | decorated = false; |
672 | 48 | resizable = false; | 60 | resizable = false; |
673 | 49 | skip_taskbar_hint = true; | 61 | skip_taskbar_hint = true; |
674 | @@ -58,6 +70,29 @@ | |||
675 | 58 | screen.monitors_changed.connect (on_monitors_changed); | 70 | screen.monitors_changed.connect (on_monitors_changed); |
676 | 59 | 71 | ||
677 | 60 | destroy.connect (Gtk.main_quit); | 72 | destroy.connect (Gtk.main_quit); |
678 | 73 | |||
679 | 74 | wnck_screen = Wnck.Screen.get_default (); | ||
680 | 75 | wnck_screen.active_workspace_changed.connect (update_panel_alpha); | ||
681 | 76 | wnck_screen.window_opened.connect ((window) => { | ||
682 | 77 | if (window.get_window_type () == Wnck.WindowType.NORMAL) | ||
683 | 78 | window.state_changed.connect (window_state_changed); | ||
684 | 79 | }); | ||
685 | 80 | wnck_screen.window_closed.connect ((window) => { | ||
686 | 81 | if (window.get_window_type () == Wnck.WindowType.NORMAL) | ||
687 | 82 | window.state_changed.disconnect (window_state_changed); | ||
688 | 83 | }); | ||
689 | 84 | |||
690 | 85 | update_panel_alpha (); | ||
691 | 86 | } | ||
692 | 87 | |||
693 | 88 | private void window_state_changed (Wnck.Window window, | ||
694 | 89 | Wnck.WindowState changed_mask, Wnck.WindowState new_state) { | ||
695 | 90 | if (((changed_mask & Wnck.WindowState.MAXIMIZED_HORIZONTALLY) != 0 | ||
696 | 91 | || (changed_mask & Wnck.WindowState.MAXIMIZED_VERTICALLY) != 0 | ||
697 | 92 | || (changed_mask & Wnck.WindowState.MINIMIZED) != 0) | ||
698 | 93 | && (window.get_workspace () == wnck_screen.get_active_workspace () | ||
699 | 94 | || window.is_sticky ())) | ||
700 | 95 | update_panel_alpha (); | ||
701 | 61 | } | 96 | } |
702 | 62 | 97 | ||
703 | 63 | protected abstract Gtk.StyleContext get_draw_style_context (); | 98 | protected abstract Gtk.StyleContext get_draw_style_context (); |
704 | @@ -79,7 +114,11 @@ | |||
705 | 79 | } | 114 | } |
706 | 80 | 115 | ||
707 | 81 | var ctx = get_draw_style_context (); | 116 | var ctx = get_draw_style_context (); |
709 | 82 | ctx.render_background (cr, size.x, size.y, size.width, size.height); | 117 | var background_color = ctx.get_background_color (Gtk.StateFlags.NORMAL); |
710 | 118 | background_color.alpha = panel_current_alpha; | ||
711 | 119 | Gdk.cairo_set_source_rgba (cr, background_color); | ||
712 | 120 | cr.rectangle (size.x, size.y, size.width, size.height); | ||
713 | 121 | cr.fill (); | ||
714 | 83 | 122 | ||
715 | 84 | // Slide in | 123 | // Slide in |
716 | 85 | if (animation_timer == 0) { | 124 | if (animation_timer == 0) { |
717 | @@ -92,21 +131,75 @@ | |||
718 | 92 | if (child != null) | 131 | if (child != null) |
719 | 93 | propagate_draw (child, cr); | 132 | propagate_draw (child, cr); |
720 | 94 | 133 | ||
722 | 95 | if (!shadow.visible) | 134 | if (panel_alpha > 1E-3) { |
723 | 135 | shadow.show (); | ||
724 | 96 | shadow.show_all (); | 136 | shadow.show_all (); |
725 | 137 | } else | ||
726 | 138 | shadow.hide (); | ||
727 | 97 | 139 | ||
728 | 98 | return true; | 140 | return true; |
729 | 99 | } | 141 | } |
730 | 100 | 142 | ||
731 | 143 | public void update_opacity (double alpha) { | ||
732 | 144 | legible_alpha_value = alpha; | ||
733 | 145 | update_panel_alpha (); | ||
734 | 146 | } | ||
735 | 147 | |||
736 | 148 | private void update_panel_alpha () { | ||
737 | 149 | panel_alpha = settings.background_alpha; | ||
738 | 150 | if (settings.auto_adjust_alpha) { | ||
739 | 151 | if (active_workspace_has_maximized_window ()) | ||
740 | 152 | panel_alpha = 1.0; | ||
741 | 153 | else if (legible_alpha_value >= 0) | ||
742 | 154 | panel_alpha = legible_alpha_value; | ||
743 | 155 | } | ||
744 | 156 | |||
745 | 157 | if (panel_current_alpha != panel_alpha) | ||
746 | 158 | panel_alpha_timer = Gdk.threads_add_timeout (1000 / FPS, draw_timeout); | ||
747 | 159 | } | ||
748 | 160 | |||
749 | 161 | private bool draw_timeout () { | ||
750 | 162 | queue_draw (); | ||
751 | 163 | |||
752 | 164 | if (panel_current_alpha > panel_alpha) { | ||
753 | 165 | panel_current_alpha -= ALPHA_ANIMATION_STEP; | ||
754 | 166 | panel_current_alpha = double.max (panel_current_alpha, panel_alpha); | ||
755 | 167 | } else if (panel_current_alpha < panel_alpha) { | ||
756 | 168 | panel_current_alpha += ALPHA_ANIMATION_STEP; | ||
757 | 169 | panel_current_alpha = double.min (panel_current_alpha, panel_alpha); | ||
758 | 170 | } | ||
759 | 171 | |||
760 | 172 | if (panel_current_alpha != panel_alpha) | ||
761 | 173 | return true; | ||
762 | 174 | |||
763 | 175 | if (panel_alpha_timer > 0) { | ||
764 | 176 | Source.remove (panel_alpha_timer); | ||
765 | 177 | panel_alpha_timer = 0; | ||
766 | 178 | } | ||
767 | 179 | |||
768 | 180 | return false; | ||
769 | 181 | } | ||
770 | 182 | |||
771 | 101 | private bool animation_callback () { | 183 | private bool animation_callback () { |
773 | 102 | if (panel_displacement >= 0 ) { | 184 | if (panel_displacement >= 0 ) |
774 | 103 | return false; | 185 | return false; |
780 | 104 | } else { | 186 | |
781 | 105 | panel_displacement += 1; | 187 | panel_displacement += 1; |
782 | 106 | move (panel_x, panel_y + panel_displacement); | 188 | move (panel_x, panel_y + panel_displacement); |
783 | 107 | shadow.move (panel_x, panel_y + panel_height + panel_displacement); | 189 | shadow.move (panel_x, panel_y + panel_height + panel_displacement); |
784 | 108 | return true; | 190 | return true; |
785 | 191 | } | ||
786 | 192 | |||
787 | 193 | private bool active_workspace_has_maximized_window () { | ||
788 | 194 | var workspace = wnck_screen.get_active_workspace (); | ||
789 | 195 | |||
790 | 196 | foreach (var window in wnck_screen.get_windows ()) { | ||
791 | 197 | if ((window.is_pinned () || window.get_workspace () == workspace) | ||
792 | 198 | && window.is_maximized () && !window.is_minimized ()) | ||
793 | 199 | return true; | ||
794 | 109 | } | 200 | } |
795 | 201 | |||
796 | 202 | return false; | ||
797 | 110 | } | 203 | } |
798 | 111 | 204 | ||
799 | 112 | private void on_monitors_changed () { | 205 | private void on_monitors_changed () { |
800 | @@ -144,9 +237,9 @@ | |||
801 | 144 | screen.get_monitor_geometry (screen.get_primary_monitor (), out monitor_dimensions); | 237 | screen.get_monitor_geometry (screen.get_primary_monitor (), out monitor_dimensions); |
802 | 145 | 238 | ||
803 | 146 | // if we have multiple monitors, we must check if the panel would be placed inbetween | 239 | // if we have multiple monitors, we must check if the panel would be placed inbetween |
805 | 147 | // monitors. If that's the case we have to move it to the topmost, or we'll make the | 240 | // monitors. If that's the case we have to move it to the topmost, or we'll make the |
806 | 148 | // upper monitor unusable because of the struts. | 241 | // upper monitor unusable because of the struts. |
808 | 149 | // First check if there are monitors overlapping horizontally and if they are higher | 242 | // First check if there are monitors overlapping horizontally and if they are higher |
809 | 150 | // our current highest, make this one the new highest and test all again | 243 | // our current highest, make this one the new highest and test all again |
810 | 151 | if (screen.get_n_monitors () > 1) { | 244 | if (screen.get_n_monitors () > 1) { |
811 | 152 | Gdk.Rectangle dimensions; | 245 | Gdk.Rectangle dimensions; |
812 | @@ -156,8 +249,8 @@ | |||
813 | 156 | && dimensions.x < monitor_dimensions.x + monitor_dimensions.width) | 249 | && dimensions.x < monitor_dimensions.x + monitor_dimensions.width) |
814 | 157 | || (dimensions.x + dimensions.width > monitor_dimensions.x | 250 | || (dimensions.x + dimensions.width > monitor_dimensions.x |
815 | 158 | && dimensions.x + dimensions.width <= monitor_dimensions.x + monitor_dimensions.width) | 251 | && dimensions.x + dimensions.width <= monitor_dimensions.x + monitor_dimensions.width) |
818 | 159 | || (dimensions.x < monitor_dimensions.x | 252 | || (dimensions.x < monitor_dimensions.x |
819 | 160 | && dimensions.x + dimensions.width > monitor_dimensions.x + monitor_dimensions.width)) | 253 | && dimensions.x + dimensions.width > monitor_dimensions.x + monitor_dimensions.width)) |
820 | 161 | && dimensions.y < monitor_dimensions.y) { | 254 | && dimensions.y < monitor_dimensions.y) { |
821 | 162 | warning ("Not placing wingpanel on the primary monitor because of problems" + | 255 | warning ("Not placing wingpanel on the primary monitor because of problems" + |
822 | 163 | " with multimonitor setups"); | 256 | " with multimonitor setups"); |
823 | 164 | 257 | ||
824 | === modified file 'src/Widgets/Panel.vala' | |||
825 | --- src/Widgets/Panel.vala 2013-04-14 07:54:25 +0000 | |||
826 | +++ src/Widgets/Panel.vala 2014-03-25 04:00:57 +0000 | |||
827 | @@ -2,7 +2,7 @@ | |||
828 | 2 | /*** | 2 | /*** |
829 | 3 | BEGIN LICENSE | 3 | BEGIN LICENSE |
830 | 4 | 4 | ||
832 | 5 | Copyright (C) 2011-2012 Wingpanel Developers | 5 | Copyright (C) 2011-2014 Wingpanel Developers |
833 | 6 | This program is free software: you can redistribute it and/or modify it | 6 | This program is free software: you can redistribute it and/or modify it |
834 | 7 | under the terms of the GNU Lesser General Public License version 3, as published | 7 | under the terms of the GNU Lesser General Public License version 3, as published |
835 | 8 | by the Free Software Foundation. | 8 | by the Free Software Foundation. |
836 | @@ -31,10 +31,11 @@ | |||
837 | 31 | 31 | ||
838 | 32 | private IndicatorLoader indicator_loader; | 32 | private IndicatorLoader indicator_loader; |
839 | 33 | 33 | ||
842 | 34 | public Panel (WingpanelApp app, Services.Settings settings, IndicatorLoader indicator_loader) { | 34 | public Panel (Gtk.Application app, Services.Settings settings, IndicatorLoader indicator_loader) { |
843 | 35 | set_application (app as Gtk.Application); | 35 | base (settings); |
844 | 36 | 36 | ||
845 | 37 | this.indicator_loader = indicator_loader; | 37 | this.indicator_loader = indicator_loader; |
846 | 38 | set_application (app); | ||
847 | 38 | 39 | ||
848 | 39 | container = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); | 40 | container = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
849 | 40 | left_wrapper = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); | 41 | left_wrapper = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); |
850 | @@ -77,7 +78,9 @@ | |||
851 | 77 | } | 78 | } |
852 | 78 | 79 | ||
853 | 79 | private void create_entry (IndicatorWidget entry) { | 80 | private void create_entry (IndicatorWidget entry) { |
855 | 80 | if (entry.get_indicator ().get_name () == "libdatetime.so") | 81 | string entry_name = entry.get_indicator ().get_name (); |
856 | 82 | |||
857 | 83 | if (entry_name == "libdatetime.so" || entry_name == "com.canonical.indicator.datetime") | ||
858 | 81 | clock.prepend (entry); | 84 | clock.prepend (entry); |
859 | 82 | else | 85 | else |
860 | 83 | menubar.insert_sorted (entry); | 86 | menubar.insert_sorted (entry); |
861 | @@ -110,6 +113,18 @@ | |||
862 | 110 | var gpr = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL); | 113 | var gpr = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL); |
863 | 111 | gpr.add_widget (left_wrapper); | 114 | gpr.add_widget (left_wrapper); |
864 | 112 | gpr.add_widget (right_wrapper); | 115 | gpr.add_widget (right_wrapper); |
865 | 116 | |||
866 | 117 | // make sure those are all transparent when we later adjust the transparency | ||
867 | 118 | // in the panel's draw callback | ||
868 | 119 | clock.override_background_color (Gtk.StateFlags.NORMAL, Gdk.RGBA () { | ||
869 | 120 | red = 0.0, green = 0.0, blue = 0.0, alpha = 0.0 | ||
870 | 121 | }); | ||
871 | 122 | menubar.override_background_color (Gtk.StateFlags.NORMAL, Gdk.RGBA () { | ||
872 | 123 | red = 0.0, green = 0.0, blue = 0.0, alpha = 0.0 | ||
873 | 124 | }); | ||
874 | 125 | apps_menubar.override_background_color (Gtk.StateFlags.NORMAL, Gdk.RGBA () { | ||
875 | 126 | red = 0.0, green = 0.0, blue = 0.0, alpha = 0.0 | ||
876 | 127 | }); | ||
877 | 113 | } | 128 | } |
878 | 114 | } | 129 | } |
879 | 115 | } | 130 | } |
880 | 116 | 131 | ||
881 | === modified file 'src/WingpanelApp.vala' | |||
882 | --- src/WingpanelApp.vala 2013-04-14 07:54:25 +0000 | |||
883 | +++ src/WingpanelApp.vala 2014-03-25 04:00:57 +0000 | |||
884 | @@ -1,59 +1,57 @@ | |||
885 | 1 | // -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | // -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- |
942 | 2 | /*** | 2 | // |
943 | 3 | BEGIN LICENSE | 3 | // Copyright (C) 2013 Wingpanel Developers |
944 | 4 | 4 | // | |
945 | 5 | Copyright (C) 2011-2012 Wingpanel Developers | 5 | // This program is free software: you can redistribute it and/or modify |
946 | 6 | This program is free software: you can redistribute it and/or modify it | 6 | // it under the terms of the GNU General Public License as published by |
947 | 7 | under the terms of the GNU Lesser General Public License version 3, as published | 7 | // the Free Software Foundation, either version 3 of the License, or |
948 | 8 | by the Free Software Foundation. | 8 | // (at your option) any later version. |
949 | 9 | 9 | // | |
950 | 10 | This program is distributed in the hope that it will be useful, but | 10 | // This program is distributed in the hope that it will be useful, |
951 | 11 | WITHOUT ANY WARRANTY; without even the implied warranties of | 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
952 | 12 | MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
953 | 13 | PURPOSE. See the GNU General Public License for more details. | 13 | // GNU General Public License for more details. |
954 | 14 | 14 | // | |
955 | 15 | You should have received a copy of the GNU General Public License along | 15 | // You should have received a copy of the GNU General Public License |
956 | 16 | with this program. If not, see <http://www.gnu.org/licenses/> | 16 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
957 | 17 | 17 | ||
958 | 18 | END LICENSE | 18 | public class Wingpanel.App : Granite.Application { |
959 | 19 | ***/ | 19 | private IndicatorLoader indicator_loader; |
960 | 20 | 20 | private Widgets.BasePanel panel; | |
961 | 21 | namespace Wingpanel { | 21 | private Services.BackgroundManager background_manager; |
962 | 22 | 22 | ||
963 | 23 | public class WingpanelApp : Granite.Application { | 23 | construct { |
964 | 24 | private IndicatorLoader indicator_loader; | 24 | build_data_dir = Build.DATADIR; |
965 | 25 | private Services.Settings settings; | 25 | build_pkg_data_dir = Build.PKGDATADIR; |
966 | 26 | private Widgets.BasePanel panel; | 26 | build_release_name = Build.RELEASE_NAME; |
967 | 27 | 27 | build_version = Build.VERSION; | |
968 | 28 | construct { | 28 | build_version_info = Build.VERSION_INFO; |
969 | 29 | build_data_dir = Build.DATADIR; | 29 | |
970 | 30 | build_pkg_data_dir = Build.PKGDATADIR; | 30 | program_name = "Wingpanel"; |
971 | 31 | build_release_name = Build.RELEASE_NAME; | 31 | exec_name = "wingpanel"; |
972 | 32 | build_version = Build.VERSION; | 32 | application_id = "net.launchpad.wingpanel"; |
973 | 33 | build_version_info = Build.VERSION_INFO; | 33 | } |
974 | 34 | 34 | ||
975 | 35 | program_name = "Wingpanel"; | 35 | protected override void startup () { |
976 | 36 | exec_name = "wingpanel"; | 36 | base.startup (); |
977 | 37 | application_id = "net.launchpad.wingpanel"; | 37 | |
978 | 38 | } | 38 | Ido.init (); |
979 | 39 | 39 | ||
980 | 40 | protected override void activate () { | 40 | var settings = new Services.Settings (); |
981 | 41 | debug ("Activating"); | 41 | indicator_loader = new Backend.IndicatorFactory (settings.blacklist); |
982 | 42 | 42 | panel = new Widgets.Panel (this, settings, indicator_loader); | |
983 | 43 | if (get_windows () == null) | 43 | |
984 | 44 | init (); | 44 | panel.show_all (); |
985 | 45 | } | 45 | |
986 | 46 | 46 | background_manager = new Services.BackgroundManager (settings, panel.get_screen ()); | |
987 | 47 | private void init () { | 47 | background_manager.update_background_alpha.connect (panel.update_opacity); |
988 | 48 | settings = new Services.Settings (); | 48 | } |
989 | 49 | indicator_loader = new Backend.IndicatorFactory (settings); | 49 | |
990 | 50 | panel = new Widgets.Panel (this, settings, indicator_loader); | 50 | protected override void activate () { |
991 | 51 | 51 | panel.present (); | |
992 | 52 | panel.show_all (); | 52 | } |
993 | 53 | } | 53 | |
994 | 54 | 54 | public static int main (string[] args) { | |
995 | 55 | public static int main (string[] args) { | 55 | return new Wingpanel.App ().run (args); |
940 | 56 | return new WingpanelApp ().run (args); | ||
941 | 57 | } | ||
996 | 58 | } | 56 | } |
997 | 59 | } | 57 | } |
998 | 60 | 58 | ||
999 | === renamed file 'vapi/indicator-0.4.vapi' => 'vapi/indicator3-0.4.vapi' | |||
1000 | --- vapi/indicator-0.4.vapi 2013-10-15 20:44:53 +0000 | |||
1001 | +++ vapi/indicator3-0.4.vapi 2014-03-25 04:00:57 +0000 | |||
1002 | @@ -1,4 +1,4 @@ | |||
1004 | 1 | /* indicator-0.4.vapi generated by vapigen, do not modify. */ | 1 | /* indicator3-0.4.vapi generated by vapigen, do not modify. */ |
1005 | 2 | 2 | ||
1006 | 3 | namespace Indicator { | 3 | namespace Indicator { |
1007 | 4 | [CCode (cheader_filename = "libindicator/indicator-desktop-shortcuts.h", type_check_function = "INDICATOR_IS_DESKTOP_SHORTCUTS", type_id = "indicator_desktop_shortcuts_get_type ()")] | 4 | [CCode (cheader_filename = "libindicator/indicator-desktop-shortcuts.h", type_check_function = "INDICATOR_IS_DESKTOP_SHORTCUTS", type_id = "indicator_desktop_shortcuts_get_type ()")] |
1008 | @@ -7,12 +7,28 @@ | |||
1009 | 7 | public DesktopShortcuts (string file, string identity); | 7 | public DesktopShortcuts (string file, string identity); |
1010 | 8 | public unowned string get_nicks (); | 8 | public unowned string get_nicks (); |
1011 | 9 | public bool nick_exec (string nick); | 9 | public bool nick_exec (string nick); |
1012 | 10 | public bool nick_exec_with_context (string nick, GLib.AppLaunchContext launch_context); | ||
1013 | 10 | public unowned string nick_get_name (string nick); | 11 | public unowned string nick_get_name (string nick); |
1014 | 11 | public string desktop_file { construct; } | 12 | public string desktop_file { construct; } |
1015 | 12 | [NoAccessorMethod] | 13 | [NoAccessorMethod] |
1016 | 13 | public string identity { owned get; construct; } | 14 | public string identity { owned get; construct; } |
1017 | 14 | } | 15 | } |
1019 | 15 | [CCode (cheader_filename = "libindicator/indicator-object.h", type_check_function = "INDICATOR_IS_OBJECT", type_id = "indicator_object_get_type ()")] | 16 | <<<<<<< TREE |
1020 | 17 | [CCode (cheader_filename = "libindicator/indicator-object.h", type_check_function = "INDICATOR_IS_OBJECT", type_id = "indicator_object_get_type ()")] | ||
1021 | 18 | ======= | ||
1022 | 19 | [CCode (cheader_filename = "libindicator/indicator-ng.h", type_check_function = "INDICATOR_IS_NG", type_id = "indicator_ng_get_type ()")] | ||
1023 | 20 | public class Ng : Indicator.Object, GLib.Initable { | ||
1024 | 21 | [CCode (has_construct_function = false)] | ||
1025 | 22 | public Ng (string service_file) throws GLib.Error; | ||
1026 | 23 | [CCode (has_construct_function = false)] | ||
1027 | 24 | public Ng.for_profile (string service_file, string profile) throws GLib.Error; | ||
1028 | 25 | public unowned string get_profile (); | ||
1029 | 26 | public unowned string get_service_file (); | ||
1030 | 27 | public string profile { get; construct; } | ||
1031 | 28 | public string service_file { get; construct; } | ||
1032 | 29 | } | ||
1033 | 30 | [CCode (cheader_filename = "libindicator/indicator-object.h", type_check_function = "INDICATOR_IS_OBJECT", type_id = "indicator_object_get_type ()")] | ||
1034 | 31 | >>>>>>> MERGE-SOURCE | ||
1035 | 16 | public class Object : GLib.Object { | 32 | public class Object : GLib.Object { |
1036 | 17 | [CCode (has_construct_function = false)] | 33 | [CCode (has_construct_function = false)] |
1037 | 18 | protected Object (); | 34 | protected Object (); |
1038 | @@ -42,17 +58,8 @@ | |||
1039 | 42 | public virtual unowned Gtk.Menu get_menu (); | 58 | public virtual unowned Gtk.Menu get_menu (); |
1040 | 43 | [NoWrapper] | 59 | [NoWrapper] |
1041 | 44 | public virtual unowned string get_name_hint (); | 60 | public virtual unowned string get_name_hint (); |
1042 | 61 | public virtual int get_position (); | ||
1043 | 45 | public virtual bool get_show_now (Indicator.ObjectEntry entry); | 62 | public virtual bool get_show_now (Indicator.ObjectEntry entry); |
1044 | 46 | [NoWrapper] | ||
1045 | 47 | public virtual void reserved1 (); | ||
1046 | 48 | [NoWrapper] | ||
1047 | 49 | public virtual void reserved2 (); | ||
1048 | 50 | [NoWrapper] | ||
1049 | 51 | public virtual void reserved3 (); | ||
1050 | 52 | [NoWrapper] | ||
1051 | 53 | public virtual void reserved4 (); | ||
1052 | 54 | [NoWrapper] | ||
1053 | 55 | public virtual void reserved5 (); | ||
1054 | 56 | public void set_environment (string[] env); | 63 | public void set_environment (string[] env); |
1055 | 57 | public void set_visible (bool visible); | 64 | public void set_visible (bool visible); |
1056 | 58 | [NoAccessorMethod] | 65 | [NoAccessorMethod] |
1057 | @@ -75,26 +82,15 @@ | |||
1058 | 75 | public weak Gtk.Menu menu; | 82 | public weak Gtk.Menu menu; |
1059 | 76 | public weak string name_hint; | 83 | public weak string name_hint; |
1060 | 77 | public weak Indicator.Object parent_object; | 84 | public weak Indicator.Object parent_object; |
1061 | 78 | public weak GLib.Callback reserved1; | ||
1062 | 79 | public weak GLib.Callback reserved2; | ||
1063 | 80 | public weak GLib.Callback reserved3; | ||
1064 | 81 | public weak GLib.Callback reserved4; | ||
1065 | 82 | public static void activate (Indicator.Object io, Indicator.ObjectEntry entry, uint timestamp); | 85 | public static void activate (Indicator.Object io, Indicator.ObjectEntry entry, uint timestamp); |
1066 | 83 | public static void activate_window (Indicator.Object io, Indicator.ObjectEntry entry, uint windowid, uint timestamp); | 86 | public static void activate_window (Indicator.Object io, Indicator.ObjectEntry entry, uint windowid, uint timestamp); |
1067 | 84 | public static void close (Indicator.Object io, Indicator.ObjectEntry entry, uint timestamp); | 87 | public static void close (Indicator.Object io, Indicator.ObjectEntry entry, uint timestamp); |
1068 | 88 | public static bool is_visible (Indicator.Object io, Indicator.ObjectEntry entry); | ||
1069 | 85 | } | 89 | } |
1070 | 86 | [CCode (cheader_filename = "libindicator/indicator-service.h", type_check_function = "INDICATOR_IS_SERVICE", type_id = "indicator_service_get_type ()")] | 90 | [CCode (cheader_filename = "libindicator/indicator-service.h", type_check_function = "INDICATOR_IS_SERVICE", type_id = "indicator_service_get_type ()")] |
1071 | 87 | public class Service : GLib.Object { | 91 | public class Service : GLib.Object { |
1072 | 88 | [CCode (has_construct_function = false)] | 92 | [CCode (has_construct_function = false)] |
1073 | 89 | public Service (string name); | 93 | public Service (string name); |
1074 | 90 | [NoWrapper] | ||
1075 | 91 | public virtual void indicator_service_reserved1 (); | ||
1076 | 92 | [NoWrapper] | ||
1077 | 93 | public virtual void indicator_service_reserved2 (); | ||
1078 | 94 | [NoWrapper] | ||
1079 | 95 | public virtual void indicator_service_reserved3 (); | ||
1080 | 96 | [NoWrapper] | ||
1081 | 97 | public virtual void indicator_service_reserved4 (); | ||
1082 | 98 | [CCode (cname = "indicator_service_new_version", has_construct_function = false)] | 94 | [CCode (cname = "indicator_service_new_version", has_construct_function = false)] |
1083 | 99 | public Service.with_version (string name, uint version); | 95 | public Service.with_version (string name, uint version); |
1084 | 100 | [NoAccessorMethod] | 96 | [NoAccessorMethod] |
1085 | @@ -108,14 +104,6 @@ | |||
1086 | 108 | [CCode (has_construct_function = false)] | 104 | [CCode (has_construct_function = false)] |
1087 | 109 | public ServiceManager (string dbus_name); | 105 | public ServiceManager (string dbus_name); |
1088 | 110 | public bool connected (); | 106 | public bool connected (); |
1089 | 111 | [NoWrapper] | ||
1090 | 112 | public virtual void indicator_service_manager_reserved1 (); | ||
1091 | 113 | [NoWrapper] | ||
1092 | 114 | public virtual void indicator_service_manager_reserved2 (); | ||
1093 | 115 | [NoWrapper] | ||
1094 | 116 | public virtual void indicator_service_manager_reserved3 (); | ||
1095 | 117 | [NoWrapper] | ||
1096 | 118 | public virtual void indicator_service_manager_reserved4 (); | ||
1097 | 119 | public void set_refresh (uint time_in_ms); | 107 | public void set_refresh (uint time_in_ms); |
1098 | 120 | [CCode (cname = "indicator_service_manager_new_version", has_construct_function = false)] | 108 | [CCode (cname = "indicator_service_manager_new_version", has_construct_function = false)] |
1099 | 121 | public ServiceManager.with_version (string dbus_name, uint version); | 109 | public ServiceManager.with_version (string dbus_name, uint version); |
1100 | @@ -140,28 +128,6 @@ | |||
1101 | 140 | public const string GET_TYPE_S; | 128 | public const string GET_TYPE_S; |
1102 | 141 | [CCode (cheader_filename = "libindicator/indicator.h")] | 129 | [CCode (cheader_filename = "libindicator/indicator.h")] |
1103 | 142 | public const string GET_VERSION_S; | 130 | public const string GET_VERSION_S; |
1104 | 143 | [CCode (cheader_filename = "libindicator/indicator-gobject.h")] | ||
1105 | 144 | public const string OBJECT_DEFAULT_VISIBILITY; | ||
1106 | 145 | [CCode (cheader_filename = "libindicator/indicator-gobject.h")] | ||
1107 | 146 | public const string OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE; | ||
1108 | 147 | [CCode (cheader_filename = "libindicator/indicator-gobject.h")] | ||
1109 | 148 | public const string OBJECT_SIGNAL_ENTRY_ADDED; | ||
1110 | 149 | [CCode (cheader_filename = "libindicator/indicator-gobject.h")] | ||
1111 | 150 | public const string OBJECT_SIGNAL_ENTRY_MOVED; | ||
1112 | 151 | [CCode (cheader_filename = "libindicator/indicator-gobject.h")] | ||
1113 | 152 | public const string OBJECT_SIGNAL_ENTRY_REMOVED; | ||
1114 | 153 | [CCode (cheader_filename = "libindicator/indicator-gobject.h")] | ||
1115 | 154 | public const string OBJECT_SIGNAL_ENTRY_SCROLLED; | ||
1116 | 155 | [CCode (cheader_filename = "libindicator/indicator-gobject.h")] | ||
1117 | 156 | public const string OBJECT_SIGNAL_MENU_SHOW; | ||
1118 | 157 | [CCode (cheader_filename = "libindicator/indicator-gobject.h")] | ||
1119 | 158 | public const string OBJECT_SIGNAL_SECONDARY_ACTIVATE; | ||
1120 | 159 | [CCode (cheader_filename = "libindicator/indicator-gobject.h")] | ||
1121 | 160 | public const string OBJECT_SIGNAL_SHOW_NOW_CHANGED; | ||
1122 | 161 | [CCode (cheader_filename = "libindicator/indicator-service-manager.h")] | ||
1123 | 162 | public const string SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE; | ||
1124 | 163 | [CCode (cheader_filename = "libindicator/indicator-service.h")] | ||
1125 | 164 | public const string SERVICE_SIGNAL_SHUTDOWN; | ||
1126 | 165 | [CCode (cheader_filename = "libindicator/indicator.h")] | 131 | [CCode (cheader_filename = "libindicator/indicator.h")] |
1127 | 166 | public const int SET_VERSION; | 132 | public const int SET_VERSION; |
1128 | 167 | [CCode (cheader_filename = "libindicator/indicator.h")] | 133 | [CCode (cheader_filename = "libindicator/indicator.h")] |
1129 | @@ -172,4 +138,6 @@ | |||
1130 | 172 | public static unowned Gtk.Image image_helper (string name); | 138 | public static unowned Gtk.Image image_helper (string name); |
1131 | 173 | [CCode (cheader_filename = "libindicator/indicator-image-helper.h")] | 139 | [CCode (cheader_filename = "libindicator/indicator-image-helper.h")] |
1132 | 174 | public static void image_helper_update (Gtk.Image image, string name); | 140 | public static void image_helper_update (Gtk.Image image, string name); |
1133 | 141 | [CCode (cheader_filename = "libindicator/indicator-image-helper.h")] | ||
1134 | 142 | public static void image_helper_update_from_gicon (Gtk.Image image, GLib.Icon icon); | ||
1135 | 175 | } | 143 | } |
1136 | 176 | 144 | ||
1137 | === added file 'vapi/libido3-0.1.vapi' | |||
1138 | --- vapi/libido3-0.1.vapi 1970-01-01 00:00:00 +0000 | |||
1139 | +++ vapi/libido3-0.1.vapi 2014-03-25 04:00:57 +0000 | |||
1140 | @@ -0,0 +1,4 @@ | |||
1141 | 1 | [CCode (cheader_filename="libido/libido.h", lower_case_cprefix = "ido_")] | ||
1142 | 2 | namespace Ido { | ||
1143 | 3 | public void init (); | ||
1144 | 4 | } |