Merge lp:~timo-jyrinki/bamf/revert-474-0.2 into lp:bamf/0.2
- revert-474-0.2
- Merge into bamf-0.2
Proposed by
Timo Jyrinki
Status: | Merged |
---|---|
Approved by: | Łukasz Zemczak |
Approved revision: | 485 |
Merged at revision: | 485 |
Proposed branch: | lp:~timo-jyrinki/bamf/revert-474-0.2 |
Merge into: | lp:bamf/0.2 |
Diff against target: |
923 lines (+260/-285) 12 files modified
Makefile.am.marshal (+2/-2) configure.in (+1/-3) data/Makefile.am (+1/-1) lib/libbamf/Bamf-0.2.metadata (+0/-1) lib/libbamf/Makefile.am (+39/-44) lib/libbamf/bamf-application.c (+0/-43) lib/libbamf/bamf-application.h (+48/-5) lib/libbamf/bamf-matcher.c (+3/-117) lib/libbamf/bamf-matcher.h (+104/-0) lib/libbamf/bamf-view.c (+1/-62) lib/libbamf/bamf-view.h (+61/-0) lib/libbamf/bamf-window.c (+0/-7) |
To merge this branch: | bzr merge lp:~timo-jyrinki/bamf/revert-474-0.2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Łukasz Zemczak | Approve | ||
Review via email: mp+136417@code.launchpad.net |
Commit message
Revert r474 - preferable not to change dependencies in stable release (was: Enable introspection)
Description of the change
Revert r474 - preferable not to change dependencies in stable release (was: Enable introspection)
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Makefile.am.marshal' | |||
2 | --- Makefile.am.marshal 2012-07-01 18:12:17 +0000 | |||
3 | +++ Makefile.am.marshal 2012-11-27 13:41:43 +0000 | |||
4 | @@ -23,7 +23,7 @@ | |||
5 | 23 | EXTRA_DIST += $(glib_marshal_list) | 23 | EXTRA_DIST += $(glib_marshal_list) |
6 | 24 | 24 | ||
7 | 25 | stamp-marshal: $(glib_marshal_list) | 25 | stamp-marshal: $(glib_marshal_list) |
9 | 26 | $(AM_V_GEN)$(GLIB_GENMARSHAL) \ | 26 | $(QUIET_GEN)$(GLIB_GENMARSHAL) \ |
10 | 27 | --prefix=$(glib_marshal_prefix) \ | 27 | --prefix=$(glib_marshal_prefix) \ |
11 | 28 | --header \ | 28 | --header \ |
12 | 29 | $(srcdir)/$(glib_marshal_list) > xgen-mh \ | 29 | $(srcdir)/$(glib_marshal_list) > xgen-mh \ |
13 | @@ -35,7 +35,7 @@ | |||
14 | 35 | @true | 35 | @true |
15 | 36 | 36 | ||
16 | 37 | $(marshal_c): $(marshal_h) | 37 | $(marshal_c): $(marshal_h) |
18 | 38 | $(AM_V_GEN)(echo "#include \"$(marshal_h)\"" ; \ | 38 | $(QUIET_GEN)(echo "#include \"$(marshal_h)\"" ; \ |
19 | 39 | $(GLIB_GENMARSHAL) \ | 39 | $(GLIB_GENMARSHAL) \ |
20 | 40 | --prefix=$(glib_marshal_prefix) \ | 40 | --prefix=$(glib_marshal_prefix) \ |
21 | 41 | --body \ | 41 | --body \ |
22 | 42 | 42 | ||
23 | === modified file 'configure.in' | |||
24 | --- configure.in 2012-11-14 06:54:12 +0000 | |||
25 | +++ configure.in 2012-11-27 13:41:43 +0000 | |||
26 | @@ -9,7 +9,6 @@ | |||
27 | 9 | AC_CONFIG_HEADERS(config.h) | 9 | AC_CONFIG_HEADERS(config.h) |
28 | 10 | 10 | ||
29 | 11 | AM_INIT_AUTOMAKE([foreign tar-pax]) | 11 | AM_INIT_AUTOMAKE([foreign tar-pax]) |
30 | 12 | AM_SILENT_RULES([yes]) | ||
31 | 13 | 12 | ||
32 | 14 | AC_CONFIG_MACRO_DIR([m4]) | 13 | AC_CONFIG_MACRO_DIR([m4]) |
33 | 15 | 14 | ||
34 | @@ -106,7 +105,7 @@ | |||
35 | 106 | # GObject Introspection | 105 | # GObject Introspection |
36 | 107 | ########################### | 106 | ########################### |
37 | 108 | 107 | ||
39 | 109 | GOBJECT_INTROSPECTION_CHECK([0.10.2]) | 108 | GOBJECT_INTROSPECTION_CHECK([0.6.7]) |
40 | 110 | 109 | ||
41 | 111 | ########################### | 110 | ########################### |
42 | 112 | # Vala API Generation | 111 | # Vala API Generation |
43 | @@ -175,7 +174,6 @@ | |||
44 | 175 | 174 | ||
45 | 176 | Build Environment | 175 | Build Environment |
46 | 177 | Install Prefix: ${prefix} | 176 | Install Prefix: ${prefix} |
47 | 178 | Introspection: ${enable_introspection} | ||
48 | 179 | GTK+ Version: ${with_gtk} | 177 | GTK+ Version: ${with_gtk} |
49 | 180 | Headless tests: ${enable_headless_tests} | 178 | Headless tests: ${enable_headless_tests} |
50 | 181 | 179 | ||
51 | 182 | 180 | ||
52 | === modified file 'data/Makefile.am' | |||
53 | --- data/Makefile.am 2012-07-01 18:12:17 +0000 | |||
54 | +++ data/Makefile.am 2012-11-27 13:41:43 +0000 | |||
55 | @@ -4,6 +4,6 @@ | |||
56 | 4 | EXTRA_DIST=org.ayatana.bamf.service.in | 4 | EXTRA_DIST=org.ayatana.bamf.service.in |
57 | 5 | 5 | ||
58 | 6 | org.ayatana.bamf.service: org.ayatana.bamf.service.in | 6 | org.ayatana.bamf.service: org.ayatana.bamf.service.in |
60 | 7 | $(AM_V_GEN)sed "s,@LIBEXECDIR@,$(libexecdir)," $< > $@ | 7 | sed "s,@LIBEXECDIR@,$(libexecdir)," $< > $@ |
61 | 8 | 8 | ||
62 | 9 | CLEANFILES = org.ayatana.bamf.service | 9 | CLEANFILES = org.ayatana.bamf.service |
63 | 10 | 10 | ||
64 | === removed file 'lib/libbamf/Bamf-0.2.metadata' | |||
65 | --- lib/libbamf/Bamf-0.2.metadata 2012-07-01 18:38:29 +0000 | |||
66 | +++ lib/libbamf/Bamf-0.2.metadata 1970-01-01 00:00:00 +0000 | |||
67 | @@ -1,1 +0,0 @@ | |||
68 | 1 | TabSource.show_tab skip | ||
69 | 2 | 0 | ||
70 | === modified file 'lib/libbamf/Makefile.am' | |||
71 | --- lib/libbamf/Makefile.am 2012-11-27 11:39:42 +0000 | |||
72 | +++ lib/libbamf/Makefile.am 2012-11-27 13:41:43 +0000 | |||
73 | @@ -12,7 +12,6 @@ | |||
74 | 12 | EXTRA_DIST = | 12 | EXTRA_DIST = |
75 | 13 | 13 | ||
76 | 14 | include $(top_srcdir)/Makefile.am.marshal | 14 | include $(top_srcdir)/Makefile.am.marshal |
77 | 15 | -include $(INTROSPECTION_MAKEFILE) | ||
78 | 16 | 15 | ||
79 | 17 | libbamf_sources = \ | 16 | libbamf_sources = \ |
80 | 18 | bamf-application.c \ | 17 | bamf-application.c \ |
81 | @@ -82,7 +81,7 @@ | |||
82 | 82 | glib_marshal_prefix = bamf_marshal | 81 | glib_marshal_prefix = bamf_marshal |
83 | 83 | 82 | ||
84 | 84 | bamf-tab-source-glue.h: bamf-tab-source-glue.xml | 83 | bamf-tab-source-glue.h: bamf-tab-source-glue.xml |
86 | 85 | $(AM_V_GEN)$(DBUS_GLIB_BIN)/dbus-binding-tool --prefix=bamf_tab_source --mode=glib-server --output=$@ $< | 84 | $(DBUS_GLIB_BIN)/dbus-binding-tool --prefix=bamf_tab_source --mode=glib-server --output=$@ $< |
87 | 86 | 85 | ||
88 | 87 | BUILT_SOURCES += \ | 86 | BUILT_SOURCES += \ |
89 | 88 | bamf-tab-source-glue.h \ | 87 | bamf-tab-source-glue.h \ |
90 | @@ -106,51 +105,47 @@ | |||
91 | 106 | # GObject Introsepction | 105 | # GObject Introsepction |
92 | 107 | ######################### | 106 | ######################### |
93 | 108 | 107 | ||
125 | 109 | INTROSPECTION_GIRS = | 108 | #-include $(INTROSPECTION_MAKEFILE) |
126 | 110 | INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) | 109 | #INTROSPECTION_GIRS = |
127 | 111 | INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) | 110 | #INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) |
128 | 112 | 111 | #INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) | |
129 | 113 | if HAVE_INTROSPECTION | 112 | |
130 | 114 | 113 | #if HAVE_INTROSPECTION | |
131 | 115 | introspection_sources = $(libbamf_la_SOURCES) | 114 | |
132 | 116 | 115 | #introspection_sources = $(library_include_HEADERS) | |
133 | 117 | Bamf-0.2.gir: libbamf.la | 116 | |
134 | 118 | Bamf_0_2_gir_INCLUDES = GObject-2.0 GLib-2.0 | 117 | #Bamf-0.2.gir: libbamf.la |
135 | 119 | Bamf_0_2_gir_CFLAGS = \ | 118 | #Bamf_0_2_gir_INCLUDES = \ |
136 | 120 | --c-include='libbamf/libbamf.h' \ | 119 | # GObject-2.0 |
137 | 121 | $(DBUS_CFLAGS) \ | 120 | #Bamf_0_2_gir_CFLAGS = --c-include='libbamf/libbamf.h' $(LIBBAMF_CFLAGS) -I$(top_srcdir)/lib -I$(top_builddir)/lib |
138 | 122 | -I$(top_srcdir)/lib \ | 121 | #Bamf_0_2_gir_LIBS = libbamf.la |
139 | 123 | -I$(top_builddir)/lib \ | 122 | #Bamf_0_2_gir_FILES = $(introspection_sources) |
140 | 124 | $(NULL) | 123 | # |
141 | 125 | Bamf_0_2_gir_LIBS = libbamf.la | 124 | #INTROSPECTION_GIRS += Bamf-0.2.gir |
142 | 126 | Bamf_0_2_gir_FILES = $(introspection_sources) | 125 | # |
143 | 127 | Bamf_0_2_gir_EXPORT_PACKAGES = libbamf$(VER) | 126 | #girdir = $(datadir)/gir-1.0 |
144 | 128 | 127 | #dist_gir_DATA = $(INTROSPECTION_GIRS) | |
145 | 129 | INTROSPECTION_GIRS += Bamf-0.2.gir | 128 | |
146 | 130 | 129 | #typelibdir = $(libdir)/girepository-1.0 | |
147 | 131 | girdir = $(datadir)/gir-1.0 | 130 | #typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) |
148 | 132 | dist_gir_DATA = $(INTROSPECTION_GIRS) | 131 | |
149 | 133 | 132 | #CLEANFILES += $(dist_gir_DATA) $(typelib_DATA) | |
150 | 134 | typelibdir = $(libdir)/girepository-1.0 | 133 | |
151 | 135 | typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) | 134 | #endif |
121 | 136 | |||
122 | 137 | CLEANFILES += $(dist_gir_DATA) $(typelib_DATA) | ||
123 | 138 | |||
124 | 139 | endif | ||
152 | 140 | 135 | ||
153 | 141 | ######################### | 136 | ######################### |
154 | 142 | # VAPI Files | 137 | # VAPI Files |
155 | 143 | ######################### | 138 | ######################### |
156 | 144 | 139 | ||
168 | 145 | if HAVE_INTROSPECTION | 140 | #if HAVE_INTROSPECTION |
169 | 146 | 141 | ||
170 | 147 | vapidir = $(datadir)/vala/vapi | 142 | #vapidir = $(datadir)/vala/vapi |
171 | 148 | vapi_DATA = libbamf$(VER).vapi | 143 | #vapi_DATA = Bamf-0.2.vapi |
172 | 149 | 144 | ||
173 | 150 | $(vapi_DATA): $(INTROSPECTION_GIRS) | 145 | #Bamf-0.2.vapi: Bamf-0.2.gir |
174 | 151 | $(AM_V_GEN)$(VALA_API_GEN) --library=$(@:.vapi=) $< | 146 | # $(VALA_API_GEN) --library=Bamf-0.2 $< |
175 | 152 | 147 | ||
176 | 153 | DISTCLEANFILES += $(vapi_DATA) | 148 | #CLEANFILES += $(vapi_DATA) |
177 | 154 | 149 | ||
178 | 155 | endif | 150 | #endif |
179 | 156 | 151 | ||
180 | 157 | 152 | ||
181 | === modified file 'lib/libbamf/bamf-application.c' | |||
182 | --- lib/libbamf/bamf-application.c 2012-11-27 11:39:42 +0000 | |||
183 | +++ lib/libbamf/bamf-application.c 2012-11-27 13:41:43 +0000 | |||
184 | @@ -71,15 +71,6 @@ | |||
185 | 71 | int show_stubs; | 71 | int show_stubs; |
186 | 72 | }; | 72 | }; |
187 | 73 | 73 | ||
188 | 74 | /** | ||
189 | 75 | * bamf_application_get_desktop_file: | ||
190 | 76 | * @application: a #BamfApplication | ||
191 | 77 | * | ||
192 | 78 | * Used to fetch the path to the .desktop file associated with the passed application. If | ||
193 | 79 | * none exists, the result is NULL. | ||
194 | 80 | * | ||
195 | 81 | * Returns: A string representing the path to the desktop file. | ||
196 | 82 | */ | ||
197 | 83 | const gchar * | 74 | const gchar * |
198 | 84 | bamf_application_get_desktop_file (BamfApplication *application) | 75 | bamf_application_get_desktop_file (BamfApplication *application) |
199 | 85 | { | 76 | { |
200 | @@ -119,16 +110,6 @@ | |||
201 | 119 | return file; | 110 | return file; |
202 | 120 | } | 111 | } |
203 | 121 | 112 | ||
204 | 122 | /** | ||
205 | 123 | * bamf_application_get_applicaton_type: | ||
206 | 124 | * @application: a #BamfApplication | ||
207 | 125 | * | ||
208 | 126 | * Used to determine what type of application a .desktop file represents. Current values are: | ||
209 | 127 | * "system" : A normal application, like firefox or evolution | ||
210 | 128 | * "web" : A web application, like facebook or twitter | ||
211 | 129 | * | ||
212 | 130 | * Returns: A string | ||
213 | 131 | */ | ||
214 | 132 | const gchar * | 113 | const gchar * |
215 | 133 | bamf_application_get_application_type (BamfApplication *application) | 114 | bamf_application_get_application_type (BamfApplication *application) |
216 | 134 | { | 115 | { |
217 | @@ -162,14 +143,6 @@ | |||
218 | 162 | return type; | 143 | return type; |
219 | 163 | } | 144 | } |
220 | 164 | 145 | ||
221 | 165 | /** | ||
222 | 166 | * bamf_application_get_xids: | ||
223 | 167 | * @application: a #BamfApplication | ||
224 | 168 | * | ||
225 | 169 | * Used to fetch all #BamfWindow's xids associated with the passed #BamfApplication. | ||
226 | 170 | * | ||
227 | 171 | * Returns: (element-type guint) (transfer full): An array of xids. | ||
228 | 172 | */ | ||
229 | 173 | GArray * | 146 | GArray * |
230 | 174 | bamf_application_get_xids (BamfApplication *application) | 147 | bamf_application_get_xids (BamfApplication *application) |
231 | 175 | { | 148 | { |
232 | @@ -199,14 +172,6 @@ | |||
233 | 199 | return xids; | 172 | return xids; |
234 | 200 | } | 173 | } |
235 | 201 | 174 | ||
236 | 202 | /** | ||
237 | 203 | * bamf_application_get_windows: | ||
238 | 204 | * @application: a #BamfApplication | ||
239 | 205 | * | ||
240 | 206 | * Used to fetch all #BamfWindow's associated with the passed #BamfApplication. | ||
241 | 207 | * | ||
242 | 208 | * Returns: (element-type Bamf.Window) (transfer container): A list of #BamfWindow's. | ||
243 | 209 | */ | ||
244 | 210 | GList * | 175 | GList * |
245 | 211 | bamf_application_get_windows (BamfApplication *application) | 176 | bamf_application_get_windows (BamfApplication *application) |
246 | 212 | { | 177 | { |
247 | @@ -232,14 +197,6 @@ | |||
248 | 232 | return windows; | 197 | return windows; |
249 | 233 | } | 198 | } |
250 | 234 | 199 | ||
251 | 235 | /** | ||
252 | 236 | * bamf_application_get_show_menu_stubs: | ||
253 | 237 | * @application: a #BamfApplication | ||
254 | 238 | * | ||
255 | 239 | * Used to discover whether the application wants menu stubs shown. | ||
256 | 240 | * | ||
257 | 241 | * Returns: Whether the stubs should be shown. | ||
258 | 242 | */ | ||
259 | 243 | gboolean | 200 | gboolean |
260 | 244 | bamf_application_get_show_menu_stubs (BamfApplication * application) | 201 | bamf_application_get_show_menu_stubs (BamfApplication * application) |
261 | 245 | { | 202 | { |
262 | 246 | 203 | ||
263 | === modified file 'lib/libbamf/bamf-application.h' | |||
264 | --- lib/libbamf/bamf-application.h 2012-07-01 18:13:55 +0000 | |||
265 | +++ lib/libbamf/bamf-application.h 2012-11-27 13:41:43 +0000 | |||
266 | @@ -75,15 +75,58 @@ | |||
267 | 75 | 75 | ||
268 | 76 | GType bamf_application_get_type (void) G_GNUC_CONST; | 76 | GType bamf_application_get_type (void) G_GNUC_CONST; |
269 | 77 | 77 | ||
270 | 78 | /** | ||
271 | 79 | * bamf_application_get_applicaton_type: | ||
272 | 80 | * @application: a #BamfApplication | ||
273 | 81 | * | ||
274 | 82 | * Used to determine what type of application a .desktop file represents. Current values are: | ||
275 | 83 | * "system" : A normal application, like firefox or evolution | ||
276 | 84 | * "web" : A web application, like facebook or twitter | ||
277 | 85 | * | ||
278 | 86 | * Returns: A string | ||
279 | 87 | */ | ||
280 | 78 | const gchar * bamf_application_get_application_type (BamfApplication *application); | 88 | const gchar * bamf_application_get_application_type (BamfApplication *application); |
281 | 79 | 89 | ||
282 | 90 | /** | ||
283 | 91 | * bamf_application_get_desktop_file: | ||
284 | 92 | * @application: a #BamfApplication | ||
285 | 93 | * | ||
286 | 94 | * Used to fetch the path to the .desktop file associated with the passed application. If | ||
287 | 95 | * none exists, the result is NULL. | ||
288 | 96 | * | ||
289 | 97 | * Returns: A string representing the path to the desktop file. | ||
290 | 98 | */ | ||
291 | 80 | const gchar * bamf_application_get_desktop_file (BamfApplication *application); | 99 | const gchar * bamf_application_get_desktop_file (BamfApplication *application); |
292 | 81 | 100 | ||
298 | 82 | GList * bamf_application_get_windows (BamfApplication *application); | 101 | /** |
299 | 83 | 102 | * bamf_application_get_windows: | |
300 | 84 | GArray * bamf_application_get_xids (BamfApplication *application); | 103 | * @application: a #BamfApplication |
301 | 85 | 104 | * | |
302 | 86 | gboolean bamf_application_get_show_menu_stubs (BamfApplication *application); | 105 | * Used to fetch all #BamfWindow's associated with the passed #BamfApplication. |
303 | 106 | * | ||
304 | 107 | * Returns: (element-type Bamf.Window) (transfer container): A list of #BamfWindow's. | ||
305 | 108 | */ | ||
306 | 109 | GList * bamf_application_get_windows (BamfApplication *application); | ||
307 | 110 | |||
308 | 111 | /** | ||
309 | 112 | * bamf_application_get_xids: | ||
310 | 113 | * @application: a #BamfApplication | ||
311 | 114 | * | ||
312 | 115 | * Used to fetch all #BamfWindow's xids associated with the passed #BamfApplication. | ||
313 | 116 | * | ||
314 | 117 | * Returns: (transfer full): An array of xids. | ||
315 | 118 | */ | ||
316 | 119 | GArray * bamf_application_get_xids (BamfApplication *application); | ||
317 | 120 | |||
318 | 121 | /** | ||
319 | 122 | * bamf_application_get_show_stubs: | ||
320 | 123 | * @application: a #BamfApplication | ||
321 | 124 | * | ||
322 | 125 | * Used to discover whether the application wants menu stubs shown. | ||
323 | 126 | * | ||
324 | 127 | * Returns: Whether the stubs should be shown. | ||
325 | 128 | */ | ||
326 | 129 | gboolean bamf_application_get_show_menu_stubs (BamfApplication *application); | ||
327 | 87 | 130 | ||
328 | 88 | G_END_DECLS | 131 | G_END_DECLS |
329 | 89 | 132 | ||
330 | 90 | 133 | ||
331 | === modified file 'lib/libbamf/bamf-matcher.c' | |||
332 | --- lib/libbamf/bamf-matcher.c 2012-11-27 11:39:42 +0000 | |||
333 | +++ lib/libbamf/bamf-matcher.c 2012-11-27 13:41:43 +0000 | |||
334 | @@ -346,14 +346,6 @@ | |||
335 | 346 | /* | 346 | /* |
336 | 347 | * Public Methods | 347 | * Public Methods |
337 | 348 | */ | 348 | */ |
338 | 349 | |||
339 | 350 | /** | ||
340 | 351 | * bamf_matcher_get_default: | ||
341 | 352 | * | ||
342 | 353 | * Returns the default matcher. This matcher is owned by bamf and shared between other callers. | ||
343 | 354 | * | ||
344 | 355 | * Returns: (transfer full): A new #BamfMatcher | ||
345 | 356 | */ | ||
346 | 357 | BamfMatcher * | 349 | BamfMatcher * |
347 | 358 | bamf_matcher_get_default (void) | 350 | bamf_matcher_get_default (void) |
348 | 359 | { | 351 | { |
349 | @@ -363,14 +355,6 @@ | |||
350 | 363 | return (default_matcher = g_object_new (BAMF_TYPE_MATCHER, NULL)); | 355 | return (default_matcher = g_object_new (BAMF_TYPE_MATCHER, NULL)); |
351 | 364 | } | 356 | } |
352 | 365 | 357 | ||
353 | 366 | /** | ||
354 | 367 | * bamf_matcher_get_active_application: | ||
355 | 368 | * @matcher: a #BamfMatcher | ||
356 | 369 | * | ||
357 | 370 | * Used to fetch the active #BamfApplication. | ||
358 | 371 | * | ||
359 | 372 | * Returns: (transfer none): The active #BamfApplication. | ||
360 | 373 | */ | ||
361 | 374 | BamfApplication * | 358 | BamfApplication * |
362 | 375 | bamf_matcher_get_active_application (BamfMatcher *matcher) | 359 | bamf_matcher_get_active_application (BamfMatcher *matcher) |
363 | 376 | { | 360 | { |
364 | @@ -413,14 +397,6 @@ | |||
365 | 413 | return BAMF_APPLICATION (view); | 397 | return BAMF_APPLICATION (view); |
366 | 414 | } | 398 | } |
367 | 415 | 399 | ||
368 | 416 | /** | ||
369 | 417 | * bamf_matcher_get_active_window: | ||
370 | 418 | * @matcher: a #BamfMatcher | ||
371 | 419 | * | ||
372 | 420 | * Used to fetch the active #BamfWindow. | ||
373 | 421 | * | ||
374 | 422 | * Returns: (transfer none): The active #BamfWindow. | ||
375 | 423 | */ | ||
376 | 424 | BamfWindow * | 400 | BamfWindow * |
377 | 425 | bamf_matcher_get_active_window (BamfMatcher *matcher) | 401 | bamf_matcher_get_active_window (BamfMatcher *matcher) |
378 | 426 | { | 402 | { |
379 | @@ -463,36 +439,16 @@ | |||
380 | 463 | return BAMF_WINDOW (view); | 439 | return BAMF_WINDOW (view); |
381 | 464 | } | 440 | } |
382 | 465 | 441 | ||
392 | 466 | /** | 442 | /* Looks up the window's XID and calls the application_for_xid |
393 | 467 | * bamf_matcher_get_application_for_window: | 443 | function just below here. */ |
385 | 468 | * @matcher: a #BamfMatcher | ||
386 | 469 | * @window: The window to look for | ||
387 | 470 | * | ||
388 | 471 | * Used to fetch the #BamfApplication containing the passed window. | ||
389 | 472 | * | ||
390 | 473 | * Returns: (transfer none): The #BamfApplication representing the xid passed, or NULL if none exists. | ||
391 | 474 | */ | ||
394 | 475 | BamfApplication * | 444 | BamfApplication * |
395 | 476 | bamf_matcher_get_application_for_window (BamfMatcher *matcher, | 445 | bamf_matcher_get_application_for_window (BamfMatcher *matcher, |
396 | 477 | BamfWindow *window) | 446 | BamfWindow *window) |
397 | 478 | { | 447 | { |
398 | 479 | /* Looks up the window's XID and calls the application_for_xid | ||
399 | 480 | function just below here. */ | ||
400 | 481 | |||
401 | 482 | g_return_val_if_fail(BAMF_IS_WINDOW(window), NULL); | 448 | g_return_val_if_fail(BAMF_IS_WINDOW(window), NULL); |
404 | 483 | return bamf_matcher_get_application_for_xid (matcher, | 449 | return bamf_matcher_get_application_for_xid (matcher, bamf_window_get_xid(window)); |
403 | 484 | bamf_window_get_xid(window)); | ||
405 | 485 | } | 450 | } |
406 | 486 | 451 | ||
407 | 487 | /** | ||
408 | 488 | * bamf_matcher_get_application_for_xid: | ||
409 | 489 | * @matcher: a #BamfMatcher | ||
410 | 490 | * @xid: The XID to search for | ||
411 | 491 | * | ||
412 | 492 | * Used to fetch the #BamfApplication containing the passed xid. | ||
413 | 493 | * | ||
414 | 494 | * Returns: (transfer none): The #BamfApplication representing the xid passed, or NULL if none exists. | ||
415 | 495 | */ | ||
416 | 496 | BamfApplication * | 452 | BamfApplication * |
417 | 497 | bamf_matcher_get_application_for_xid (BamfMatcher *matcher, | 453 | bamf_matcher_get_application_for_xid (BamfMatcher *matcher, |
418 | 498 | guint32 xid) | 454 | guint32 xid) |
419 | @@ -566,17 +522,6 @@ | |||
420 | 566 | return running; | 522 | return running; |
421 | 567 | } | 523 | } |
422 | 568 | 524 | ||
423 | 569 | /** | ||
424 | 570 | * bamf_matcher_get_applications: | ||
425 | 571 | * @matcher: a #BamfMatcher | ||
426 | 572 | * | ||
427 | 573 | * Used to fetch all #BamfApplication's running or not. Application authors who wish to only | ||
428 | 574 | * see running applications should use bamf_matcher_get_running_applications instead. The reason | ||
429 | 575 | * this method is needed is bamf will occasionally track applications which are not currently | ||
430 | 576 | * running for nefarious purposes. | ||
431 | 577 | * | ||
432 | 578 | * Returns: (element-type Bamf.Application) (transfer container): A list of #BamfApplication's. | ||
433 | 579 | */ | ||
434 | 580 | GList * | 525 | GList * |
435 | 581 | bamf_matcher_get_applications (BamfMatcher *matcher) | 526 | bamf_matcher_get_applications (BamfMatcher *matcher) |
436 | 582 | { | 527 | { |
437 | @@ -620,14 +565,6 @@ | |||
438 | 620 | return result; | 565 | return result; |
439 | 621 | } | 566 | } |
440 | 622 | 567 | ||
441 | 623 | /** | ||
442 | 624 | * bamf_matcher_get_windows: | ||
443 | 625 | * @matcher: a #BamfMatcher | ||
444 | 626 | * | ||
445 | 627 | * Used to fetch all windows that BAMF knows about. | ||
446 | 628 | * | ||
447 | 629 | * Returns: (element-type Bamf.View) (transfer container): A list of windows. | ||
448 | 630 | */ | ||
449 | 631 | GList * | 568 | GList * |
450 | 632 | bamf_matcher_get_windows (BamfMatcher *matcher) | 569 | bamf_matcher_get_windows (BamfMatcher *matcher) |
451 | 633 | { | 570 | { |
452 | @@ -671,16 +608,6 @@ | |||
453 | 671 | return result; | 608 | return result; |
454 | 672 | } | 609 | } |
455 | 673 | 610 | ||
456 | 674 | /** | ||
457 | 675 | * bamf_matcher_get_window_stack_for_monitor: | ||
458 | 676 | * @matcher: a #BamfMatcher | ||
459 | 677 | * @monitor: the monitor you want the stack from, negative value to get all | ||
460 | 678 | * | ||
461 | 679 | * Used to fetch all windows that BAMF knows about in the requested screen, | ||
462 | 680 | * in stacking bottom-to-top order. | ||
463 | 681 | * | ||
464 | 682 | * Returns: (element-type Bamf.View) (transfer container): A list of #BamfWindow. | ||
465 | 683 | */ | ||
466 | 684 | GList * | 611 | GList * |
467 | 685 | bamf_matcher_get_window_stack_for_monitor (BamfMatcher *matcher, gint monitor) | 612 | bamf_matcher_get_window_stack_for_monitor (BamfMatcher *matcher, gint monitor) |
468 | 686 | { | 613 | { |
469 | @@ -726,14 +653,6 @@ | |||
470 | 726 | return result; | 653 | return result; |
471 | 727 | } | 654 | } |
472 | 728 | 655 | ||
473 | 729 | /** | ||
474 | 730 | * bamf_matcher_register_favorites: | ||
475 | 731 | * @matcher: a #BamfMatcher | ||
476 | 732 | * @favorites: an array of strings, each containing an absolute path to a .desktop file | ||
477 | 733 | * | ||
478 | 734 | * Used to effect how bamf performs matching. Desktop files passed to this method will | ||
479 | 735 | * be prefered by bamf to system desktop files. | ||
480 | 736 | */ | ||
481 | 737 | void | 656 | void |
482 | 738 | bamf_matcher_register_favorites (BamfMatcher *matcher, | 657 | bamf_matcher_register_favorites (BamfMatcher *matcher, |
483 | 739 | const gchar **favorites) | 658 | const gchar **favorites) |
484 | @@ -751,14 +670,6 @@ | |||
485 | 751 | G_TYPE_INVALID); | 670 | G_TYPE_INVALID); |
486 | 752 | } | 671 | } |
487 | 753 | 672 | ||
488 | 754 | /** | ||
489 | 755 | * bamf_matcher_get_running_applications: | ||
490 | 756 | * @matcher: a #BamfMatcher | ||
491 | 757 | * | ||
492 | 758 | * Used to fetch all #BamfApplication's which are running. | ||
493 | 759 | * | ||
494 | 760 | * Returns: (element-type Bamf.Application) (transfer container): A list of #BamfApplication's. | ||
495 | 761 | */ | ||
496 | 762 | GList * | 673 | GList * |
497 | 763 | bamf_matcher_get_running_applications (BamfMatcher *matcher) | 674 | bamf_matcher_get_running_applications (BamfMatcher *matcher) |
498 | 764 | { | 675 | { |
499 | @@ -802,14 +713,6 @@ | |||
500 | 802 | return result; | 713 | return result; |
501 | 803 | } | 714 | } |
502 | 804 | 715 | ||
503 | 805 | /** | ||
504 | 806 | * bamf_matcher_get_tabs: | ||
505 | 807 | * @matcher: a #BamfMatcher | ||
506 | 808 | * | ||
507 | 809 | * Used to fetch all #BamfView's representing tabs. Currently unused. | ||
508 | 810 | * | ||
509 | 811 | * Returns: (element-type Bamf.View) (transfer container): A list of #BamfViews's. | ||
510 | 812 | */ | ||
511 | 813 | GList * | 716 | GList * |
512 | 814 | bamf_matcher_get_tabs (BamfMatcher *matcher) | 717 | bamf_matcher_get_tabs (BamfMatcher *matcher) |
513 | 815 | { | 718 | { |
514 | @@ -817,15 +720,6 @@ | |||
515 | 817 | return NULL; | 720 | return NULL; |
516 | 818 | } | 721 | } |
517 | 819 | 722 | ||
518 | 820 | /** | ||
519 | 821 | * bamf_matcher_get_xids_for_application: | ||
520 | 822 | * @matcher: a #BamfMatcher | ||
521 | 823 | * | ||
522 | 824 | * Used to fetch all xid's associated with an application. Useful for performing window | ||
523 | 825 | * | ||
524 | 826 | * | ||
525 | 827 | * Returns: (element-type guint32) (transfer full): A list of xids. | ||
526 | 828 | */ | ||
527 | 829 | GArray * | 723 | GArray * |
528 | 830 | bamf_matcher_get_xids_for_application (BamfMatcher *matcher, | 724 | bamf_matcher_get_xids_for_application (BamfMatcher *matcher, |
529 | 831 | const gchar *application) | 725 | const gchar *application) |
530 | @@ -834,14 +728,6 @@ | |||
531 | 834 | return NULL; | 728 | return NULL; |
532 | 835 | } | 729 | } |
533 | 836 | 730 | ||
534 | 837 | /** | ||
535 | 838 | * bamf_matcher_get_application_for_desktop_file: | ||
536 | 839 | * @matcher: a #BamfMatcher | ||
537 | 840 | * @desktop_file_path: Path to the desktop file | ||
538 | 841 | * @create_if_not_found: Create a #BamfApplication if one isn't found | ||
539 | 842 | * | ||
540 | 843 | * Returns: (transfer none): A #BamfApplication for given desktop file. | ||
541 | 844 | */ | ||
542 | 845 | BamfApplication * | 731 | BamfApplication * |
543 | 846 | bamf_matcher_get_application_for_desktop_file (BamfMatcher *matcher, | 732 | bamf_matcher_get_application_for_desktop_file (BamfMatcher *matcher, |
544 | 847 | const gchar *desktop_file_path, | 733 | const gchar *desktop_file_path, |
545 | 848 | 734 | ||
546 | === modified file 'lib/libbamf/bamf-matcher.h' | |||
547 | --- lib/libbamf/bamf-matcher.h 2012-07-01 18:13:55 +0000 | |||
548 | +++ lib/libbamf/bamf-matcher.h 2012-11-27 13:41:43 +0000 | |||
549 | @@ -76,34 +76,138 @@ | |||
550 | 76 | 76 | ||
551 | 77 | GType bamf_matcher_get_type (void) G_GNUC_CONST; | 77 | GType bamf_matcher_get_type (void) G_GNUC_CONST; |
552 | 78 | 78 | ||
553 | 79 | /** | ||
554 | 80 | * bamf_matcher_get_default: | ||
555 | 81 | * @matcher: a #BamfMatcher | ||
556 | 82 | * | ||
557 | 83 | * Returns the default matcher. This matcher is owned by bamf and shared between other callers. | ||
558 | 84 | * | ||
559 | 85 | * Returns: (transfer none): A new #BamfMatcher | ||
560 | 86 | */ | ||
561 | 79 | BamfMatcher * bamf_matcher_get_default (void); | 87 | BamfMatcher * bamf_matcher_get_default (void); |
562 | 80 | 88 | ||
563 | 89 | /** | ||
564 | 90 | * bamf_matcher_get_active_application: | ||
565 | 91 | * @matcher: a #BamfMatcher | ||
566 | 92 | * | ||
567 | 93 | * Used to fetch the active #BamfApplication. | ||
568 | 94 | * | ||
569 | 95 | * Returns: (transfer none): The active #BamfApplication. | ||
570 | 96 | */ | ||
571 | 81 | BamfApplication * bamf_matcher_get_active_application (BamfMatcher *matcher); | 97 | BamfApplication * bamf_matcher_get_active_application (BamfMatcher *matcher); |
572 | 82 | 98 | ||
573 | 99 | /** | ||
574 | 100 | * bamf_matcher_get_active_window: | ||
575 | 101 | * @matcher: a #BamfMatcher | ||
576 | 102 | * | ||
577 | 103 | * Used to fetch the active #BamfWindow. | ||
578 | 104 | * | ||
579 | 105 | * Returns: (transfer none): The active #BamfWindow. | ||
580 | 106 | */ | ||
581 | 83 | BamfWindow * bamf_matcher_get_active_window (BamfMatcher *matcher); | 107 | BamfWindow * bamf_matcher_get_active_window (BamfMatcher *matcher); |
582 | 84 | 108 | ||
583 | 109 | /** | ||
584 | 110 | * bamf_matcher_get_application_for_xid: | ||
585 | 111 | * @matcher: a #BamfMatcher | ||
586 | 112 | * @xid: The XID to search for | ||
587 | 113 | * | ||
588 | 114 | * Used to fetch the #BamfApplication containing the passed xid. | ||
589 | 115 | * | ||
590 | 116 | * Returns: (transfer container): The #BamfApplication representing the xid passed, or NULL if none exists. | ||
591 | 117 | */ | ||
592 | 85 | BamfApplication * bamf_matcher_get_application_for_xid (BamfMatcher *matcher, | 118 | BamfApplication * bamf_matcher_get_application_for_xid (BamfMatcher *matcher, |
593 | 86 | guint32 xid); | 119 | guint32 xid); |
594 | 120 | /** | ||
595 | 121 | * bamf_matcher_get_application_for_window: | ||
596 | 122 | * @matcher: a #BamfMatcher | ||
597 | 123 | * @window: The window to look for | ||
598 | 124 | * | ||
599 | 125 | * Used to fetch the #BamfApplication containing the passed window. | ||
600 | 126 | * | ||
601 | 127 | * Returns: (transfer container): The #BamfApplication representing the xid passed, or NULL if none exists. | ||
602 | 128 | */ | ||
603 | 87 | BamfApplication * bamf_matcher_get_application_for_window (BamfMatcher *matcher, | 129 | BamfApplication * bamf_matcher_get_application_for_window (BamfMatcher *matcher, |
604 | 88 | BamfWindow *window); | 130 | BamfWindow *window); |
605 | 89 | 131 | ||
606 | 90 | gboolean bamf_matcher_application_is_running (BamfMatcher *matcher, | 132 | gboolean bamf_matcher_application_is_running (BamfMatcher *matcher, |
607 | 91 | const gchar *application); | 133 | const gchar *application); |
608 | 92 | 134 | ||
609 | 135 | /** | ||
610 | 136 | * bamf_matcher_get_applications: | ||
611 | 137 | * @matcher: a #BamfMatcher | ||
612 | 138 | * | ||
613 | 139 | * Used to fetch all #BamfApplication's running or not. Application authors who wish to only | ||
614 | 140 | * see running applications should use bamf_matcher_get_running_applications instead. The reason | ||
615 | 141 | * this method is needed is bamf will occasionally track applications which are not currently | ||
616 | 142 | * running for nefarious purposes. | ||
617 | 143 | * | ||
618 | 144 | * Returns: (element-type Bamf.Application) (transfer container): A list of #BamfApplication's. | ||
619 | 145 | */ | ||
620 | 93 | GList * bamf_matcher_get_applications (BamfMatcher *matcher); | 146 | GList * bamf_matcher_get_applications (BamfMatcher *matcher); |
621 | 94 | 147 | ||
622 | 148 | /** | ||
623 | 149 | * bamf_matcher_register_favorites: | ||
624 | 150 | * @matcher: a #BamfMatcher | ||
625 | 151 | * @favorites: an array of strings, each containing an absolute path to a .desktop file | ||
626 | 152 | * | ||
627 | 153 | * Used to effect how bamf performs matching. Desktop files passed to this method will | ||
628 | 154 | * be prefered by bamf to system desktop files. | ||
629 | 155 | */ | ||
630 | 95 | void bamf_matcher_register_favorites (BamfMatcher *matcher, | 156 | void bamf_matcher_register_favorites (BamfMatcher *matcher, |
631 | 96 | const gchar **favorites); | 157 | const gchar **favorites); |
632 | 97 | 158 | ||
633 | 159 | /** | ||
634 | 160 | * bamf_matcher_get_running_applications: | ||
635 | 161 | * @matcher: a #BamfMatcher | ||
636 | 162 | * | ||
637 | 163 | * Used to fetch all #BamfApplication's which are running. | ||
638 | 164 | * | ||
639 | 165 | * Returns: (element-type Bamf.Application) (transfer container): A list of #BamfApplication's. | ||
640 | 166 | */ | ||
641 | 98 | GList * bamf_matcher_get_running_applications (BamfMatcher *matcher); | 167 | GList * bamf_matcher_get_running_applications (BamfMatcher *matcher); |
642 | 99 | 168 | ||
643 | 169 | /** | ||
644 | 170 | * bamf_matcher_get_tabs: | ||
645 | 171 | * @matcher: a #BamfMatcher | ||
646 | 172 | * | ||
647 | 173 | * Used to fetch all #BamfView's representing tabs. Currently unused. | ||
648 | 174 | * | ||
649 | 175 | * Returns: (element-type Bamf.View) (transfer container): A list of #BamfViews's. | ||
650 | 176 | */ | ||
651 | 100 | GList * bamf_matcher_get_tabs (BamfMatcher *matcher); | 177 | GList * bamf_matcher_get_tabs (BamfMatcher *matcher); |
652 | 101 | 178 | ||
653 | 179 | /** | ||
654 | 180 | * bamf_matcher_get_applications: | ||
655 | 181 | * @matcher: a #BamfMatcher | ||
656 | 182 | * | ||
657 | 183 | * Used to fetch all xid's associated with an application. Useful for performing window | ||
658 | 184 | * | ||
659 | 185 | * | ||
660 | 186 | * Returns: (element-type guint32) (transfer none): A list of xids. | ||
661 | 187 | */ | ||
662 | 102 | GArray * bamf_matcher_get_xids_for_application (BamfMatcher *matcher, | 188 | GArray * bamf_matcher_get_xids_for_application (BamfMatcher *matcher, |
663 | 103 | const gchar *application); | 189 | const gchar *application); |
664 | 104 | 190 | ||
665 | 191 | /** | ||
666 | 192 | * bamf_matcher_get_windows: | ||
667 | 193 | * @matcher: a #BamfMatcher | ||
668 | 194 | * | ||
669 | 195 | * Used to fetch all windows that BAMF knows about. | ||
670 | 196 | * | ||
671 | 197 | * Returns: (element-type Bamf.View) (transfer container): A list of windows. | ||
672 | 198 | */ | ||
673 | 105 | GList * bamf_matcher_get_windows (BamfMatcher *matcher); | 199 | GList * bamf_matcher_get_windows (BamfMatcher *matcher); |
674 | 106 | 200 | ||
675 | 201 | /** | ||
676 | 202 | * bamf_matcher_get_window_stack_for_monitor: | ||
677 | 203 | * @matcher: a #BamfMatcher | ||
678 | 204 | * @monitor: the monitor you want the stack from, negative value to get all | ||
679 | 205 | * | ||
680 | 206 | * Used to fetch all windows that BAMF knows about in the requested screen, | ||
681 | 207 | * in stacking bottom-to-top order. | ||
682 | 208 | * | ||
683 | 209 | * Returns: (element-type Bamf.View) (transfer container): A list of #BamfWindow. | ||
684 | 210 | */ | ||
685 | 107 | GList * bamf_matcher_get_window_stack_for_monitor (BamfMatcher *matcher, | 211 | GList * bamf_matcher_get_window_stack_for_monitor (BamfMatcher *matcher, |
686 | 108 | gint monitor); | 212 | gint monitor); |
687 | 109 | 213 | ||
688 | 110 | 214 | ||
689 | === modified file 'lib/libbamf/bamf-view.c' | |||
690 | --- lib/libbamf/bamf-view.c 2012-11-27 11:39:42 +0000 | |||
691 | +++ lib/libbamf/bamf-view.c 2012-11-27 13:41:43 +0000 | |||
692 | @@ -142,15 +142,6 @@ | |||
693 | 142 | return priv->set_flags & flag; | 142 | return priv->set_flags & flag; |
694 | 143 | } | 143 | } |
695 | 144 | 144 | ||
696 | 145 | /** | ||
697 | 146 | * bamf_view_get_children: | ||
698 | 147 | * @view: a #BamfView | ||
699 | 148 | * | ||
700 | 149 | * Note: Makes sever dbus calls the first time this is called on a view. Dbus messaging is reduced afterwards. | ||
701 | 150 | * | ||
702 | 151 | * Returns: (element-type Bamf.View) (transfer container): Returns a list of #BamfView which must be | ||
703 | 152 | * freed after usage. Elements of the list are owned by bamf and should not be unreffed. | ||
704 | 153 | */ | ||
705 | 154 | GList * | 145 | GList * |
706 | 155 | bamf_view_get_children (BamfView *view) | 146 | bamf_view_get_children (BamfView *view) |
707 | 156 | { | 147 | { |
708 | @@ -233,12 +224,6 @@ | |||
709 | 233 | return result; | 224 | return result; |
710 | 234 | } | 225 | } |
711 | 235 | 226 | ||
712 | 236 | /** | ||
713 | 237 | * bamf_view_is_closed: | ||
714 | 238 | * @view: a #BamfView | ||
715 | 239 | * | ||
716 | 240 | * Determines if the view is closed or not. | ||
717 | 241 | */ | ||
718 | 242 | gboolean | 227 | gboolean |
719 | 243 | bamf_view_is_closed (BamfView *view) | 228 | bamf_view_is_closed (BamfView *view) |
720 | 244 | { | 229 | { |
721 | @@ -247,12 +232,6 @@ | |||
722 | 247 | return view->priv->is_closed; | 232 | return view->priv->is_closed; |
723 | 248 | } | 233 | } |
724 | 249 | 234 | ||
725 | 250 | /** | ||
726 | 251 | * bamf_view_is_active: | ||
727 | 252 | * @view: a #BamfView | ||
728 | 253 | * | ||
729 | 254 | * Determines if the view is currently active and focused by the user. Useful for an active window indicator. | ||
730 | 255 | */ | ||
731 | 256 | gboolean | 235 | gboolean |
732 | 257 | bamf_view_is_active (BamfView *view) | 236 | bamf_view_is_active (BamfView *view) |
733 | 258 | { | 237 | { |
734 | @@ -265,14 +244,7 @@ | |||
735 | 265 | 244 | ||
736 | 266 | } | 245 | } |
737 | 267 | 246 | ||
746 | 268 | /** | 247 | gboolean |
739 | 269 | * bamf_view_user_visible: | ||
740 | 270 | * @view: a #BamfView | ||
741 | 271 | * | ||
742 | 272 | * Returns a boolean useful for determining if a particular view is "user visible". User visible | ||
743 | 273 | * is a concept relating to whether or not a window should be shown in a launcher tasklist. | ||
744 | 274 | */ | ||
745 | 275 | gboolean | ||
747 | 276 | bamf_view_user_visible (BamfView *self) | 248 | bamf_view_user_visible (BamfView *self) |
748 | 277 | { | 249 | { |
749 | 278 | g_return_val_if_fail (BAMF_IS_VIEW (self), FALSE); | 250 | g_return_val_if_fail (BAMF_IS_VIEW (self), FALSE); |
750 | @@ -281,12 +253,6 @@ | |||
751 | 281 | 253 | ||
752 | 282 | } | 254 | } |
753 | 283 | 255 | ||
754 | 284 | /** | ||
755 | 285 | * bamf_view_is_running: | ||
756 | 286 | * @view: a #BamfView | ||
757 | 287 | * | ||
758 | 288 | * Determines if the view is currently running. Useful for a running window indicator. | ||
759 | 289 | */ | ||
760 | 290 | gboolean | 256 | gboolean |
761 | 291 | bamf_view_is_running (BamfView *self) | 257 | bamf_view_is_running (BamfView *self) |
762 | 292 | { | 258 | { |
763 | @@ -298,12 +264,6 @@ | |||
764 | 298 | return bamf_view_get_boolean (self, "IsRunning", BAMF_VIEW_RUNNING_FLAG); | 264 | return bamf_view_get_boolean (self, "IsRunning", BAMF_VIEW_RUNNING_FLAG); |
765 | 299 | } | 265 | } |
766 | 300 | 266 | ||
767 | 301 | /** | ||
768 | 302 | * bamf_view_is_urgent: | ||
769 | 303 | * @view: a #BamfView | ||
770 | 304 | * | ||
771 | 305 | * Determines if the view is currently requiring attention. Useful for a running window indicator. | ||
772 | 306 | */ | ||
773 | 307 | gboolean | 267 | gboolean |
774 | 308 | bamf_view_is_urgent (BamfView *self) | 268 | bamf_view_is_urgent (BamfView *self) |
775 | 309 | { | 269 | { |
776 | @@ -376,12 +336,6 @@ | |||
777 | 376 | g_object_unref (view); | 336 | g_object_unref (view); |
778 | 377 | } | 337 | } |
779 | 378 | 338 | ||
780 | 379 | /** | ||
781 | 380 | * bamf_view_get_icon: | ||
782 | 381 | * @view: a #BamfView | ||
783 | 382 | * | ||
784 | 383 | * Gets the icon of a view. This icon is used to visually represent the view. | ||
785 | 384 | */ | ||
786 | 385 | gchar * | 339 | gchar * |
787 | 386 | bamf_view_get_icon (BamfView *self) | 340 | bamf_view_get_icon (BamfView *self) |
788 | 387 | { | 341 | { |
789 | @@ -420,12 +374,6 @@ | |||
790 | 420 | return icon; | 374 | return icon; |
791 | 421 | } | 375 | } |
792 | 422 | 376 | ||
793 | 423 | /** | ||
794 | 424 | * bamf_view_get_name: | ||
795 | 425 | * @view: a #BamfView | ||
796 | 426 | * | ||
797 | 427 | * Gets the name of a view. This name is a short name best used to represent the view with text. | ||
798 | 428 | */ | ||
799 | 429 | gchar * | 377 | gchar * |
800 | 430 | bamf_view_get_name (BamfView *self) | 378 | bamf_view_get_name (BamfView *self) |
801 | 431 | { | 379 | { |
802 | @@ -473,15 +421,6 @@ | |||
803 | 473 | return FALSE; | 421 | return FALSE; |
804 | 474 | } | 422 | } |
805 | 475 | 423 | ||
806 | 476 | /** | ||
807 | 477 | * bamf_view_get_view_type: | ||
808 | 478 | * @view: a #BamfView | ||
809 | 479 | * | ||
810 | 480 | * The view type of a window is a short string used to represent all views of the same class. These | ||
811 | 481 | * descriptions should not be used to do casting as they are not considered stable. | ||
812 | 482 | * | ||
813 | 483 | * Virtual: view_type | ||
814 | 484 | */ | ||
815 | 485 | const gchar * | 424 | const gchar * |
816 | 486 | bamf_view_get_view_type (BamfView *self) | 425 | bamf_view_get_view_type (BamfView *self) |
817 | 487 | { | 426 | { |
818 | 488 | 427 | ||
819 | === modified file 'lib/libbamf/bamf-view.h' | |||
820 | --- lib/libbamf/bamf-view.h 2012-07-01 18:13:55 +0000 | |||
821 | +++ lib/libbamf/bamf-view.h 2012-11-27 13:41:43 +0000 | |||
822 | @@ -106,22 +106,83 @@ | |||
823 | 106 | 106 | ||
824 | 107 | GType bamf_view_get_type (void) G_GNUC_CONST; | 107 | GType bamf_view_get_type (void) G_GNUC_CONST; |
825 | 108 | 108 | ||
826 | 109 | /** | ||
827 | 110 | * bamf_view_get_children: | ||
828 | 111 | * @view: a #BamfView | ||
829 | 112 | * | ||
830 | 113 | * Note: Makes sever dbus calls the first time this is called on a view. Dbus messaging is reduced afterwards. | ||
831 | 114 | * | ||
832 | 115 | * Returns: (element-type Bamf.View) (transfer container): Returns a list of #BamfView which must be | ||
833 | 116 | * freed after usage. Elements of the list are owned by bamf and should not be unreffed. | ||
834 | 117 | */ | ||
835 | 109 | GList * bamf_view_get_children (BamfView *view); | 118 | GList * bamf_view_get_children (BamfView *view); |
836 | 110 | 119 | ||
837 | 120 | /** | ||
838 | 121 | * bamf_view_is_active: | ||
839 | 122 | * @view: a #BamfView | ||
840 | 123 | * | ||
841 | 124 | * Determines if the view is closed or not. | ||
842 | 125 | */ | ||
843 | 111 | gboolean bamf_view_is_closed (BamfView *view); | 126 | gboolean bamf_view_is_closed (BamfView *view); |
844 | 112 | 127 | ||
845 | 128 | /** | ||
846 | 129 | * bamf_view_is_active: | ||
847 | 130 | * @view: a #BamfView | ||
848 | 131 | * | ||
849 | 132 | * Determines if the view is currently active and focused by the user. Useful for an active window indicator. | ||
850 | 133 | */ | ||
851 | 113 | gboolean bamf_view_is_active (BamfView *view); | 134 | gboolean bamf_view_is_active (BamfView *view); |
852 | 114 | 135 | ||
853 | 136 | /** | ||
854 | 137 | * bamf_view_is_running: | ||
855 | 138 | * @view: a #BamfView | ||
856 | 139 | * | ||
857 | 140 | * Determines if the view is currently running. Useful for a running window indicator. | ||
858 | 141 | */ | ||
859 | 115 | gboolean bamf_view_is_running (BamfView *view); | 142 | gboolean bamf_view_is_running (BamfView *view); |
860 | 116 | 143 | ||
861 | 144 | /** | ||
862 | 145 | * bamf_view_is_running: | ||
863 | 146 | * @view: a #BamfView | ||
864 | 147 | * | ||
865 | 148 | * Determines if the view is currently requiring attention. Useful for a running window indicator. | ||
866 | 149 | */ | ||
867 | 117 | gboolean bamf_view_is_urgent (BamfView *view); | 150 | gboolean bamf_view_is_urgent (BamfView *view); |
868 | 118 | 151 | ||
869 | 152 | /** | ||
870 | 153 | * bamf_view_get_name: | ||
871 | 154 | * @view: a #BamfView | ||
872 | 155 | * | ||
873 | 156 | * Gets the name of a view. This name is a short name best used to represent the view with text. | ||
874 | 157 | */ | ||
875 | 119 | gchar * bamf_view_get_name (BamfView *view); | 158 | gchar * bamf_view_get_name (BamfView *view); |
876 | 120 | 159 | ||
877 | 160 | /** | ||
878 | 161 | * bamf_view_get_icon: | ||
879 | 162 | * @view: a #BamfView | ||
880 | 163 | * | ||
881 | 164 | * Gets the icon of a view. This icon is used to visually represent the view. | ||
882 | 165 | */ | ||
883 | 121 | gchar * bamf_view_get_icon (BamfView *view); | 166 | gchar * bamf_view_get_icon (BamfView *view); |
884 | 122 | 167 | ||
885 | 168 | /** | ||
886 | 169 | * bamf_view_user_visible: | ||
887 | 170 | * @view: a #BamfView | ||
888 | 171 | * | ||
889 | 172 | * Returns a boolean useful for determining if a particular view is "user visible". User visible | ||
890 | 173 | * is a concept relating to whether or not a window should be shown in a launcher tasklist. | ||
891 | 174 | */ | ||
892 | 123 | gboolean bamf_view_user_visible (BamfView *view); | 175 | gboolean bamf_view_user_visible (BamfView *view); |
893 | 124 | 176 | ||
894 | 177 | /** | ||
895 | 178 | * bamf_view_get_view_type: | ||
896 | 179 | * @view: a #BamfView | ||
897 | 180 | * | ||
898 | 181 | * The view type of a window is a short string used to represent all views of the same class. These | ||
899 | 182 | * descriptions should not be used to do casting as they are not considered stable. | ||
900 | 183 | * | ||
901 | 184 | * Returns: (transfer full): A gchar* | ||
902 | 185 | */ | ||
903 | 125 | const gchar * bamf_view_get_view_type (BamfView *view); | 186 | const gchar * bamf_view_get_view_type (BamfView *view); |
904 | 126 | 187 | ||
905 | 127 | void bamf_view_set_sticky (BamfView *view, gboolean value); | 188 | void bamf_view_set_sticky (BamfView *view, gboolean value); |
906 | 128 | 189 | ||
907 | === modified file 'lib/libbamf/bamf-window.c' | |||
908 | --- lib/libbamf/bamf-window.c 2012-11-27 11:39:42 +0000 | |||
909 | +++ lib/libbamf/bamf-window.c 2012-11-27 13:41:43 +0000 | |||
910 | @@ -75,13 +75,6 @@ | |||
911 | 75 | return self->priv->last_active; | 75 | return self->priv->last_active; |
912 | 76 | } | 76 | } |
913 | 77 | 77 | ||
914 | 78 | /** | ||
915 | 79 | * bamf_window_get_transient: | ||
916 | 80 | * @self: a #BamfWindow | ||
917 | 81 | * | ||
918 | 82 | * Returns: (transfer none) (nullable): A transient for this #BamfWindow. | ||
919 | 83 | */ | ||
920 | 84 | |||
921 | 85 | BamfWindow * bamf_window_get_transient (BamfWindow *self) | 78 | BamfWindow * bamf_window_get_transient (BamfWindow *self) |
922 | 86 | { | 79 | { |
923 | 87 | BamfWindowPrivate *priv; | 80 | BamfWindowPrivate *priv; |
Looks good to me. If distro says it needs reverting, let be it!