[gnome-control-center] shell: Make all control-center plugins static



commit 3686cf7eb8528b19597945e2c19ba0f619ef42f6
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Dec 11 11:46:28 2012 +0100

    shell: Make all control-center plugins static
    
    This makes loading faster, with less I/O, avoids unnecessary
    code duplication (around 1k lines shaved), and ensures that
    all the panels link and work appropriately.
    
    By the same token, it will stop external panels from being
    created, and loaded.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690036

 Makefile.am                                       |    4 +-
 configure.ac                                      |   16 ++--
 panels/background/Makefile.am                     |    5 +-
 panels/background/background-module.c             |   41 --------
 panels/background/cc-background-panel.c           |   10 --
 panels/background/cc-background-panel.h           |    2 -
 panels/bluetooth/Makefile.am                      |    4 +-
 panels/bluetooth/cc-bluetooth-panel.c             |   26 -----
 panels/bluetooth/cc-bluetooth-panel.h             |    2 -
 panels/color/Makefile.am                          |    5 +-
 panels/color/cc-color-panel.c                     |   10 --
 panels/color/cc-color-panel.h                     |    2 -
 panels/color/color-module.c                       |   42 ---------
 panels/common/Makefile.am                         |    2 -
 panels/datetime/Makefile.am                       |    6 +-
 panels/datetime/cc-datetime-panel.c               |   12 ---
 panels/datetime/cc-datetime-panel.h               |    2 -
 panels/datetime/datetime-module.c                 |   46 ---------
 panels/display/Makefile.am                        |    5 +-
 panels/display/cc-display-panel.c                 |   10 --
 panels/display/cc-display-panel.h                 |    2 -
 panels/display/display-module.c                   |   41 --------
 panels/info/Makefile.am                           |    5 +-
 panels/info/cc-info-panel.c                       |   10 --
 panels/info/cc-info-panel.h                       |    2 -
 panels/info/info-module.c                         |   41 --------
 panels/keyboard/Makefile.am                       |    5 +-
 panels/keyboard/cc-keyboard-panel.c               |   10 --
 panels/keyboard/cc-keyboard-panel.h               |    2 -
 panels/keyboard/keyboard-module.c                 |   41 --------
 panels/mouse/Makefile.am                          |    6 +-
 panels/mouse/cc-mouse-panel.c                     |   10 --
 panels/mouse/cc-mouse-panel.h                     |    2 -
 panels/mouse/mouse-module.c                       |   41 --------
 panels/network/Makefile.am                        |    5 +-
 panels/network/cc-network-panel.c                 |    9 --
 panels/network/cc-network-panel.h                 |    2 -
 panels/network/network-module.c                   |   41 --------
 panels/online-accounts/Makefile.am                |    3 +-
 panels/online-accounts/cc-online-accounts-panel.c |   85 ++++++-----------
 panels/online-accounts/cc-online-accounts-panel.h |   10 +-
 panels/power/Makefile.am                          |    5 +-
 panels/power/cc-power-panel.c                     |   10 --
 panels/power/cc-power-panel.h                     |    2 -
 panels/power/power-module.c                       |   41 --------
 panels/printers/Makefile.am                       |    5 +-
 panels/printers/cc-printers-panel.c               |   10 --
 panels/printers/cc-printers-panel.h               |    2 -
 panels/printers/printers-module.c                 |   39 --------
 panels/privacy/Makefile.am                        |    5 +-
 panels/privacy/cc-privacy-panel.c                 |    9 --
 panels/privacy/cc-privacy-panel.h                 |    2 -
 panels/privacy/privacy-module.c                   |   41 --------
 panels/region/Makefile.am                         |    6 +-
 panels/region/cc-region-panel.c                   |    9 --
 panels/region/cc-region-panel.h                   |    2 -
 panels/region/region-module.c                     |   41 --------
 panels/screen/Makefile.am                         |    5 +-
 panels/screen/cc-screen-panel.c                   |   10 --
 panels/screen/cc-screen-panel.h                   |    2 -
 panels/screen/screen-module.c                     |   41 --------
 panels/search/Makefile.am                         |    5 +-
 panels/search/cc-search-panel.c                   |    9 --
 panels/search/cc-search-panel.h                   |    2 -
 panels/search/search-module.c                     |   41 --------
 panels/sound/Makefile.am                          |    4 +-
 panels/sound/cc-sound-panel.c                     |   26 -----
 panels/sound/cc-sound-panel.h                     |    2 -
 panels/universal-access/Makefile.am               |    5 +-
 panels/universal-access/cc-ua-panel.c             |   10 --
 panels/universal-access/cc-ua-panel.h             |    2 -
 panels/universal-access/universal-access-module.c |   42 ---------
 panels/user-accounts/Makefile.am                  |    8 +-
 panels/user-accounts/um-user-module.c             |   48 ----------
 panels/user-accounts/um-user-panel.c              |   86 ++++++++----------
 panels/user-accounts/um-user-panel.h              |   24 ++---
 panels/wacom/Makefile.am                          |    6 +-
 panels/wacom/cc-wacom-panel.c                     |    9 --
 panels/wacom/cc-wacom-panel.h                     |    2 -
 panels/wacom/wacom-module.c                       |   41 --------
 shell/Makefile.am                                 |   43 ++++++++-
 shell/cc-panel.h                                  |   15 ++--
 shell/gnome-control-center.c                      |  103 ++++++++++++++-------
 83 files changed, 231 insertions(+), 1214 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a57c5f2..6f34c23 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,10 +1,10 @@
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
-SUBDIRS = po egg-list-box shell panels
+SUBDIRS = po egg-list-box panels shell
 if BUILD_DOCUMENTATION
 SUBDIRS += man
 endif
-DIST_SUBDIRS = po shell panels man
+DIST_SUBDIRS = po panels shell man
 
 MAINTAINERCLEANFILES = \
 	$(srcdir)/INSTALL \
diff --git a/configure.ac b/configure.ac
index 01cf142..b021408 100644
--- a/configure.ac
+++ b/configure.ac
@@ -176,12 +176,17 @@ PKG_CHECK_MODULES(NETWORK_MANAGER, NetworkManager >= $NETWORK_MANAGER_REQUIRED_V
                   [have_networkmanager=yes], have_networkmanager=no)
 if test "x$have_networkmanager" = xno ; then
         AC_MSG_WARN(*** Network panel will not be built (NetworkManager ~0.9 or newer not found) ***)
+else
+	AC_DEFINE(BUILD_NETWORK, 1, [Define to 1 to build the Network panel])
 fi
 AM_CONDITIONAL(BUILD_NETWORK, [test x$have_networkmanager = xyes])
 
 # Check for gnome-bluetooth
 PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.5.5,
 		  [have_bluetooth=yes], have_bluetooth=no)
+if test "x$have_bluetooth" = xyes ; then
+	AC_DEFINE(BUILD_BLUETOOTH, 1, [Define to 1 to build the Network panel])
+fi
 AM_CONDITIONAL(BUILD_BLUETOOTH, [test x$have_bluetooth = xyes])
 
 # Check for CUPS 1.4 or newer
@@ -210,6 +215,8 @@ if test x"$enable_cups" != x"no" ; then
     AC_MSG_ERROR([CUPS 1.4 or newer not found, but CUPS support requested])
   fi
 
+  AC_DEFINE(BUILD_PRINTERS, 1, [Define to 1 to build the Printers panel])
+
   CUPS_CFLAGS=`$CUPS_CONFIG --cflags | $SED -e 's/-O\w*//g' -e 's/-m\w*//g'`
   CUPS_LIBS=`$CUPS_CONFIG --libs`
   AC_SUBST(CUPS_CFLAGS)
@@ -246,6 +253,7 @@ case $host_os in
                         gnome-settings-daemon >= $GSD_REQUIRED_VERSION
                         xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION
                         gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
+      AC_DEFINE(BUILD_WACOM, 1, [Define to 1 to build the Wacom panel])
       have_wacom=yes
     fi
     ;;
@@ -294,18 +302,12 @@ dnl =======================================
 dnl Panels
 dnl =======================================
 
-PANELS_DIR="${libdir}/control-center-1/panels"
-AC_SUBST(PANELS_DIR)
-
-PANEL_CFLAGS="-I\$(top_srcdir)/ -DG_LOG_DOMAIN=\"\\\"\$(cappletname)-cc-panel\\\"\""
+PANEL_CFLAGS="-I\$(top_srcdir)/ -DG_LOG_DOMAIN=\"\\\"\$(cappletname)-cc-panel\\\"\" -DPANEL_ID=\"\\\"\$(cappletname)\\\"\""
 AC_SUBST(PANEL_CFLAGS)
 
 PANEL_LIBS=""
 AC_SUBST(PANEL_LIBS)
 
-PANEL_LDFLAGS="-export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload)'"
-AC_SUBST(PANEL_LDFLAGS)
-
 dnl ==============================================
 dnl libsocialweb
 dnl ==============================================
diff --git a/panels/background/Makefile.am b/panels/background/Makefile.am
index a59c95f..d32b75a 100644
--- a/panels/background/Makefile.am
+++ b/panels/background/Makefile.am
@@ -22,8 +22,7 @@ INCLUDES =						\
 	-DPIXMAP_DIR=\""$(datadir)/gnome-control-center/pixmaps"\"	\
 	$(NULL)
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libbackground.la
+noinst_LTLIBRARIES = libbackground.la
 
 BUILT_SOURCES =            \
 	gdesktop-enums-types.c \
@@ -31,7 +30,6 @@ BUILT_SOURCES =            \
 
 libbackground_la_SOURCES =		\
 	$(BUILT_SOURCES)		\
-	background-module.c		\
 	cc-background-chooser-dialog.c	\
 	cc-background-chooser-dialog.h	\
 	cc-background-panel.c		\
@@ -51,7 +49,6 @@ libbackground_la_SOURCES =		\
 
 
 libbackground_la_LIBADD = $(PANEL_LIBS) $(BACKGROUND_PANEL_LIBS)
-libbackground_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 if WITH_LIBSOCIALWEB
 libbackground_la_SOURCES += bg-flickr-source.c bg-flickr-source.h
diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
index 0259aa9..ebebaf2 100644
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@ -774,13 +774,3 @@ cc_background_panel_init (CcBackgroundPanel *self)
   widget = WID ("background-set-button");
   g_signal_connect (widget, "clicked", G_CALLBACK (on_background_button_clicked), self);
 }
-
-void
-cc_background_panel_register (GIOModule *module)
-{
-  cc_background_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_BACKGROUND_PANEL,
-                                  "background", 0);
-}
-
diff --git a/panels/background/cc-background-panel.h b/panels/background/cc-background-panel.h
index e4ada08..191fb6f 100644
--- a/panels/background/cc-background-panel.h
+++ b/panels/background/cc-background-panel.h
@@ -67,8 +67,6 @@ struct _CcBackgroundPanelClass
 
 GType cc_background_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_background_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_BACKGROUND_PANEL_H */
diff --git a/panels/bluetooth/Makefile.am b/panels/bluetooth/Makefile.am
index a0f33d6..dbc034e 100644
--- a/panels/bluetooth/Makefile.am
+++ b/panels/bluetooth/Makefile.am
@@ -1,8 +1,7 @@
 # This is used in PANEL_CFLAGS
 cappletname = bluetooth
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libbluetooth.la
+noinst_LTLIBRARIES = libbluetooth.la
 
 INCLUDES = 						\
 	$(PANEL_CFLAGS)					\
@@ -16,7 +15,6 @@ libbluetooth_la_SOURCES =			\
 	cc-bluetooth-panel.h
 
 libbluetooth_la_LIBADD = $(PANEL_LIBS) $(BLUETOOTH_LIBS)
-libbluetooth_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 desktopdir = $(datadir)/applications
 desktop_in_in_files = bluetooth-properties.desktop.in.in
diff --git a/panels/bluetooth/cc-bluetooth-panel.c b/panels/bluetooth/cc-bluetooth-panel.c
index 9011d9c..1494199 100644
--- a/panels/bluetooth/cc-bluetooth-panel.c
+++ b/panels/bluetooth/cc-bluetooth-panel.c
@@ -864,29 +864,3 @@ cc_bluetooth_panel_init (CcBluetoothPanel *self)
 
 	gtk_widget_show_all (GTK_WIDGET (self));
 }
-
-void
-cc_bluetooth_panel_register (GIOModule *module)
-{
-	cc_bluetooth_panel_register_type (G_TYPE_MODULE (module));
-	g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-					CC_TYPE_BLUETOOTH_PANEL,
-					"bluetooth", 0);
-}
-
-/* GIO extension stuff */
-void
-g_io_module_load (GIOModule *module)
-{
-	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
-	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-
-	/* register the panel */
-	cc_bluetooth_panel_register (module);
-}
-
-void
-g_io_module_unload (GIOModule *module)
-{
-}
-
diff --git a/panels/bluetooth/cc-bluetooth-panel.h b/panels/bluetooth/cc-bluetooth-panel.h
index 2a37d74..bfcf842 100644
--- a/panels/bluetooth/cc-bluetooth-panel.h
+++ b/panels/bluetooth/cc-bluetooth-panel.h
@@ -51,8 +51,6 @@ struct CcBluetoothPanelClass {
 
 GType cc_bluetooth_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_bluetooth_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_BLUETOOTH_PANEL_H */
diff --git a/panels/color/Makefile.am b/panels/color/Makefile.am
index cad6679..f1c1fa3 100644
--- a/panels/color/Makefile.am
+++ b/panels/color/Makefile.am
@@ -11,16 +11,13 @@ INCLUDES = 						\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
 	$(NULL)
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libcolor.la
+noinst_LTLIBRARIES = libcolor.la
 
 libcolor_la_SOURCES =		\
-	color-module.c		\
 	cc-color-panel.c	\
 	cc-color-panel.h
 
 libcolor_la_LIBADD = $(PANEL_LIBS) $(COLOR_PANEL_LIBS)
-libcolor_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
 dist_ui_DATA = color.ui
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
index fc8a659..836117e 100644
--- a/panels/color/cc-color-panel.c
+++ b/panels/color/cc-color-panel.c
@@ -2600,13 +2600,3 @@ cc_color_panel_init (CcColorPanel *prefs)
                     G_CALLBACK (gcm_prefs_window_realize_cb),
                     prefs);
 }
-
-void
-cc_color_panel_register (GIOModule *module)
-{
-  cc_color_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_COLOR_PANEL,
-                                  "color", 0);
-}
-
diff --git a/panels/color/cc-color-panel.h b/panels/color/cc-color-panel.h
index afc022c..daa57e4 100644
--- a/panels/color/cc-color-panel.h
+++ b/panels/color/cc-color-panel.h
@@ -67,8 +67,6 @@ struct _CcColorPanelClass
 
 GType cc_color_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_color_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_COLOR_PANEL_H */
diff --git a/panels/common/Makefile.am b/panels/common/Makefile.am
index b68a82e..b854428 100644
--- a/panels/common/Makefile.am
+++ b/panels/common/Makefile.am
@@ -25,8 +25,6 @@ liblanguage_la_SOURCES =		\
 liblanguage_la_LIBADD = 		\
 	$(LIBLANGUAGE_LIBS)
 
-liblanguage_la_LDFLAGS = -export_dynamic -avoid-version -module -no-undefined
-
 list_languages_SOURCES = list-languages.c
 list_languages_LDADD = liblanguage.la
 list_languages_CFLAGS = $(LIBLANGUAGE_CFLAGS)
diff --git a/panels/datetime/Makefile.am b/panels/datetime/Makefile.am
index 9092cd5..19fed7c 100644
--- a/panels/datetime/Makefile.am
+++ b/panels/datetime/Makefile.am
@@ -136,8 +136,7 @@ check-local: test-timezone-gfx test-endianess test-timezone
 	$(builddir)/test-endianess
 #	$(builddir)/test-timezone
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libdate_time.la
+noinst_LTLIBRARIES = libdate_time.la
 
 
 # This requires running d-bus session and accessible timedate1 daemon
@@ -159,7 +158,6 @@ timedated.h: Makefile.am timedated1-interface.xml
 		$(srcdir)/timedated1-interface.xml
 
 libdate_time_la_SOURCES =	\
-	datetime-module.c	\
 	cc-datetime-panel.c	\
 	cc-datetime-panel.h	\
 	cc-timezone-map.c	\
@@ -171,8 +169,6 @@ libdate_time_la_SOURCES =	\
 	$(NULL)
 
 libdate_time_la_LIBADD = $(PANEL_LIBS) $(DATETIME_PANEL_LIBS)
-libdate_time_la_LDFLAGS = $(PANEL_LDFLAGS)
-
 
 polkitdir = $(datadir)/polkit-1/actions
 polkit_in_files = org.gnome.controlcenter.datetime.policy.in
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index df3fe45..6f8ef09 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -1135,15 +1135,3 @@ cc_date_time_panel_init (CcDateTimePanel *self)
                     G_CALLBACK (on_permission_changed), self);
   on_permission_changed (priv->permission, NULL, self);
 }
-
-void
-cc_date_time_panel_register (GIOModule *module)
-{
-  bind_textdomain_codeset (GETTEXT_PACKAGE_TIMEZONES, "UTF-8");
-
-  cc_date_time_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_DATE_TIME_PANEL,
-                                  "datetime", 0);
-}
-
diff --git a/panels/datetime/cc-datetime-panel.h b/panels/datetime/cc-datetime-panel.h
index a47e185..5444f33 100644
--- a/panels/datetime/cc-datetime-panel.h
+++ b/panels/datetime/cc-datetime-panel.h
@@ -67,8 +67,6 @@ struct _CcDateTimePanelClass
 
 GType cc_date_time_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_date_time_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_DATE_TIME_PANEL_H */
diff --git a/panels/display/Makefile.am b/panels/display/Makefile.am
index 4d2a484..ca687ba 100644
--- a/panels/display/Makefile.am
+++ b/panels/display/Makefile.am
@@ -12,11 +12,9 @@ foo-marshal.c: foo-marshal.h
 foo-marshal.h: foo-marshal.list
 	$(AM_V_GEN) ( $(GLIB_GENMARSHAL) --prefix=foo_marshal $(srcdir)/foo-marshal.list --header > foo-marshal.h )
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libdisplay.la
+noinst_LTLIBRARIES = libdisplay.la
 
 libdisplay_la_SOURCES =		\
-	display-module.c	\
 	cc-display-panel.c	\
 	cc-display-panel.h	\
 	cc-rr-labeler.c		\
@@ -26,7 +24,6 @@ libdisplay_la_SOURCES =		\
 	$(MARSHALFILES)
 
 libdisplay_la_LIBADD = $(PANEL_LIBS) $(DISPLAY_PANEL_LIBS)
-libdisplay_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 # You will need a recent intltool or the patch from this bug
 # http://bugzilla.gnome.org/show_bug.cgi?id=462312
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index 80b1c04..90acd34 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -2679,13 +2679,3 @@ cc_display_panel_constructor (GType                  gtype,
 
   return obj;
 }
-
-void
-cc_display_panel_register (GIOModule *module)
-{
-  cc_display_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_DISPLAY_PANEL,
-                                  "display", 0);
-}
-
diff --git a/panels/display/cc-display-panel.h b/panels/display/cc-display-panel.h
index 75ef4a4..dd02c2b 100644
--- a/panels/display/cc-display-panel.h
+++ b/panels/display/cc-display-panel.h
@@ -67,8 +67,6 @@ struct _CcDisplayPanelClass
 
 GType cc_display_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_display_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_DISPLAY_PANEL_H */
diff --git a/panels/info/Makefile.am b/panels/info/Makefile.am
index 9eef9e0..6462743 100644
--- a/panels/info/Makefile.am
+++ b/panels/info/Makefile.am
@@ -20,11 +20,9 @@ all-local: check-local
 check-local: test-hostname
 	$(builddir)/test-hostname $(srcdir)/hostnames-test.txt > /dev/null
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libinfo.la
+noinst_LTLIBRARIES = libinfo.la
 
 libinfo_la_SOURCES =		\
-	info-module.c		\
 	cc-info-panel.c		\
 	cc-info-panel.h		\
 	hostname-helper.c	\
