Fixes #321778
2005-11-21 Jens Granseuer <jensgr@gmx.net> Fixes #321778 * gnome-settings-daemon/gnome-settings-keyboard.c (numlock_set_xkb_state, numlock_get_gconf_state): C89 compilation fixes.
This commit is contained in:
parent
53ea9368c6
commit
3bb09e2a1a
2 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2005-11-21 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
Fixes #321778
|
||||||
|
|
||||||
|
* gnome-settings-daemon/gnome-settings-keyboard.c
|
||||||
|
(numlock_set_xkb_state, numlock_get_gconf_state): C89 compilation
|
||||||
|
fixes.
|
||||||
|
|
||||||
2005-11-14 Sebastien Bacher <seb128@debian.org>
|
2005-11-14 Sebastien Bacher <seb128@debian.org>
|
||||||
|
|
||||||
* gnome-settings-xsettings.c:
|
* gnome-settings-xsettings.c:
|
||||||
|
|
|
@ -140,10 +140,11 @@ numlock_NumLock_modifier_mask ()
|
||||||
static void
|
static void
|
||||||
numlock_set_xkb_state (gboolean new_state)
|
numlock_set_xkb_state (gboolean new_state)
|
||||||
{
|
{
|
||||||
|
unsigned int num_mask;
|
||||||
Display *dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
Display *dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||||
if (new_state != NUMLOCK_STATE_ON && new_state != NUMLOCK_STATE_OFF)
|
if (new_state != NUMLOCK_STATE_ON && new_state != NUMLOCK_STATE_OFF)
|
||||||
return;
|
return;
|
||||||
unsigned num_mask = numlock_NumLock_modifier_mask ();
|
num_mask = numlock_NumLock_modifier_mask ();
|
||||||
XkbLockModifiers (dpy, XkbUseCoreKbd, num_mask, new_state ? num_mask : 0);
|
XkbLockModifiers (dpy, XkbUseCoreKbd, num_mask, new_state ? num_mask : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,12 +163,13 @@ numlock_gconf_state_key ()
|
||||||
static int
|
static int
|
||||||
numlock_get_gconf_state ()
|
numlock_get_gconf_state ()
|
||||||
{
|
{
|
||||||
|
int curr_state;
|
||||||
GConfClient *gcc;
|
GConfClient *gcc;
|
||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
char *key = numlock_gconf_state_key ();
|
char *key = numlock_gconf_state_key ();
|
||||||
if (!key) return NUMLOCK_STATE_UNKNOWN;
|
if (!key) return NUMLOCK_STATE_UNKNOWN;
|
||||||
gcc = gnome_settings_daemon_get_conf_client ();
|
gcc = gnome_settings_daemon_get_conf_client ();
|
||||||
int curr_state = gconf_client_get_bool (gcc, key, &err);
|
curr_state = gconf_client_get_bool (gcc, key, &err);
|
||||||
if (err) curr_state = NUMLOCK_STATE_UNKNOWN;
|
if (err) curr_state = NUMLOCK_STATE_UNKNOWN;
|
||||||
g_clear_error (&err);
|
g_clear_error (&err);
|
||||||
g_free (key);
|
g_free (key);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue