[gnome-shell] st-im-text: Simplify dispose
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st-im-text: Simplify dispose
- Date: Fri, 31 Aug 2012 00:20:04 +0000 (UTC)
commit 85d993386ad6694d9db602973ef17e75e17c1fd1
Author: Rui Matos <tiagomatos gmail com>
Date: Fri Aug 31 01:50:25 2012 +0200
st-im-text: Simplify dispose
There's no need to disconnect signal handlers on a private object that
we are destroying.
src/st/st-im-text.c | 20 +-------------------
1 files changed, 1 insertions(+), 19 deletions(-)
---
diff --git a/src/st/st-im-text.c b/src/st/st-im-text.c
index d5e287a..ddd95b8 100644
--- a/src/st/st-im-text.c
+++ b/src/st/st-im-text.c
@@ -77,13 +77,6 @@ struct _StIMTextPrivate
guint need_im_reset : 1;
};
-static void st_im_text_commit_cb (GtkIMContext *context,
- const gchar *str,
- StIMText *imtext);
-
-static void st_im_text_preedit_changed_cb (GtkIMContext *context,
- StIMText *imtext);
-
G_DEFINE_TYPE (StIMText, st_im_text, CLUTTER_TYPE_TEXT)
static void
@@ -91,18 +84,7 @@ st_im_text_dispose (GObject *object)
{
StIMTextPrivate *priv = ST_IM_TEXT (object)->priv;
- if (priv->im_context != NULL)
- {
- g_signal_handlers_disconnect_by_func (priv->im_context,
- (void *) st_im_text_commit_cb,
- object);
- g_signal_handlers_disconnect_by_func (priv->im_context,
- (void *) st_im_text_preedit_changed_cb,
- object);
-
- g_object_unref (priv->im_context);
- priv->im_context = NULL;
- }
+ g_clear_object (&priv->im_context);
G_OBJECT_CLASS (st_im_text_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]