@@ -33,7 +31,6 @@ libinfo_la_SOURCES =		\
 	gsd-disk-space-helper.c
 
 libinfo_la_LIBADD = $(PANEL_LIBS) $(INFO_PANEL_LIBS)
-libinfo_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
 dist_ui_DATA = info.ui GnomeLogoVerticalMedium.svg
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index 396822e..540b505 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -2110,13 +2110,3 @@ cc_info_panel_init (CcInfoPanel *self)
   info_panel_setup_graphics (self);
   info_panel_setup_virt (self);
 }
-
-void
-cc_info_panel_register (GIOModule *module)
-{
-  cc_info_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_INFO_PANEL,
-                                  "info", 0);
-}
-
diff --git a/panels/info/cc-info-panel.h b/panels/info/cc-info-panel.h
index 75397ad..ff08324 100644
--- a/panels/info/cc-info-panel.h
+++ b/panels/info/cc-info-panel.h
@@ -66,8 +66,6 @@ struct _CcInfoPanelClass
 
 GType cc_info_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_info_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_INFO_PANEL_H */
diff --git a/panels/keyboard/Makefile.am b/panels/keyboard/Makefile.am
index e3d7fc6..d863d02 100644
--- a/panels/keyboard/Makefile.am
+++ b/panels/keyboard/Makefile.am
@@ -1,11 +1,9 @@
 # This is used in PANEL_CFLAGS
 cappletname = keyboard
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libkeyboard.la
+noinst_LTLIBRARIES = libkeyboard.la
 
 libkeyboard_la_SOURCES =   \
-	keyboard-module.c		\
 	cc-keyboard-panel.c		\
 	cc-keyboard-panel.h		\
 	cc-keyboard-item.c		\
@@ -21,7 +19,6 @@ libkeyboard_la_SOURCES =   \
 
 libkeyboard_la_CFLAGS = $(PANEL_CFLAGS) $(KEYBOARD_PANEL_CFLAGS) -I$(top_srcdir)/panels/common/
 libkeyboard_la_LIBADD = $(PANEL_LIBS) $(KEYBOARD_PANEL_LIBS)
-libkeyboard_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 @INTLTOOL_DESKTOP_RULE@
 
diff --git a/panels/keyboard/cc-keyboard-panel.c b/panels/keyboard/cc-keyboard-panel.c
index 5db9ee1..cbfc97d 100644
--- a/panels/keyboard/cc-keyboard-panel.c
+++ b/panels/keyboard/cc-keyboard-panel.c
@@ -199,13 +199,3 @@ cc_keyboard_panel_init (CcKeyboardPanel *self)
       priv->builder = NULL;
     }
 }
-
-void
-cc_keyboard_panel_register (GIOModule *module)
-{
-  cc_keyboard_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_KEYBOARD_PANEL,
-                                  "keyboard", 0);
-}
-
diff --git a/panels/keyboard/cc-keyboard-panel.h b/panels/keyboard/cc-keyboard-panel.h
index d9f7665..2e5dcb9 100644
--- a/panels/keyboard/cc-keyboard-panel.h
+++ b/panels/keyboard/cc-keyboard-panel.h
@@ -67,8 +67,6 @@ struct _CcKeyboardPanelClass
 
 GType cc_keyboard_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_keyboard_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_KEYBOARD_PANEL_H */
diff --git a/panels/mouse/Makefile.am b/panels/mouse/Makefile.am
index cb35a01..851a89e 100644
--- a/panels/mouse/Makefile.am
+++ b/panels/mouse/Makefile.am
@@ -9,12 +9,9 @@ INCLUDES = 						\
 	-DGNOMECC_UI_DIR="\"$(uidir)\""			\
 	$(NULL)
 
-
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libmouse-properties.la
+noinst_LTLIBRARIES = libmouse-properties.la
 
 libmouse_properties_la_SOURCES =	\
-	mouse-module.c			\
 	cc-mouse-panel.c		\
 	cc-mouse-panel.h		\
 	gnome-mouse-properties.c	\
@@ -25,7 +22,6 @@ libmouse_properties_la_SOURCES =	\
 	gnome-mouse-test.h
 
 libmouse_properties_la_LIBADD = $(PANEL_LIBS) $(MOUSE_PANEL_LIBS)
-libmouse_properties_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 test_gnome_mouse_test_SOURCES =			\
 	gnome-mouse-test.c		\
diff --git a/panels/mouse/cc-mouse-panel.c b/panels/mouse/cc-mouse-panel.c
index d5a5dcc..c913711 100644
--- a/panels/mouse/cc-mouse-panel.c
+++ b/panels/mouse/cc-mouse-panel.c
@@ -218,13 +218,3 @@ cc_mouse_panel_class_init (CcMousePanelClass *klass)
   object_class->dispose = cc_mouse_panel_dispose;
   object_class->constructed = cc_mouse_panel_constructed;
 }
-
-void
-cc_mouse_panel_register (GIOModule *module)
-{
-  cc_mouse_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_MOUSE_PANEL,
-                                  "mouse", 0);
-}
-
diff --git a/panels/mouse/cc-mouse-panel.h b/panels/mouse/cc-mouse-panel.h
index 65ff56e..0853e10 100644
--- a/panels/mouse/cc-mouse-panel.h
+++ b/panels/mouse/cc-mouse-panel.h
@@ -67,8 +67,6 @@ struct _CcMousePanelClass
 
 GType cc_mouse_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_mouse_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_MOUSE_PANEL_H */
diff --git a/panels/network/Makefile.am b/panels/network/Makefile.am
index 1db7a66..3ee94bf 100644
--- a/panels/network/Makefile.am
+++ b/panels/network/Makefile.am
@@ -9,11 +9,9 @@ INCLUDES = 						\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
 	$(NULL)
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libnetwork.la
+noinst_LTLIBRARIES = libnetwork.la
 
 libnetwork_la_SOURCES =					\
-	network-module.c				\
 	panel-common.c					\
 	panel-common.h					\
 	net-object.c					\
@@ -55,7 +53,6 @@ libnetwork_la_SOURCES =					\
 	rfkill.h
 
 libnetwork_la_LIBADD = $(PANEL_LIBS) $(NETWORK_PANEL_LIBS) $(NETWORK_MANAGER_LIBS)
-libnetwork_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
 dist_ui_DATA =						\
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 3039157..3f212af 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -1287,12 +1287,3 @@ cc_network_panel_init (CcNetworkPanel *panel)
                                                      "vbox1"));
         gtk_widget_reparent (widget, (GtkWidget *) panel);
 }
-
-void
-cc_network_panel_register (GIOModule *module)
-{
-        cc_network_panel_register_type (G_TYPE_MODULE (module));
-        g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                        CC_TYPE_NETWORK_PANEL,
-                                        "network", 0);
-}
diff --git a/panels/network/cc-network-panel.h b/panels/network/cc-network-panel.h
index a9bbd8a..f869c3f 100644
--- a/panels/network/cc-network-panel.h
+++ b/panels/network/cc-network-panel.h
@@ -65,8 +65,6 @@ struct _CcNetworkPanelClass
 
 GType cc_network_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_network_panel_register (GIOModule *module);
-
 GPtrArray *cc_network_panel_get_devices (CcNetworkPanel *panel);
 
 G_END_DECLS
diff --git a/panels/online-accounts/Makefile.am b/panels/online-accounts/Makefile.am
index e403b17..fdbbb25 100644
--- a/panels/online-accounts/Makefile.am
+++ b/panels/online-accounts/Makefile.am
@@ -10,8 +10,7 @@ INCLUDES = 						\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
 	$(NULL)
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libonline-accounts.la
+noinst_LTLIBRARIES = libonline-accounts.la
 
 libonline_accounts_la_SOURCES =		\
 	cc-online-accounts-add-account-dialog.c	\
diff --git a/panels/online-accounts/cc-online-accounts-panel.c b/panels/online-accounts/cc-online-accounts-panel.c
index 68328cc..9f6ad1e 100644
--- a/panels/online-accounts/cc-online-accounts-panel.c
+++ b/panels/online-accounts/cc-online-accounts-panel.c
@@ -36,9 +36,9 @@
 #include "cc-online-accounts-add-account-dialog.h"
 #include "cc-online-accounts-model.h"
 
-typedef struct _GoaPanelClass GoaPanelClass;
+typedef struct _CcGoaPanelClass CcGoaPanelClass;
 
-struct _GoaPanel
+struct _CcGoaPanel
 {
   CcPanel parent_instance;
 
@@ -55,7 +55,7 @@ struct _GoaPanel
   GtkWidget *accounts_vbox;
 };
 
-struct _GoaPanelClass
+struct _CcGoaPanelClass
 {
   CcPanelClass parent_class;
 };
@@ -83,10 +83,10 @@ static void on_account_changed (GoaClient  *client,
                                 GoaObject  *object,
                                 gpointer    user_data);
 
-static gboolean select_account_by_id (GoaPanel    *panel,
+static gboolean select_account_by_id (CcGoaPanel    *panel,
                                       const gchar *account_id);
 
-CC_PANEL_REGISTER (GoaPanel, goa_panel);
+CC_PANEL_REGISTER (CcGoaPanel, cc_goa_panel);
 
 enum {
   PROP_0,
@@ -94,7 +94,7 @@ enum {
 };
 
 static void
-goa_panel_set_property (GObject *object,
+cc_goa_panel_set_property (GObject *object,
                         guint property_id,
                         const GValue *value,
                         GParamSpec *pspec)
@@ -108,7 +108,7 @@ goa_panel_set_property (GObject *object,
           args = g_value_get_boxed (value);
 
           if (args != NULL && *args != '\0')
-            select_account_by_id (GOA_PANEL (object), args[0]);
+            select_account_by_id (CC_GOA_PANEL (object), args[0]);
           return;
         }
     }
@@ -117,9 +117,9 @@ goa_panel_set_property (GObject *object,
 }
 
 static void
-goa_panel_finalize (GObject *object)
+cc_goa_panel_finalize (GObject *object)
 {
-  GoaPanel *panel = GOA_PANEL (object);
+  CcGoaPanel *panel = CC_GOA_PANEL (object);
 
   if (panel->accounts_model != NULL)
     g_clear_object (&panel->accounts_model);
@@ -128,11 +128,11 @@ goa_panel_finalize (GObject *object)
     g_object_unref (panel->client);
   g_object_unref (panel->builder);
 
-  G_OBJECT_CLASS (goa_panel_parent_class)->finalize (object);
+  G_OBJECT_CLASS (cc_goa_panel_parent_class)->finalize (object);
 }
 
 static void
-goa_panel_init (GoaPanel *panel)
+cc_goa_panel_init (CcGoaPanel *panel)
 {
   GtkWidget *button;
   GtkWidget *w;
@@ -264,21 +264,21 @@ goa_panel_init (GoaPanel *panel)
 }
 
 static const char *
-goa_panel_get_help_uri (CcPanel *panel)
+cc_goa_panel_get_help_uri (CcPanel *panel)
 {
   return "help:gnome-help/accounts";
 }
 
 static void
-goa_panel_class_init (GoaPanelClass *klass)
+cc_goa_panel_class_init (CcGoaPanelClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
   CcPanelClass *panel_class = CC_PANEL_CLASS (klass);
 
-  panel_class->get_help_uri = goa_panel_get_help_uri;
+  panel_class->get_help_uri = cc_goa_panel_get_help_uri;
 
-  object_class->set_property = goa_panel_set_property;
-  object_class->finalize = goa_panel_finalize;
+  object_class->set_property = cc_goa_panel_set_property;
+  object_class->finalize = cc_goa_panel_finalize;
 
   g_object_class_override_property (object_class, PROP_ARGV, "argv");
 }
@@ -286,32 +286,7 @@ goa_panel_class_init (GoaPanelClass *klass)
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-goa_panel_register (GIOModule *module)
-{
-  goa_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  GOA_TYPE_PANEL,
-                                  "online-accounts",
-                                  0);
-}
-
-void
-g_io_module_load (GIOModule *module)
-{
-  bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
-  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-  goa_panel_register (module);
-}
-
-void
-g_io_module_unload (GIOModule *module)
-{
-}
-
-/* ---------------------------------------------------------------------------------------------------- */
-
-static void
-show_page (GoaPanel *panel,
+show_page (CcGoaPanel *panel,
            gint page_num)
 {
   GtkNotebook *notebook;
@@ -320,7 +295,7 @@ show_page (GoaPanel *panel,
 }
 
 static void
-show_page_nothing_selected (GoaPanel *panel)
+show_page_nothing_selected (CcGoaPanel *panel)
 {
   GtkWidget *box;
   GtkWidget *label;
@@ -339,7 +314,7 @@ on_info_bar_response (GtkInfoBar *info_bar,
                       gint        response_id,
                       gpointer    user_data)
 {
-  GoaPanel *panel = GOA_PANEL (user_data);
+  CcGoaPanel *panel = CC_GOA_PANEL (user_data);
   GtkTreeIter iter;
 
   if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (panel->accounts_treeview)),
@@ -394,7 +369,7 @@ on_info_bar_response (GtkInfoBar *info_bar,
 }
 
 static void
-show_page_account (GoaPanel  *panel,
+show_page_account (CcGoaPanel  *panel,
                    GoaObject *object)
 {
   GList *children;
@@ -477,7 +452,7 @@ show_page_account (GoaPanel  *panel,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-select_account_by_id (GoaPanel    *panel,
+select_account_by_id (CcGoaPanel    *panel,
                       const gchar *account_id)
 {
   GoaObject *goa_object = NULL;
@@ -510,7 +485,7 @@ static void
 on_tree_view_selection_changed (GtkTreeSelection *selection,
                                 gpointer          user_data)
 {
-  GoaPanel *panel = GOA_PANEL (user_data);
+  CcGoaPanel *panel = CC_GOA_PANEL (user_data);
   GtkTreeIter iter;
 
   if (gtk_tree_selection_get_selected (selection, NULL, &iter))
@@ -534,7 +509,7 @@ on_account_changed (GoaClient  *client,
                     GoaObject  *object,
                     gpointer    user_data)
 {
-  GoaPanel *panel = GOA_PANEL (user_data);
+  CcGoaPanel *panel = CC_GOA_PANEL (user_data);
   GtkTreeIter iter;
 
   if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (panel->accounts_treeview)),
@@ -571,7 +546,7 @@ on_model_row_deleted (GtkTreeModel *tree_model,
                       GtkTreePath  *path,
                       gpointer      user_data)
 {
-  GoaPanel *panel = GOA_PANEL (user_data);
+  CcGoaPanel *panel = CC_GOA_PANEL (user_data);
   GtkTreeIter iter;
   GtkTreeSelection *selection;
 
@@ -591,7 +566,7 @@ on_model_row_inserted (GtkTreeModel *tree_model,
                        GtkTreeIter  *iter,
                        gpointer      user_data)
 {
-  GoaPanel *panel = GOA_PANEL (user_data);
+  CcGoaPanel *panel = CC_GOA_PANEL (user_data);
   GtkTreeSelection *selection;
 
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (panel->accounts_treeview));
@@ -607,7 +582,7 @@ on_model_row_inserted (GtkTreeModel *tree_model,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-add_account (GoaPanel *panel)
+add_account (CcGoaPanel *panel)
 {
   GtkWindow *parent;
   GtkWidget *dialog;
@@ -693,7 +668,7 @@ static void
 on_toolbar_add_button_clicked (GtkToolButton *button,
                                gpointer       user_data)
 {
-  GoaPanel *panel = GOA_PANEL (user_data);
+  CcGoaPanel *panel = CC_GOA_PANEL (user_data);
   add_account (panel);
 }
 
@@ -702,7 +677,7 @@ remove_account_cb (GoaAccount    *account,
                    GAsyncResult  *res,
                    gpointer       user_data)
 {
-  GoaPanel *panel = GOA_PANEL (user_data);
+  CcGoaPanel *panel = CC_GOA_PANEL (user_data);
   GError *error;
 
   error = NULL;
@@ -729,7 +704,7 @@ static void
 on_toolbar_remove_button_clicked (GtkToolButton *button,
                                   gpointer       user_data)
 {
-  GoaPanel *panel = GOA_PANEL (user_data);
+  CcGoaPanel *panel = CC_GOA_PANEL (user_data);
   GtkTreeIter iter;
 
   if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (panel->accounts_treeview)),
@@ -774,6 +749,6 @@ static void
 on_add_button_clicked (GtkButton *button,
                        gpointer   user_data)
 {
-  GoaPanel *panel = GOA_PANEL (user_data);
+  CcGoaPanel *panel = CC_GOA_PANEL (user_data);
   add_account (panel);
 }
diff --git a/panels/online-accounts/cc-online-accounts-panel.h b/panels/online-accounts/cc-online-accounts-panel.h
index 901c5ef..34a881c 100644
--- a/panels/online-accounts/cc-online-accounts-panel.h
+++ b/panels/online-accounts/cc-online-accounts-panel.h
@@ -27,13 +27,13 @@
 
 G_BEGIN_DECLS
 
-#define GOA_TYPE_PANEL  (goa_panel_get_type ())
-#define GOA_PANEL(o)    (G_TYPE_CHECK_INSTANCE_CAST ((o), GOA_TYPE_PANEL, GoaPanel))
-#define GOA_IS_PANEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOA_TYPE_PANEL))
+#define CC_GOA_TYPE_PANEL  (cc_goa_panel_get_type ())
+#define CC_GOA_PANEL(o)    (G_TYPE_CHECK_INSTANCE_CAST ((o), CC_GOA_TYPE_PANEL, CcGoaPanel))
+#define CC_GOA_IS_PANEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CC_GOA_TYPE_PANEL))
 
-typedef struct _GoaPanel              GoaPanel;
+typedef struct _CcGoaPanel              CcGoaPanel;
 
-GType      goa_panel_get_type   (void) G_GNUC_CONST;
+GType      cc_goa_panel_get_type   (void) G_GNUC_CONST;
 
 G_END_DECLS
 
diff --git a/panels/power/Makefile.am b/panels/power/Makefile.am
index c9866df..3442c38 100644
--- a/panels/power/Makefile.am
+++ b/panels/power/Makefile.am
@@ -11,16 +11,13 @@ INCLUDES = 						\
 	-I$(srcdir)/../../shell/			\
 	$(NULL)
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libpower.la
+noinst_LTLIBRARIES = libpower.la
 
 libpower_la_SOURCES =		\
-	power-module.c		\
 	cc-power-panel.c	\
 	cc-power-panel.h
 
 libpower_la_LIBADD = $(PANEL_LIBS) $(POWER_PANEL_LIBS)
-libpower_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
 dist_ui_DATA = power.ui
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index ae81c98..eeeb560 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -1083,13 +1083,3 @@ cc_power_panel_init (CcPowerPanel *self)
   widget = WID (self->priv->builder, "vbox_power");
   gtk_widget_reparent (widget, (GtkWidget *) self);
 }
-
-void
-cc_power_panel_register (GIOModule *module)
-{
-  cc_power_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_POWER_PANEL,
-                                  "power", 0);
-}
-
diff --git a/panels/power/cc-power-panel.h b/panels/power/cc-power-panel.h
index 01f6828..0f1b4f0 100644
--- a/panels/power/cc-power-panel.h
+++ b/panels/power/cc-power-panel.h
@@ -66,8 +66,6 @@ struct _CcPowerPanelClass
 
 GType cc_power_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_power_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_POWER_PANEL_H */
diff --git a/panels/printers/Makefile.am b/panels/printers/Makefile.am
index 195f215..1083139 100644
--- a/panels/printers/Makefile.am
+++ b/panels/printers/Makefile.am
@@ -17,11 +17,9 @@ INCLUDES = 						\
 	-DDATADIR="\"$(uidir)\""			\
 	$(NULL)
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libprinters.la
+noinst_LTLIBRARIES = libprinters.la
 
 libprinters_la_SOURCES =		\
-	printers-module.c		\
 	pp-new-printer.c		\
 	pp-new-printer.h		\
 	pp-maintenance-command.c	\
@@ -48,7 +46,6 @@ libprinters_la_SOURCES =		\
 	cc-printers-panel.h
 
 libprinters_la_LIBADD = $(PRINTERS_PANEL_LIBS) $(PANEL_LIBS) $(CUPS_LIBS)
-libprinters_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 @INTLTOOL_DESKTOP_RULE@
 
diff --git a/panels/printers/cc-printers-panel.c b/panels/printers/cc-printers-panel.c
index bfa57ad..f4b12ec 100644
--- a/panels/printers/cc-printers-panel.c
+++ b/panels/printers/cc-printers-panel.c
@@ -3000,13 +3000,3 @@ Please check your installation");
   gtk_container_add (GTK_CONTAINER (self), top_widget);
   gtk_widget_show_all (GTK_WIDGET (self));
 }
-
-void
-cc_printers_panel_register (GIOModule *module)
-{
-  cc_printers_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_PRINTERS_PANEL,
-                                  "printers", 0);
-}
-
diff --git a/panels/printers/cc-printers-panel.h b/panels/printers/cc-printers-panel.h
index c140234..b0b3d37 100644
--- a/panels/printers/cc-printers-panel.h
+++ b/panels/printers/cc-printers-panel.h
@@ -65,8 +65,6 @@ struct _CcPrintersPanelClass
 
 GType cc_printers_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_printers_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_PRINTERS_PANEL_H */
diff --git a/panels/privacy/Makefile.am b/panels/privacy/Makefile.am
index d9c5a72..345fdac 100644
--- a/panels/privacy/Makefile.am
+++ b/panels/privacy/Makefile.am
@@ -10,16 +10,13 @@ INCLUDES = 						\
 	-I$(top_srcdir)/panels/common/			\
 	$(NULL)
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libprivacy.la
+noinst_LTLIBRARIES = libprivacy.la
 
 libprivacy_la_SOURCES =		\
-	privacy-module.c		\
 	cc-privacy-panel.c	\
 	cc-privacy-panel.h
 
 libprivacy_la_LIBADD = $(PANEL_LIBS) $(PRIVACY_PANEL_LIBS)
-libprivacy_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
 dist_ui_DATA = 		\
diff --git a/panels/privacy/cc-privacy-panel.c b/panels/privacy/cc-privacy-panel.c
index ae6f3bb..f5105d9 100644
--- a/panels/privacy/cc-privacy-panel.c
+++ b/panels/privacy/cc-privacy-panel.c
@@ -723,12 +723,3 @@ cc_privacy_panel_class_init (CcPrivacyPanelClass *klass)
 
   g_type_class_add_private (klass, sizeof (CcPrivacyPanelPrivate));
 }
-
-void
-cc_privacy_panel_register (GIOModule *module)
-{
-  cc_privacy_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_PRIVACY_PANEL,
-                                  "privacy", 0);
-}
diff --git a/panels/privacy/cc-privacy-panel.h b/panels/privacy/cc-privacy-panel.h
index d9c6004..a7bcac0 100644
--- a/panels/privacy/cc-privacy-panel.h
+++ b/panels/privacy/cc-privacy-panel.h
@@ -66,8 +66,6 @@ struct _CcPrivacyPanelClass
 
 GType cc_privacy_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_privacy_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_PRIVACY_PANEL_H */
diff --git a/panels/region/Makefile.am b/panels/region/Makefile.am
index da7aaab..f9eec81 100644
--- a/panels/region/Makefile.am
+++ b/panels/region/Makefile.am
@@ -10,11 +10,9 @@ INCLUDES =						\
 	-I$(srcdir)/../common/				\
 	$(NULL)
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libregion.la
+noinst_LTLIBRARIES = libregion.la
 
 libregion_la_SOURCES =	\
-	region-module.c \
 	cc-region-panel.c \
 	cc-region-panel.h \
 	gnome-region-panel-formats.c \
@@ -29,8 +27,6 @@ libregion_la_SOURCES =	\
 
 libregion_la_LIBADD = $(PANEL_LIBS) $(REGION_PANEL_LIBS) $(builddir)/../common/liblanguage.la
 
-libregion_la_LDFLAGS = $(PANEL_LDFLAGS)
-
 @INTLTOOL_DESKTOP_RULE@
 
 uidir   = $(pkgdatadir)/ui
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
index 4c310d0..d7cb828 100644
--- a/panels/region/cc-region-panel.c
+++ b/panels/region/cc-region-panel.c
@@ -160,12 +160,3 @@ cc_region_panel_init (CcRegionPanel * self)
 	setup_formats (priv->builder);
 	setup_system (priv->builder);
 }
-
-void
-cc_region_panel_register (GIOModule * module)
-{
-	cc_region_panel_register_type (G_TYPE_MODULE (module));
-	g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-					CC_TYPE_REGION_PANEL,
-					"region", 0);
-}
diff --git a/panels/region/cc-region-panel.h b/panels/region/cc-region-panel.h
index c67b18e..a2c6b9a 100644
--- a/panels/region/cc-region-panel.h
+++ b/panels/region/cc-region-panel.h
@@ -67,8 +67,6 @@ struct _CcRegionPanelClass
 
 GType cc_region_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_region_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_REGION_PANEL_H */
diff --git a/panels/screen/Makefile.am b/panels/screen/Makefile.am
index e597444..668439e 100644
--- a/panels/screen/Makefile.am
+++ b/panels/screen/Makefile.am
@@ -8,16 +8,13 @@ INCLUDES = 						\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
 	$(NULL)
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libscreen.la
+noinst_LTLIBRARIES = libscreen.la
 
 libscreen_la_SOURCES =		\
-	screen-module.c		\
 	cc-screen-panel.c	\
 	cc-screen-panel.h
 
 libscreen_la_LIBADD = $(PANEL_LIBS) $(SCREEN_PANEL_LIBS)
-libscreen_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
 dist_ui_DATA = screen.ui
diff --git a/panels/screen/cc-screen-panel.c b/panels/screen/cc-screen-panel.c
index 389698d..7a855fc 100644
--- a/panels/screen/cc-screen-panel.c
+++ b/panels/screen/cc-screen-panel.c
@@ -551,13 +551,3 @@ cc_screen_panel_init (CcScreenPanel *self)
   gtk_widget_reparent (widget, (GtkWidget *) self);
   g_object_set (self, "valign", GTK_ALIGN_START, NULL);
 }
-
-void
-cc_screen_panel_register (GIOModule *module)
-{
-  cc_screen_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_SCREEN_PANEL,
-                                  "screen", 0);
-}
-
diff --git a/panels/screen/cc-screen-panel.h b/panels/screen/cc-screen-panel.h
index 6280b78..6bc9074 100644
--- a/panels/screen/cc-screen-panel.h
+++ b/panels/screen/cc-screen-panel.h
@@ -66,8 +66,6 @@ struct _CcScreenPanelClass
 
 GType cc_screen_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_screen_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_SCREEN_PANEL_H */
diff --git a/panels/search/Makefile.am b/panels/search/Makefile.am
index 5c32d5b..c209d24 100644
--- a/panels/search/Makefile.am
+++ b/panels/search/Makefile.am
@@ -10,18 +10,15 @@ INCLUDES = 						\
 	-I$(top_srcdir)/panels/common/			\
 	$(NULL)
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libsearch.la
+noinst_LTLIBRARIES = libsearch.la
 
 libsearch_la_SOURCES =		\
-	search-module.c		\
 	cc-search-locations-dialog.c \
 	cc-search-locations-dialog.h \
 	cc-search-panel.c	\
 	cc-search-panel.h
 
 libsearch_la_LIBADD = $(PANEL_LIBS) $(SEARCH_PANEL_LIBS)
-libsearch_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
 dist_ui_DATA = 		\
diff --git a/panels/search/cc-search-panel.c b/panels/search/cc-search-panel.c
index f73d1c0..94e15ab 100644
--- a/panels/search/cc-search-panel.c
+++ b/panels/search/cc-search-panel.c
@@ -641,12 +641,3 @@ cc_search_panel_class_init (CcSearchPanelClass *klass)
 
   g_type_class_add_private (klass, sizeof (CcSearchPanelPrivate));
 }
-
-void
-cc_search_panel_register (GIOModule *module)
-{
-  cc_search_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_SEARCH_PANEL,
-                                  "search", 0);
-}
diff --git a/panels/search/cc-search-panel.h b/panels/search/cc-search-panel.h
index 8f1e8f7..31d3893 100644
--- a/panels/search/cc-search-panel.h
+++ b/panels/search/cc-search-panel.h
@@ -66,8 +66,6 @@ struct _CcSearchPanelClass
 
 GType cc_search_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_search_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_SEARCH_PANEL_H */
diff --git a/panels/sound/Makefile.am b/panels/sound/Makefile.am
index e440dba..1f152b6 100644
--- a/panels/sound/Makefile.am
+++ b/panels/sound/Makefile.am
@@ -4,8 +4,7 @@ SUBDIRS = data gvc
 cappletname = sound
 NULL =
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libsound.la
+noinst_LTLIBRARIES = libsound.la libgvcgtk.la
 
 AM_CPPFLAGS =					\
 	-I$(srcdir)/gvc/			\
@@ -22,7 +21,6 @@ AM_CPPFLAGS =					\
 # Needed because Automake complains if
 # the same source file is used in a library
 # and in an executable
-noinst_LTLIBRARIES = libgvcgtk.la
 libgvcgtk_la_SOURCES = 				\
 	gvc-channel-bar.h			\
 	gvc-channel-bar.c			\
diff --git a/panels/sound/cc-sound-panel.c b/panels/sound/cc-sound-panel.c
index 1a5b552..c60916d 100644
--- a/panels/sound/cc-sound-panel.c
+++ b/panels/sound/cc-sound-panel.c
@@ -117,29 +117,3 @@ cc_sound_panel_init (CcSoundPanel *self)
         gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (self->dialog));
         gtk_widget_show (GTK_WIDGET (self->dialog));
 }
-
-void
-cc_sound_panel_register (GIOModule *module)
-{
-        cc_sound_panel_register_type (G_TYPE_MODULE (module));
-        g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                        CC_TYPE_SOUND_PANEL,
-                                        "sound", 0);
-}
-
-/* GIO extension stuff */
-void
-g_io_module_load (GIOModule *module)
-{
-        bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
-        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-
-        /* register the panel */
-        cc_sound_panel_register (module);
-}
-
-void
-g_io_module_unload (GIOModule *module)
-{
-}
-
diff --git a/panels/sound/cc-sound-panel.h b/panels/sound/cc-sound-panel.h
index 74962c9..ea306d2 100644
--- a/panels/sound/cc-sound-panel.h
+++ b/panels/sound/cc-sound-panel.h
@@ -52,8 +52,6 @@ struct _CcSoundPanelClass {
 
 GType cc_sound_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_sound_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_SOUND_PANEL_H */
diff --git a/panels/universal-access/Makefile.am b/panels/universal-access/Makefile.am
index 1f387f9..591c563 100644
--- a/panels/universal-access/Makefile.am
+++ b/panels/universal-access/Makefile.am
@@ -9,11 +9,9 @@ INCLUDES = 						\
 	-I$(top_srcdir)/panels/common/			\
 	$(NULL)
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libuniversal-access.la
+noinst_LTLIBRARIES = libuniversal-access.la
 
 libuniversal_access_la_SOURCES =		\
-	universal-access-module.c		\
 	cc-ua-panel.c				\
 	cc-ua-panel.h				\
 	cc-marshal.c				\
@@ -22,7 +20,6 @@ libuniversal_access_la_SOURCES =		\
 	zoom-options.h
 
 libuniversal_access_la_LIBADD = $(PANEL_LIBS) $(UNIVERSAL_ACCESS_PANEL_LIBS)
-libuniversal_access_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
 dist_ui_DATA = uap.ui zoom-options.ui
diff --git a/panels/universal-access/cc-ua-panel.c b/panels/universal-access/cc-ua-panel.c
index 7fe97ae..7fe2ce8 100644
--- a/panels/universal-access/cc-ua-panel.c
+++ b/panels/universal-access/cc-ua-panel.c
@@ -652,13 +652,3 @@ cc_ua_panel_init (CcUaPanel *self)
 
   gtk_container_add (GTK_CONTAINER (self), widget);
 }
