[libgnomekbd] Got rid of the obsolete plugins architecture
- From: Sergey V. Udaltsov <svu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgnomekbd] Got rid of the obsolete plugins architecture
- Date: Wed, 22 Feb 2012 23:49:53 +0000 (UTC)
commit d63547c01abff6a24920445455c8d2ede2eadd02
Author: Sergey V. Udaltsov <svu gnome org>
Date: Wed Feb 22 23:41:59 2012 +0000
Got rid of the obsolete plugins architecture
In the GNOME 3 world, there are gnome-shell extensions, there is introspection - so plugins are not necessary any more
Makefile.am | 2 +-
capplet/.gitignore | 9 -
capplet/.indent.pro | 2 -
capplet/Makefile.am | 46 --
capplet/gkbd-indicator-plugins-add.c | 220 ----------
capplet/gkbd-indicator-plugins-capplet.c | 462 --------------------
.../gkbd-indicator-plugins-capplet.desktop.in.in | 15 -
capplet/gkbd-indicator-plugins-capplet.h | 63 ---
capplet/gkbd-indicator-plugins-capplet.png | Bin 2378 -> 0 bytes
capplet/gkbd-indicator-plugins.ui | 255 -----------
capplet/gkbd-indicator-plugins_add.ui | 142 ------
configure.in | 2 -
libgnomekbd/Makefile.am | 9 +-
libgnomekbd/gkbd-indicator-config.c | 13 -
libgnomekbd/gkbd-indicator-config.h | 2 -
libgnomekbd/gkbd-indicator-plugin-manager.c | 409 -----------------
libgnomekbd/gkbd-indicator-plugin-manager.h | 123 ------
libgnomekbd/gkbd-indicator-plugin.h | 132 ------
libgnomekbd/gkbd-indicator.c | 56 +---
libgnomekbd/libgnomekbd.convert | 1 -
.../org.gnome.libgnomekbd.gschema.xml.in.in | 5 -
po/POTFILES.in | 6 -
22 files changed, 4 insertions(+), 1970 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 83aba99..53f246c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ if BUILD_TESTS
TEST = test
endif
-SUBDIRS = libgnomekbd $(TEST) capplet po
+SUBDIRS = libgnomekbd $(TEST) po
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
diff --git a/configure.in b/configure.in
index 37c888d..c36c165 100644
--- a/configure.in
+++ b/configure.in
@@ -101,6 +101,4 @@ libgnomekbd/org.gnome.libgnomekbd.keyboard.gschema.xml.in
libgnomekbd/org.gnome.libgnomekbd.gschema.xml.in
libgnomekbd/gkbd-keyboard-display.desktop.in
test/Makefile
-capplet/Makefile
-capplet/gkbd-indicator-plugins-capplet.desktop.in
])
diff --git a/libgnomekbd/Makefile.am b/libgnomekbd/Makefile.am
index 7117f97..ed71260 100644
--- a/libgnomekbd/Makefile.am
+++ b/libgnomekbd/Makefile.am
@@ -23,7 +23,6 @@ common_CFLAGS = \
$(LIBXKLAVIER_CFLAGS) \
$(XLIB_CFLAGS) \
-I$(top_srcdir)/intl \
- -DSYS_PLUGIN_DIR=\"$(libdir)/gnomekbd/\" \
-DG_LOG_DOMAIN=\"GnomeKbdIndicator\" \
-DDATADIR=\"$(datadir)\" \
-DICONSDIR=\"$(iconsdir)\" \
@@ -65,7 +64,6 @@ libgnomekbdui_la_SOURCES = \
gkbd-indicator.c \
gkbd-status.c \
gkbd-indicator-marshal.c \
- gkbd-indicator-plugin-manager.c \
gkbd-keyboard-drawing-marshal.c \
gkbd-keyboard-drawing.c
@@ -107,7 +105,6 @@ gnomekbdinc_HEADERS = \
gkbd-indicator.h \
gkbd-status.h \
gkbd-indicator-config.h \
- gkbd-indicator-plugin.h \
gkbd-keyboard-drawing.h \
gkbd-util.h
@@ -117,8 +114,7 @@ sys_DATA = $(sys_in_in_files:.desktop.in.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
-noinst_HEADERS = gkbd-indicator-plugin-manager.h \
- $(extra_nih) \
+noinst_HEADERS = $(extra_nih) \
gkbd-config-private.h
convertdir = $(datadir)/GConf/gsettings
@@ -161,8 +157,7 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
if HAVE_INTROSPECTION
introspection_sources = $(gnomekbdinc_HEADERS) \
$(libgnomekbd_la_SOURCES) \
- $(libgnomekbdui_la_SOURCES) \
- gkbd-indicator-plugin-manager.h
+ $(libgnomekbdui_la_SOURCES)
Gkbd-3.0.gir: libgnomekbd.la libgnomekbdui.la
Gkbd_3_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 xlib-2.0 Xkl-1.0
diff --git a/libgnomekbd/gkbd-indicator-config.c b/libgnomekbd/gkbd-indicator-config.c
index c678643..fce70b2 100644
--- a/libgnomekbd/gkbd-indicator-config.c
+++ b/libgnomekbd/gkbd-indicator-config.c
@@ -39,8 +39,6 @@
*/
const gchar GKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] = "show-flags";
-const gchar GKBD_INDICATOR_CONFIG_KEY_ENABLED_PLUGINS[] =
- "enabled-plugins";
const gchar GKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] = "secondary";
const gchar GKBD_INDICATOR_CONFIG_KEY_FONT_FAMILY[] = "font-family";
const gchar GKBD_INDICATOR_CONFIG_KEY_FONT_SIZE[] = "font-size";
@@ -280,8 +278,6 @@ gkbd_indicator_config_term (GkbdIndicatorConfig * ind_config)
gkbd_indicator_config_free_image_filenames (ind_config);
- g_strfreev (ind_config->enabled_plugins);
- ind_config->enabled_plugins = NULL;
g_object_unref (ind_config->settings);
ind_config->settings = NULL;
}
@@ -299,11 +295,6 @@ gkbd_indicator_config_load (GkbdIndicatorConfig * ind_config)
gkbd_indicator_config_load_font (ind_config);
gkbd_indicator_config_load_colors (ind_config);
-
- g_strfreev (ind_config->enabled_plugins);
- ind_config->enabled_plugins =
- g_settings_get_strv (ind_config->settings,
- GKBD_INDICATOR_CONFIG_KEY_ENABLED_PLUGINS);
}
void
@@ -317,10 +308,6 @@ gkbd_indicator_config_save (GkbdIndicatorConfig * ind_config)
g_settings_set_boolean (ind_config->settings,
GKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
ind_config->show_flags);
- g_settings_set_strv (ind_config->settings,
- GKBD_INDICATOR_CONFIG_KEY_ENABLED_PLUGINS,
- (const gchar *
- const *) ind_config->enabled_plugins);
g_settings_apply (ind_config->settings);
}
diff --git a/libgnomekbd/gkbd-indicator-config.h b/libgnomekbd/gkbd-indicator-config.h
index 9b9d935..3c1515b 100644
--- a/libgnomekbd/gkbd-indicator-config.h
+++ b/libgnomekbd/gkbd-indicator-config.h
@@ -37,8 +37,6 @@ struct _GkbdIndicatorConfig {
gchar *foreground_color;
gchar *background_color;
- gchar **enabled_plugins;
-
/* private, transient */
GSettings *settings;
GSList *image_filenames;
diff --git a/libgnomekbd/gkbd-indicator.c b/libgnomekbd/gkbd-indicator.c
index d85339a..413284b 100644
--- a/libgnomekbd/gkbd-indicator.c
+++ b/libgnomekbd/gkbd-indicator.c
@@ -32,14 +32,9 @@
#include <gkbd-indicator-config.h>
#include <gkbd-configuration.h>
-#include <gkbd-indicator-plugin-manager.h>
-
typedef struct _gki_globals {
GkbdConfiguration *config;
- GkbdIndicatorPluginContainer plugin_container;
- GkbdIndicatorPluginManager plugin_manager;
-
GSList *images;
} gki_globals;
@@ -110,7 +105,7 @@ gkbd_indicator_fill (GkbdIndicator * gki)
gkbd_configuration_get_group_names (globals.config);
for (grp = 0; grp < total_groups; grp++) {
- GtkWidget *page, *decorated_page = NULL;
+ GtkWidget *page = NULL;
gchar *full_group_name =
(grp <
g_strv_length (full_group_names)) ?
@@ -120,15 +115,6 @@ gkbd_indicator_fill (GkbdIndicator * gki)
if (page == NULL)
page = gtk_label_new ("");
- decorated_page =
- gkbd_indicator_plugin_manager_decorate_widget
- (&globals.plugin_manager, page, grp,
- full_group_name,
- gkbd_configuration_get_keyboard_config
- (globals.config));
-
- page = decorated_page == NULL ? page : decorated_page;
-
gtk_notebook_append_page (notebook, page, NULL);
gtk_widget_show_all (page);
}
@@ -299,11 +285,6 @@ gkbd_indicator_reinit_ui (GkbdIndicator * gki)
static void
gkbd_indicator_cfg_callback (GkbdConfiguration * configuration)
{
- gkbd_indicator_plugin_manager_toggle_plugins
- (&globals.plugin_manager, &globals.plugin_container,
- gkbd_configuration_get_indicator_config (globals.
- config)->enabled_plugins);
-
ForAllObjects (configuration) {
gkbd_indicator_reinit_ui (GKBD_INDICATOR (gki));
} NextObject ()
@@ -315,8 +296,6 @@ gkbd_indicator_state_callback (GkbdConfiguration * configuration,
gint group)
{
ForAllObjects (configuration) {
- gkbd_indicator_plugin_manager_group_changed
- (&globals.plugin_manager, GTK_WIDGET (gki), group);
xkl_debug (200, "do repaint\n");
gkbd_indicator_set_current_page_for_group (GKBD_INDICATOR
(gki), group);
@@ -487,11 +466,6 @@ gkbd_indicator_global_term (void)
gkbd_configuration_free_images (globals.config, globals.images);
globals.images = NULL;
- gkbd_indicator_plugin_manager_term_initialized_plugins
- (&globals.plugin_manager);
- gkbd_indicator_plugin_manager_term (&globals.plugin_manager);
- gkbd_indicator_plugin_container_term (&globals.plugin_container);
-
gkbd_indicator_stop_listen ();
g_object_unref (globals.config);
globals.config = NULL;
@@ -534,16 +508,8 @@ gkbd_indicator_global_init (void)
g_signal_connect (globals.config, "changed",
G_CALLBACK (gkbd_indicator_cfg_callback), NULL);
- gkbd_indicator_plugin_container_init (&globals.plugin_container);
-
globals.images = gkbd_configuration_load_images (globals.config);
- gkbd_indicator_plugin_manager_init (&globals.plugin_manager);
- gkbd_indicator_plugin_manager_init_enabled_plugins
- (&globals.plugin_manager, &globals.plugin_container,
- gkbd_configuration_get_indicator_config (globals.
- config)->enabled_plugins);
-
gkbd_indicator_start_listen ();
xkl_debug (100, "*** Inited globals *** \n");
@@ -616,23 +582,3 @@ gkbd_indicator_set_angle (GkbdIndicator * gki, gdouble angle)
gki->priv->angle = angle;
}
-/* Plugin support */
-/* Preserve the plugin container functions during the linking */
-void
-gkbd_indicator_plugin_container_reinit_ui (GkbdIndicatorPluginContainer *
- pc)
-{
- ForAllObjects (globals.config) {
- gkbd_indicator_reinit_ui (GKBD_INDICATOR (gki));
- } NextObject ()
-}
-
-/**
- * gkbd_indicator_plugin_load_localized_group_names:
- * Returns: (transfer none) (array zero-terminated=1): all group names
- */
-gchar **gkbd_indicator_plugin_load_localized_group_names
- (GkbdIndicatorPluginContainer * pc) {
- return (gchar **)
- gkbd_configuration_get_group_names (globals.config);
-}
diff --git a/libgnomekbd/libgnomekbd.convert b/libgnomekbd/libgnomekbd.convert
index 388edf2..991a8ae 100644
--- a/libgnomekbd/libgnomekbd.convert
+++ b/libgnomekbd/libgnomekbd.convert
@@ -18,7 +18,6 @@ font-family = /desktop/gnome/peripherals/keyboard/indicator/fontFamily
font-size = /desktop/gnome/peripherals/keyboard/indicator/fontSize
foreground-color = /desktop/gnome/peripherals/keyboard/indicator/foregroundColor
background-color = /desktop/gnome/peripherals/keyboard/indicator/backgroundColor
-enabled-plugins = /desktop/gnome/peripherals/keyboard/indicator/enabledPlugins
[org.gnome.libgnomekbd.keyboard]
model = /desktop/gnome/peripherals/keyboard/kbd/model
diff --git a/libgnomekbd/org.gnome.libgnomekbd.gschema.xml.in.in b/libgnomekbd/org.gnome.libgnomekbd.gschema.xml.in.in
index 450d6a4..ea3dcce 100644
--- a/libgnomekbd/org.gnome.libgnomekbd.gschema.xml.in.in
+++ b/libgnomekbd/org.gnome.libgnomekbd.gschema.xml.in.in
@@ -63,10 +63,5 @@
<_summary>The background color</_summary>
<_description>The background color for the layout indicator</_description>
</key>
- <key name="enabled-plugins" type="as">
- <default>[]</default>
- <_summary>The list of enabled Keyboard Indicator plugins</_summary>
- <_description>The list of enabled Keyboard Indicator plugins</_description>
- </key>
</schema>
</schemalist>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ff1d54b..5ce4cd1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,6 @@
libgnomekbd/gkbd-desktop-config.c
libgnomekbd/gkbd-indicator.c
libgnomekbd/gkbd-indicator-config.c
-libgnomekbd/gkbd-indicator-plugin-manager.c
libgnomekbd/gkbd-keyboard-drawing.c
libgnomekbd/gkbd-keyboard-config.c
libgnomekbd/gkbd-status.c
@@ -11,9 +10,4 @@ libgnomekbd/gkbd-keyboard-display.desktop.in.in
[type: gettext/xml]libgnomekbd/org.gnome.libgnomekbd.gschema.xml.in.in
[type: gettext/xml]libgnomekbd/org.gnome.libgnomekbd.keyboard.gschema.xml.in.in
[type: gettext/glade]libgnomekbd/show-layout.ui
-[type: gettext/glade]capplet/gkbd-indicator-plugins.ui
-[type: gettext/glade]capplet/gkbd-indicator-plugins_add.ui
-capplet/gkbd-indicator-plugins-capplet.c
-capplet/gkbd-indicator-plugins-capplet.desktop.in.in
-capplet/gkbd-indicator-plugins-add.c
test/gkbd-indicator-test.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]