/* a serial number used to generate a unique name of a bus. */
guint id;
- GMutex *dispatch_lock;
+ GMutex dispatch_lock;
GList *dispatch_queue;
- GMutex *forward_lock;
+ GMutex forward_lock;
GList *forward_queue;
/* a list of BusMethodCall to be used to reply when services are
NULL,
(GDestroyNotify) bus_name_service_free);
- dbus->dispatch_lock = g_mutex_new ();
- dbus->forward_lock = g_mutex_new ();
+ g_mutex_init (&dbus->dispatch_lock);
+ g_mutex_init (&dbus->forward_lock);
/* other members are automatically zero-initialized. */
}
(GDestroyNotify) bus_method_call_free);
dbus->start_service_calls = NULL;
+ g_mutex_clear (&dbus->dispatch_lock);
+ g_mutex_clear (&dbus->forward_lock);
+
/* FIXME destruct _lock and _queue members. */
IBUS_OBJECT_CLASS(bus_dbus_impl_parent_class)->destroy ((IBusObject *) dbus);
}
{
g_return_val_if_fail (dbus->forward_queue != NULL, FALSE);
- g_mutex_lock (dbus->forward_lock);
+ g_mutex_lock (&dbus->forward_lock);
BusForwardData *data = (BusForwardData *) dbus->forward_queue->data;
dbus->forward_queue = g_list_delete_link (dbus->forward_queue, dbus->forward_queue);
gboolean has_message = (dbus->forward_queue != NULL);
- g_mutex_unlock (dbus->forward_lock);
+ g_mutex_unlock (&dbus->forward_lock);
do {
const gchar *destination = g_dbus_message_get_destination (data->message);
data->message = g_object_ref (message);
data->sender_connection = g_object_ref (connection);
- g_mutex_lock (dbus->forward_lock);
+ g_mutex_lock (&dbus->forward_lock);
gboolean is_running = (dbus->forward_queue != NULL);
dbus->forward_queue = g_list_append (dbus->forward_queue, data);
- g_mutex_unlock (dbus->forward_lock);
+ g_mutex_unlock (&dbus->forward_lock);
if (!is_running) {
g_idle_add_full (G_PRIORITY_DEFAULT,
if (G_UNLIKELY (IBUS_OBJECT_DESTROYED (dbus))) {
/* dbus was destryed */
- g_mutex_lock (dbus->dispatch_lock);
+ g_mutex_lock (&dbus->dispatch_lock);
g_list_free_full (dbus->dispatch_queue,
(GDestroyNotify) bus_dispatch_data_free);
dbus->dispatch_queue = NULL;
- g_mutex_unlock (dbus->dispatch_lock);
+ g_mutex_unlock (&dbus->dispatch_lock);
return FALSE; /* return FALSE to prevent this callback to be called again. */
}
/* remove fist node */
- g_mutex_lock (dbus->dispatch_lock);
+ g_mutex_lock (&dbus->dispatch_lock);
BusDispatchData *data = (BusDispatchData *) dbus->dispatch_queue->data;
dbus->dispatch_queue = g_list_delete_link (dbus->dispatch_queue, dbus->dispatch_queue);
gboolean has_message = (dbus->dispatch_queue != NULL);
- g_mutex_unlock (dbus->dispatch_lock);
+ g_mutex_unlock (&dbus->dispatch_lock);
GList *link = NULL;
GList *recipients = NULL;
g_object_set_qdata ((GObject *) message, dispatched_quark, GINT_TO_POINTER (1));
/* append dispatch data into the queue, and start idle task if necessary */
- g_mutex_lock (dbus->dispatch_lock);
+ g_mutex_lock (&dbus->dispatch_lock);
gboolean is_running = (dbus->dispatch_queue != NULL);
dbus->dispatch_queue = g_list_append (dbus->dispatch_queue,
bus_dispatch_data_new (message, skip_connection));
- g_mutex_unlock (dbus->dispatch_lock);
+ g_mutex_unlock (&dbus->dispatch_lock);
if (!is_running) {
g_idle_add_full (G_PRIORITY_DEFAULT,
(GSourceFunc) bus_dbus_impl_dispatch_message_by_rule_idle_cb,
/* always install snooper */
- if (_key_snooper_id == 0)
+ if (_key_snooper_id == 0) {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
_key_snooper_id = gtk_key_snooper_install (_key_snooper_cb, NULL);
+#pragma GCC diagnostic pop
+ }
_daemon_name_watch_id = g_bus_watch_name (G_BUS_TYPE_SESSION,
IBUS_SERVICE_IBUS,
{
if (_key_snooper_id != 0) {
IDEBUG ("snooper is terminated.");
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
gtk_key_snooper_remove (_key_snooper_id);
+#pragma GCC diagnostic pop
_key_snooper_id = 0;
}
if (!g_queue_is_empty (ibusimcontext->events_queue)) {
GdkEventKey *event;
- while (event = g_queue_pop_head (ibusimcontext->events_queue)) {
+ while ((event = g_queue_pop_head (ibusimcontext->events_queue))) {
_process_key_event (context, event);
gdk_event_free ((GdkEvent *)event);
}
%{_bindir}/ibus
%{_bindir}/ibus-daemon
%{_bindir}/ibus-setup
-%{_datadir}/ibus/*
+%{_datadir}/ibus/component/gtkpanel.xml
+%{_datadir}/ibus/component/simple.xml
+%{_datadir}/ibus/keymaps/*
+%{_datadir}/ibus/setup/*
+
+
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*/apps/*
%if %{build_python_library}
%{_libexecdir}/ibus-x11
%{_libexecdir}/ibus-engine-simple
# %{_sysconfdir}/xdg/autostart/ibus.desktop
-%{_sysconfdir}/bash_completion.d/ibus.bash
+%{_datadir}/bash-completion/completions/ibus.bash
%config %{_xinputconf}
%files libs
%files gconf
%defattr(-,root,root,-)
+%{_datadir}/ibus/component/gconf.xml
%{_libexecdir}/ibus-gconf
%{_sysconfdir}/gconf/schemas/ibus.schemas
%files dconf
%defattr(-,root,root,-)
+%{_datadir}/ibus/component/dconf.xml
%{_libexecdir}/ibus-dconf
%{_sysconfdir}/dconf/db/ibus.d
%{_sysconfdir}/dconf/profile/ibus