-
-void
-cc_ua_panel_register (GIOModule *module)
-{
-  cc_ua_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                  CC_TYPE_UA_PANEL,
-                                  "universal-access", 0);
-}
-
diff --git a/panels/universal-access/cc-ua-panel.h b/panels/universal-access/cc-ua-panel.h
index a36e0c8..c93dfa5 100644
--- a/panels/universal-access/cc-ua-panel.h
+++ b/panels/universal-access/cc-ua-panel.h
@@ -68,8 +68,6 @@ struct _CcUaPanelClass
 
 GType cc_ua_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_ua_panel_register (GIOModule *module);
-
 G_END_DECLS
 
 #endif /* _CC_UA_PANEL_H */
diff --git a/panels/user-accounts/Makefile.am b/panels/user-accounts/Makefile.am
index ee85cdf..896dddf 100644
--- a/panels/user-accounts/Makefile.am
+++ b/panels/user-accounts/Makefile.am
@@ -4,8 +4,7 @@ SUBDIRS = data
 cappletname = user-accounts
 NULL =
 
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libuser-accounts.la
+noinst_LTLIBRARIES = libuser-accounts.la
 
 AM_CPPFLAGS =						\
 	-DDATADIR=\""$(datadir)"\"			\
@@ -57,7 +56,6 @@ libuser_accounts_la_SOURCES =		\
 	um-editable-combo.c		\
 	um-user-panel.h 		\
 	um-user-panel.c			\
-	um-user-module.c		\
 	um-realm-manager.c		\
 	um-realm-manager.h		\
 	$(BUILT_SOURCES)
@@ -65,7 +63,7 @@ libuser_accounts_la_SOURCES =		\
 libuser_accounts_la_LIBADD = 		\
 	$(PANEL_LIBS)			\
 	$(USER_ACCOUNTS_PANEL_LIBS)	\
-	$(top_builddir)/panels/common/liblanguage.la \
+	$(builddir)/../common/liblanguage.la	\
 	-lpwquality			\
 	-lcrypt				\
 	-lm
@@ -74,8 +72,6 @@ if BUILD_CHEESE
 libuser_accounts_la_LIBADD += $(CHEESE_LIBS)
 endif
 
-libuser_accounts_la_LDFLAGS = $(PANEL_LDFLAGS)
-
 um-realm-generated.c: $(srcdir)/data/org.freedesktop.realmd.xml
 	$(AM_V_GEN) gdbus-codegen --interface-prefix org.freedesktop.realmd. \
 		--generate-c-code um-realm-generated --c-namespace UmRealm \
diff --git a/panels/user-accounts/um-user-panel.c b/panels/user-accounts/um-user-panel.c
index e3eb825..a4c5161 100644
--- a/panels/user-accounts/um-user-panel.c
+++ b/panels/user-accounts/um-user-panel.c
@@ -56,12 +56,12 @@
 
 #define USER_ACCOUNTS_PERMISSION "org.gnome.controlcenter.user-accounts.administration"
 
-CC_PANEL_REGISTER (UmUserPanel, um_user_panel)
+CC_PANEL_REGISTER (CcUserPanel, cc_user_panel)
 
 #define UM_USER_PANEL_PRIVATE(o) \
-  (G_TYPE_INSTANCE_GET_PRIVATE ((o), UM_TYPE_USER_PANEL, UmUserPanelPrivate))
+  (G_TYPE_INSTANCE_GET_PRIVATE ((o), UM_TYPE_USER_PANEL, CcUserPanelPrivate))
 
