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
|
@ -140,10 +140,11 @@ numlock_NumLock_modifier_mask ()
|
|||
static void
|
||||
numlock_set_xkb_state (gboolean new_state)
|
||||
{
|
||||
unsigned int num_mask;
|
||||
Display *dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
if (new_state != NUMLOCK_STATE_ON && new_state != NUMLOCK_STATE_OFF)
|
||||
return;
|
||||
unsigned num_mask = numlock_NumLock_modifier_mask ();
|
||||
num_mask = numlock_NumLock_modifier_mask ();
|
||||
XkbLockModifiers (dpy, XkbUseCoreKbd, num_mask, new_state ? num_mask : 0);
|
||||
}
|
||||
|
||||
|
@ -162,12 +163,13 @@ numlock_gconf_state_key ()
|
|||
static int
|
||||
numlock_get_gconf_state ()
|
||||
{
|
||||
int curr_state;
|
||||
GConfClient *gcc;
|
||||
GError *err = NULL;
|
||||
char *key = numlock_gconf_state_key ();
|
||||
if (!key) return NUMLOCK_STATE_UNKNOWN;
|
||||
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;
|
||||
g_clear_error (&err);
|
||||
g_free (key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue