Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
squeekboard
Commits
aca9a4dc
Commit
aca9a4dc
authored
Sep 15, 2011
by
Daiki Ueno
Browse files
Fix some mistakes.
parent
953c35bd
Changes
6
Hide whitespace changes
Inline
Side-by-side
eekboard/eekboard-client.c
View file @
aca9a4dc
...
...
@@ -360,8 +360,9 @@ eekboard_client_destroy_context (EekboardClient *client,
g_return_if_fail
(
EEKBOARD_IS_CLIENT
(
client
));
g_return_if_fail
(
EEKBOARD_IS_CONTEXT
(
context
));
send_destroy_context
(
client
,
context
,
cancellable
);
priv
=
EEKBOARD_CLIENT_GET_PRIVATE
(
client
);
object_path
=
g_dbus_proxy_get_object_path
(
G_DBUS_PROXY
(
context
));
g_hash_table_remove
(
priv
->
context_hash
,
object_path
);
send_destroy_context
(
client
,
context
,
cancellable
);
}
src/client-main.c
View file @
aca9a4dc
...
...
@@ -103,17 +103,17 @@ enum FocusListenerType {
};
static
gboolean
set_keyboards
(
Client
*
client
,
gchar
**
keyboards
)
set_keyboards
(
Client
*
client
,
const
gchar
*
const
*
keyboards
)
{
if
(
g_strv_length
(
keyboards
)
==
0
)
{
if
(
g_strv_length
(
(
gchar
**
)
keyboards
)
==
0
)
{
if
(
!
client_enable_xkl
(
client
))
{
g_printerr
(
"Can't register xklavier event listeners
\n
"
);
return
FALSE
;
}
}
else
{
if
(
!
client_set_keyboards
(
client
,
keyboards
))
{
gchar
*
str
=
g_strjoinv
(
", "
,
keyboards
);
gchar
*
str
=
g_strjoinv
(
", "
,
(
gchar
**
)
keyboards
);
g_printerr
(
"Can't set keyboards
\"
%s
\"\n
"
,
str
);
g_free
(
str
);
return
FALSE
;
...
...
@@ -315,7 +315,7 @@ main (int argc, char **argv)
g_object_unref
(
eekboard
);
keyboards
=
g_settings_get_strv
(
settings
,
"keyboards"
);
if
(
!
set_keyboards
(
client
,
keyboards
))
{
if
(
!
set_keyboards
(
client
,
(
const
gchar
*
const
*
)
keyboards
))
{
g_strfreev
(
keyboards
);
retval
=
1
;
goto
out
;
...
...
src/client.c
View file @
aca9a4dc
...
...
@@ -128,7 +128,7 @@ static gboolean keystroke_listener_cb (const AtspiDeviceEvent *stroke,
void
*
user_data
);
#endif
/* HAVE_ATSPI */
static
gboolean
set_keyboards
(
Client
*
client
,
const
gchar
*
*
keyboard
);
const
gchar
*
const
*
keyboard
);
static
gboolean
set_keyboards_from_xkl
(
Client
*
client
);
#ifdef HAVE_XTEST
...
...
@@ -298,8 +298,8 @@ client_init (Client *client)
}
gboolean
client_set_keyboards
(
Client
*
client
,
const
gchar
**
keyboards
)
client_set_keyboards
(
Client
*
client
,
const
gchar
*
const
*
keyboards
)
{
gboolean
retval
;
retval
=
set_keyboards
(
client
,
keyboards
);
...
...
@@ -707,11 +707,11 @@ on_xkl_config_changed (XklEngine *xklengine,
}
static
gboolean
set_keyboards
(
Client
*
client
,
const
gchar
**
keyboards
)
set_keyboards
(
Client
*
client
,
const
gchar
*
const
*
keyboards
)
{
guint
keyboard_id
;
gchar
**
p
;
const
gchar
*
const
*
p
;
GSList
*
head
=
NULL
;
if
(
client
->
keyboards
)
...
...
@@ -955,7 +955,7 @@ send_fake_key_events (Client *client,
/* If symbol is a text, convert chars in it to keysym */
if
(
EEK_IS_TEXT
(
symbol
))
{
gchar
*
utf8
=
eek_text_get_text
(
EEK_TEXT
(
symbol
));
const
gchar
*
utf8
=
eek_text_get_text
(
EEK_TEXT
(
symbol
));
glong
items_written
;
gunichar
*
ucs4
=
g_utf8_to_ucs4_fast
(
utf8
,
-
1
,
&
items_written
);
gint
i
;
...
...
src/client.h
View file @
aca9a4dc
...
...
@@ -31,25 +31,25 @@ G_BEGIN_DECLS
typedef
struct
_Client
Client
;
Client
*
client_new
(
GDBusConnection
*
connection
);
Client
*
client_new
(
GDBusConnection
*
connection
);
gboolean
client_set_keyboards
(
Client
*
client
,
const
gchar
*
*
keyboard
);
gboolean
client_set_keyboards
(
Client
*
client
,
const
gchar
*
const
*
keyboard
);
gboolean
client_enable_xkl
(
Client
*
client
);
void
client_disable_xkl
(
Client
*
client
);
gboolean
client_enable_xkl
(
Client
*
client
);
void
client_disable_xkl
(
Client
*
client
);
gboolean
client_enable_atspi_focus
(
Client
*
client
);
void
client_disable_atspi_focus
(
Client
*
client
);
gboolean
client_enable_atspi_focus
(
Client
*
client
);
void
client_disable_atspi_focus
(
Client
*
client
);
gboolean
client_enable_atspi_keystroke
(
Client
*
client
);
void
client_disable_atspi_keystroke
(
Client
*
client
);
gboolean
client_enable_atspi_keystroke
(
Client
*
client
);
void
client_disable_atspi_keystroke
(
Client
*
client
);
gboolean
client_enable_xtest
(
Client
*
client
);
void
client_disable_xtest
(
Client
*
client
);
gboolean
client_enable_xtest
(
Client
*
client
);
void
client_disable_xtest
(
Client
*
client
);
gboolean
client_enable_ibus_focus
(
Client
*
client
);
void
client_disable_ibus_focus
(
Client
*
client
);
gboolean
client_enable_ibus_focus
(
Client
*
client
);
void
client_disable_ibus_focus
(
Client
*
client
);
G_END_DECLS
#endif
/* CLIENT_H */
src/preferences-dialog.c
View file @
aca9a4dc
...
...
@@ -67,8 +67,8 @@ get_strv (GValue *value,
GVariant
*
variant
,
gpointer
user_data
)
{
gchar
*
strv
=
g_variant_get_strv
(
variant
,
NULL
);
gchar
*
text
=
g_strjoinv
(
", "
,
strv
);
const
gchar
*
*
strv
=
g_variant_get_strv
(
variant
,
NULL
);
gchar
*
text
=
g_strjoinv
(
", "
,
(
gchar
**
)
strv
);
g_free
(
strv
);
g_value_set_string
(
value
,
text
);
return
TRUE
;
...
...
@@ -79,14 +79,14 @@ set_strv (const GValue *value,
const
GVariantType
*
expected_type
,
gpointer
user_data
)
{
gchar
*
text
=
g_value_get_string
(
value
);
const
gchar
*
text
=
g_value_get_string
(
value
);
gchar
**
strv
=
g_strsplit
(
text
,
","
,
-
1
),
**
p
;
GVariant
*
variant
;
for
(
p
=
strv
;
*
p
!=
NULL
;
p
++
)
g_strstrip
(
*
p
);
variant
=
g_variant_new_strv
(
strv
,
-
1
);
variant
=
g_variant_new_strv
(
(
const
gchar
*
const
*
)
strv
,
-
1
);
g_strfreev
(
strv
);
return
variant
;
}
...
...
src/server-context-service.c
View file @
aca9a4dc
...
...
@@ -546,14 +546,14 @@ server_context_service_init (ServerContextService *context)
g_settings_bind_with_mapping
(
context
->
settings
,
"size-constraint-landscape"
,
context
,
"size-constraint-landscape"
,
G_SETTINGS_BIND_GET
,
(
GSettingsBindGetMapping
*
)
g_value_set_variant
,
(
GSettingsBindGetMapping
)
g_value_set_variant
,
NULL
,
NULL
,
NULL
);
g_settings_bind_with_mapping
(
context
->
settings
,
"size-constraint-portrait"
,
context
,
"size-constraint-portrait"
,
G_SETTINGS_BIND_GET
,
(
GSettingsBindGetMapping
*
)
g_value_set_variant
,
(
GSettingsBindGetMapping
)
g_value_set_variant
,
NULL
,
NULL
,
NULL
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment