ekiga r6381 - trunk/lib/engine/gui/gtk-frontend
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6381 - trunk/lib/engine/gui/gtk-frontend
- Date: Mon, 9 Jun 2008 13:02:59 +0000 (UTC)
Author: jpuydt
Date: Mon Jun 9 13:02:59 2008
New Revision: 6381
URL: http://svn.gnome.org/viewvc/ekiga?rev=6381&view=rev
Log:
Made group sizes visible in the roster view
Modified:
trunk/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
Modified: trunk/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
==============================================================================
--- trunk/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp (original)
+++ trunk/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp Mon Jun 9 13:02:59 2008
@@ -99,6 +99,7 @@
COLUMN_STATUS,
COLUMN_PRESENCE,
COLUMN_ACTIVE,
+ COLUMN_GROUP_SIZE,
COLUMN_NUMBER
};
@@ -106,7 +107,6 @@
* Callbacks
*/
-
/* DESCRIPTION : Called when the user right-clicks on a heap, group or
* presentity.
* BEHAVIOR : Update the menu and displays it as a popup.
@@ -290,6 +290,7 @@
/* Implementation of the callbacks */
+
static void
show_offline_contacts_changed_nt (G_GNUC_UNUSED gpointer id,
GmConfEntry *entry,
@@ -816,6 +817,7 @@
gboolean go_on = FALSE;
gchar *name = NULL;
+ gchar *size = NULL;
model = GTK_TREE_MODEL (view->priv->store);
@@ -827,6 +829,13 @@
// folded or unfolded
if (gtk_tree_model_iter_has_child (model, &iter)) {
+ size = g_strdup_printf ("%d", gtk_tree_model_iter_n_children (model,
+ &iter));
+ gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
+ COLUMN_GROUP_SIZE, size,
+ -1);
+ g_free (size);
+
gtk_tree_model_get (model, &iter,
COLUMN_NAME, &name, -1);
if (name) {
@@ -991,13 +1000,14 @@
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
self->priv->store = gtk_tree_store_new (COLUMN_NUMBER,
- G_TYPE_INT, // type
- G_TYPE_POINTER, // heap
- G_TYPE_POINTER, // presentity
- G_TYPE_STRING, // name
- G_TYPE_STRING, // status
- G_TYPE_STRING, // presence
- G_TYPE_STRING); // color if active
+ G_TYPE_INT, // type
+ G_TYPE_POINTER, // heap
+ G_TYPE_POINTER, // presentity
+ G_TYPE_STRING, // name
+ G_TYPE_STRING, // status
+ G_TYPE_STRING, // presence
+ G_TYPE_STRING, // color if active
+ G_TYPE_STRING); // group size
self->priv->tree_view =
GTK_TREE_VIEW (gtk_tree_view_new_with_model (GTK_TREE_MODEL (self->priv->store)));
@@ -1067,6 +1077,15 @@
gtk_tree_view_column_set_cell_data_func (col, renderer,
show_cell_data_func, GINT_TO_POINTER (TYPE_PRESENTITY), NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_column_set_spacing (col, 0);
+ gtk_tree_view_column_pack_start (col, renderer, TRUE);
+ gtk_tree_view_column_add_attribute (col, renderer, "text", COLUMN_GROUP_SIZE);
+ gtk_tree_view_column_set_alignment (col, 0.0);
+ gtk_tree_view_column_set_cell_data_func (col, renderer,
+ show_cell_data_func,
+ GINT_TO_POINTER (TYPE_GROUP), NULL);
+
/* Callback when the selection has been changed */
selection = gtk_tree_view_get_selection (self->priv->tree_view);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]