Commit 0fb0d613 authored by Rui Matos's avatar Rui Matos Committed by Bastien Nocera

region: Removal of the Layouts tab

https://bugzilla.gnome.org/show_bug.cgi?id=662489
parent bfaeb6a4
......@@ -114,9 +114,8 @@ 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
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
libxklavier >= 5.1 libgnomekbdui >= 2.91.91)
PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
PKG_CHECK_MODULES(SCREEN_PANEL, $COMMON_MODULES)
PKG_CHECK_MODULES(SOUND_PANEL, $COMMON_MODULES libxml-2.0
libcanberra-gtk3 >= $CANBERRA_REQUIRED_VERSION
......
......@@ -25,12 +25,7 @@ libregion_la_SOURCES = \
gnome-region-panel-system.h \
gnome-region-panel-input.c \
gnome-region-panel-input.h \
gnome-region-panel-xkb.c \
gnome-region-panel-xkblt.c \
gnome-region-panel-xkbltadd.c \
gnome-region-panel-xkbot.c \
gnome-region-panel-xkbpv.c \
gnome-region-panel-xkb.h
$(NULL)
libregion_la_LIBADD = $(PANEL_LIBS) $(REGION_PANEL_LIBS) $(builddir)/../common/liblanguage.la
......@@ -41,9 +36,8 @@ 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
$(NULL)
desktopdir = $(datadir)/applications
Desktop_in_files = gnome-region-panel.desktop.in
......
......@@ -22,7 +22,6 @@
#include "cc-region-panel.h"
#include <gtk/gtk.h>
#include "gnome-region-panel-xkb.h"
#include "gnome-region-panel-input.h"
#include "gnome-region-panel-lang.h"
#include "gnome-region-panel-formats.h"
......@@ -161,7 +160,6 @@ cc_region_panel_init (CcRegionPanel * self)
gtk_widget_reparent (prefs_widget, GTK_WIDGET (self));
setup_xkb_tabs (priv->builder);
setup_input_tabs (priv->builder, self);
setup_language (priv->builder);
setup_formats (priv->builder);
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<object class="GtkListStore" id="layout_list_model">
<columns>
<!-- column-name sort_order -->
<column type="gchararray"/>
<!-- column-name visible -->
<column type="gchararray"/>
<!-- column-name xkb_id -->
<column type="gchararray"/>
<!-- column-name country_desc -->
<column type="gchararray"/>
<!-- column-name language_desc -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkTreeModelFilter" id="filtered_layout_list_model">
<property name="child_model">layout_list_model</property>
</object>
<object class="GtkDialog" id="xkb_layout_chooser">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Choose a Layout</property>
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="hbtnBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="btnPreview">
<property name="label" translatable="yes">Preview</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnCancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnOk">
<property name="label">gtk-add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkVBox" id="vbox40">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="spacing">6</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Select an input source to add</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<property name="shadow_type">etched-in</property>
<property name="min_content_width">450</property>
<property name="min_content_height">250</property>
<child>
<object class="GtkTreeView" id="xkb_filtered_layouts_list">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="model">filtered_layout_list_model</property>
<property name="headers_visible">False</property>
<property name="search_column">0</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="xkb_layout_filter">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="secondary-icon-name">edit-find-symbolic</property>
<property name="secondary-icon-activatable">False</property>
<property name="secondary-icon-sensitive">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="1">btnPreview</action-widget>
<action-widget response="-5">btnOk</action-widget>
<action-widget response="-6">btnCancel</action-widget>
</action-widgets>
</object>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<object class="GtkDialog" id="xkb_options_dialog">
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Keyboard Layout Options</property>
<property name="window_position">center-on-parent</property>
<property name="default_width">550</property>
<property name="default_height">400</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkScrolledWindow" id="options_scroll">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">5</property>
<property name="shadow_type">out</property>
<child>
<object class="GtkViewport" id="viewport1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkVBox" id="options_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="layout_style">end</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="button2">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-7">button2</action-widget>
</action-widgets>
</object>
</interface>
......@@ -29,13 +29,13 @@
#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"
#include "gnome-region-panel-xkb.h"
static GSettings *locale_settings, *xkb_settings;
#define WID(s) GTK_WIDGET(gtk_builder_get_object (dialog, s))
static GSettings *locale_settings;
static GDBusProxy *localed_proxy;
static GPermission *localed_permission;
......@@ -130,64 +130,6 @@ system_update_language (GtkBuilder *dialog, const gchar *language)
update_copy_button (dialog);
}
static void
xkb_settings_changed (GSettings *settings,
const gchar *key,
GtkBuilder *dialog)
{
guint i;
GString *disp, *list, *variants;
GtkWidget *label;
gchar **layouts;
layouts = g_settings_get_strv (settings, "layouts");
if (layouts == NULL)
return;
label = WID ("user_input_source");
disp = g_string_new ("");
list = g_string_new ("");
variants = g_string_new ("");
for (i = 0; layouts[i]; i++) {
gchar *utf_visible;
char **split;
gchar *layout, *variant;
utf_visible = xkb_layout_description_utf8 (layouts[i]);
if (disp->str[0] != '\0')
g_string_append (disp, ", ");
g_string_append (disp, utf_visible ? utf_visible : layouts[i]);
g_free (utf_visible);
split = g_strsplit_set (layouts[i], " \t", 2);
if (split == NULL || split[0] == NULL)
continue;
layout = split[0];
variant = split[1];
if (list->str[0] != '\0')
g_string_append (list, ",");
g_string_append (list, layout);
if (variants->str[0] != '\0')
g_string_append (variants, ",");
g_string_append (variants, variant ? variant : "");
g_strfreev (split);
}
g_strfreev (layouts);
g_object_set_data_full (G_OBJECT (label), "input_source", g_string_free (list, FALSE), g_free);
g_object_set_data_full (G_OBJECT (label), "input_variants", g_string_free (variants, FALSE), g_free);
gtk_label_set_text (GTK_LABEL (label), disp->str);
g_string_free (disp, TRUE);
update_copy_button (dialog);
}
static void
update_property (GDBusProxy *proxy,
const char *property)
......@@ -223,11 +165,6 @@ on_localed_properties_changed (GDBusProxy *proxy,
GtkBuilder *dialog)
{
GVariant *v;
GtkWidget *label;
const char *layout;
char **layouts;
GString *disp;
guint i;
if (invalidated_properties != NULL) {
guint i;
......@@ -287,33 +224,6 @@ on_localed_properties_changed (GDBusProxy *proxy,
g_variant_unref (v);
}
label = WID ("system_input_source");
v = g_dbus_proxy_get_cached_property (proxy, "X11Layout");
if (v) {
layout = g_variant_get_string (v, NULL);
g_object_set_data_full (G_OBJECT (label), "input_source", g_strdup (layout), g_free);
} else {
g_object_set_data_full (G_OBJECT (label), "input_source", NULL, g_free);
update_copy_button (dialog);
return;
}
disp = g_string_new ("");
layouts = g_strsplit (layout, ",", -1);
for (i = 0; layouts[i]; i++) {
gchar *utf_visible;
utf_visible = xkb_layout_description_utf8 (layouts[i]);
if (disp->str[0] != '\0')
disp = g_string_append (disp, ", ");
disp = g_string_append (disp, utf_visible ? utf_visible : layouts[i]);
g_free (utf_visible);
}
gtk_label_set_text (GTK_LABEL (label), disp->str);
g_string_free (disp, TRUE);
g_variant_unref (v);
update_copy_button (dialog);
}
......@@ -468,11 +378,6 @@ setup_system (GtkBuilder *dialog)
G_CALLBACK (locale_settings_changed), dialog);
g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_object_unref, locale_settings);
xkb_settings = g_settings_new (GKBD_KEYBOARD_SCHEMA);
g_signal_connect (xkb_settings, "changed::layouts",
G_CALLBACK (xkb_settings_changed), dialog);
g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_object_unref, xkb_settings);
/* Display user settings */
language = cc_common_language_get_current_language ();
system_update_language (dialog, language);
......@@ -480,8 +385,6 @@ setup_system (GtkBuilder *dialog)
locale_settings_changed (locale_settings, "region", dialog);
xkb_settings_changed (xkb_settings, "layouts", dialog);
bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
g_dbus_proxy_new (bus,
G_DBUS_PROXY_FLAGS_NONE,
......
/* gnome-region-panel-xkb.c
* Copyright (C) 2003-2007 Sergey V. Udaltsov
*
* Written by: Sergey V. Udaltsov <svu@gnome.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <string.h>
#include <gdk/gdkx.h>
#include <glib/gi18n.h>
#include "gnome-region-panel-xkb.h"
#include <libgnomekbd/gkbd-desktop-config.h>
XklEngine *engine;
XklConfigRegistry *config_registry;
GkbdKeyboardConfig initial_config;
GkbdDesktopConfig desktop_config;
GSettings *xkb_keyboard_settings;
GSettings *xkb_desktop_settings;
char *
xci_desc_to_utf8 (const XklConfigItem * ci)
{
gchar *dd = g_strdup (ci->description);
gchar *sd = g_strstrip (dd);
gchar *rv = g_strdup (sd[0] == 0 ? ci->name : sd);
g_free (dd);
return rv;
}
static void
cleanup_xkb_tabs (GtkBuilder * dialog,
GObject *where_the_object_wa)
{
gkbd_desktop_config_term (&desktop_config);
gkbd_keyboard_config_term (&initial_config);
g_object_unref (G_OBJECT (config_registry));
config_registry = NULL;
/* Don't unref it here, or we'll crash if open the panel again */
engine = NULL;
g_object_unref (G_OBJECT (xkb_keyboard_settings));
g_object_unref (G_OBJECT (xkb_desktop_settings));
xkb_keyboard_settings = NULL;
xkb_desktop_settings = NULL;
}
static void
reset_to_defaults (GtkWidget * button, GtkBuilder * dialog)
{
GkbdKeyboardConfig empty_kbd_config;
gkbd_keyboard_config_init (&empty_kbd_config, engine);
gkbd_keyboard_config_save (&empty_kbd_config);
gkbd_keyboard_config_term (&empty_kbd_config);
g_settings_reset (xkb_desktop_settings,
GKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
/* all the rest is g-s-d's business */
}
static void
chk_new_windows_inherit_layout_toggled (GtkWidget *
chk_new_windows_inherit_layout,
GtkBuilder * dialog)
{
xkb_save_default_group (gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON
(chk_new_windows_inherit_layout)) ? -1 :
0);
}
void
setup_xkb_tabs (GtkBuilder * dialog)
{
GtkWidget *widget;
GtkStyleContext *context;
GtkWidget *chk_new_windows_inherit_layout;
chk_new_windows_inherit_layout = WID ("chk_new_windows_inherit_layout");
xkb_desktop_settings = g_settings_new (GKBD_DESKTOP_SCHEMA);
xkb_keyboard_settings = g_settings_new (GKBD_KEYBOARD_SCHEMA);
engine =
xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY
(gdk_display_get_default ()));
config_registry = xkl_config_registry_get_instance (engine);
gkbd_desktop_config_init (&desktop_config, engine);
gkbd_desktop_config_load (&desktop_config);
xkl_config_registry_load (config_registry,
desktop_config.load_extra_items);
gkbd_keyboard_config_init (&initial_config, engine);
gkbd_keyboard_config_load_from_x_initial (&initial_config, NULL);
/* Set initial state */
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("chk_separate_group_per_window")),
g_settings_get_boolean (xkb_desktop_settings,
GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chk_new_windows_inherit_layout),
xkb_get_default_group () < 0);
g_settings_bind (xkb_desktop_settings,
GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
WID ("chk_separate_group_per_window"), "active",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind (xkb_desktop_settings,
GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
WID ("chk_new_windows_inherit_layout"), "sensitive",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind (xkb_desktop_settings,
GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
WID ("chk_new_windows_default_layout"), "sensitive",
G_SETTINGS_BIND_DEFAULT);
xkb_layouts_prepare_selected_tree (dialog);
xkb_layouts_fill_selected_tree (dialog);
xkb_layouts_register_buttons_handlers (dialog);
g_signal_connect (G_OBJECT (WID ("xkb_reset_to_defaults")),
"clicked", G_CALLBACK (reset_to_defaults),
dialog);
g_signal_connect (G_OBJECT (chk_new_windows_inherit_layout),
"toggled",
G_CALLBACK
(chk_new_windows_inherit_layout_toggled),
dialog);
g_signal_connect_swapped (G_OBJECT (WID ("xkb_layout_options")),
"clicked",
G_CALLBACK (xkb_options_popup_dialog),
dialog);
xkb_layouts_register_conf_listener (dialog);
xkb_options_register_conf_listener (dialog);
g_object_weak_ref (G_OBJECT (WID ("region_notebook")),
(GWeakNotify) cleanup_xkb_tabs, dialog);
enable_disable_restoring (dialog);
/* Setup junction between toolbar and treeview */
widget = WID ("xkb_layouts_swindow");
context = gtk_widget_get_style_context (widget);
gtk_style_context_set_junction_sides (context, GTK_JUNCTION_BOTTOM);
widget = WID ("layouts-toolbar");
context = gtk_widget_get_style_context (widget);
gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
}
void
enable_disable_restoring (GtkBuilder * dialog)
{
GkbdKeyboardConfig gswic;
gboolean enable;
gkbd_keyboard_config_init (&gswic, engine);
gkbd_keyboard_config_load (&gswic, NULL);
enable = !gkbd_keyboard_config_equals (&gswic, &initial_config);
gkbd_keyboard_config_term (&gswic);
gtk_widget_set_sensitive (WID ("xkb_reset_to_defaults"), enable);
}
/* gnome-region-panel-xkb.h
* Copyright (C) 2003-2007 Sergey V Udaltsov
*
* Written by Sergey V. Udaltsov <svu@gnome.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef __GNOME_KEYBOARD_PROPERTY_XKB_H
#define __GNOME_KEYBOARD_PROPERTY_XKB_H
#include <gtk/gtk.h>
#include "libgnomekbd/gkbd-keyboard-config.h"
#include "libgnomekbd/gkbd-util.h"
G_BEGIN_DECLS
#define CWID(s) GTK_WIDGET (gtk_builder_get_object (chooser_dialog, s))
#define WID(s) GTK_WIDGET (gtk_builder_get_object (dialog, s))
extern XklEngine *engine;
extern XklConfigRegistry *config_registry;
extern GSettings *xkb_keyboard_settings;
extern GSettings *xkb_desktop_settings;
extern GkbdKeyboardConfig initial_config;
extern void setup_xkb_tabs (GtkBuilder * dialog);
extern void xkb_layouts_fill_selected_tree (GtkBuilder * dialog);
extern void xkb_layouts_register_buttons_handlers (GtkBuilder * dialog);
extern void xkb_layouts_register_conf_listener (GtkBuilder * dialog);
extern void xkb_options_register_conf_listener (GtkBuilder * dialog);
extern void xkb_layouts_prepare_selected_tree (GtkBuilder * dialog);
extern void xkb_options_load_options (GtkBuilder * dialog);
extern void xkb_options_popup_dialog (GtkBuilder * dialog);
extern char *xci_desc_to_utf8 (const XklConfigItem * ci);
extern gchar *xkb_layout_description_utf8 (const gchar * visible);
extern void enable_disable_restoring (GtkBuilder * dialog);
extern void preview_toggled (GtkBuilder * dialog, GtkWidget * button);
extern GtkWidget *xkb_layout_choose (GtkBuilder * dialog);
extern void xkb_layout_chooser_response (GtkDialog *dialog, gint response_id);