Merge lp:~amigadave/gnome-control-center-signon/optional-panel into lp:gnome-control-center-signon

Proposed by David King
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 121
Merged at revision: 118
Proposed branch: lp:~amigadave/gnome-control-center-signon/optional-panel
Merge into: lp:gnome-control-center-signon
Diff against target: 229 lines (+78/-14)
7 files modified
.bzrignore (+4/-1)
Makefile.am (+34/-9)
configure.ac (+28/-3)
data/com.canonical.webcredentials.capture.service.in (+1/-1)
data/credentials-preferences.desktop.in.in (+9/-0)
po/POTFILES.in (+1/-0)
po/POTFILES.skip (+1/-0)
To merge this branch: bzr merge lp:~amigadave/gnome-control-center-signon/optional-panel
Reviewer Review Type Date Requested Status
Alberto Mardegan (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+131524@code.launchpad.net

Description of the change

Make the GNOME Control Center support optional

This is helpful for other distributions, which do not patch the control center to allow the building of external panels. Plenty of build changes here, so needs some careful testing.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alberto Mardegan (mardy) wrote :

Works like a charm!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2012-07-05 06:12:29 +0000
3+++ .bzrignore 2012-10-26 06:58:39 +0000
4@@ -13,11 +13,14 @@
5 /autom4te.cache
6 /build-aux
7 /aclocal.m4
8-/cc-credentials-application
9+/credentials-preferences
10 /config.*
11 /configure
12 /credentials-lcov
13 /credentials-lcov.info
14+/data/com.canonical.webcredentials.capture.service
15+/data/credentials-preferences.desktop
16+/data/credentials-preferences.desktop.in
17 /data/gnome-credentials-panel.desktop
18 /data/gnome-credentials-panel.desktop.in
19 /data/update-accounts.desktop
20
21=== modified file 'Makefile.am'
22--- Makefile.am 2012-09-26 06:37:40 +0000
23+++ Makefile.am 2012-10-26 06:58:39 +0000
24@@ -2,7 +2,8 @@
25
26 DISTCHECK_CONFIGURE_FLAGS = \
27 --enable-gtk-doc \
28- --enable-introspection=yes
29+ --enable-introspection=yes \
30+ --with-gnome-control-center
31
32 # libaccount-plugin.
33 lib_LTLIBRARIES = libaccount-plugin-@LIBACCOUNT_PLUGIN_API_VERSION@.la
34@@ -41,8 +42,10 @@
35 # Credentials control center applet.
36 cappletname = credentials
37
38-ccpanelsdir = $(libdir)/control-center-1/panels
39+if WITH_GNOME_CONTROL_CENTER
40+ccpanelsdir = $(CCPANELDIR)
41 ccpanels_LTLIBRARIES = libcredentials.la
42+endif
43
44 common_cppflags = \
45 $(CREDENTIALS_PANEL_CFLAGS) \
46@@ -94,19 +97,24 @@
47 -no-undefined \
48 -export-symbols-regex '^g_io_module_(load|unload)'
49
50-noinst_PROGRAMS = cc-credentials-application
51+if WITH_GNOME_CONTROL_CENTER
52+noinst_PROGRAMS = credentials-preferences
53+preferences_ldadd = libcredentials.la
54+else
55+bin_PROGRAMS = credentials-preferences
56+endif
57
58-cc_credentials_application_CPPFLAGS = \
59+credentials_preferences_CPPFLAGS = \
60 $(common_cppflags)
61
62-cc_credentials_application_SOURCES = \
63+credentials_preferences_SOURCES = \
64 $(common_vala_sources) \
65 src/cc-credentials-application.vala
66
67-cc_credentials_application_LDADD = \
68+credentials_preferences_LDADD = \
69 $(CREDENTIALS_PANEL_LIBS) \
70 libaccount-plugin-@LIBACCOUNT_PLUGIN_API_VERSION@.la \
71- libcredentials.la
72+ $(preferences_ldadd)
73
74 # Account update tool for enabling new services
75 libexec_PROGRAMS = update-accounts
76@@ -337,17 +345,32 @@
77 @INTLTOOL_DESKTOP_RULE@
78
79 desktopdir = $(datadir)/applications
80+if WITH_GNOME_CONTROL_CENTER
81 desktop_in_files = \
82 data/gnome-credentials-panel.desktop.in \
83 data/update-accounts.desktop.in
84+else # !WITH_GNOME_CONTROL_CENTER
85+desktop_in_files = \
86+ data/credentials-preferences.desktop.in \
87+ data/update-accounts.desktop.in
88+endif
89 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
90
91 data/update-accounts.desktop: data/update-accounts.desktop.in
92 $(AM_V_GEN)$(SED) -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@
93
94 dbus_servicedir = $(datadir)/dbus-1/services
95-dist_dbus_service_DATA = \
96- data/com.canonical.webcredentials.capture.service
97+dbus_service_in_files = data/com.canonical.webcredentials.capture.service.in
98+dbus_service_DATA = $(dbus_service_in_files:.service.in=.service)
99+
100+if WITH_GNOME_CONTROL_CENTER
101+service_executable = $(bindir)/gnome-control-center credentials
102+else
103+service_executable = $(bindir)/credentials-preferences
104+endif
105+
106+data/com.canonical.webcredentials.capture.service: data/com.canonical.webcredentials.capture.service.in
107+ $(AM_V_GEN)$(SED) -e "s|\@SERVICE_EXECUTABLE\@|$service_executable|" $< > $@
108
109 iconthemedir = $(datadir)/icons/hicolor
110 credentialsicon = credentials-preferences.png
111@@ -415,6 +438,7 @@
112 autogen.sh
113
114 dist_noinst_DATA = \
115+ $(dbus_service_in_files) \
116 $(gtkdoc_srcdir)/account-plugin-docs.xml \
117 $(gtkdoc_srcdir)/account-plugin-sections.txt \
118 $(gtkdoc_srcdir)/version.xml.in \
119@@ -429,6 +453,7 @@
120 src/signon.vapi
121
122 CLEANFILES = \
123+ $(dbus_service_DATA) \
124 $(desktop_in_files) \
125 $(desktop_DATA)
126
127
128=== modified file 'configure.ac'
129--- configure.ac 2012-10-17 12:58:21 +0000
130+++ configure.ac 2012-10-26 06:58:39 +0000
131@@ -1,8 +1,8 @@
132 AC_INIT([Credentials Control Center],
133 [0.0.20],
134- [https://bugs.launchpad.net/opensesame-gnome-control-center],
135+ [https://bugs.launchpad.net/online-accounts-gnome-control-center],
136 [credentials-control-center],
137- [https://launchpad.net/opensesame-gnome-control-center])
138+ [https://launchpad.net/online-accounts-gnome-control-center])
139
140 AC_CONFIG_AUX_DIR([build-aux])
141 AC_CONFIG_SRCDIR([src/cc-credentials-panel.c])
142@@ -40,13 +40,37 @@
143
144 PKG_PROG_PKG_CONFIG([0.24])
145
146-# Libraries
147+# Libraries.
148 LIBACCOUNTS_GLIB_REQUIRED="libaccounts-glib"
149 LIBSIGNON_GLIB_REQUIRED="libsignon-glib >= 1.7"
150 GLIB_REQUIRED="glib-2.0 gio-2.0 gio-unix-2.0 >= 2.29.5"
151 GTK_REQUIRED="gtk+-3.0 >= 3.0.0"
152 GNOME_CONTROL_CENTER_REQUIRED="libgnome-control-center"
153
154+AC_ARG_VAR([control_center_extensiondir],
155+ [Install control center panel to the given extension dir. Alternatively, get the installation path from pkg-config.])
156+
157+AC_ARG_WITH([gnome-control-center],
158+ [AS_HELP_STRING([--without-gnome-control-center],
159+ [Ignore the presence of gnome-control-center and disable it])])
160+
161+AS_IF([test "x$with_gnome_control_center" != "xno"],
162+ [PKG_CHECK_EXISTS([$GNOME_CONTROL_CENTER_REQUIRED],
163+ [have_gnome_control_center=yes],
164+ [have_gnome_control_center=no])],
165+ [have_gnome_control_center=no])
166+
167+AS_IF([test "x$have_gnome_control_center" = "xyes"],
168+ [AS_IF([test -n "$control_center_extensiondir"],
169+ [AC_SUBST([CCPANELDIR], [$control_center_extensiondir])],
170+ [AC_SUBST([CCPANELDIR], [`$PKG_CONFIG --variable=extensiondir $GNOME_CONTROL_CENTER_REQUIRED`])])],
171+ [GNOME_CONTROL_CENTER_REQUIRED=""
172+ AS_IF([test "x$with_gnome_control_center" = "xyes"],
173+ [AC_MSG_ERROR([gnome-control-center support requested but not found])])])
174+
175+AM_CONDITIONAL([WITH_GNOME_CONTROL_CENTER],
176+ [test "x$have_gnome_control_center" = "xyes"])
177+
178 PKG_CHECK_MODULES([CREDENTIALS_PANEL],
179 [$LIBACCOUNTS_GLIB_REQUIRED
180 $LIBSIGNON_GLIB_REQUIRED
181@@ -109,6 +133,7 @@
182
183 AC_CONFIG_FILES([
184 Makefile
185+data/credentials-preferences.desktop.in
186 data/gnome-credentials-panel.desktop.in
187 data/update-accounts.desktop.in
188 doc/account-plugin/Makefile
189
190=== renamed file 'data/com.canonical.webcredentials.capture.service' => 'data/com.canonical.webcredentials.capture.service.in'
191--- data/com.canonical.webcredentials.capture.service 2012-05-31 08:04:51 +0000
192+++ data/com.canonical.webcredentials.capture.service.in 2012-10-26 06:58:39 +0000
193@@ -1,3 +1,3 @@
194 [D-BUS Service]
195 Name=com.canonical.webcredentials.capture
196-Exec=/usr/bin/gnome-control-center credentials
197+Exec=@SERVICE_EXECUTABLE@
198
199=== added file 'data/credentials-preferences.desktop.in.in'
200--- data/credentials-preferences.desktop.in.in 1970-01-01 00:00:00 +0000
201+++ data/credentials-preferences.desktop.in.in 2012-10-26 06:58:39 +0000
202@@ -0,0 +1,9 @@
203+[Desktop Entry]
204+_Name=Online Accounts
205+_Comment=Online account credentials and settings
206+Exec=credentials-preferences
207+Icon=credentials-preferences
208+Terminal=false
209+Type=Application
210+StartupNotify=true
211+Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalSettings;
212
213=== modified file 'po/POTFILES.in'
214--- po/POTFILES.in 2012-03-05 18:43:20 +0000
215+++ po/POTFILES.in 2012-10-26 06:58:39 +0000
216@@ -1,3 +1,4 @@
217+data/credentials-preferences.desktop.in.in
218 data/gnome-credentials-panel.desktop.in.in
219 src/cc-credentials-account-details-page.vala
220 src/cc-credentials-accounts-model.vala
221
222=== modified file 'po/POTFILES.skip'
223--- po/POTFILES.skip 2012-03-15 10:54:25 +0000
224+++ po/POTFILES.skip 2012-10-26 06:58:39 +0000
225@@ -1,3 +1,4 @@
226+data/credentials-preferences.desktop.in
227 data/gnome-credentials-panel.desktop.in
228 src/cc-credentials-account-details-page.c
229 src/cc-credentials-accounts-model.c

Subscribers

People subscribed via source and target branches

to all changes: