diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-08-05 18:08:20 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-08-05 21:04:05 +0800 |
commit | 8e839c45aea812bef072cc3365c58f366adc104e (patch) | |
tree | 4c38fd62505913c011a8824321424a62be6345f6 | |
parent | 508d001793fdcb91dc6305c547a9b2f205acdad1 (diff) | |
download | gsoc2013-empathy-8e839c45aea812bef072cc3365c58f366adc104e.tar gsoc2013-empathy-8e839c45aea812bef072cc3365c58f366adc104e.tar.gz gsoc2013-empathy-8e839c45aea812bef072cc3365c58f366adc104e.tar.bz2 gsoc2013-empathy-8e839c45aea812bef072cc3365c58f366adc104e.tar.lz gsoc2013-empathy-8e839c45aea812bef072cc3365c58f366adc104e.tar.xz gsoc2013-empathy-8e839c45aea812bef072cc3365c58f366adc104e.tar.zst gsoc2013-empathy-8e839c45aea812bef072cc3365c58f366adc104e.zip |
EmpathyContactChooser: remove EmpathyTpChat property
It's not used any more and a generic widget shouldn't need it.
https://bugzilla.gnome.org/show_bug.cgi?id=656020
-rw-r--r-- | libempathy-gtk/empathy-contact-chooser.c | 61 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contact-chooser.h | 2 | ||||
-rw-r--r-- | src/empathy-invite-participant-dialog.c | 2 |
3 files changed, 3 insertions, 62 deletions
diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c index f6fa59d3b..a4a0aad1d 100644 --- a/libempathy-gtk/empathy-contact-chooser.c +++ b/libempathy-gtk/empathy-contact-chooser.c @@ -20,11 +20,6 @@ G_DEFINE_TYPE (EmpathyContactChooser, empathy_contact_chooser, GTK_TYPE_BOX); -enum -{ - PROP_TP_CHAT = 1 -}; - enum { SIG_SELECTION_CHANGED, LAST_SIGNAL @@ -36,7 +31,6 @@ typedef struct _AddTemporaryIndividualCtx AddTemporaryIndividualCtx; struct _EmpathyContactChooserPrivate { - EmpathyTpChat *tp_chat; TpAccountManager *account_mgr; EmpathyIndividualStore *store; @@ -53,47 +47,6 @@ struct _EmpathyContactChooserPrivate gpointer filter_data; }; -static void -contact_chooser_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec) -{ - EmpathyContactChooser *self = (EmpathyContactChooser *) - object; - - switch (param_id) - { - case PROP_TP_CHAT: - g_value_set_object (value, self->priv->tp_chat); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - }; -} - -static void -contact_chooser_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec) -{ - EmpathyContactChooser *self = (EmpathyContactChooser *) - object; - - switch (param_id) - { - case PROP_TP_CHAT: - g_assert (self->priv->tp_chat == NULL); /* construct-only */ - self->priv->tp_chat = g_value_dup_object (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - }; -} - struct _AddTemporaryIndividualCtx { EmpathyContactChooser *self; @@ -139,7 +92,6 @@ contact_chooser_dispose (GObject *object) tp_clear_pointer (&self->priv->add_temp_ctx, add_temporary_individual_ctx_free); - tp_clear_object (&self->priv->tp_chat); tp_clear_object (&self->priv->store); tp_clear_pointer (&self->priv->search_words, g_ptr_array_unref); tp_clear_pointer (&self->priv->search_str, g_free); @@ -156,19 +108,11 @@ empathy_contact_chooser_class_init ( { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = contact_chooser_get_property; - object_class->set_property = contact_chooser_set_property; object_class->dispose = contact_chooser_dispose; g_type_class_add_private (object_class, sizeof (EmpathyContactChooserPrivate)); - g_object_class_install_property (object_class, - PROP_TP_CHAT, - g_param_spec_object ("tp-chat", "EmpathyTpChat", "EmpathyTpChat", - EMPATHY_TYPE_TP_CHAT, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); - signals[SIG_SELECTION_CHANGED] = g_signal_new ("selection-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, @@ -395,13 +339,10 @@ empathy_contact_chooser_init (EmpathyContactChooser *self) } GtkWidget * -empathy_contact_chooser_new (EmpathyTpChat *tp_chat) +empathy_contact_chooser_new (void) { - g_return_val_if_fail (EMPATHY_IS_TP_CHAT (tp_chat), NULL); - return g_object_new (EMPATHY_TYPE_CONTACT_CHOOSER, "orientation", GTK_ORIENTATION_VERTICAL, - "tp-chat", tp_chat, NULL); } diff --git a/libempathy-gtk/empathy-contact-chooser.h b/libempathy-gtk/empathy-contact-chooser.h index b6e45c220..ba95bcfbe 100644 --- a/libempathy-gtk/empathy-contact-chooser.h +++ b/libempathy-gtk/empathy-contact-chooser.h @@ -52,7 +52,7 @@ struct _EmpathyContactChooserClass GType empathy_contact_chooser_get_type (void); -GtkWidget * empathy_contact_chooser_new (EmpathyTpChat *tp_chat); +GtkWidget * empathy_contact_chooser_new (void); FolksIndividual * empathy_contact_chooser_dup_selected ( EmpathyContactChooser *self); diff --git a/src/empathy-invite-participant-dialog.c b/src/empathy-invite-participant-dialog.c index 4023ebacd..ec5a275d4 100644 --- a/src/empathy-invite-participant-dialog.c +++ b/src/empathy-invite-participant-dialog.c @@ -213,7 +213,7 @@ invite_participant_dialog_constructed (GObject *object) gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); /* contact chooser */ - self->priv->chooser = empathy_contact_chooser_new (self->priv->tp_chat); + self->priv->chooser = empathy_contact_chooser_new (); empathy_contact_chooser_set_filter_func ( EMPATHY_CONTACT_CHOOSER (self->priv->chooser), filter_individual, self); |