Fix memleaks; add doc comments.
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
|
||||
/**
|
||||
* SECTION:eekboard-client
|
||||
* @short_description: D-Bus proxy of eekboard-server
|
||||
* @short_description: client interface of eekboard service
|
||||
*
|
||||
* The #EekboardClient class provides a client side access to eekboard-server.
|
||||
*/
|
||||
@ -126,7 +126,7 @@ eekboard_name_vanished_callback (GDBusConnection *connection,
|
||||
* @connection: a #GDBusConnection
|
||||
* @cancellable: a #GCancellable
|
||||
*
|
||||
* Create a D-Bus proxy of eekboard-eekboard.
|
||||
* Create a client.
|
||||
*/
|
||||
EekboardClient *
|
||||
eekboard_client_new (GDBusConnection *connection,
|
||||
|
||||
@ -15,6 +15,16 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:eekboard-context-service
|
||||
* @short_description: base server implementation of eekboard input
|
||||
* context service
|
||||
*
|
||||
* The #EekboardService class provides a base server side
|
||||
* implementation of eekboard input context service.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
@ -171,10 +181,9 @@ eekboard_context_service_real_create_keyboard (EekboardContextService *self,
|
||||
|
||||
error = NULL;
|
||||
input = g_file_read (file, NULL, &error);
|
||||
if (input == NULL) {
|
||||
g_object_unref (file);
|
||||
g_object_unref (file);
|
||||
if (input == NULL)
|
||||
return NULL;
|
||||
}
|
||||
layout = eek_xml_layout_new (G_INPUT_STREAM(input));
|
||||
}
|
||||
keyboard = eek_keyboard_new (layout, CSW, CSH);
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
/**
|
||||
* SECTION:eekboard-context
|
||||
* @short_description: input context maintained by #EekboardServer.
|
||||
* @short_description: client interface of eekboard input context service
|
||||
*
|
||||
* The #EekboardContext class provides a client access to remote input
|
||||
* context.
|
||||
@ -91,10 +91,13 @@ eekboard_context_real_g_signal (GDBusProxy *self,
|
||||
g_return_if_fail (variant != NULL);
|
||||
|
||||
serializable = eek_serializable_deserialize (variant);
|
||||
g_variant_unref (variant);
|
||||
|
||||
g_return_if_fail (EEK_IS_SYMBOL(serializable));
|
||||
|
||||
g_signal_emit_by_name (context, "key-pressed",
|
||||
keyname, EEK_SYMBOL(serializable), modifiers);
|
||||
g_object_unref (serializable);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -15,6 +15,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:eekboard-service
|
||||
* @short_description: base server implementation of eekboard service
|
||||
*
|
||||
* The #EekboardService class provides a base server side
|
||||
* implementation of eekboard service.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
@ -221,6 +230,12 @@ eekboard_service_class_init (EekboardServiceClass *klass)
|
||||
gobject_class->dispose = eekboard_service_dispose;
|
||||
gobject_class->finalize = eekboard_service_finalize;
|
||||
|
||||
/**
|
||||
* EekboardService::destroyed:
|
||||
* @service: an #EekboardService
|
||||
*
|
||||
* The ::destroyed signal is emitted when the service is vanished.
|
||||
*/
|
||||
signals[DESTROYED] =
|
||||
g_signal_new (I_("destroyed"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
@ -348,7 +363,9 @@ handle_method_call (GDBusConnection *connection,
|
||||
object_path = g_strdup_printf (EEKBOARD_CONTEXT_SERVICE_PATH, context_id++);
|
||||
g_assert (klass->create_context);
|
||||
context = klass->create_context (service, client_name, object_path);
|
||||
g_object_set_data (G_OBJECT(context), "owner", g_strdup (sender));
|
||||
g_object_set_data_full (G_OBJECT(context),
|
||||
"owner", g_strdup (sender),
|
||||
(GDestroyNotify)g_free);
|
||||
g_hash_table_insert (priv->context_hash,
|
||||
object_path,
|
||||
context);
|
||||
|
||||
Reference in New Issue
Block a user