[gnome-control-center/wip/input-sources: 9/13] region: Remove the last remnants of libgnomekbd
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/input-sources: 9/13] region: Remove the last remnants of libgnomekbd
- Date: Wed, 18 Apr 2012 15:41:37 +0000 (UTC)
commit f07c5da29e708f6b0202d73409a67e55fb80edf0
Author: Rui Matos <tiagomatos gmail com>
Date: Wed Apr 18 01:18:56 2012 +0200
region: Remove the last remnants of libgnomekbd
There's no need to be linking to libgnomekbd and libxklavier just to
show keyboard previews, we can just spawn gkbd-keyboard-display. This
isn't ideal but we can polish it better later on.
configure.ac | 5 +-
panels/region/Makefile.am | 4 +-
panels/region/gnome-region-panel-input.c | 31 +---
panels/region/gnome-region-panel-layout-chooser.ui | 180 --------------------
panels/region/gnome-region-panel-options-dialog.ui | 79 ---------
panels/region/gnome-region-panel-system.c | 1 -
panels/region/use_cases.txt | 42 -----
7 files changed, 7 insertions(+), 335 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index dfb774f..3f6bdd6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,10 +112,9 @@ PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1
PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES colord >= 0.1.8)
PKG_CHECK_MODULES(PRINTERS_PANEL, $COMMON_MODULES
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
-PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES libgnomekbd >= 2.91.91
+PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
- ibus-1.0
- libxklavier >= 5.1 libgnomekbdui >= 2.91.91)
+ ibus-1.0)
PKG_CHECK_MODULES(SCREEN_PANEL, $COMMON_MODULES)
PKG_CHECK_MODULES(SOUND_PANEL, $COMMON_MODULES libxml-2.0
libcanberra-gtk3 >= $CANBERRA_REQUIRED_VERSION
diff --git a/panels/region/Makefile.am b/panels/region/Makefile.am
index b4f6e76..00f8207 100644
--- a/panels/region/Makefile.am
+++ b/panels/region/Makefile.am
@@ -35,9 +35,7 @@ libregion_la_LDFLAGS = $(PANEL_LDFLAGS)
uidir = $(pkgdatadir)/ui
ui_DATA = \
gnome-region-panel.ui \
- gnome-region-panel-layout-chooser.ui \
- gnome-region-panel-input-chooser.ui \
- gnome-region-panel-options-dialog.ui
+ gnome-region-panel-input-chooser.ui
desktopdir = $(datadir)/applications
Desktop_in_files = gnome-region-panel.desktop.in
diff --git a/panels/region/gnome-region-panel-input.c b/panels/region/gnome-region-panel-input.c
index 25b5868..29fd09f 100644
--- a/panels/region/gnome-region-panel-input.c
+++ b/panels/region/gnome-region-panel-input.c
@@ -32,9 +32,6 @@
#include <ibusutil.h>
#undef IBUS_COMPILATION
-#include <gdk/gdkx.h>
-#include <libgnomekbd/gkbd-keyboard-drawing.h>
-
#include "gnome-region-panel-input.h"
#define WID(s) GTK_WIDGET(gtk_builder_get_object (builder, s))
@@ -527,15 +524,10 @@ static void
show_selected_layout (GtkButton *button, gpointer data)
{
GtkBuilder *builder = data;
- GtkWidget *parent;
- GtkWidget *popup;
GtkTreeModel *model;
GtkTreeIter iter;
gchar *layout;
- gchar *desc;
- gchar *title;
- XklEngine *engine;
- XklConfigRegistry *registry;
+ gchar *kbd_viewer_args;
g_debug ("show selected layout");
@@ -544,29 +536,14 @@ show_selected_layout (GtkButton *button, gpointer data)
gtk_tree_model_get (model, &iter,
COL_LAYOUT, &layout,
- COL_DESC, &desc,
-1);
- parent = WID ("region_notebook");
- popup = gkbd_keyboard_drawing_dialog_new ();
-
- engine = xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (parent)));
- registry = xkl_config_registry_get_instance (engine);
+ kbd_viewer_args = g_strdup_printf ("gkbd-keyboard-display -l %s", layout);
- gkbd_keyboard_drawing_dialog_set_layout (popup, registry, layout);
-
- g_object_unref (registry);
-
- title = g_strdup_printf (_("Keyboard layout for %s"), desc);
- gtk_window_set_title (GTK_WINDOW (popup), title);
- g_free (title);
-
- gtk_window_set_transient_for (GTK_WINDOW (popup),
- GTK_WINDOW (gtk_widget_get_toplevel (parent)));
- gtk_widget_show_all (popup);
+ g_spawn_command_line_async (kbd_viewer_args, NULL);
+ g_free (kbd_viewer_args);
g_free (layout);
- g_free (desc);
}
/* Main setup {{{1 */
diff --git a/panels/region/gnome-region-panel-system.c b/panels/region/gnome-region-panel-system.c
index de1564b..a500f6d 100644
--- a/panels/region/gnome-region-panel-system.c
+++ b/panels/region/gnome-region-panel-system.c
@@ -29,7 +29,6 @@
#include <glib/gi18n.h>
-#include <libgnomekbd/gkbd-keyboard-config.h>
#include "cc-common-language.h"
#include "gdm-languages.h"
#include "gnome-region-panel-system.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]