]> git.0d.be Git - empathy.git/commitdiff
EmpathyContactChooser: remove EmpathyTpChat property
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 5 Aug 2011 10:08:20 +0000 (12:08 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 5 Aug 2011 13:04:05 +0000 (15:04 +0200)
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
libempathy-gtk/empathy-contact-chooser.h
src/empathy-invite-participant-dialog.c

index f6fa59d3b4497be2fc63d560c5016dbbc7d685b0..a4a0aad1df5848efd83bc9d86286015337705f49 100644 (file)
 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);
 }
 
index b6e45c220d90db2c1b7977aadf98aca43588f651..ba95bcfbe8a0b4d05cec89d9ed35139dca1bef60 100644 (file)
@@ -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);
index 4023ebacdbf4d6855c0e7bc0e9461c823dbda48f..ec5a275d4f3812b503dffd796407a5016d9e369d 100644 (file)
@@ -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);