Merge lp:~ricotz/bamf/replace-user-visible into lp:bamf/0.4

Proposed by Rico Tzschichholz on 2012-10-27
Status: Merged
Approved by: Didier Roche on 2012-11-12
Approved revision: 496
Merged at revision: 496
Proposed branch: lp:~ricotz/bamf/replace-user-visible
Merge into: lp:bamf/0.4
Diff against target: 119 lines (+33/-14)
4 files modified
configure.in (+1/-1)
lib/libbamf/bamf-view.c (+27/-11)
lib/libbamf/bamf-view.h (+3/-0)
tests/functional/alt-tabber.c (+2/-2)
To merge this branch: bzr merge lp:~ricotz/bamf/replace-user-visible
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing on 2012-11-05
Marco Trevisan (Treviño) 2012-10-27 Approve on 2012-11-05
Review via email: mp+131723@code.launchpad.net

Commit Message

libbamf: add bamf_view_is_user_visible ()

This makes the gir/vala api nicer and avoids a conlict with the property.
Mark bamf_view_user_visible as deprecated using glib 2.32 macro

Description of the Change

This makes the gir/vala api nicer and avoids a conflict with the property.
Mark bamf_view_user_visible as deprecated using glib 2.32 macro

To post a comment you must log in.
Marco Trevisan (Treviño) (3v1n0) wrote :

+1

review: Approve
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
No commit message was specified.

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.in'
2--- configure.in 2012-10-08 10:24:47 +0000
3+++ configure.in 2012-10-27 07:44:19 +0000
4@@ -57,7 +57,7 @@
5 #
6 # glib
7 #
8-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28.0 gio-2.0 >= 2.30.0 gio-unix-2.0)
9+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32.0 gio-2.0 >= 2.30.0 gio-unix-2.0)
10
11 #
12 # gdbus-codegen
13
14=== modified file 'lib/libbamf/bamf-view.c'
15--- lib/libbamf/bamf-view.c 2012-10-08 16:34:51 +0000
16+++ lib/libbamf/bamf-view.c 2012-10-27 07:44:19 +0000
17@@ -267,19 +267,35 @@
18 }
19
20 /**
21- * bamf_view_user_visible:
22- * @view: a #BamfView
23- *
24- * Returns: a boolean useful for determining if a particular view is "user visible". User visible
25- * is a concept relating to whether or not a window should be shown in a launcher tasklist.
26+ * bamf_view_is_user_visible:
27+ * @view: a #BamfView
28+ *
29+ * Returns: a boolean useful for determining if a particular view is "user visible". User visible
30+ * is a concept relating to whether or not a window should be shown in a launcher tasklist.
31+ *
32+ * Since: 0.4.0
33+ */
34+gboolean
35+bamf_view_is_user_visible (BamfView *self)
36+{
37+ g_return_val_if_fail (BAMF_IS_VIEW (self), FALSE);
38+
39+ return bamf_view_get_boolean (self, "UserVisible", BAMF_VIEW_VISIBLE_FLAG);
40+}
41+
42+/**
43+ * bamf_view_user_visible: (skip)
44+ * @view: a #BamfView
45+ *
46+ * Returns: a boolean useful for determining if a particular view is "user visible". User visible
47+ * is a concept relating to whether or not a window should be shown in a launcher tasklist.
48+ *
49+ * Deprecated: 0.4.0
50 */
51 gboolean
52 bamf_view_user_visible (BamfView *self)
53 {
54- g_return_val_if_fail (BAMF_IS_VIEW (self), FALSE);
55-
56- return bamf_view_get_boolean (self, "UserVisible", BAMF_VIEW_VISIBLE_FLAG);
57-
58+ return bamf_view_is_user_visible (self);
59 }
60
61 /**
62@@ -706,7 +722,7 @@
63 break;
64
65 case PROP_USER_VISIBLE:
66- g_value_set_boolean (value, bamf_view_user_visible (self));
67+ g_value_set_boolean (value, bamf_view_is_user_visible (self));
68 break;
69
70 default:
71@@ -827,7 +843,7 @@
72 priv = view->priv;
73 priv->checked_flags = 0x0;
74
75- if (bamf_view_user_visible (view))
76+ if (bamf_view_is_user_visible (view))
77 {
78 g_signal_emit (G_OBJECT(view), view_signals[VISIBLE_CHANGED], 0, TRUE);
79 g_object_notify (G_OBJECT (view), "user-visible");
80
81=== modified file 'lib/libbamf/bamf-view.h'
82--- lib/libbamf/bamf-view.h 2012-10-08 11:41:04 +0000
83+++ lib/libbamf/bamf-view.h 2012-10-27 07:44:19 +0000
84@@ -116,10 +116,13 @@
85
86 gboolean bamf_view_is_urgent (BamfView *view);
87
88+gboolean bamf_view_is_user_visible (BamfView *view);
89+
90 gchar * bamf_view_get_name (BamfView *view);
91
92 gchar * bamf_view_get_icon (BamfView *view);
93
94+GLIB_DEPRECATED
95 gboolean bamf_view_user_visible (BamfView *view);
96
97 const gchar * bamf_view_get_view_type (BamfView *view);
98
99=== modified file 'tests/functional/alt-tabber.c'
100--- tests/functional/alt-tabber.c 2011-01-26 14:15:59 +0000
101+++ tests/functional/alt-tabber.c 2012-10-27 07:44:19 +0000
102@@ -58,7 +58,7 @@
103 {
104 app = BAMF_APPLICATION (l->data);
105
106- if (!bamf_view_user_visible (BAMF_VIEW (app)))
107+ if (!bamf_view_is_user_visible (BAMF_VIEW (app)))
108 continue;
109
110 gtk_tree_store_append (store, &position, NULL);
111@@ -75,7 +75,7 @@
112 {
113 window = BAMF_WINDOW (c->data);
114
115- if (!bamf_view_user_visible (BAMF_VIEW (window)))
116+ if (!bamf_view_is_user_visible (BAMF_VIEW (window)))
117 continue;
118
119 const gchar *name = bamf_view_get_name (BAMF_VIEW (window));

Subscribers

People subscribed via source and target branches