Changing library dependency from virtual libgswitchit/libkbdraw to normal libgnomekbd
This commit is contained in:
parent
0caebda160
commit
ada87a95f2
15 changed files with 1091 additions and 1150 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
||||||
|
2006-10-18 Sergey Udaltsov <svu@gnome.org>
|
||||||
|
|
||||||
|
* Makefile.am, configure.in, capplets/keyboard/Makefile.am,
|
||||||
|
capplets/keyboard/gnome-keyboard-properties-xkb.c,
|
||||||
|
capplets/keyboard/gnome-keyboard-properties-xkb.h,
|
||||||
|
capplets/keyboard/gnome-keyboard-properties-xkblt.c,
|
||||||
|
capplets/keyboard/gnome-keyboard-properties-xkbmc.c,
|
||||||
|
capplets/keyboard/gnome-keyboard-properties-xkbot.c,
|
||||||
|
capplets/keyboard/gnome-keyboard-properties-xkbpv.c,
|
||||||
|
gnome-settings-daemon/Makefile.am,
|
||||||
|
gnome-settings-daemon/gnome-settings-keyboard-xkb.c,
|
||||||
|
gnome-settings-daemon/gnome-settings-keyboard-xkb.h,
|
||||||
|
schemas/Makefile.am: changing things from libgswitchit/libkbdraw to
|
||||||
|
libgnomekbd
|
||||||
|
|
||||||
2006-10-16 Rodrigo Moya <rodrigo@novell.com>
|
2006-10-16 Rodrigo Moya <rodrigo@novell.com>
|
||||||
|
|
||||||
* configure.in:
|
* configure.in:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
SUBDIRS = po libsounds libbackground libwindow-settings libgswitchit libkbdraw gnome-settings-daemon capplets control-center help vfs-methods idl schemas $(TYPING_BREAK)
|
SUBDIRS = po libsounds libbackground libwindow-settings gnome-settings-daemon capplets control-center help vfs-methods idl schemas $(TYPING_BREAK)
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,7 @@ gnome_keyboard_properties_SOURCES = gnome-keyboard-properties.c \
|
||||||
gnome-keyboard-properties-xkb.h
|
gnome-keyboard-properties-xkb.h
|
||||||
gnome_keyboard_properties_LDADD = \
|
gnome_keyboard_properties_LDADD = \
|
||||||
../accessibility/keyboard/libaccessibility-keyboard.a \
|
../accessibility/keyboard/libaccessibility-keyboard.a \
|
||||||
$(GNOMECC_CAPPLETS_LIBS) $(LIBXKLAVIER_LIBS) \
|
$(GNOMECC_CAPPLETS_LIBS) $(LIBGNOMEKBDUI_LIBS)
|
||||||
../../libgswitchit/libgswitchit.a \
|
|
||||||
../../libkbdraw/libkbdraw.a
|
|
||||||
|
|
||||||
@INTLTOOL_DESKTOP_RULE@
|
@INTLTOOL_DESKTOP_RULE@
|
||||||
|
|
||||||
|
@ -29,6 +27,6 @@ desktopdir = $(datadir)/applications
|
||||||
Desktop_in_files = keyboard.desktop.in
|
Desktop_in_files = keyboard.desktop.in
|
||||||
desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
|
desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
|
||||||
|
|
||||||
INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) $(LIBXKLAVIER_CFLAGS)
|
INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) $(LIBGNOMEKBDUI_CFLAGS)
|
||||||
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
|
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
|
||||||
EXTRA_DIST = $(Glade_DATA) $(pixmaps_DATA)
|
EXTRA_DIST = $(Glade_DATA) $(pixmaps_DATA)
|
||||||
|
|
|
@ -30,192 +30,192 @@
|
||||||
#include <gconf/gconf-client.h>
|
#include <gconf/gconf-client.h>
|
||||||
#include <glade/glade.h>
|
#include <glade/glade.h>
|
||||||
|
|
||||||
#include "libgswitchit/gswitchit-config.h"
|
|
||||||
|
|
||||||
#include "capplet-util.h"
|
#include "capplet-util.h"
|
||||||
#include "gconf-property-editor.h"
|
#include "gconf-property-editor.h"
|
||||||
#include "activate-settings-daemon.h"
|
#include "activate-settings-daemon.h"
|
||||||
#include "capplet-stock-icons.h"
|
#include "capplet-stock-icons.h"
|
||||||
#include <../accessibility/keyboard/accessibility-keyboard.h>
|
#include <../accessibility/keyboard/accessibility-keyboard.h>
|
||||||
|
|
||||||
|
#include <libgnomekbd/gkbd-desktop-config.h>
|
||||||
|
|
||||||
#include "gnome-keyboard-properties-xkb.h"
|
#include "gnome-keyboard-properties-xkb.h"
|
||||||
|
|
||||||
XklEngine *engine;
|
XklEngine *engine;
|
||||||
XklConfigRegistry *config_registry;
|
XklConfigRegistry *config_registry;
|
||||||
|
|
||||||
GSwitchItKbdConfig initial_config;
|
GkbdKeyboardConfig initial_config;
|
||||||
|
|
||||||
GConfClient *xkb_gconf_client;
|
GConfClient *xkb_gconf_client;
|
||||||
|
|
||||||
char *
|
char *
|
||||||
xci_desc_to_utf8 (XklConfigItem * ci)
|
xci_desc_to_utf8 (XklConfigItem * ci)
|
||||||
{
|
{
|
||||||
char *sd = g_strstrip (ci->description);
|
char *sd = g_strstrip (ci->description);
|
||||||
return sd[0] == 0 ? g_strdup (ci->name) :
|
return sd[0] == 0 ? g_strdup (ci->name) :
|
||||||
g_locale_to_utf8 (sd, -1, NULL, NULL, NULL);
|
g_locale_to_utf8 (sd, -1, NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_model_text (GtkWidget * entry,
|
set_model_text (GtkWidget * entry, GConfValue * value)
|
||||||
GConfValue * value)
|
|
||||||
{
|
{
|
||||||
XklConfigItem ci;
|
XklConfigItem ci;
|
||||||
const char * model = NULL;
|
const char *model = NULL;
|
||||||
|
|
||||||
if (value != NULL && value->type == GCONF_VALUE_STRING)
|
if (value != NULL && value->type == GCONF_VALUE_STRING) {
|
||||||
{
|
model = gconf_value_get_string (value);
|
||||||
model = gconf_value_get_string (value);
|
if (model != NULL && model[0] == '\0')
|
||||||
if (model != NULL && model[0] == '\0')
|
model = NULL;
|
||||||
model = NULL;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (model == NULL)
|
if (model == NULL) {
|
||||||
{
|
model = initial_config.model;
|
||||||
model = initial_config.model;
|
if (model == NULL)
|
||||||
if (model == NULL)
|
model = "";
|
||||||
model = "";
|
}
|
||||||
}
|
|
||||||
|
|
||||||
g_snprintf (ci.name, sizeof (ci.name), "%s", model);
|
g_snprintf (ci.name, sizeof (ci.name), "%s", model);
|
||||||
|
|
||||||
if (xkl_config_registry_find_model (config_registry, &ci))
|
if (xkl_config_registry_find_model (config_registry, &ci)) {
|
||||||
{
|
char *d;
|
||||||
char * d;
|
|
||||||
|
|
||||||
d = xci_desc_to_utf8 (&ci);
|
d = xci_desc_to_utf8 (&ci);
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), d);
|
gtk_entry_set_text (GTK_ENTRY (entry), d);
|
||||||
g_free (d);
|
g_free (d);
|
||||||
}
|
} else {
|
||||||
else
|
gtk_entry_set_text (GTK_ENTRY (entry), _("Unknown"));
|
||||||
{
|
}
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), _("Unknown"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
model_key_changed (GConfClient * client,
|
model_key_changed (GConfClient * client,
|
||||||
guint cnxn_id,
|
guint cnxn_id, GConfEntry * entry, GladeXML * dialog)
|
||||||
GConfEntry * entry,
|
|
||||||
GladeXML * dialog)
|
|
||||||
{
|
{
|
||||||
set_model_text (WID ("xkb_model"),
|
set_model_text (WID ("xkb_model"), gconf_entry_get_value (entry));
|
||||||
gconf_entry_get_value (entry));
|
|
||||||
|
|
||||||
enable_disable_restoring (dialog);
|
enable_disable_restoring (dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
setup_model_entry (GladeXML * dialog)
|
setup_model_entry (GladeXML * dialog)
|
||||||
{
|
{
|
||||||
GConfValue * value;
|
GConfValue *value;
|
||||||
|
|
||||||
value = gconf_client_get (xkb_gconf_client,
|
value = gconf_client_get (xkb_gconf_client,
|
||||||
GSWITCHIT_KBD_CONFIG_KEY_MODEL,
|
GKBD_KEYBOARD_CONFIG_KEY_MODEL, NULL);
|
||||||
NULL);
|
set_model_text (WID ("xkb_model"), value);
|
||||||
set_model_text (WID ("xkb_model"), value);
|
if (value != NULL)
|
||||||
if (value != NULL)
|
gconf_value_free (value);
|
||||||
gconf_value_free (value);
|
|
||||||
|
|
||||||
gconf_client_notify_add (xkb_gconf_client,
|
gconf_client_notify_add (xkb_gconf_client,
|
||||||
GSWITCHIT_KBD_CONFIG_KEY_MODEL,
|
GKBD_KEYBOARD_CONFIG_KEY_MODEL,
|
||||||
(GConfClientNotifyFunc) model_key_changed,
|
(GConfClientNotifyFunc) model_key_changed,
|
||||||
dialog, NULL, NULL);
|
dialog, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cleanup_xkb_tabs (GladeXML * dialog)
|
cleanup_xkb_tabs (GladeXML * dialog)
|
||||||
{
|
{
|
||||||
gswitchit_kbd_config_term (&initial_config);
|
gkbd_keyboard_config_term (&initial_config);
|
||||||
g_object_unref (G_OBJECT (config_registry));
|
g_object_unref (G_OBJECT (config_registry));
|
||||||
config_registry = NULL;
|
config_registry = NULL;
|
||||||
g_object_unref (G_OBJECT (engine));
|
g_object_unref (G_OBJECT (engine));
|
||||||
engine = NULL;
|
engine = NULL;
|
||||||
g_object_unref (G_OBJECT (xkb_gconf_client));
|
g_object_unref (G_OBJECT (xkb_gconf_client));
|
||||||
xkb_gconf_client = NULL;
|
xkb_gconf_client = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
reset_to_defaults (GtkWidget * button, GladeXML * dialog)
|
reset_to_defaults (GtkWidget * button, GladeXML * dialog)
|
||||||
{
|
{
|
||||||
GSwitchItKbdConfig empty_kbd_config;
|
GkbdKeyboardConfig empty_kbd_config;
|
||||||
|
|
||||||
gswitchit_kbd_config_init (&empty_kbd_config, xkb_gconf_client, engine);
|
gkbd_keyboard_config_init (&empty_kbd_config, xkb_gconf_client,
|
||||||
gswitchit_kbd_config_save_to_gconf_backup (&empty_kbd_config);
|
engine);
|
||||||
gswitchit_kbd_config_save_to_gconf (&empty_kbd_config);
|
gkbd_keyboard_config_save_to_gconf_backup (&empty_kbd_config);
|
||||||
gswitchit_kbd_config_term (&empty_kbd_config);
|
gkbd_keyboard_config_save_to_gconf (&empty_kbd_config);
|
||||||
|
gkbd_keyboard_config_term (&empty_kbd_config);
|
||||||
|
|
||||||
/* all the rest is g-s-d's business */
|
/* all the rest is g-s-d's business */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
chk_separate_group_per_window_toggled (GConfPropertyEditor *peditor,
|
chk_separate_group_per_window_toggled (GConfPropertyEditor * peditor,
|
||||||
const gchar *key,
|
const gchar * key,
|
||||||
const GConfValue *value,
|
const GConfValue * value,
|
||||||
GladeXML* dialog)
|
GladeXML * dialog)
|
||||||
{
|
{
|
||||||
xkb_layouts_enable_disable_default (dialog, value && gconf_value_get_bool (value));
|
xkb_layouts_enable_disable_default (dialog, value
|
||||||
|
&&
|
||||||
|
gconf_value_get_bool (value));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
setup_xkb_tabs (GladeXML * dialog, GConfChangeSet * changeset)
|
setup_xkb_tabs (GladeXML * dialog, GConfChangeSet * changeset)
|
||||||
{
|
{
|
||||||
GObject * peditor;
|
GObject *peditor;
|
||||||
xkb_gconf_client = gconf_client_get_default ();
|
xkb_gconf_client = gconf_client_get_default ();
|
||||||
|
|
||||||
engine = xkl_engine_get_instance (GDK_DISPLAY ());
|
engine = xkl_engine_get_instance (GDK_DISPLAY ());
|
||||||
config_registry = xkl_config_registry_get_instance (engine);
|
config_registry = xkl_config_registry_get_instance (engine);
|
||||||
xkl_config_registry_load (config_registry);
|
xkl_config_registry_load (config_registry);
|
||||||
|
|
||||||
gswitchit_kbd_config_init (&initial_config, xkb_gconf_client, engine);
|
gkbd_keyboard_config_init (&initial_config, xkb_gconf_client,
|
||||||
gswitchit_kbd_config_load_from_x_initial (&initial_config);
|
engine);
|
||||||
|
gkbd_keyboard_config_load_from_x_initial (&initial_config, NULL);
|
||||||
|
|
||||||
setup_model_entry (dialog);
|
setup_model_entry (dialog);
|
||||||
|
|
||||||
peditor = gconf_peditor_new_boolean
|
peditor = gconf_peditor_new_boolean
|
||||||
(changeset, (gchar *) GSWITCHIT_CONFIG_KEY_GROUP_PER_WINDOW,
|
(changeset, (gchar *) GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
|
||||||
WID ("chk_separate_group_per_window"), NULL);
|
WID ("chk_separate_group_per_window"), NULL);
|
||||||
|
|
||||||
g_signal_connect (peditor, "value-changed", (GCallback)chk_separate_group_per_window_toggled , dialog);
|
g_signal_connect (peditor, "value-changed",
|
||||||
|
(GCallback)
|
||||||
|
chk_separate_group_per_window_toggled, dialog);
|
||||||
|
|
||||||
/* tab 2 */
|
/* tab 2 */
|
||||||
/*fill_available_layouts_tree (dialog);*/
|
/*fill_available_layouts_tree (dialog); */
|
||||||
xkb_layouts_prepare_selected_tree (dialog, changeset);
|
xkb_layouts_prepare_selected_tree (dialog, changeset);
|
||||||
xkb_layouts_fill_selected_tree (dialog);
|
xkb_layouts_fill_selected_tree (dialog);
|
||||||
|
|
||||||
/* tab 3 */
|
/* tab 3 */
|
||||||
xkb_options_load_options (dialog);
|
xkb_options_load_options (dialog);
|
||||||
|
|
||||||
xkb_layouts_register_buttons_handlers (dialog);
|
xkb_layouts_register_buttons_handlers (dialog);
|
||||||
g_signal_connect (G_OBJECT (WID ("xkb_reset_to_defaults")), "clicked",
|
g_signal_connect (G_OBJECT (WID ("xkb_reset_to_defaults")),
|
||||||
G_CALLBACK (reset_to_defaults), dialog);
|
"clicked", G_CALLBACK (reset_to_defaults),
|
||||||
|
dialog);
|
||||||
|
|
||||||
g_signal_connect_swapped (G_OBJECT (WID ("xkb_model_pick")), "clicked",
|
g_signal_connect_swapped (G_OBJECT (WID ("xkb_model_pick")),
|
||||||
G_CALLBACK (choose_model), dialog);
|
"clicked", G_CALLBACK (choose_model),
|
||||||
|
dialog);
|
||||||
|
|
||||||
xkb_layouts_register_gconf_listener (dialog);
|
xkb_layouts_register_gconf_listener (dialog);
|
||||||
xkb_options_register_gconf_listener (dialog);
|
xkb_options_register_gconf_listener (dialog);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (WID ("keyboard_dialog")),
|
g_signal_connect (G_OBJECT (WID ("keyboard_dialog")),
|
||||||
"destroy", G_CALLBACK (cleanup_xkb_tabs), dialog);
|
"destroy", G_CALLBACK (cleanup_xkb_tabs),
|
||||||
|
dialog);
|
||||||
|
|
||||||
enable_disable_restoring (dialog);
|
enable_disable_restoring (dialog);
|
||||||
xkb_layouts_enable_disable_default (dialog,
|
xkb_layouts_enable_disable_default (dialog,
|
||||||
gconf_client_get_bool (xkb_gconf_client,
|
gconf_client_get_bool
|
||||||
GSWITCHIT_CONFIG_KEY_GROUP_PER_WINDOW,
|
(xkb_gconf_client,
|
||||||
NULL));
|
GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
|
||||||
|
NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
enable_disable_restoring (GladeXML * dialog)
|
enable_disable_restoring (GladeXML * dialog)
|
||||||
{
|
{
|
||||||
GSwitchItKbdConfig gswic;
|
GkbdKeyboardConfig gswic;
|
||||||
gboolean enable;
|
gboolean enable;
|
||||||
|
|
||||||
gswitchit_kbd_config_init (&gswic, xkb_gconf_client, engine);
|
gkbd_keyboard_config_init (&gswic, xkb_gconf_client, engine);
|
||||||
gswitchit_kbd_config_load_from_gconf (&gswic, NULL);
|
gkbd_keyboard_config_load_from_gconf (&gswic, NULL);
|
||||||
|
|
||||||
enable = !gswitchit_kbd_config_equals (&gswic, &initial_config);
|
enable = !gkbd_keyboard_config_equals (&gswic, &initial_config);
|
||||||
|
|
||||||
gswitchit_kbd_config_term (&gswic);
|
gkbd_keyboard_config_term (&gswic);
|
||||||
gtk_widget_set_sensitive (WID ("xkb_reset_to_defaults"), enable);
|
gtk_widget_set_sensitive (WID ("xkb_reset_to_defaults"), enable);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,29 +24,23 @@
|
||||||
#ifndef __GNOME_KEYBOARD_PROPERTY_XKB_H
|
#ifndef __GNOME_KEYBOARD_PROPERTY_XKB_H
|
||||||
#define __GNOME_KEYBOARD_PROPERTY_XKB_H
|
#define __GNOME_KEYBOARD_PROPERTY_XKB_H
|
||||||
|
|
||||||
#include <libxklavier/xklavier.h>
|
|
||||||
#include <gconf/gconf-client.h>
|
#include <gconf/gconf-client.h>
|
||||||
|
|
||||||
#include "libgswitchit/gswitchit-config.h"
|
#include "libgnomekbd/gkbd-keyboard-config.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define SEL_LAYOUT_TREE_COL_DESCRIPTION 0
|
#define SEL_LAYOUT_TREE_COL_DESCRIPTION 0
|
||||||
#define SEL_LAYOUT_TREE_COL_DEFAULT 1
|
#define SEL_LAYOUT_TREE_COL_DEFAULT 1
|
||||||
#define SEL_LAYOUT_TREE_COL_ID 2
|
#define SEL_LAYOUT_TREE_COL_ID 2
|
||||||
|
|
||||||
#define AVAIL_LAYOUT_TREE_COL_DESCRIPTION 0
|
#define AVAIL_LAYOUT_TREE_COL_DESCRIPTION 0
|
||||||
#define AVAIL_LAYOUT_TREE_COL_ID 1
|
#define AVAIL_LAYOUT_TREE_COL_ID 1
|
||||||
|
|
||||||
#define CWID(s) glade_xml_get_widget (chooser_dialog, s)
|
#define CWID(s) glade_xml_get_widget (chooser_dialog, s)
|
||||||
|
|
||||||
extern XklEngine *engine;
|
extern XklEngine *engine;
|
||||||
extern XklConfigRegistry *config_registry;
|
extern XklConfigRegistry *config_registry;
|
||||||
extern GConfClient *xkb_gconf_client;
|
extern GConfClient *xkb_gconf_client;
|
||||||
extern GSwitchItKbdConfig initial_config;
|
extern GkbdKeyboardConfig initial_config;
|
||||||
|
|
||||||
extern void setup_xkb_tabs (GladeXML * dialog,
|
extern void setup_xkb_tabs (GladeXML * dialog, GConfChangeSet * changeset);
|
||||||
GConfChangeSet * changeset);
|
|
||||||
|
|
||||||
extern void xkb_layouts_fill_available_tree (GladeXML * dialog);
|
extern void xkb_layouts_fill_available_tree (GladeXML * dialog);
|
||||||
|
|
||||||
|
@ -64,8 +58,8 @@ extern void xkb_layouts_register_gconf_listener (GladeXML * dialog);
|
||||||
|
|
||||||
extern void xkb_options_register_gconf_listener (GladeXML * dialog);
|
extern void xkb_options_register_gconf_listener (GladeXML * dialog);
|
||||||
|
|
||||||
extern void xkb_layouts_prepare_selected_tree (GladeXML * dialog,
|
extern void xkb_layouts_prepare_selected_tree (GladeXML * dialog,
|
||||||
GConfChangeSet * changeset);
|
GConfChangeSet * changeset);
|
||||||
|
|
||||||
extern void xkb_options_prepare_selected_tree (GladeXML * dialog);
|
extern void xkb_options_prepare_selected_tree (GladeXML * dialog);
|
||||||
|
|
||||||
|
@ -85,23 +79,24 @@ extern void choose_model (GladeXML * dialog);
|
||||||
|
|
||||||
extern void xkb_layout_choose (GladeXML * dialog);
|
extern void xkb_layout_choose (GladeXML * dialog);
|
||||||
|
|
||||||
extern void xkb_layouts_enable_disable_default (GladeXML * dialog,
|
extern void xkb_layouts_enable_disable_default (GladeXML * dialog,
|
||||||
gboolean enable);
|
gboolean enable);
|
||||||
|
|
||||||
extern GSList *xkb_layouts_get_selected_list (void);
|
extern GSList *xkb_layouts_get_selected_list (void);
|
||||||
extern GSList *xkb_options_get_selected_list (void);
|
extern GSList *xkb_options_get_selected_list (void);
|
||||||
|
|
||||||
#define xkb_layouts_set_selected_list(list) \
|
#define xkb_layouts_set_selected_list(list) \
|
||||||
gconf_client_set_list (gconf_client_get_default (), \
|
gconf_client_set_list (gconf_client_get_default (), \
|
||||||
GSWITCHIT_KBD_CONFIG_KEY_LAYOUTS, \
|
GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS, \
|
||||||
GCONF_VALUE_STRING, (list), NULL)
|
GCONF_VALUE_STRING, (list), NULL)
|
||||||
|
|
||||||
#define xkb_options_set_selected_list(list) \
|
#define xkb_options_set_selected_list(list) \
|
||||||
gconf_client_set_list (gconf_client_get_default (), \
|
gconf_client_set_list (gconf_client_get_default (), \
|
||||||
GSWITCHIT_KBD_CONFIG_KEY_OPTIONS, \
|
GKBD_KEYBOARD_CONFIG_KEY_OPTIONS, \
|
||||||
GCONF_VALUE_STRING, (list), NULL)
|
GCONF_VALUE_STRING, (list), NULL)
|
||||||
|
|
||||||
extern GtkWidget * xkb_layout_preview_create_widget (GladeXML * chooser_dialog);
|
extern GtkWidget *xkb_layout_preview_create_widget (GladeXML *
|
||||||
|
chooser_dialog);
|
||||||
|
|
||||||
extern void xkb_layout_preview_update (GladeXML * chooser_dialog);
|
extern void xkb_layout_preview_update (GladeXML * chooser_dialog);
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -30,8 +30,6 @@
|
||||||
#include <gconf/gconf-client.h>
|
#include <gconf/gconf-client.h>
|
||||||
#include <glade/glade.h>
|
#include <glade/glade.h>
|
||||||
|
|
||||||
#include "libgswitchit/gswitchit-config.h"
|
|
||||||
|
|
||||||
#include "capplet-util.h"
|
#include "capplet-util.h"
|
||||||
#include "gconf-property-editor.h"
|
#include "gconf-property-editor.h"
|
||||||
#include "activate-settings-daemon.h"
|
#include "activate-settings-daemon.h"
|
||||||
|
@ -40,123 +38,145 @@
|
||||||
|
|
||||||
#include "gnome-keyboard-properties-xkb.h"
|
#include "gnome-keyboard-properties-xkb.h"
|
||||||
|
|
||||||
static gchar* current_model_name = NULL;
|
static gchar *current_model_name = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
add_model_to_list (XklConfigRegistry * config_registry,
|
add_model_to_list (XklConfigRegistry * config_registry,
|
||||||
XklConfigItem * config_item,
|
XklConfigItem * config_item, GtkTreeView * models_list)
|
||||||
GtkTreeView * models_list)
|
|
||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GtkListStore * list_store = GTK_LIST_STORE (gtk_tree_view_get_model (models_list));
|
GtkListStore *list_store =
|
||||||
char *utf_model_name = xci_desc_to_utf8 (config_item);
|
GTK_LIST_STORE (gtk_tree_view_get_model (models_list));
|
||||||
gtk_list_store_append( list_store, &iter );
|
char *utf_model_name = xci_desc_to_utf8 (config_item);
|
||||||
gtk_list_store_set( list_store, &iter,
|
gtk_list_store_append (list_store, &iter);
|
||||||
0, utf_model_name,
|
gtk_list_store_set (list_store, &iter,
|
||||||
1, config_item->name, -1 );
|
0, utf_model_name, 1, config_item->name, -1);
|
||||||
|
|
||||||
g_free (utf_model_name);
|
g_free (utf_model_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xkb_model_chooser_change_sel (GtkTreeSelection* selection,
|
xkb_model_chooser_change_sel (GtkTreeSelection * selection,
|
||||||
GladeXML* chooser_dialog)
|
GladeXML * chooser_dialog)
|
||||||
{
|
{
|
||||||
gboolean anysel = gtk_tree_selection_get_selected (selection, NULL, NULL);
|
gboolean anysel =
|
||||||
gtk_dialog_set_response_sensitive (GTK_DIALOG (CWID ("xkb_model_chooser")),
|
gtk_tree_selection_get_selected (selection, NULL, NULL);
|
||||||
GTK_RESPONSE_OK, anysel);
|
gtk_dialog_set_response_sensitive (GTK_DIALOG
|
||||||
|
(CWID ("xkb_model_chooser")),
|
||||||
|
GTK_RESPONSE_OK, anysel);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fill_models_list (GladeXML * chooser_dialog)
|
fill_models_list (GladeXML * chooser_dialog)
|
||||||
{
|
{
|
||||||
GtkWidget* models_list = CWID( "models_list" );
|
GtkWidget *models_list = CWID ("models_list");
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
GtkCellRenderer* renderer = gtk_cell_renderer_text_new ();
|
GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
|
||||||
GtkTreeViewColumn* description_col = gtk_tree_view_column_new_with_attributes ( _("Models"),
|
GtkTreeViewColumn *description_col =
|
||||||
renderer,
|
gtk_tree_view_column_new_with_attributes (_("Models"),
|
||||||
"text", 0,
|
renderer,
|
||||||
NULL);
|
"text", 0,
|
||||||
GtkListStore *list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
NULL);
|
||||||
char *model_name;
|
GtkListStore *list_store =
|
||||||
|
gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
||||||
|
char *model_name;
|
||||||
|
|
||||||
gtk_tree_view_column_set_visible (description_col, TRUE);
|
gtk_tree_view_column_set_visible (description_col, TRUE);
|
||||||
gtk_tree_view_append_column (GTK_TREE_VIEW (models_list), description_col);
|
gtk_tree_view_append_column (GTK_TREE_VIEW (models_list),
|
||||||
|
description_col);
|
||||||
|
|
||||||
gtk_tree_view_set_model (GTK_TREE_VIEW (models_list), GTK_TREE_MODEL (list_store) );
|
gtk_tree_view_set_model (GTK_TREE_VIEW (models_list),
|
||||||
|
GTK_TREE_MODEL (list_store));
|
||||||
|
|
||||||
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (list_store),
|
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE
|
||||||
0, GTK_SORT_ASCENDING);
|
(list_store), 0,
|
||||||
|
GTK_SORT_ASCENDING);
|
||||||
|
|
||||||
xkl_config_registry_foreach_model (config_registry,
|
xkl_config_registry_foreach_model (config_registry,
|
||||||
(ConfigItemProcessFunc) add_model_to_list,
|
(ConfigItemProcessFunc)
|
||||||
models_list);
|
add_model_to_list, models_list);
|
||||||
|
|
||||||
if (current_model_name != NULL)
|
if (current_model_name != NULL) {
|
||||||
{
|
if (gtk_tree_model_get_iter_first
|
||||||
if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list_store), &iter))
|
(GTK_TREE_MODEL (list_store), &iter)) {
|
||||||
{
|
do {
|
||||||
do
|
gtk_tree_model_get (GTK_TREE_MODEL
|
||||||
{
|
(list_store), &iter, 1,
|
||||||
gtk_tree_model_get (GTK_TREE_MODEL (list_store), &iter,
|
&model_name, -1);
|
||||||
1, &model_name, -1);
|
if (!g_ascii_strcasecmp
|
||||||
if (!g_ascii_strcasecmp(model_name, current_model_name))
|
(model_name, current_model_name)) {
|
||||||
{
|
gtk_tree_selection_select_iter
|
||||||
gtk_tree_selection_select_iter (gtk_tree_view_get_selection (GTK_TREE_VIEW (models_list)), &iter);
|
(gtk_tree_view_get_selection
|
||||||
path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
|
(GTK_TREE_VIEW (models_list)),
|
||||||
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (models_list),
|
&iter);
|
||||||
path, NULL, TRUE, 0.5, 0);
|
path =
|
||||||
gtk_tree_path_free (path);
|
gtk_tree_model_get_path
|
||||||
}
|
(GTK_TREE_MODEL (list_store),
|
||||||
g_free (model_name);
|
&iter);
|
||||||
} while (gtk_tree_model_iter_next (GTK_TREE_MODEL (list_store), &iter));
|
gtk_tree_view_scroll_to_cell
|
||||||
}
|
(GTK_TREE_VIEW (models_list),
|
||||||
}
|
path, NULL, TRUE, 0.5, 0);
|
||||||
|
gtk_tree_path_free (path);
|
||||||
|
}
|
||||||
|
g_free (model_name);
|
||||||
|
} while (gtk_tree_model_iter_next
|
||||||
|
(GTK_TREE_MODEL (list_store), &iter));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (models_list))),
|
g_signal_connect (G_OBJECT
|
||||||
"changed",
|
(gtk_tree_view_get_selection
|
||||||
G_CALLBACK (xkb_model_chooser_change_sel),
|
(GTK_TREE_VIEW (models_list))), "changed",
|
||||||
chooser_dialog);
|
G_CALLBACK (xkb_model_chooser_change_sel),
|
||||||
|
chooser_dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xkb_model_chooser_response (GtkDialog *dialog,
|
xkb_model_chooser_response (GtkDialog * dialog,
|
||||||
gint response,
|
gint response, GladeXML * chooser_dialog)
|
||||||
GladeXML *chooser_dialog)
|
|
||||||
{
|
{
|
||||||
if (response == GTK_RESPONSE_OK)
|
if (response == GTK_RESPONSE_OK) {
|
||||||
{
|
GtkWidget *models_list = CWID ("models_list");
|
||||||
GtkWidget* models_list = CWID( "models_list" );
|
GtkTreeSelection *selection =
|
||||||
GtkTreeSelection* selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (models_list));
|
gtk_tree_view_get_selection (GTK_TREE_VIEW
|
||||||
GtkTreeIter iter;
|
(models_list));
|
||||||
GtkTreeModel* list_store = NULL;
|
GtkTreeIter iter;
|
||||||
if (gtk_tree_selection_get_selected (selection, &list_store, &iter))
|
GtkTreeModel *list_store = NULL;
|
||||||
{
|
if (gtk_tree_selection_get_selected
|
||||||
gchar* model_name = NULL;
|
(selection, &list_store, &iter)) {
|
||||||
gtk_tree_model_get (list_store, &iter,
|
gchar *model_name = NULL;
|
||||||
1, &model_name, -1);
|
gtk_tree_model_get (list_store, &iter,
|
||||||
|
1, &model_name, -1);
|
||||||
|
|
||||||
gconf_client_set_string (xkb_gconf_client,
|
gconf_client_set_string (xkb_gconf_client,
|
||||||
GSWITCHIT_KBD_CONFIG_KEY_MODEL,
|
GKBD_KEYBOARD_CONFIG_KEY_MODEL,
|
||||||
model_name, NULL);
|
model_name, NULL);
|
||||||
g_free(model_name);
|
g_free (model_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
choose_model(GladeXML * dialog)
|
choose_model (GladeXML * dialog)
|
||||||
{
|
{
|
||||||
GladeXML* chooser_dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-keyboard-properties.glade", "xkb_model_chooser", NULL);
|
GladeXML *chooser_dialog =
|
||||||
GtkWidget* chooser = CWID ( "xkb_model_chooser");
|
glade_xml_new (GNOMECC_DATA_DIR
|
||||||
gtk_window_set_transient_for (GTK_WINDOW (chooser), GTK_WINDOW (WID ("keyboard_dialog")));
|
"/interfaces/gnome-keyboard-properties.glade",
|
||||||
current_model_name = gconf_client_get_string (xkb_gconf_client,
|
"xkb_model_chooser", NULL);
|
||||||
GSWITCHIT_KBD_CONFIG_KEY_MODEL, NULL);
|
GtkWidget *chooser = CWID ("xkb_model_chooser");
|
||||||
fill_models_list (chooser_dialog);
|
gtk_window_set_transient_for (GTK_WINDOW (chooser),
|
||||||
g_signal_connect (G_OBJECT (chooser),
|
GTK_WINDOW (WID
|
||||||
"response", G_CALLBACK (xkb_model_chooser_response), chooser_dialog);
|
("keyboard_dialog")));
|
||||||
gtk_dialog_run (GTK_DIALOG (chooser));
|
current_model_name =
|
||||||
gtk_widget_destroy (chooser);
|
gconf_client_get_string (xkb_gconf_client,
|
||||||
g_free (current_model_name);
|
GKBD_KEYBOARD_CONFIG_KEY_MODEL, NULL);
|
||||||
|
fill_models_list (chooser_dialog);
|
||||||
|
g_signal_connect (G_OBJECT (chooser),
|
||||||
|
"response",
|
||||||
|
G_CALLBACK (xkb_model_chooser_response),
|
||||||
|
chooser_dialog);
|
||||||
|
gtk_dialog_run (GTK_DIALOG (chooser));
|
||||||
|
gtk_widget_destroy (chooser);
|
||||||
|
g_free (current_model_name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include <gconf/gconf-client.h>
|
#include <gconf/gconf-client.h>
|
||||||
#include <glade/glade.h>
|
#include <glade/glade.h>
|
||||||
|
|
||||||
#include "libgswitchit/gswitchit-config.h"
|
#include "libgnomekbd/gkbd-keyboard-config.h"
|
||||||
|
|
||||||
#include "capplet-util.h"
|
#include "capplet-util.h"
|
||||||
#include "gconf-property-editor.h"
|
#include "gconf-property-editor.h"
|
||||||
|
@ -54,153 +54,170 @@ static GSList *current_radio_group = NULL;
|
||||||
GSList *
|
GSList *
|
||||||
xkb_options_get_selected_list (void)
|
xkb_options_get_selected_list (void)
|
||||||
{
|
{
|
||||||
GSList *retval;
|
GSList *retval;
|
||||||
|
|
||||||
retval = gconf_client_get_list (xkb_gconf_client,
|
retval = gconf_client_get_list (xkb_gconf_client,
|
||||||
GSWITCHIT_KBD_CONFIG_KEY_OPTIONS,
|
GKBD_KEYBOARD_CONFIG_KEY_OPTIONS,
|
||||||
GCONF_VALUE_STRING,
|
GCONF_VALUE_STRING, NULL);
|
||||||
NULL);
|
if (retval == NULL) {
|
||||||
if (retval == NULL)
|
GSList *cur_option;
|
||||||
{
|
|
||||||
GSList *cur_option;
|
|
||||||
|
|
||||||
for (cur_option = initial_config.options; cur_option != NULL; cur_option = cur_option->next)
|
for (cur_option = initial_config.options;
|
||||||
retval = g_slist_prepend (retval, g_strdup (cur_option->data));
|
cur_option != NULL; cur_option = cur_option->next)
|
||||||
|
retval =
|
||||||
|
g_slist_prepend (retval,
|
||||||
|
g_strdup (cur_option->data));
|
||||||
|
|
||||||
retval = g_slist_reverse (retval);
|
retval = g_slist_reverse (retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
xkb_options_get_expander (GtkWidget * option_button)
|
xkb_options_get_expander (GtkWidget * option_button)
|
||||||
{
|
{
|
||||||
return gtk_widget_get_parent (
|
return
|
||||||
gtk_widget_get_parent (
|
gtk_widget_get_parent (gtk_widget_get_parent
|
||||||
gtk_widget_get_parent (option_button)));
|
(gtk_widget_get_parent
|
||||||
|
(option_button)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
xkb_options_expander_selcounter_get (GtkWidget * expander)
|
xkb_options_expander_selcounter_get (GtkWidget * expander)
|
||||||
{
|
{
|
||||||
return GPOINTER_TO_INT(g_object_get_data (G_OBJECT (expander), SELCOUNTER_PROP));
|
return
|
||||||
|
GPOINTER_TO_INT (g_object_get_data
|
||||||
|
(G_OBJECT (expander), SELCOUNTER_PROP));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xkb_options_expander_selcounter_add (GtkWidget * expander, int value)
|
xkb_options_expander_selcounter_add (GtkWidget * expander, int value)
|
||||||
{
|
{
|
||||||
g_object_set_data (G_OBJECT (expander), SELCOUNTER_PROP,
|
g_object_set_data (G_OBJECT (expander), SELCOUNTER_PROP,
|
||||||
GINT_TO_POINTER (xkb_options_expander_selcounter_get (expander) + value));
|
GINT_TO_POINTER
|
||||||
|
(xkb_options_expander_selcounter_get (expander)
|
||||||
|
+ value));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xkb_options_expander_highlight (GtkWidget * expander)
|
xkb_options_expander_highlight (GtkWidget * expander)
|
||||||
{
|
{
|
||||||
char * utf_group_name = g_object_get_data (G_OBJECT (expander), "utfGroupName");
|
char *utf_group_name =
|
||||||
int counter = xkb_options_expander_selcounter_get (expander);
|
g_object_get_data (G_OBJECT (expander), "utfGroupName");
|
||||||
if (utf_group_name != NULL) {
|
int counter = xkb_options_expander_selcounter_get (expander);
|
||||||
gchar *titlemarkup = g_strconcat (counter > 0 ? "<span weight=\"bold\">" : "<span>",
|
if (utf_group_name != NULL) {
|
||||||
utf_group_name, "</span>", NULL);
|
gchar *titlemarkup =
|
||||||
gtk_expander_set_label (GTK_EXPANDER (expander), titlemarkup);
|
g_strconcat (counter >
|
||||||
g_free (titlemarkup);
|
0 ? "<span weight=\"bold\">" : "<span>",
|
||||||
}
|
utf_group_name, "</span>", NULL);
|
||||||
|
gtk_expander_set_label (GTK_EXPANDER (expander),
|
||||||
|
titlemarkup);
|
||||||
|
g_free (titlemarkup);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add optionname from the backend's selection list if it's not
|
/* Add optionname from the backend's selection list if it's not
|
||||||
already in there. */
|
already in there. */
|
||||||
static void
|
static void
|
||||||
xkb_options_select (gchar *optionname)
|
xkb_options_select (gchar * optionname)
|
||||||
{
|
{
|
||||||
gboolean already_selected = FALSE;
|
gboolean already_selected = FALSE;
|
||||||
GSList *options_list = xkb_options_get_selected_list ();
|
GSList *options_list = xkb_options_get_selected_list ();
|
||||||
GSList *option;
|
GSList *option;
|
||||||
for (option = options_list ; option != NULL ; option = option->next)
|
for (option = options_list; option != NULL; option = option->next)
|
||||||
if (!strcmp ((gchar*)option->data, optionname))
|
if (!strcmp ((gchar *) option->data, optionname))
|
||||||
already_selected = TRUE;
|
already_selected = TRUE;
|
||||||
|
|
||||||
if (!already_selected)
|
if (!already_selected)
|
||||||
options_list = g_slist_append (options_list, g_strdup (optionname));
|
options_list =
|
||||||
xkb_options_set_selected_list (options_list);
|
g_slist_append (options_list, g_strdup (optionname));
|
||||||
|
xkb_options_set_selected_list (options_list);
|
||||||
|
|
||||||
clear_xkb_elements_list (options_list);
|
clear_xkb_elements_list (options_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove all occurences of optionname from the backend's selection list */
|
/* Remove all occurences of optionname from the backend's selection list */
|
||||||
static void
|
static void
|
||||||
xkb_options_deselect (gchar *optionname)
|
xkb_options_deselect (gchar * optionname)
|
||||||
{
|
{
|
||||||
GSList *options_list = xkb_options_get_selected_list ();
|
GSList *options_list = xkb_options_get_selected_list ();
|
||||||
GSList *nodetmp;
|
GSList *nodetmp;
|
||||||
GSList *option = options_list;
|
GSList *option = options_list;
|
||||||
while (option != NULL)
|
while (option != NULL) {
|
||||||
{
|
gchar *id = (char *) option->data;
|
||||||
gchar *id = (char *) option->data;
|
if (!strcmp (id, optionname)) {
|
||||||
if (!strcmp(id, optionname))
|
nodetmp = option->next;
|
||||||
{
|
g_free (id);
|
||||||
nodetmp = option->next;
|
options_list =
|
||||||
g_free (id);
|
g_slist_remove_link (options_list, option);
|
||||||
options_list = g_slist_remove_link (options_list, option);
|
g_slist_free_1 (option);
|
||||||
g_slist_free_1 (option);
|
option = nodetmp;
|
||||||
option=nodetmp;
|
} else
|
||||||
}
|
option = option->next;
|
||||||
else
|
}
|
||||||
option = option->next;
|
xkb_options_set_selected_list (options_list);
|
||||||
}
|
clear_xkb_elements_list (options_list);
|
||||||
xkb_options_set_selected_list (options_list);
|
|
||||||
clear_xkb_elements_list (options_list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return true if optionname describes a string already in the backend's
|
/* Return true if optionname describes a string already in the backend's
|
||||||
list of selected options */
|
list of selected options */
|
||||||
static gboolean
|
static gboolean
|
||||||
xkb_options_is_selected (gchar *optionname)
|
xkb_options_is_selected (gchar * optionname)
|
||||||
{
|
{
|
||||||
gboolean retval = FALSE;
|
gboolean retval = FALSE;
|
||||||
GSList *options_list = xkb_options_get_selected_list ();
|
GSList *options_list = xkb_options_get_selected_list ();
|
||||||
GSList *option;
|
GSList *option;
|
||||||
for (option = options_list ; option != NULL ; option = option->next)
|
for (option = options_list; option != NULL; option = option->next) {
|
||||||
{
|
if (!strcmp ((gchar *) option->data, optionname))
|
||||||
if (!strcmp ((gchar*)option->data, optionname))
|
retval = TRUE;
|
||||||
retval = TRUE;
|
}
|
||||||
}
|
clear_xkb_elements_list (options_list);
|
||||||
clear_xkb_elements_list (options_list);
|
return retval;
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update xkb backend to reflect the new UI state */
|
/* Update xkb backend to reflect the new UI state */
|
||||||
static void
|
static void
|
||||||
option_toggled_cb (GtkWidget *checkbutton, gpointer data)
|
option_toggled_cb (GtkWidget * checkbutton, gpointer data)
|
||||||
{
|
{
|
||||||
gpointer optionID = g_object_get_data (G_OBJECT (checkbutton), OPTION_ID_PROP);
|
gpointer optionID =
|
||||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)))
|
g_object_get_data (G_OBJECT (checkbutton), OPTION_ID_PROP);
|
||||||
xkb_options_select (optionID);
|
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)))
|
||||||
else
|
xkb_options_select (optionID);
|
||||||
xkb_options_deselect (optionID);
|
else
|
||||||
|
xkb_options_deselect (optionID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update UI state from xkb backend */
|
/* Update UI state from xkb backend */
|
||||||
static void
|
static void
|
||||||
option_update_cb (GConfClient * client,
|
option_update_cb (GConfClient * client,
|
||||||
guint cnxn_id, GConfEntry * entry, gpointer data)
|
guint cnxn_id, GConfEntry * entry, gpointer data)
|
||||||
{
|
{
|
||||||
GtkToggleButton *toggle = GTK_TOGGLE_BUTTON (data);
|
GtkToggleButton *toggle = GTK_TOGGLE_BUTTON (data);
|
||||||
GtkWidget *expander = xkb_options_get_expander (GTK_WIDGET (toggle));
|
GtkWidget *expander =
|
||||||
gboolean old_state = gtk_toggle_button_get_active (toggle);
|
xkb_options_get_expander (GTK_WIDGET (toggle));
|
||||||
gboolean new_state = xkb_options_is_selected (
|
gboolean old_state = gtk_toggle_button_get_active (toggle);
|
||||||
g_object_get_data (G_OBJECT (toggle), OPTION_ID_PROP));
|
gboolean new_state =
|
||||||
int old_gstate = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (toggle), GCONFSTATE_PROP));
|
xkb_options_is_selected (g_object_get_data
|
||||||
int state_diff = new_state - old_gstate;
|
(G_OBJECT (toggle), OPTION_ID_PROP));
|
||||||
|
int old_gstate =
|
||||||
|
GPOINTER_TO_INT (g_object_get_data
|
||||||
|
(G_OBJECT (toggle), GCONFSTATE_PROP));
|
||||||
|
int state_diff = new_state - old_gstate;
|
||||||
|
|
||||||
if (GTK_WIDGET_TYPE (toggle) == GTK_TYPE_RADIO_BUTTON &&
|
if (GTK_WIDGET_TYPE (toggle) == GTK_TYPE_RADIO_BUTTON &&
|
||||||
old_state == TRUE && new_state == FALSE)
|
old_state == TRUE && new_state == FALSE)
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data (G_OBJECT (toggle), "NoneRadio")), TRUE);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
|
||||||
else
|
(g_object_get_data
|
||||||
gtk_toggle_button_set_active (toggle, new_state);
|
(G_OBJECT (toggle),
|
||||||
|
"NoneRadio")), TRUE);
|
||||||
|
else
|
||||||
|
gtk_toggle_button_set_active (toggle, new_state);
|
||||||
|
|
||||||
g_object_set_data (G_OBJECT (toggle), GCONFSTATE_PROP, GINT_TO_POINTER (new_state));
|
g_object_set_data (G_OBJECT (toggle), GCONFSTATE_PROP,
|
||||||
xkb_options_expander_selcounter_add (expander, state_diff);
|
GINT_TO_POINTER (new_state));
|
||||||
xkb_options_expander_highlight (expander);
|
xkb_options_expander_selcounter_add (expander, state_diff);
|
||||||
|
xkb_options_expander_highlight (expander);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add a check_button or radio_button to control a particular option
|
/* Add a check_button or radio_button to control a particular option
|
||||||
|
@ -208,153 +225,186 @@ option_update_cb (GConfClient * client,
|
||||||
the top of this file. */
|
the top of this file. */
|
||||||
static void
|
static void
|
||||||
xkb_options_add_option (XklConfigRegistry * config_registry,
|
xkb_options_add_option (XklConfigRegistry * config_registry,
|
||||||
XklConfigItem * config_item,
|
XklConfigItem * config_item, GladeXML * dialog)
|
||||||
GladeXML * dialog)
|
|
||||||
{
|
{
|
||||||
GtkWidget *option_check;
|
GtkWidget *option_check;
|
||||||
gchar *utf_option_name = xci_desc_to_utf8 (config_item);
|
gchar *utf_option_name = xci_desc_to_utf8 (config_item);
|
||||||
/* Copy this out because we'll load it into the widget with set_data */
|
/* Copy this out because we'll load it into the widget with set_data */
|
||||||
gchar *full_option_name = g_strdup(
|
gchar *full_option_name =
|
||||||
gswitchit_kbd_config_merge_items (current1st_level_id, config_item->name));
|
g_strdup (gkbd_keyboard_config_merge_items
|
||||||
gboolean initial_state;
|
(current1st_level_id, config_item->name));
|
||||||
|
gboolean initial_state;
|
||||||
|
|
||||||
if (current_multi_select)
|
if (current_multi_select)
|
||||||
option_check = gtk_check_button_new_with_label (utf_option_name);
|
option_check =
|
||||||
else
|
gtk_check_button_new_with_label (utf_option_name);
|
||||||
{
|
else {
|
||||||
if (current_radio_group == NULL)
|
if (current_radio_group == NULL) {
|
||||||
{
|
/* The first radio in a group is to be "Default", meaning none of
|
||||||
/* The first radio in a group is to be "Default", meaning none of
|
the below options are to be included in the selected list.
|
||||||
the below options are to be included in the selected list.
|
This is a HIG-compliant alternative to allowing no
|
||||||
This is a HIG-compliant alternative to allowing no
|
selection in the group. */
|
||||||
selection in the group. */
|
option_check =
|
||||||
option_check = gtk_radio_button_new_with_label (current_radio_group, _("Default"));
|
gtk_radio_button_new_with_label
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (option_check), TRUE);
|
(current_radio_group, _("Default"));
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (current_vbox), option_check);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
|
||||||
current_radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (option_check));
|
(option_check),
|
||||||
current_none_radio = option_check;
|
TRUE);
|
||||||
}
|
gtk_box_pack_start_defaults (GTK_BOX
|
||||||
option_check = gtk_radio_button_new_with_label (current_radio_group, utf_option_name);
|
(current_vbox),
|
||||||
current_radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (option_check));
|
option_check);
|
||||||
g_object_set_data (G_OBJECT (option_check), "NoneRadio", current_none_radio);
|
current_radio_group =
|
||||||
}
|
gtk_radio_button_get_group (GTK_RADIO_BUTTON
|
||||||
g_free (utf_option_name);
|
(option_check));
|
||||||
|
current_none_radio = option_check;
|
||||||
|
}
|
||||||
|
option_check =
|
||||||
|
gtk_radio_button_new_with_label (current_radio_group,
|
||||||
|
utf_option_name);
|
||||||
|
current_radio_group =
|
||||||
|
gtk_radio_button_get_group (GTK_RADIO_BUTTON
|
||||||
|
(option_check));
|
||||||
|
g_object_set_data (G_OBJECT (option_check), "NoneRadio",
|
||||||
|
current_none_radio);
|
||||||
|
}
|
||||||
|
g_free (utf_option_name);
|
||||||
|
|
||||||
initial_state = xkb_options_is_selected (full_option_name);
|
initial_state = xkb_options_is_selected (full_option_name);
|
||||||
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (option_check), initial_state);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (option_check),
|
||||||
|
initial_state);
|
||||||
|
|
||||||
g_object_set_data_full (G_OBJECT (option_check), OPTION_ID_PROP, full_option_name, g_free);
|
g_object_set_data_full (G_OBJECT (option_check), OPTION_ID_PROP,
|
||||||
|
full_option_name, g_free);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (option_check), "toggled", G_CALLBACK (option_toggled_cb), NULL);
|
g_signal_connect (G_OBJECT (option_check), "toggled",
|
||||||
|
G_CALLBACK (option_toggled_cb), NULL);
|
||||||
|
|
||||||
gconf_client_notify_add (xkb_gconf_client,
|
gconf_client_notify_add (xkb_gconf_client,
|
||||||
GSWITCHIT_KBD_CONFIG_KEY_OPTIONS,
|
GKBD_KEYBOARD_CONFIG_KEY_OPTIONS,
|
||||||
(GConfClientNotifyFunc)
|
(GConfClientNotifyFunc)
|
||||||
option_update_cb, option_check, NULL, NULL);
|
option_update_cb, option_check, NULL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (current_vbox), option_check);
|
gtk_box_pack_start_defaults (GTK_BOX (current_vbox), option_check);
|
||||||
|
|
||||||
xkb_options_expander_selcounter_add (xkb_options_get_expander (option_check), initial_state);
|
xkb_options_expander_selcounter_add (xkb_options_get_expander
|
||||||
g_object_set_data (G_OBJECT (option_check), GCONFSTATE_PROP, GINT_TO_POINTER (initial_state));
|
(option_check),
|
||||||
|
initial_state);
|
||||||
|
g_object_set_data (G_OBJECT (option_check), GCONFSTATE_PROP,
|
||||||
|
GINT_TO_POINTER (initial_state));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add a group of options: create title and layout widgets and then
|
/* Add a group of options: create title and layout widgets and then
|
||||||
add widgets for all the options in the group. */
|
add widgets for all the options in the group. */
|
||||||
static void
|
static void
|
||||||
xkb_options_add_group (XklConfigRegistry * config_registry,
|
xkb_options_add_group (XklConfigRegistry * config_registry,
|
||||||
XklConfigItem * config_item,
|
XklConfigItem * config_item, GladeXML * dialog)
|
||||||
GladeXML * dialog)
|
|
||||||
{
|
{
|
||||||
GtkWidget *expander, *align, *vbox;
|
GtkWidget *expander, *align, *vbox;
|
||||||
gboolean allow_multiple_selection = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (config_item),
|
gboolean allow_multiple_selection =
|
||||||
XCI_PROP_ALLOW_MULTIPLE_SELECTION));
|
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (config_item),
|
||||||
|
XCI_PROP_ALLOW_MULTIPLE_SELECTION));
|
||||||
|
|
||||||
GSList * expanders_list = g_object_get_data (G_OBJECT (dialog), EXPANDERS_PROP);
|
GSList *expanders_list =
|
||||||
|
g_object_get_data (G_OBJECT (dialog), EXPANDERS_PROP);
|
||||||
|
|
||||||
gchar *utf_group_name = xci_desc_to_utf8 (config_item);
|
gchar *utf_group_name = xci_desc_to_utf8 (config_item);
|
||||||
gchar *titlemarkup = g_strconcat ("<span>", utf_group_name, "</span>", NULL);
|
gchar *titlemarkup =
|
||||||
|
g_strconcat ("<span>", utf_group_name, "</span>", NULL);
|
||||||
|
|
||||||
expander = gtk_expander_new (titlemarkup);
|
expander = gtk_expander_new (titlemarkup);
|
||||||
gtk_expander_set_use_markup (GTK_EXPANDER (expander), TRUE);
|
gtk_expander_set_use_markup (GTK_EXPANDER (expander), TRUE);
|
||||||
g_object_set_data_full (G_OBJECT (expander), "utfGroupName", utf_group_name, g_free);
|
g_object_set_data_full (G_OBJECT (expander), "utfGroupName",
|
||||||
|
utf_group_name, g_free);
|
||||||
|
|
||||||
g_free (titlemarkup);
|
g_free (titlemarkup);
|
||||||
align = gtk_alignment_new (0, 0, 1, 1);
|
align = gtk_alignment_new (0, 0, 1, 1);
|
||||||
gtk_alignment_set_padding (GTK_ALIGNMENT (align), 6, 12, 12, 0);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (align), 6, 12, 12, 0);
|
||||||
vbox = gtk_vbox_new (TRUE, 6);
|
vbox = gtk_vbox_new (TRUE, 6);
|
||||||
gtk_container_add (GTK_CONTAINER (align), vbox);
|
gtk_container_add (GTK_CONTAINER (align), vbox);
|
||||||
gtk_container_add (GTK_CONTAINER (expander), align);
|
gtk_container_add (GTK_CONTAINER (expander), align);
|
||||||
current_vbox = vbox;
|
current_vbox = vbox;
|
||||||
|
|
||||||
current_multi_select = (gboolean) allow_multiple_selection;
|
current_multi_select = (gboolean) allow_multiple_selection;
|
||||||
current_radio_group = NULL;
|
current_radio_group = NULL;
|
||||||
|
|
||||||
current1st_level_id = config_item->name;
|
current1st_level_id = config_item->name;
|
||||||
xkl_config_registry_foreach_option (config_registry, config_item->name,
|
xkl_config_registry_foreach_option (config_registry,
|
||||||
(ConfigItemProcessFunc)xkb_options_add_option,
|
config_item->name,
|
||||||
dialog);
|
(ConfigItemProcessFunc)
|
||||||
|
xkb_options_add_option,
|
||||||
|
dialog);
|
||||||
|
|
||||||
xkb_options_expander_highlight (expander);
|
xkb_options_expander_highlight (expander);
|
||||||
|
|
||||||
expanders_list = g_slist_append (expanders_list, expander);
|
expanders_list = g_slist_append (expanders_list, expander);
|
||||||
g_object_set_data (G_OBJECT (dialog), EXPANDERS_PROP, expanders_list);
|
g_object_set_data (G_OBJECT (dialog), EXPANDERS_PROP,
|
||||||
|
expanders_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
xkb_options_expanders_compare (GtkWidget * expander1, GtkWidget * expander2)
|
xkb_options_expanders_compare (GtkWidget * expander1,
|
||||||
|
GtkWidget * expander2)
|
||||||
{
|
{
|
||||||
const gchar *t1 = gtk_expander_get_label (GTK_EXPANDER (expander1));
|
const gchar *t1 =
|
||||||
const gchar *t2 = gtk_expander_get_label (GTK_EXPANDER (expander2));
|
gtk_expander_get_label (GTK_EXPANDER (expander1));
|
||||||
return g_utf8_collate (t1, t2);
|
const gchar *t2 =
|
||||||
|
gtk_expander_get_label (GTK_EXPANDER (expander2));
|
||||||
|
return g_utf8_collate (t1, t2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create widgets to represent the options made available by the backend */
|
/* Create widgets to represent the options made available by the backend */
|
||||||
void
|
void
|
||||||
xkb_options_load_options (GladeXML * dialog)
|
xkb_options_load_options (GladeXML * dialog)
|
||||||
{
|
{
|
||||||
GtkWidget *opts_vbox = WID ("options_vbox");
|
GtkWidget *opts_vbox = WID ("options_vbox");
|
||||||
GSList * expanders_list;
|
GSList *expanders_list;
|
||||||
GtkWidget * expander;
|
GtkWidget *expander;
|
||||||
|
|
||||||
/* fill the list */
|
/* fill the list */
|
||||||
xkl_config_registry_foreach_option_group (config_registry,
|
xkl_config_registry_foreach_option_group (config_registry,
|
||||||
(ConfigItemProcessFunc)xkb_options_add_group,
|
(ConfigItemProcessFunc)
|
||||||
dialog);
|
xkb_options_add_group,
|
||||||
/* sort it */
|
dialog);
|
||||||
expanders_list = g_object_get_data (G_OBJECT (dialog), EXPANDERS_PROP);
|
/* sort it */
|
||||||
expanders_list = g_slist_sort (expanders_list, (GCompareFunc)xkb_options_expanders_compare);
|
expanders_list =
|
||||||
while (expanders_list)
|
g_object_get_data (G_OBJECT (dialog), EXPANDERS_PROP);
|
||||||
{
|
expanders_list =
|
||||||
expander = GTK_WIDGET (expanders_list->data);
|
g_slist_sort (expanders_list,
|
||||||
gtk_box_pack_start (GTK_BOX (opts_vbox), expander, FALSE, FALSE, 0);
|
(GCompareFunc) xkb_options_expanders_compare);
|
||||||
expanders_list = expanders_list->next;
|
while (expanders_list) {
|
||||||
}
|
expander = GTK_WIDGET (expanders_list->data);
|
||||||
|
gtk_box_pack_start (GTK_BOX (opts_vbox), expander, FALSE,
|
||||||
|
FALSE, 0);
|
||||||
|
expanders_list = expanders_list->next;
|
||||||
|
}
|
||||||
|
|
||||||
/* just cleanup */
|
/* just cleanup */
|
||||||
expanders_list = g_object_get_data (G_OBJECT (dialog), EXPANDERS_PROP);
|
expanders_list =
|
||||||
g_object_set_data (G_OBJECT (dialog), EXPANDERS_PROP, NULL);
|
g_object_get_data (G_OBJECT (dialog), EXPANDERS_PROP);
|
||||||
g_slist_free (expanders_list);
|
g_object_set_data (G_OBJECT (dialog), EXPANDERS_PROP, NULL);
|
||||||
|
g_slist_free (expanders_list);
|
||||||
|
|
||||||
gtk_widget_show_all (opts_vbox);
|
gtk_widget_show_all (opts_vbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Respond to a change in the xkb gconf settings */
|
/* Respond to a change in the xkb gconf settings */
|
||||||
static void
|
static void
|
||||||
xkb_options_update (GConfClient * client,
|
xkb_options_update (GConfClient * client,
|
||||||
guint cnxn_id, GConfEntry * entry, GladeXML * dialog)
|
guint cnxn_id, GConfEntry * entry, GladeXML * dialog)
|
||||||
{
|
{
|
||||||
/* Updating options is handled by gconf notifies for each widget
|
/* Updating options is handled by gconf notifies for each widget
|
||||||
This is here to avoid calling it N_OPTIONS times for each gconf
|
This is here to avoid calling it N_OPTIONS times for each gconf
|
||||||
change.*/
|
change. */
|
||||||
enable_disable_restoring (dialog);
|
enable_disable_restoring (dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xkb_options_register_gconf_listener (GladeXML * dialog)
|
xkb_options_register_gconf_listener (GladeXML * dialog)
|
||||||
{
|
{
|
||||||
gconf_client_notify_add (xkb_gconf_client,
|
gconf_client_notify_add (xkb_gconf_client,
|
||||||
GSWITCHIT_KBD_CONFIG_KEY_OPTIONS,
|
GKBD_KEYBOARD_CONFIG_KEY_OPTIONS,
|
||||||
(GConfClientNotifyFunc)
|
(GConfClientNotifyFunc)
|
||||||
xkb_options_update, dialog, NULL, NULL);
|
xkb_options_update, dialog, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,12 +28,12 @@
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
#include <glade/glade.h>
|
#include <glade/glade.h>
|
||||||
|
|
||||||
#include "libgswitchit/gswitchit-config.h"
|
#include <libgnomekbd/gkbd-keyboard-config.h>
|
||||||
|
|
||||||
#include "capplet-util.h"
|
#include "capplet-util.h"
|
||||||
|
|
||||||
#include "gnome-keyboard-properties-xkb.h"
|
#include "gnome-keyboard-properties-xkb.h"
|
||||||
#include "libkbdraw/keyboard-drawing.h"
|
#include <libgnomekbd/gkbd-keyboard-drawing.h>
|
||||||
|
|
||||||
#ifdef HAVE_X11_EXTENSIONS_XKB_H
|
#ifdef HAVE_X11_EXTENSIONS_XKB_H
|
||||||
#include "X11/XKBlib.h"
|
#include "X11/XKBlib.h"
|
||||||
|
@ -42,78 +42,92 @@
|
||||||
* Any ideas on architectural improvements are WELCOME
|
* Any ideas on architectural improvements are WELCOME
|
||||||
*/
|
*/
|
||||||
extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
|
extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
|
||||||
const XklConfigRec * data,
|
const XklConfigRec * data,
|
||||||
XkbComponentNamesPtr component_names);
|
XkbComponentNamesPtr
|
||||||
|
component_names);
|
||||||
|
|
||||||
extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
|
extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
|
||||||
XkbComponentNamesPtr component_names);
|
XkbComponentNamesPtr
|
||||||
|
component_names);
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static KeyboardDrawingGroupLevel groupsLevels[] = {{0,1},{0,3},{0,0},{0,2}};
|
static GkbdKeyboardDrawingGroupLevel groupsLevels[] =
|
||||||
static KeyboardDrawingGroupLevel * pGroupsLevels[] = {
|
{ {0, 1}, {0, 3}, {0, 0}, {0, 2} };
|
||||||
groupsLevels, groupsLevels+1, groupsLevels+2, groupsLevels+3 };
|
static GkbdKeyboardDrawingGroupLevel *pGroupsLevels[] = {
|
||||||
|
groupsLevels, groupsLevels + 1, groupsLevels + 2, groupsLevels + 3
|
||||||
|
};
|
||||||
|
|
||||||
GtkWidget*
|
GtkWidget *
|
||||||
xkb_layout_preview_create_widget (GladeXML * chooserDialog)
|
xkb_layout_preview_create_widget (GladeXML * chooserDialog)
|
||||||
{
|
{
|
||||||
GtkWidget *kbdraw = keyboard_drawing_new ();
|
GtkWidget *kbdraw = gkbd_keyboard_drawing_new ();
|
||||||
|
|
||||||
keyboard_drawing_set_groups_levels (KEYBOARD_DRAWING (kbdraw), pGroupsLevels);
|
gkbd_keyboard_drawing_set_groups_levels (GKBD_KEYBOARD_DRAWING
|
||||||
return kbdraw;
|
(kbdraw), pGroupsLevels);
|
||||||
|
return kbdraw;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xkb_layout_preview_update (GladeXML * chooser_dialog)
|
xkb_layout_preview_update (GladeXML * chooser_dialog)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_X11_EXTENSIONS_XKB_H
|
#ifdef HAVE_X11_EXTENSIONS_XKB_H
|
||||||
GtkWidget *chooser = CWID ( "xkb_layout_chooser");
|
GtkWidget *chooser = CWID ("xkb_layout_chooser");
|
||||||
GtkWidget *available_layouts_tree = CWID ("xkb_layouts_available");
|
GtkWidget *available_layouts_tree = CWID ("xkb_layouts_available");
|
||||||
GtkTreeSelection *selection =
|
GtkTreeSelection *selection =
|
||||||
gtk_tree_view_get_selection (GTK_TREE_VIEW (available_layouts_tree));
|
gtk_tree_view_get_selection (GTK_TREE_VIEW
|
||||||
GtkTreeIter selected_iter;
|
(available_layouts_tree));
|
||||||
GtkTreeModel *model;
|
GtkTreeIter selected_iter;
|
||||||
GtkWidget *kbdraw = GTK_WIDGET (g_object_get_data (G_OBJECT (chooser), "kbdraw"));
|
GtkTreeModel *model;
|
||||||
if (kbdraw != NULL &&
|
GtkWidget *kbdraw =
|
||||||
gtk_tree_selection_get_selected (selection, &model, &selected_iter))
|
GTK_WIDGET (g_object_get_data (G_OBJECT (chooser), "kbdraw"));
|
||||||
{
|
if (kbdraw != NULL
|
||||||
gchar *id;
|
&& gtk_tree_selection_get_selected (selection, &model,
|
||||||
XklConfigRec *data;
|
&selected_iter)) {
|
||||||
char **p, *layout, *variant;
|
gchar *id;
|
||||||
XkbComponentNamesRec component_names;
|
XklConfigRec *data;
|
||||||
|
char **p, *layout, *variant;
|
||||||
|
XkbComponentNamesRec component_names;
|
||||||
|
|
||||||
gtk_tree_model_get (model, &selected_iter, AVAIL_LAYOUT_TREE_COL_ID, &id, -1);
|
gtk_tree_model_get (model, &selected_iter,
|
||||||
data = xkl_config_rec_new ();
|
AVAIL_LAYOUT_TREE_COL_ID, &id, -1);
|
||||||
if (xkl_config_rec_get_from_server (data, engine))
|
data = xkl_config_rec_new ();
|
||||||
{
|
if (xkl_config_rec_get_from_server (data, engine)) {
|
||||||
if( ( p = data->layouts ) != NULL )
|
if ((p = data->layouts) != NULL)
|
||||||
g_strfreev(data->layouts);
|
g_strfreev (data->layouts);
|
||||||
|
|
||||||
if( ( p = data->variants ) != NULL )
|
if ((p = data->variants) != NULL)
|
||||||
g_strfreev(data->variants);
|
g_strfreev (data->variants);
|
||||||
|
|
||||||
data->layouts = g_new0 (char*, 2);
|
|
||||||
data->variants = g_new0 (char*, 2);
|
|
||||||
if (gswitchit_kbd_config_split_items (id, &layout, &variant)
|
|
||||||
&& variant != NULL)
|
|
||||||
{
|
|
||||||
data->layouts[0] = (layout == NULL) ? NULL : g_strdup (layout);
|
|
||||||
data->variants[0] = (variant == NULL) ? NULL : g_strdup (variant);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
data->layouts[0] = (id == NULL) ? NULL : g_strdup (id);
|
|
||||||
data->variants[0] = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (xkl_xkb_config_native_prepare (engine, data, &component_names))
|
data->layouts = g_new0 (char *, 2);
|
||||||
{
|
data->variants = g_new0 (char *, 2);
|
||||||
keyboard_drawing_set_keyboard (KEYBOARD_DRAWING (kbdraw), &component_names);
|
if (gkbd_keyboard_config_split_items
|
||||||
|
(id, &layout, &variant)
|
||||||
|
&& variant != NULL) {
|
||||||
|
data->layouts[0] =
|
||||||
|
(layout ==
|
||||||
|
NULL) ? NULL : g_strdup (layout);
|
||||||
|
data->variants[0] =
|
||||||
|
(variant ==
|
||||||
|
NULL) ? NULL : g_strdup (variant);
|
||||||
|
} else {
|
||||||
|
data->layouts[0] =
|
||||||
|
(id == NULL) ? NULL : g_strdup (id);
|
||||||
|
data->variants[0] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
xkl_xkb_config_native_cleanup (engine, &component_names);
|
if (xkl_xkb_config_native_prepare
|
||||||
}
|
(engine, data, &component_names)) {
|
||||||
}
|
gkbd_keyboard_drawing_set_keyboard
|
||||||
g_object_unref (G_OBJECT (data));
|
(GKBD_KEYBOARD_DRAWING (kbdraw),
|
||||||
}
|
&component_names);
|
||||||
|
|
||||||
|
xkl_xkb_config_native_cleanup (engine,
|
||||||
|
&component_names);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
g_object_unref (G_OBJECT (data));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
24
configure.in
24
configure.in
|
@ -109,9 +109,6 @@ PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-2.0)
|
||||||
PKG_CHECK_MODULES(DEFAULT_APPLICATIONS_CAPPLET, libxml-2.0)
|
PKG_CHECK_MODULES(DEFAULT_APPLICATIONS_CAPPLET, libxml-2.0)
|
||||||
PKG_CHECK_MODULES(SOUND_CAPPLET, esound gstreamer-0.10)
|
PKG_CHECK_MODULES(SOUND_CAPPLET, esound gstreamer-0.10)
|
||||||
PKG_CHECK_MODULES(METACITY, libmetacity-private)
|
PKG_CHECK_MODULES(METACITY, libmetacity-private)
|
||||||
PKG_CHECK_MODULES(LIBXKLAVIER, libxklavier >= 2.91,,
|
|
||||||
AC_MSG_ERROR([gnome-control-center depends on libxklavier >= 2.91.
|
|
||||||
The latest release is available from http://prdownloads.sourceforge.net/gswitchit], 1))
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Check for Xft version 2; we build in extra functionality to the font capplet
|
dnl Check for Xft version 2; we build in extra functionality to the font capplet
|
||||||
|
@ -195,18 +192,13 @@ fi
|
||||||
dnl ==============
|
dnl ==============
|
||||||
dnl gswitchit
|
dnl gswitchit
|
||||||
dnl ==============
|
dnl ==============
|
||||||
dnl Make sure the new cvs virtual include has been checked out
|
PKG_CHECK_MODULES(LIBGNOMEKBD, [libgnomekbd >= 0.1])
|
||||||
AC_MSG_CHECKING([for inclusion of libgswitchit])
|
AC_SUBST(LIBGNOMEKBD_CFLAGS)
|
||||||
if test ! -d "$srcdir/libgswitchit"; then
|
AC_SUBST(LIBGNOMEKBD_LIBS)
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
AC_MSG_ERROR([Your checkout of gnome-control-center is out of date.
|
PKG_CHECK_MODULES(LIBGNOMEKBDUI, [libgnomekbdui >= 0.1])
|
||||||
The 'libgswitchit' module has been virtually included into
|
AC_SUBST(LIBGNOMEKBDUI_CFLAGS)
|
||||||
gnome-control-center by CVS as a subdirectory. Please check
|
AC_SUBST(LIBGNOMEKBDUI_LIBS)
|
||||||
out again (this can be done on top of your existing checkout)])
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL(INCLUDE_GSWITCHIT_DEVEL, false) dnl pull devel from applet
|
|
||||||
|
|
||||||
dnl ==============================================
|
dnl ==============================================
|
||||||
dnl themus and fontilust dependencies
|
dnl themus and fontilust dependencies
|
||||||
|
@ -610,8 +602,6 @@ control-center/Makefile
|
||||||
libbackground/Makefile
|
libbackground/Makefile
|
||||||
libwindow-settings/Makefile
|
libwindow-settings/Makefile
|
||||||
libwindow-settings/gnome-window-settings-2.0.pc
|
libwindow-settings/gnome-window-settings-2.0.pc
|
||||||
libgswitchit/Makefile
|
|
||||||
libkbdraw/Makefile
|
|
||||||
capplets/Makefile
|
capplets/Makefile
|
||||||
capplets/common/Makefile
|
capplets/common/Makefile
|
||||||
capplets/default-applications/Makefile
|
capplets/default-applications/Makefile
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
SUBDIRS = xrdb actions
|
SUBDIRS = xrdb actions
|
||||||
|
|
||||||
INCLUDES=$(DBUS_CFLAGS) $(LIBXKLAVIER_CFLAGS) $(GNOME_SETTINGS_DAEMON_CFLAGS) -I$(top_srcdir)/libbackground -I$(top_srcdir) \
|
INCLUDES=$(DBUS_CFLAGS) $(LIBGNOMEKBD_CFLAGS) $(GNOME_SETTINGS_DAEMON_CFLAGS) -I$(top_srcdir)/libbackground -I$(top_srcdir) \
|
||||||
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
|
|
||||||
-DESD_SERVER="\"$(ESD_SERVER)\"" \
|
-DESD_SERVER="\"$(ESD_SERVER)\"" \
|
||||||
-DDATADIR="\"$(datadir)\"" \
|
-DDATADIR="\"$(datadir)\"" \
|
||||||
-DPIXMAPSDIR="\"$(GNOMECC_PIXMAPS_DIR)\"" \
|
-DPIXMAPSDIR="\"$(GNOMECC_PIXMAPS_DIR)\"" \
|
||||||
|
@ -69,10 +68,9 @@ gnome_settings_daemon_SOURCES = \
|
||||||
|
|
||||||
gnome_settings_daemon_LDADD = \
|
gnome_settings_daemon_LDADD = \
|
||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(LIBXKLAVIER_LIBS) \
|
$(LIBGNOMEKBD_LIBS) \
|
||||||
$(top_builddir)/libbackground/libbackground.la \
|
$(top_builddir)/libbackground/libbackground.la \
|
||||||
$(top_builddir)/libsounds/libsounds.a \
|
$(top_builddir)/libsounds/libsounds.a \
|
||||||
$(top_builddir)/libgswitchit/libgswitchit.a \
|
|
||||||
$(top_builddir)/libwindow-settings/libgnome-window-settings.la \
|
$(top_builddir)/libwindow-settings/libgnome-window-settings.la \
|
||||||
$(top_builddir)/gnome-settings-daemon/actions/libacme.la \
|
$(top_builddir)/gnome-settings-daemon/actions/libacme.la \
|
||||||
$(GNOME_SETTINGS_DAEMON_LIBS) \
|
$(GNOME_SETTINGS_DAEMON_LIBS) \
|
||||||
|
|
|
@ -35,19 +35,20 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <libgswitchit/gswitchit-config.h>
|
#include <libgnomekbd/gkbd-config-registry.h>
|
||||||
#include <libgswitchit/keyboard-config-registry.h>
|
#include <libgnomekbd/gkbd-desktop-config.h>
|
||||||
|
#include <libgnomekbd/gkbd-keyboard-config.h>
|
||||||
|
|
||||||
#include "gnome-settings-keyboard-xkb.h"
|
#include "gnome-settings-keyboard-xkb.h"
|
||||||
#include "gnome-settings-daemon.h"
|
#include "gnome-settings-daemon.h"
|
||||||
|
|
||||||
XklEngine *xkl_engine;
|
XklEngine *xkl_engine;
|
||||||
|
|
||||||
static GSwitchItConfig current_config;
|
static GkbdDesktopConfig current_config;
|
||||||
static GSwitchItKbdConfig current_kbd_config;
|
static GkbdKeyboardConfig current_kbd_config;
|
||||||
|
|
||||||
/* never terminated */
|
/* never terminated */
|
||||||
static GSwitchItKbdConfig initial_sys_kbd_config;
|
static GkbdKeyboardConfig initial_sys_kbd_config;
|
||||||
|
|
||||||
static gboolean inited_ok;
|
static gboolean inited_ok;
|
||||||
|
|
||||||
|
@ -133,34 +134,34 @@ apply_settings (void)
|
||||||
if (!inited_ok)
|
if (!inited_ok)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gswitchit_config_load_from_gconf (¤t_config);
|
gkbd_desktop_config_load_from_gconf (¤t_config);
|
||||||
/* again, probably it would be nice to compare things
|
/* again, probably it would be nice to compare things
|
||||||
before activating them */
|
before activating them */
|
||||||
gswitchit_config_activate (¤t_config);
|
gkbd_desktop_config_activate (¤t_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
apply_xkb_settings (void)
|
apply_xkb_settings (void)
|
||||||
{
|
{
|
||||||
GConfClient *conf_client;
|
GConfClient *conf_client;
|
||||||
GSwitchItKbdConfig current_sys_kbd_config;
|
GkbdKeyboardConfig current_sys_kbd_config;
|
||||||
|
|
||||||
if (!inited_ok)
|
if (!inited_ok)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
conf_client = gnome_settings_daemon_get_conf_client ();
|
conf_client = gnome_settings_daemon_get_conf_client ();
|
||||||
gswitchit_kbd_config_init (¤t_sys_kbd_config, conf_client,
|
gkbd_keyboard_config_init (¤t_sys_kbd_config, conf_client,
|
||||||
xkl_engine);
|
xkl_engine);
|
||||||
|
|
||||||
gswitchit_kbd_config_load_from_gconf (¤t_kbd_config,
|
gkbd_keyboard_config_load_from_gconf (¤t_kbd_config,
|
||||||
&initial_sys_kbd_config);
|
&initial_sys_kbd_config);
|
||||||
|
|
||||||
gswitchit_kbd_config_load_from_x_current (¤t_sys_kbd_config);
|
gkbd_keyboard_config_load_from_x_current (¤t_sys_kbd_config, NULL);
|
||||||
/* Activate - only if different! */
|
/* Activate - only if different! */
|
||||||
if (!gswitchit_kbd_config_equals
|
if (!gkbd_keyboard_config_equals
|
||||||
(¤t_kbd_config, ¤t_sys_kbd_config)) {
|
(¤t_kbd_config, ¤t_sys_kbd_config)) {
|
||||||
if (gswitchit_kbd_config_activate (¤t_kbd_config)) {
|
if (gkbd_keyboard_config_activate (¤t_kbd_config)) {
|
||||||
gswitchit_kbd_config_save_to_gconf_backup
|
gkbd_keyboard_config_save_to_gconf_backup
|
||||||
(&initial_sys_kbd_config);
|
(&initial_sys_kbd_config);
|
||||||
if (pa_callback != NULL) {
|
if (pa_callback != NULL) {
|
||||||
(*pa_callback) (pa_callback_user_data);
|
(*pa_callback) (pa_callback_user_data);
|
||||||
|
@ -174,7 +175,7 @@ apply_xkb_settings (void)
|
||||||
xkl_debug (100,
|
xkl_debug (100,
|
||||||
"Actual KBD configuration was not changed: redundant notification\n");
|
"Actual KBD configuration was not changed: redundant notification\n");
|
||||||
|
|
||||||
gswitchit_kbd_config_term (¤t_sys_kbd_config);
|
gkbd_keyboard_config_term (¤t_sys_kbd_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -183,7 +184,7 @@ gnome_settings_keyboard_xkb_sysconfig_changed_response (GtkDialog * dialog,
|
||||||
what2do)
|
what2do)
|
||||||
{
|
{
|
||||||
GConfClient *conf_client;
|
GConfClient *conf_client;
|
||||||
GSwitchItKbdConfig empty_kbd_config;
|
GkbdKeyboardConfig empty_kbd_config;
|
||||||
gboolean dont_show_again =
|
gboolean dont_show_again =
|
||||||
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
|
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
|
||||||
(g_object_get_data
|
(g_object_get_data
|
||||||
|
@ -194,9 +195,9 @@ gnome_settings_keyboard_xkb_sysconfig_changed_response (GtkDialog * dialog,
|
||||||
|
|
||||||
switch (what2do) {
|
switch (what2do) {
|
||||||
case RESPONSE_USE_X:
|
case RESPONSE_USE_X:
|
||||||
gswitchit_kbd_config_init (&empty_kbd_config, conf_client,
|
gkbd_keyboard_config_init (&empty_kbd_config, conf_client,
|
||||||
xkl_engine);
|
xkl_engine);
|
||||||
gswitchit_kbd_config_save_to_gconf (&empty_kbd_config);
|
gkbd_keyboard_config_save_to_gconf (&empty_kbd_config);
|
||||||
break;
|
break;
|
||||||
case RESPONSE_USE_GNOME:
|
case RESPONSE_USE_GNOME:
|
||||||
/* Do absolutely nothing - just keep things the way they are */
|
/* Do absolutely nothing - just keep things the way they are */
|
||||||
|
@ -215,27 +216,27 @@ static void
|
||||||
gnome_settings_keyboard_xkb_analyze_sysconfig (void)
|
gnome_settings_keyboard_xkb_analyze_sysconfig (void)
|
||||||
{
|
{
|
||||||
GConfClient *conf_client;
|
GConfClient *conf_client;
|
||||||
GSwitchItKbdConfig backup_gconf_kbd_config;
|
GkbdKeyboardConfig backup_gconf_kbd_config;
|
||||||
gboolean is_config_changed, dont_show;
|
gboolean is_config_changed, dont_show;
|
||||||
|
|
||||||
if (!inited_ok)
|
if (!inited_ok)
|
||||||
return;
|
return;
|
||||||
conf_client = gnome_settings_daemon_get_conf_client ();
|
conf_client = gnome_settings_daemon_get_conf_client ();
|
||||||
gswitchit_kbd_config_init (&backup_gconf_kbd_config, conf_client,
|
gkbd_keyboard_config_init (&backup_gconf_kbd_config, conf_client,
|
||||||
xkl_engine);
|
xkl_engine);
|
||||||
gswitchit_kbd_config_init (&initial_sys_kbd_config, conf_client,
|
gkbd_keyboard_config_init (&initial_sys_kbd_config, conf_client,
|
||||||
xkl_engine);
|
xkl_engine);
|
||||||
dont_show =
|
dont_show =
|
||||||
gconf_client_get_bool (conf_client,
|
gconf_client_get_bool (conf_client,
|
||||||
DISABLE_SYSCONF_CHANGED_WARNING_KEY,
|
DISABLE_SYSCONF_CHANGED_WARNING_KEY,
|
||||||
NULL);
|
NULL);
|
||||||
gswitchit_kbd_config_load_from_gconf_backup
|
gkbd_keyboard_config_load_from_gconf_backup
|
||||||
(&backup_gconf_kbd_config);
|
(&backup_gconf_kbd_config);
|
||||||
gswitchit_kbd_config_load_from_x_initial (&initial_sys_kbd_config);
|
gkbd_keyboard_config_load_from_x_initial (&initial_sys_kbd_config, NULL);
|
||||||
|
|
||||||
is_config_changed =
|
is_config_changed =
|
||||||
g_slist_length (backup_gconf_kbd_config.layouts)
|
g_slist_length (backup_gconf_kbd_config.layouts_variants)
|
||||||
&& !gswitchit_kbd_config_equals (&initial_sys_kbd_config,
|
&& !gkbd_keyboard_config_equals (&initial_sys_kbd_config,
|
||||||
&backup_gconf_kbd_config);
|
&backup_gconf_kbd_config);
|
||||||
|
|
||||||
/* config was changed!!! */
|
/* config was changed!!! */
|
||||||
|
@ -252,10 +253,10 @@ gnome_settings_keyboard_xkb_analyze_sysconfig (void)
|
||||||
GtkWidget *msg;
|
GtkWidget *msg;
|
||||||
|
|
||||||
char *gnome_settings =
|
char *gnome_settings =
|
||||||
gswitchit_kbd_config_to_string
|
gkbd_keyboard_config_to_string
|
||||||
(&backup_gconf_kbd_config);
|
(&backup_gconf_kbd_config);
|
||||||
char *system_settings =
|
char *system_settings =
|
||||||
gswitchit_kbd_config_to_string
|
gkbd_keyboard_config_to_string
|
||||||
(&initial_sys_kbd_config);
|
(&initial_sys_kbd_config);
|
||||||
|
|
||||||
msg = gtk_message_dialog_new_with_markup (NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_NONE, /* !! temporary one */
|
msg = gtk_message_dialog_new_with_markup (NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_NONE, /* !! temporary one */
|
||||||
|
@ -299,7 +300,7 @@ gnome_settings_keyboard_xkb_analyze_sysconfig (void)
|
||||||
gtk_widget_show_all (msg);
|
gtk_widget_show_all (msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gswitchit_kbd_config_term (&backup_gconf_kbd_config);
|
gkbd_keyboard_config_term (&backup_gconf_kbd_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -405,11 +406,11 @@ gnome_settings_keyboard_xkb_init (GConfClient * client)
|
||||||
gnome_settings_keyboard_xkb_chk_lcl_xmm ();
|
gnome_settings_keyboard_xkb_chk_lcl_xmm ();
|
||||||
|
|
||||||
gnome_settings_daemon_register_callback
|
gnome_settings_daemon_register_callback
|
||||||
(GSWITCHIT_CONFIG_DIR,
|
(GKBD_DESKTOP_CONFIG_DIR,
|
||||||
(KeyCallbackFunc) apply_settings);
|
(KeyCallbackFunc) apply_settings);
|
||||||
|
|
||||||
gnome_settings_daemon_register_callback
|
gnome_settings_daemon_register_callback
|
||||||
(GSWITCHIT_KBD_CONFIG_DIR,
|
(GKBD_KEYBOARD_CONFIG_DIR,
|
||||||
(KeyCallbackFunc) apply_xkb_settings);
|
(KeyCallbackFunc) apply_xkb_settings);
|
||||||
|
|
||||||
gdk_window_add_filter (NULL, (GdkFilterFunc)
|
gdk_window_add_filter (NULL, (GdkFilterFunc)
|
||||||
|
@ -424,18 +425,17 @@ gnome_settings_keyboard_xkb_init (GConfClient * client)
|
||||||
XKLL_MANAGE_WINDOW_STATES);
|
XKLL_MANAGE_WINDOW_STATES);
|
||||||
|
|
||||||
reg =
|
reg =
|
||||||
g_object_new (keyboard_config_registry_get_type (),
|
g_object_new (gkbd_config_registry_get_type (), NULL);
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gnome_settings_keyboard_xkb_load (GConfClient * client)
|
gnome_settings_keyboard_xkb_load (GConfClient * client)
|
||||||
{
|
{
|
||||||
gswitchit_config_init (¤t_config, client, xkl_engine);
|
gkbd_desktop_config_init (¤t_config, client, xkl_engine);
|
||||||
apply_settings ();
|
apply_settings ();
|
||||||
|
|
||||||
gswitchit_kbd_config_init (¤t_kbd_config, client,
|
gkbd_keyboard_config_init (¤t_kbd_config, client,
|
||||||
xkl_engine);
|
xkl_engine);
|
||||||
apply_xkb_settings ();
|
apply_xkb_settings ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,14 @@
|
||||||
void gnome_settings_keyboard_xkb_init (GConfClient * client);
|
void gnome_settings_keyboard_xkb_init (GConfClient * client);
|
||||||
void gnome_settings_keyboard_xkb_load (GConfClient * client);
|
void gnome_settings_keyboard_xkb_load (GConfClient * client);
|
||||||
|
|
||||||
typedef void ( *PostActivationCallback ) ( void *userData );
|
typedef void (*PostActivationCallback) (void *userData);
|
||||||
|
|
||||||
void gnome_settings_keyboard_xkb_set_post_activation_callback(
|
void
|
||||||
PostActivationCallback fun,
|
gnome_settings_keyboard_xkb_set_post_activation_callback
|
||||||
void *userData );
|
(PostActivationCallback fun, void *userData);
|
||||||
|
|
||||||
GType keyboard_config_registry_get_type (void);
|
GType keyboard_config_registry_get_type (void);
|
||||||
|
|
||||||
extern XklEngine * xkl_engine;
|
extern XklEngine *xkl_engine;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,7 +3,6 @@ schema_in_files= \
|
||||||
apps_gnome_settings_daemon_screensaver.schemas.in \
|
apps_gnome_settings_daemon_screensaver.schemas.in \
|
||||||
apps_gnome_settings_daemon_default_editor.schemas.in \
|
apps_gnome_settings_daemon_default_editor.schemas.in \
|
||||||
desktop_gnome_font_rendering.schemas.in \
|
desktop_gnome_font_rendering.schemas.in \
|
||||||
desktop_gnome_peripherals_keyboard_xkb.schemas.in \
|
|
||||||
apps_gnome_settings_daemon_keybindings.schemas.in
|
apps_gnome_settings_daemon_keybindings.schemas.in
|
||||||
|
|
||||||
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
|
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
|
||||||
|
|
|
@ -1,193 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<gconfschemafile>
|
|
||||||
<schemalist>
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/desktop/gnome/peripherals/keyboard/kbd/overrideSettings</key>
|
|
||||||
<applyto>/desktop/gnome/peripherals/keyboard/kbd/overrideSettings</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>bool</type>
|
|
||||||
<default>true</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>Keyboard settings in gconf will be overridden from the system ASAP (deprecated)</short>
|
|
||||||
<long>Very soon, keyboard settings in gconf will be overridden (from the system configuration)
|
|
||||||
This key has been deprecated since GNOME 2.12, please unset the model, layouts and
|
|
||||||
options keys to get the default system configuration.</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/desktop/gnome/peripherals/keyboard/kbd/model</key>
|
|
||||||
<applyto>/desktop/gnome/peripherals/keyboard/kbd/model</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>string</type>
|
|
||||||
<default></default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>Keyboard model</short>
|
|
||||||
<long>keyboard model</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/desktop/gnome/peripherals/keyboard/kbd/layouts</key>
|
|
||||||
<applyto>/desktop/gnome/peripherals/keyboard/kbd/layouts</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>list</type>
|
|
||||||
<list_type>string</list_type>
|
|
||||||
<default>[]</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>Keyboard layout</short>
|
|
||||||
<long>keyboard layout</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/desktop/gnome/peripherals/keyboard/kbd/options</key>
|
|
||||||
<applyto>/desktop/gnome/peripherals/keyboard/kbd/options</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>list</type>
|
|
||||||
<list_type>string</list_type>
|
|
||||||
<default>[]</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>Keyboard options</short>
|
|
||||||
<long>Keyboard options</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/desktop/gnome/peripherals/keyboard/general/update_handlers</key>
|
|
||||||
<applyto>/desktop/gnome/peripherals/keyboard/general/update_handlers</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>list</type>
|
|
||||||
<list_type>string</list_type>
|
|
||||||
<default>[]</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>Keyboard Update Handlers</short>
|
|
||||||
<long>A collection of scripts to run whenever the keyboard state is
|
|
||||||
reloaded. Useful for re-applying xmodmap based adjustments</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/desktop/gnome/peripherals/keyboard/general/known_file_list</key>
|
|
||||||
<applyto>/desktop/gnome/peripherals/keyboard/general/known_file_list</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>list</type>
|
|
||||||
<list_type>string</list_type>
|
|
||||||
<default>[]</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>modmap file list</short>
|
|
||||||
<long>A list of modmap files available in the $HOME directory.</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/desktop/gnome/peripherals/keyboard/general/defaultGroup</key>
|
|
||||||
<applyto>/desktop/gnome/peripherals/keyboard/general/defaultGroup</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>int</type>
|
|
||||||
<default>-1</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>Default group, assigned on window creation</short>
|
|
||||||
<long>Default group, assigned on window creation</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/desktop/gnome/peripherals/keyboard/general/groupPerWindow</key>
|
|
||||||
<applyto>/desktop/gnome/peripherals/keyboard/general/groupPerWindow</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>bool</type>
|
|
||||||
<default>true</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>Keep and manage separate group per window</short>
|
|
||||||
<long>Keep and manage separate group per window</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/desktop/gnome/peripherals/keyboard/general/handleIndicators</key>
|
|
||||||
<applyto>/desktop/gnome/peripherals/keyboard/general/handleIndicators</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>bool</type>
|
|
||||||
<default>false</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>Save/restore indicators together with layout groups</short>
|
|
||||||
<long>Save/restore indicators together with layout groups</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/desktop/gnome/peripherals/keyboard/general/layoutNamesAsGroupNames</key>
|
|
||||||
<applyto>/desktop/gnome/peripherals/keyboard/general/layoutNamesAsGroupNames</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>bool</type>
|
|
||||||
<default>true</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>Show layout names instead of group names</short>
|
|
||||||
<long>Show layout names instead of group names (only for versions of XFree supporting multiple layouts)</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/desktop/gnome/peripherals/keyboard/general/disable_sysconfig_changed_warning</key>
|
|
||||||
<applyto>/desktop/gnome/peripherals/keyboard/general/disable_sysconfig_changed_warning</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>bool</type>
|
|
||||||
<default>false</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>Suppress the "X sysconfig changed" warning message</short>
|
|
||||||
<long>Suppress the "X sysconfig changed" warning message</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/apps/gswitchit/preview/x</key>
|
|
||||||
<applyto>/apps/gswitchit/preview/x</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>int</type>
|
|
||||||
<default>-1</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>The Keyboard Preview, X offset</short>
|
|
||||||
<long>The Keyboard Preview, X offset</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/apps/gswitchit/preview/y</key>
|
|
||||||
<applyto>/apps/gswitchit/preview/y</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>int</type>
|
|
||||||
<default>-1</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>The Keyboard Preview, Y offset</short>
|
|
||||||
<long>The Keyboard Preview, Y offset</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/apps/gswitchit/preview/width</key>
|
|
||||||
<applyto>/apps/gswitchit/preview/width</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>int</type>
|
|
||||||
<default>-1</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>The Keyboard Preview, width</short>
|
|
||||||
<long>The Keyboard Preview, width</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
<schema>
|
|
||||||
<key>/schemas/apps/gswitchit/preview/height</key>
|
|
||||||
<applyto>/apps/gswitchit/preview/height</applyto>
|
|
||||||
<owner>gnome</owner>
|
|
||||||
<type>int</type>
|
|
||||||
<default>-1</default>
|
|
||||||
<locale name="C">
|
|
||||||
<short>The Keyboard Preview, height</short>
|
|
||||||
<long>The Keyboard Preview, height</long>
|
|
||||||
</locale>
|
|
||||||
</schema>
|
|
||||||
|
|
||||||
</schemalist>
|
|
||||||
</gconfschemafile>
|
|
Loading…
Add table
Add a link
Reference in a new issue