blob: 900fd294de15993329d5fd6d509270cf5937494e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#include <errno.h>
#include <string.h>
#include <locale.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <fcntl.h>
#include <libxml/xpath.h>
#include "config.h"
#include "xklavier_private.h"
#include "xklavier_private_xmm.h"
#define XK_XKB_KEYS
#include <X11/keysymdef.h>
void xkl_xmm_config_init( void )
{
}
gboolean xkl_xmm_config_registry_load( void )
{
struct stat stat_buf;
gchar file_name[MAXPATHLEN] = "";
gchar* rf = xkl_rules_set_get_name( "" );
if ( rf == NULL || rf[0] == '\0' )
return FALSE;
g_snprintf( file_name, sizeof file_name, XMODMAP_BASE "/%s.xml", rf );
if( stat( file_name, &stat_buf ) != 0 )
{
xkl_last_error_message = "No rules file found";
return FALSE;
}
return xkl_config_registry_load_from_file( file_name );
}
gboolean xkl_xmm_config_activate( const XklConfigRec *data )
{
gboolean rv;
rv = xkl_set_names_prop( xkl_vtable->base_config_atom,
current_xmm_rules,
data );
if( rv )
xkl_xmm_group_lock( 0 );
return rv;
}
|