[empathy] EmpathyContactChooser: remove EmpathyTpChat property



commit 8e839c45aea812bef072cc3365c58f366adc104e
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Fri Aug 5 12:08:20 2011 +0200

    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

 libempathy-gtk/empathy-contact-chooser.c |   61 +-----------------------------
 libempathy-gtk/empathy-contact-chooser.h |    2 +-
 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 f6fa59d..a4a0aad 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 b6e45c2..ba95bcf 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 4023eba..ec5a275 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]