aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorLaurent Contzen <lcontzen@gmail.com>2012-08-04 20:38:25 +0800
committerLaurent Contzen <lcontzen@gmail.com>2012-08-06 17:02:19 +0800
commitb3c361fdca7f6a0bb2a63e676cd0a5d488261127 (patch)
treeb3a500a60b01bb7fb6ece7eb118a2a2669adbacb /libempathy-gtk
parent765db7cfd0a0aa7aea9f0f717a7762ad79e14ef9 (diff)
downloadgsoc2013-empathy-b3c361fdca7f6a0bb2a63e676cd0a5d488261127.tar
gsoc2013-empathy-b3c361fdca7f6a0bb2a63e676cd0a5d488261127.tar.gz
gsoc2013-empathy-b3c361fdca7f6a0bb2a63e676cd0a5d488261127.tar.bz2
gsoc2013-empathy-b3c361fdca7f6a0bb2a63e676cd0a5d488261127.tar.lz
gsoc2013-empathy-b3c361fdca7f6a0bb2a63e676cd0a5d488261127.tar.xz
gsoc2013-empathy-b3c361fdca7f6a0bb2a63e676cd0a5d488261127.tar.zst
gsoc2013-empathy-b3c361fdca7f6a0bb2a63e676cd0a5d488261127.zip
Removed the manager from the view, relying only on the model
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-roster-view.c31
-rw-r--r--libempathy-gtk/empathy-roster-view.h7
2 files changed, 3 insertions, 35 deletions
diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c
index 2b8154ecc..06a4ebf94 100644
--- a/libempathy-gtk/empathy-roster-view.c
+++ b/libempathy-gtk/empathy-roster-view.c
@@ -17,8 +17,7 @@ G_DEFINE_TYPE (EmpathyRosterView, empathy_roster_view, EGG_TYPE_LIST_BOX)
enum
{
- PROP_MANAGER = 1,
- PROP_MODEL,
+ PROP_MODEL = 1,
PROP_SHOW_OFFLINE,
PROP_SHOW_GROUPS,
PROP_EMPTY,
@@ -40,8 +39,6 @@ static guint signals[LAST_SIGNAL];
struct _EmpathyRosterViewPriv
{
- EmpathyIndividualManager *manager;
-
/* FolksIndividual (borrowed) -> GHashTable (
* (gchar * group_name) -> EmpathyRosterContact (borrowed))
*
@@ -114,9 +111,6 @@ empathy_roster_view_get_property (GObject *object,
switch (property_id)
{
- case PROP_MANAGER:
- g_value_set_object (value, self->priv->manager);
- break;
case PROP_MODEL:
g_value_set_object (value, self->priv->model);
break;
@@ -145,10 +139,6 @@ empathy_roster_view_set_property (GObject *object,
switch (property_id)
{
- case PROP_MANAGER:
- g_assert (self->priv->manager == NULL); /* construct only */
- self->priv->manager = g_value_dup_object (value);
- break;
case PROP_MODEL:
g_assert (self->priv->model == NULL);
self->priv->model = g_value_dup_object (value);
@@ -1076,7 +1066,6 @@ empathy_roster_view_constructed (GObject *object)
if (chain_up != NULL)
chain_up (object);
- g_assert (EMPATHY_IS_INDIVIDUAL_MANAGER (self->priv->manager));
g_assert (EMPATHY_IS_ROSTER_MODEL (self->priv->model));
populate_view (self);
@@ -1113,7 +1102,6 @@ empathy_roster_view_dispose (GObject *object)
stop_flashing (self);
empathy_roster_view_set_live_search (self, NULL);
- g_clear_object (&self->priv->manager);
g_clear_object (&self->priv->model);
if (chain_up != NULL)
@@ -1341,12 +1329,6 @@ empathy_roster_view_class_init (
box_class->child_activated = empathy_roster_view_child_activated;
- spec = g_param_spec_object ("manager", "Manager",
- "EmpathyIndividualManager",
- EMPATHY_TYPE_INDIVIDUAL_MANAGER,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (oclass, PROP_MANAGER, spec);
-
spec = g_param_spec_object ("model", "Model",
"EmpathyRosterModel",
EMPATHY_TYPE_ROSTER_MODEL,
@@ -1420,24 +1402,15 @@ empathy_roster_view_init (EmpathyRosterView *self)
}
GtkWidget *
-empathy_roster_view_new (EmpathyIndividualManager *manager,
- EmpathyRosterModel *model)
+empathy_roster_view_new (EmpathyRosterModel *model)
{
- g_return_val_if_fail (EMPATHY_IS_INDIVIDUAL_MANAGER (manager), NULL);
g_return_val_if_fail (EMPATHY_IS_ROSTER_MODEL (model), NULL);
return g_object_new (EMPATHY_TYPE_ROSTER_VIEW,
- "manager", manager,
"model", model,
NULL);
}
-EmpathyIndividualManager *
-empathy_roster_view_get_manager (EmpathyRosterView *self)
-{
- return self->priv->manager;
-}
-
void
empathy_roster_view_show_offline (EmpathyRosterView *self,
gboolean show)
diff --git a/libempathy-gtk/empathy-roster-view.h b/libempathy-gtk/empathy-roster-view.h
index fd4f13ec1..6d5d760a3 100644
--- a/libempathy-gtk/empathy-roster-view.h
+++ b/libempathy-gtk/empathy-roster-view.h
@@ -5,7 +5,6 @@
#include <libempathy-gtk/egg-list-box/egg-list-box.h>
#include <libempathy-gtk/empathy-live-search.h>
-#include <libempathy/empathy-individual-manager.h>
#include <libempathy-gtk/empathy-roster-model.h>
G_BEGIN_DECLS
@@ -55,11 +54,7 @@ GType empathy_roster_view_get_type (void);
EMPATHY_TYPE_ROSTER_VIEW, \
EmpathyRosterViewClass))
-GtkWidget * empathy_roster_view_new (EmpathyIndividualManager *manager,
- EmpathyRosterModel *model);
-
-EmpathyIndividualManager * empathy_roster_view_get_manager (
- EmpathyRosterView *self);
+GtkWidget * empathy_roster_view_new (EmpathyRosterModel *model);
void empathy_roster_view_show_offline (EmpathyRosterView *self,
gboolean show);