-struct _UmUserPanelPrivate {
+struct _CcUserPanelPrivate {
         UmUserManager *um;
         GtkBuilder *builder;
 
@@ -74,7 +74,7 @@ struct _UmUserPanelPrivate {
 };
 
 static GtkWidget *
-get_widget (UmUserPanelPrivate *d, const char *name)
+get_widget (CcUserPanelPrivate *d, const char *name)
 {
         return (GtkWidget *)gtk_builder_get_object (d->builder, name);
 }
@@ -91,7 +91,7 @@ enum {
 };
 
 static UmUser *
-get_selected_user (UmUserPanelPrivate *d)
+get_selected_user (CcUserPanelPrivate *d)
 {
         GtkTreeView *tv;
         GtkTreeIter iter;
@@ -119,7 +119,7 @@ get_name_col_str (UmUser *user)
 }
 
 static void
-user_added (UmUserManager *um, UmUser *user, UmUserPanelPrivate *d)
+user_added (UmUserManager *um, UmUser *user, CcUserPanelPrivate *d)
 {
         GtkWidget *widget;
         GtkTreeModel *model;
@@ -206,7 +206,7 @@ get_next_user_row (GtkTreeModel *model,
 }
 
 static void
-user_removed (UmUserManager *um, UmUser *user, UmUserPanelPrivate *d)
+user_removed (UmUserManager *um, UmUser *user, CcUserPanelPrivate *d)
 {
         GtkTreeView *tv;
         GtkTreeModel *model;
@@ -239,10 +239,10 @@ user_removed (UmUserManager *um, UmUser *user, UmUserPanelPrivate *d)
         }
 }
 
-static void show_user (UmUser *user, UmUserPanelPrivate *d);
+static void show_user (UmUser *user, CcUserPanelPrivate *d);
 
 static void
-user_changed (UmUserManager *um, UmUser *user, UmUserPanelPrivate *d)
+user_changed (UmUserManager *um, UmUser *user, CcUserPanelPrivate *d)
 {
         GtkTreeView *tv;
         GtkTreeSelection *selection;
@@ -295,7 +295,7 @@ select_created_user (GObject *object,
                      GAsyncResult *result,
                      gpointer user_data)
 {
-        UmUserPanelPrivate *d = user_data;
+        CcUserPanelPrivate *d = user_data;
         UmAccountDialog *dialog;
         GtkTreeView *tv;
         GtkTreeModel *model;
@@ -335,7 +335,7 @@ select_created_user (GObject *object,
 }
 
 static void
-add_user (GtkButton *button, UmUserPanelPrivate *d)
+add_user (GtkButton *button, CcUserPanelPrivate *d)
 {
         UmAccountDialog *dialog;
 
@@ -347,7 +347,7 @@ add_user (GtkButton *button, UmUserPanelPrivate *d)
 static void
 delete_user_done (UmUserManager     *manager,
                   GAsyncResult      *res,
-                  UmUserPanelPrivate *d)
+                  CcUserPanelPrivate *d)
 {
         GError *error;
 
@@ -376,7 +376,7 @@ delete_user_done (UmUserManager     *manager,
 static void
 delete_user_response (GtkWidget         *dialog,
                       gint               response_id,
-                      UmUserPanelPrivate *d)
+                      CcUserPanelPrivate *d)
 {
         UmUser *user;
         gboolean remove_files;
@@ -406,7 +406,7 @@ delete_user_response (GtkWidget         *dialog,
 }
 
 static void
-delete_user (GtkButton *button, UmUserPanelPrivate *d)
+delete_user (GtkButton *button, CcUserPanelPrivate *d)
 {
         UmUser *user;
         GtkWidget *dialog;
@@ -526,7 +526,7 @@ get_password_mode_text (UmUser *user)
 static void
 autologin_changed (GObject            *object,
                    GParamSpec         *pspec,
-                   UmUserPanelPrivate *d)
+                   CcUserPanelPrivate *d)
 {
         gboolean active;
         UmUser *user;
@@ -583,7 +583,7 @@ get_login_time_text (UmUser *user)
 }
 
 static void
-show_user (UmUser *user, UmUserPanelPrivate *d)
+show_user (UmUser *user, CcUserPanelPrivate *d)
 {
         GtkWidget *image;
         GtkWidget *label;
@@ -674,7 +674,7 @@ show_user (UmUser *user, UmUserPanelPrivate *d)
 static void on_permission_changed (GPermission *permission, GParamSpec *pspec, gpointer data);
 
 static void
-selected_user_changed (GtkTreeSelection *selection, UmUserPanelPrivate *d)
+selected_user_changed (GtkTreeSelection *selection, CcUserPanelPrivate *d)
 {
         GtkTreeModel *model;
         GtkTreeIter iter;
@@ -694,7 +694,7 @@ selected_user_changed (GtkTreeSelection *selection, UmUserPanelPrivate *d)
 
 static void
 change_name_done (GtkWidget          *entry,
-                  UmUserPanelPrivate *d)
+                  CcUserPanelPrivate *d)
 {
         const gchar *text;
         UmUser *user;
@@ -711,7 +711,7 @@ change_name_done (GtkWidget          *entry,
 
 static void
 account_type_changed (UmEditableCombo    *combo,
-                      UmUserPanelPrivate *d)
+                      CcUserPanelPrivate *d)
 {
         UmUser *user;
         GtkTreeModel *model;
@@ -734,7 +734,7 @@ account_type_changed (UmEditableCombo    *combo,
 static void
 language_response (GtkDialog         *dialog,
                    gint               response_id,
-                   UmUserPanelPrivate *d)
+                   CcUserPanelPrivate *d)
 {
         GtkWidget *combo;
         UmUser *user;
@@ -768,7 +768,7 @@ language_response (GtkDialog         *dialog,
 
 static void
 language_changed (UmEditableCombo    *combo,
-                  UmUserPanelPrivate *d)
+                  CcUserPanelPrivate *d)
 {
         GtkTreeModel *model;
         GtkTreeIter iter;
@@ -814,7 +814,7 @@ out:
 }
 
 static void
-change_password (GtkButton *button, UmUserPanelPrivate *d)
+change_password (GtkButton *button, CcUserPanelPrivate *d)
 {
         UmUser *user;
 
@@ -828,7 +828,7 @@ change_password (GtkButton *button, UmUserPanelPrivate *d)
 }
 
 static void
-change_fingerprint (GtkButton *button, UmUserPanelPrivate *d)
+change_fingerprint (GtkButton *button, CcUserPanelPrivate *d)
 {
         GtkWidget *label, *label2;
         UmUser *user;
@@ -895,7 +895,7 @@ dont_select_headings (GtkTreeSelection *selection,
 
 static void
 users_loaded (UmUserManager     *manager,
-              UmUserPanelPrivate *d)
+              CcUserPanelPrivate *d)
 {
         GSList *list, *l;
         UmUser *user;
@@ -969,7 +969,7 @@ on_permission_changed (GPermission *permission,
                        GParamSpec  *pspec,
                        gpointer     data)
 {
-        UmUserPanelPrivate *d = data;
+        CcUserPanelPrivate *d = data;
         gboolean is_authorized;
         gboolean self_selected;
         UmUser *user;
@@ -1153,7 +1153,7 @@ match_user (GtkTreeModel *model,
 }
 
 static void
-setup_main_window (UmUserPanelPrivate *d)
+setup_main_window (CcUserPanelPrivate *d)
 {
         GtkWidget *userlist;
         GtkTreeModel *model;
@@ -1291,9 +1291,9 @@ setup_main_window (UmUserPanelPrivate *d)
 }
 
 static void
-um_user_panel_init (UmUserPanel *self)
+cc_user_panel_init (CcUserPanel *self)
 {
-        UmUserPanelPrivate *d;
+        CcUserPanelPrivate *d;
         GError *error;
         volatile GType type G_GNUC_UNUSED;
         const gchar *filename;
@@ -1337,9 +1337,9 @@ um_user_panel_init (UmUserPanel *self)
 }
 
 static void
-um_user_panel_dispose (GObject *object)
+cc_user_panel_dispose (GObject *object)
 {
-        UmUserPanelPrivate *priv = UM_USER_PANEL (object)->priv;
+        CcUserPanelPrivate *priv = UM_USER_PANEL (object)->priv;
 
         if (priv->um) {
                 g_object_unref (priv->um);
@@ -1365,41 +1365,33 @@ um_user_panel_dispose (GObject *object)
                 g_object_unref (priv->permission);
                 priv->permission = NULL;
         }
-        G_OBJECT_CLASS (um_user_panel_parent_class)->dispose (object);
+        G_OBJECT_CLASS (cc_user_panel_parent_class)->dispose (object);
 }
 
 static GPermission *
-um_user_panel_get_permission (CcPanel *panel)
+cc_user_panel_get_permission (CcPanel *panel)
 {
-        UmUserPanelPrivate *priv = UM_USER_PANEL (panel)->priv;
+        CcUserPanelPrivate *priv = UM_USER_PANEL (panel)->priv;
 
         return priv->permission;
 }
 
 static const char *
-um_user_panel_get_help_uri (CcPanel *panel)
+cc_user_panel_get_help_uri (CcPanel *panel)
 {
 	return "help:gnome-help/user-accounts";
 }
 
 static void
-um_user_panel_class_init (UmUserPanelClass *klass)
+cc_user_panel_class_init (CcUserPanelClass *klass)
 {
         GObjectClass *object_class = G_OBJECT_CLASS (klass);
         CcPanelClass *panel_class = CC_PANEL_CLASS (klass);
 
-        object_class->dispose = um_user_panel_dispose;
+        object_class->dispose = cc_user_panel_dispose;
 
-        panel_class->get_permission = um_user_panel_get_permission;
-        panel_class->get_help_uri = um_user_panel_get_help_uri;
+        panel_class->get_permission = cc_user_panel_get_permission;
+        panel_class->get_help_uri = cc_user_panel_get_help_uri;
 
-        g_type_class_add_private (klass, sizeof (UmUserPanelPrivate));
-}
-
-void
-um_user_panel_register (GIOModule *module)
-{
-        um_user_panel_register_type (G_TYPE_MODULE (module));
-        g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-                                        UM_TYPE_USER_PANEL, "user-accounts", 0);
+        g_type_class_add_private (klass, sizeof (CcUserPanelPrivate));
 }
diff --git a/panels/user-accounts/um-user-panel.h b/panels/user-accounts/um-user-panel.h
index 46cac09..d44c4cb 100644
--- a/panels/user-accounts/um-user-panel.h
+++ b/panels/user-accounts/um-user-panel.h
@@ -26,33 +26,31 @@
 
 G_BEGIN_DECLS
 
-#define UM_TYPE_USER_PANEL um_user_panel_get_type()
+#define UM_TYPE_USER_PANEL cc_user_panel_get_type()
 
-#define UM_USER_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UM_TYPE_USER_PANEL, UmUserPanel))
-#define UM_USER_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UM_TYPE_USER_PANEL, UmUserPanelClass))
+#define UM_USER_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UM_TYPE_USER_PANEL, CcUserPanel))
+#define UM_USER_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UM_TYPE_USER_PANEL, CcUserPanelClass))
 #define UM_IS_USER_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UM_TYPE_USER_PANEL))
 #define UM_IS_USER_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UM_TYPE_USER_PANEL))
-#define UM_USER_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UM_TYPE_USER_PANEL, UmUserPanelClass))
+#define UM_USER_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UM_TYPE_USER_PANEL, CcUserPanelClass))
 
-typedef struct _UmUserPanel UmUserPanel;
-typedef struct _UmUserPanelClass UmUserPanelClass;
-typedef struct _UmUserPanelPrivate UmUserPanelPrivate;
+typedef struct _CcUserPanel CcUserPanel;
+typedef struct _CcUserPanelClass CcUserPanelClass;
+typedef struct _CcUserPanelPrivate CcUserPanelPrivate;
 
-struct _UmUserPanel
+struct _CcUserPanel
 {
   CcPanel parent;
 
-  UmUserPanelPrivate *priv;
+  CcUserPanelPrivate *priv;
 };
 
-struct _UmUserPanelClass
+struct _CcUserPanelClass
 {
   CcPanelClass parent_class;
 };
 
-GType um_user_panel_get_type (void) G_GNUC_CONST;
-
-void  um_user_panel_register (GIOModule *module);
+GType cc_user_panel_get_type (void) G_GNUC_CONST;
 
 G_END_DECLS
 
diff --git a/panels/wacom/Makefile.am b/panels/wacom/Makefile.am
index 595c8ea..92fcf75 100644
--- a/panels/wacom/Makefile.am
+++ b/panels/wacom/Makefile.am
@@ -12,12 +12,9 @@ INCLUDES = 						\
 	-DGNOMECC_UI_DIR="\"$(uidir)\""			\
 	$(NULL)
 
-
-ccpanelsdir = $(PANELS_DIR)
-ccpanels_LTLIBRARIES = libwacom-properties.la
+noinst_LTLIBRARIES = libwacom-properties.la
 
 libwacom_properties_la_SOURCES =	\
-	wacom-module.c			\
 	cc-wacom-panel.c		\
 	cc-wacom-panel.h		\
 	cc-wacom-page.c			\
@@ -35,7 +32,6 @@ libwacom_properties_la_SOURCES =	\
 	gsd-enums.h
 
 libwacom_properties_la_LIBADD = $(PANEL_LIBS) $(WACOM_PANEL_LIBS) $(builddir)/calibrator/libwacom-calibrator.la
-libwacom_properties_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 noinst_PROGRAMS = test-wacom
 
diff --git a/panels/wacom/cc-wacom-panel.c b/panels/wacom/cc-wacom-panel.c
index b679efc..f52da16 100644
--- a/panels/wacom/cc-wacom-panel.c
+++ b/panels/wacom/cc-wacom-panel.c
@@ -390,12 +390,3 @@ cc_wacom_panel_init (CcWacomPanel *self)
 
 	update_current_page (self);
 }
-
-void
-cc_wacom_panel_register (GIOModule *module)
-{
-	cc_wacom_panel_register_type (G_TYPE_MODULE (module));
-	g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-					CC_TYPE_WACOM_PANEL, "wacom", 0);
-}
-
diff --git a/panels/wacom/cc-wacom-panel.h b/panels/wacom/cc-wacom-panel.h
index 54b8faa..3ddd20b 100644
--- a/panels/wacom/cc-wacom-panel.h
+++ b/panels/wacom/cc-wacom-panel.h
@@ -67,8 +67,6 @@ struct _CcWacomPanelClass
 
 GType cc_wacom_panel_get_type (void) G_GNUC_CONST;
 
-void  cc_wacom_panel_register (GIOModule *module);
-
 void  cc_wacom_panel_switch_to_panel (CcWacomPanel *self,
 				      const char   *panel);
 
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 44e50a6..4f7c621 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -34,17 +34,48 @@ gnome_control_center_SOURCES =			\
 	cc-shell.h				\
 	$(MARSHAL_FILES)
 
-gnome_control_center_LDADD =			\
-	$(SHELL_LIBS)				\
-	$(CHEESE_LIBS)
-
 gnome_control_center_LDFLAGS = -export-dynamic
 
+gnome_control_center_LDADD =						\
+	$(SHELL_LIBS)							\
+	$(CHEESE_LIBS)							\
+	$(top_builddir)/panels/background/libbackground.la		\
+	$(top_builddir)/panels/color/libcolor.la			\
+	$(top_builddir)/panels/datetime/libdate_time.la			\
+	$(top_builddir)/panels/display/libdisplay.la			\
+	$(top_builddir)/panels/info/libinfo.la				\
+	$(top_builddir)/panels/keyboard/libkeyboard.la			\
+	$(top_builddir)/panels/mouse/libmouse-properties.la		\
+	$(top_builddir)/panels/online-accounts/libonline-accounts.la	\
+	$(top_builddir)/panels/power/libpower.la			\
+	$(top_builddir)/panels/privacy/libprivacy.la			\
+	$(top_builddir)/panels/region/libregion.la			\
+	$(top_builddir)/panels/screen/libscreen.la			\
+	$(top_builddir)/panels/search/libsearch.la			\
+	$(top_builddir)/panels/sound/libsound.la			\
+	$(top_builddir)/panels/universal-access/libuniversal-access.la	\
+	$(top_builddir)/panels/user-accounts/libuser-accounts.la
+
+if BUILD_WACOM
+gnome_control_center_LDADD += $(top_builddir)/panels/wacom/libwacom-properties.la
+endif
+
+if BUILD_PRINTERS
+gnome_control_center_LDADD += $(top_builddir)/panels/printers/libprinters.la
+endif
+
+if BUILD_NETWORK
+gnome_control_center_LDADD += $(top_builddir)/panels/network/libnetwork.la
+endif
+
+if BUILD_BLUETOOTH
+gnome_control_center_LDADD += $(top_builddir)/panels/bluetooth/libbluetooth.la
+endif
+
 AM_CPPFLAGS =							\
 	-DGNOMELOCALEDIR="\"$(datadir)/locale\""		\
 	-DUIDIR="\"$(uidir)\""					\
-	-DMENUDIR="\"$(menudir)\""				\
-	-DPANELS_DIR="\"$(PANELS_DIR)\""
+	-DMENUDIR="\"$(menudir)\""
 
 menudir = $(sysconfdir)/xdg/menus
 menu_DATA = gnomecc.menu
diff --git a/shell/cc-panel.h b/shell/cc-panel.h
index 5c440e5..11a858c 100644
--- a/shell/cc-panel.h
+++ b/shell/cc-panel.h
@@ -43,14 +43,13 @@ G_BEGIN_DECLS
  *
  * use: CC_PANEL_REGISTER (PluginName, plugin_name)
  */
-#define CC_PANEL_REGISTER(PluginName, plugin_name)                             \
-        G_DEFINE_DYNAMIC_TYPE (PluginName,                                     \
-                               plugin_name,                                    \
-                               CC_TYPE_PANEL)                                  \
-static void                                                                    \
-plugin_name##_class_finalize (PluginName##Class *plugin_name##_class)          \
-{                                                                              \
-}
+#define CC_PANEL_REGISTER(PluginName, plugin_name)							\
+	G_DEFINE_TYPE_WITH_CODE (PluginName, plugin_name, CC_TYPE_PANEL,				\
+				 GIOExtensionPoint *ep;							\
+				 ep = g_io_extension_point_register ("CcPanel");			\
+				 g_io_extension_point_set_required_type (ep, CC_TYPE_PANEL);		\
+				 g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,	\
+								 g_define_type_id, PANEL_ID, 0))
 
 typedef struct CcPanelPrivate CcPanelPrivate;
 
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index 6f9ad3b..aafc87e 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -19,6 +19,7 @@
  * Author: Thomas Wood <thos gnome org>
  */
 
+#include <config.h>
 
 #include "gnome-control-center.h"
 
@@ -55,6 +56,36 @@ G_DEFINE_TYPE (GnomeControlCenter, gnome_control_center, CC_TYPE_SHELL)
 
 #define MIN_ICON_VIEW_HEIGHT 300
 
+/* Extension points */
+extern GType cc_background_panel_get_type (void);
+#ifdef BUILD_BLUETOOTH
+extern GType cc_bluetooth_panel_get_type (void);
+#endif /* BUILD_BLUETOOTH */
+extern GType cc_color_panel_get_type (void);
+extern GType cc_date_time_panel_get_type (void);
+extern GType cc_display_panel_get_type (void);
+extern GType cc_info_panel_get_type (void);
+extern GType cc_keyboard_panel_get_type (void);
+extern GType cc_mouse_panel_get_type (void);
+#ifdef BUILD_NETWORK
+extern GType cc_network_panel_get_type (void);
+#endif /* BUILD_NETWORK */
+extern GType cc_goa_panel_get_type (void);
+extern GType cc_power_panel_get_type (void);
+#ifdef BUILD_PRINTERS
+extern GType cc_printers_panel_get_type (void);
+#endif /* BUILD_PRINTERS */
+extern GType cc_privacy_panel_get_type (void);
+extern GType cc_region_panel_get_type (void);
+extern GType cc_screen_panel_get_type (void);
+extern GType cc_search_panel_get_type (void);
+extern GType cc_sound_panel_get_type (void);
+extern GType cc_ua_panel_get_type (void);
+extern GType cc_user_panel_get_type (void);
+#ifdef BUILD_WACOM
+extern GType cc_wacom_panel_get_type (void);
+#endif /* BUILD_WACOM */
+
 typedef enum {
 	SMALL_SCREEN_UNSET,
 	SMALL_SCREEN_TRUE,
@@ -184,41 +215,26 @@ activate_panel (GnomeControlCenter *shell,
 {
   GnomeControlCenterPrivate *priv = shell->priv;
   GType panel_type = G_TYPE_INVALID;
-  GList *panels, *l;
   GtkWidget *box;
   const gchar *icon_name;
-
-  /* check if there is an plugin that implements this panel */
-  panels = g_io_extension_point_get_extensions (priv->extension_point);
+  GIOExtension *extension;
 
   if (!desktop_file)
     return FALSE;
   if (!id)
     return FALSE;
 
-  for (l = panels; l != NULL; l = l->next)
-    {
-      GIOExtension *extension;
-      const gchar *name;
-
-      extension = l->data;
-
-      name = g_io_extension_get_name (extension);
-
-      if (!g_strcmp0 (name, id))
-        {
-          panel_type = g_io_extension_get_type (extension);
-          break;
-        }
-    }
-
-  if (panel_type == G_TYPE_INVALID)
+  /* check if there is an extension point that implements this panel */
+  extension = g_io_extension_point_get_extension_by_name (priv->extension_point, id);
+  if (extension == NULL)
     {
       g_warning ("Could not find the loadable module for panel '%s'", id);
       return FALSE;
     }
 
-  /* create the panel plugin */
+  panel_type = g_io_extension_get_type (extension);
+
+  /* create the panel */
   priv->current_panel = g_object_new (panel_type, "shell", shell, "argv", argv, NULL);
   cc_shell_set_active_panel (CC_SHELL (shell), CC_PANEL (priv->current_panel));
   gtk_widget_show (priv->current_panel);
@@ -862,10 +878,8 @@ setup_model (GnomeControlCenter *shell)
 }
 
 static void
-load_panel_plugins (GnomeControlCenter *shell)
+load_panel_modules (GnomeControlCenter *shell)
 {
-  GList *modules;
-
   /* only allow this function to be run once to prevent modules being loaded
    * twice
    */
@@ -878,13 +892,36 @@ load_panel_plugins (GnomeControlCenter *shell)
   shell->priv->extension_point
     = g_io_extension_point_register (CC_SHELL_PANEL_EXTENSION_POINT);
 
-  /* load all the plugins in the panels directory */
-  modules = g_io_modules_load_all_in_directory (PANELS_DIR);
-  g_list_free (modules);
-
+  g_type_ensure (cc_background_panel_get_type ());
+#ifdef BUILD_BLUETOOTH
+  g_type_ensure (cc_bluetooth_panel_get_type ());
+#endif /* BUILD_BLUETOOTH */
+  g_type_ensure (cc_color_panel_get_type ());
+  g_type_ensure (cc_date_time_panel_get_type ());
+  g_type_ensure (cc_display_panel_get_type ());
+  g_type_ensure (cc_info_panel_get_type ());
+  g_type_ensure (cc_keyboard_panel_get_type ());
+  g_type_ensure (cc_mouse_panel_get_type ());
+#ifdef BUILD_NETWORK
+  g_type_ensure (cc_network_panel_get_type ());
+#endif /* BUILD_NETWORK */
+  g_type_ensure (cc_goa_panel_get_type ());
+  g_type_ensure (cc_power_panel_get_type ());
+#ifdef BUILD_PRINTERS
+  g_type_ensure (cc_printers_panel_get_type ());
+#endif /* BUILD_PRINTERS */
+  g_type_ensure (cc_privacy_panel_get_type ());
+  g_type_ensure (cc_region_panel_get_type ());
+  g_type_ensure (cc_screen_panel_get_type ());
+  g_type_ensure (cc_search_panel_get_type ());
+  g_type_ensure (cc_sound_panel_get_type ());
+  g_type_ensure (cc_ua_panel_get_type ());
+  g_type_ensure (cc_user_panel_get_type ());
+#ifdef BUILD_WACOM
+  g_type_ensure (cc_wacom_panel_get_type ());
+#endif /* BUILD_WACOM */
 }
 
-
 static void
 home_button_clicked_cb (GtkButton *button,
                         GnomeControlCenter *shell)
@@ -1391,12 +1428,12 @@ gnome_control_center_init (GnomeControlCenter *self)
   /* keep a list of custom widgets to unload on panel change */
   priv->custom_widgets = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
 
+  /* load the panels that are implemented as builtin modules */
+  load_panel_modules (self);
+
   /* load the available settings panels */
   setup_model (self);
 
-  /* load the panels that are implemented as plugins */
-  load_panel_plugins (self);
-
   /* setup search functionality */
   setup_search (self);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]